Switch commoncpp2 to ucommon to solve dependency conflicts.

libccrtp was depending on commoncpp2, and have been replaced by a version
depending on ucommon as well.
diff --git a/jni/libucommon/sources/AUTHORS b/jni/libucommon/sources/AUTHORS
new file mode 100644
index 0000000..e087ab0
--- /dev/null
+++ b/jni/libucommon/sources/AUTHORS
@@ -0,0 +1,8 @@
+Authors of GNU uCommon.
+
+David Sugar <dyfet@gnutelephony.org> designed and implemented commoncpp & ucommon
+Eric Schendel <esche@users.sourceforge.net> recent improvements on the serial
+I/O classes
+Angelo Naselli <anaselli at linux dot it> as contributor and for bug fixing
+Leandro Melo de Sales <leandroal@gmail.com> as contributor for DCCP socket support
+
diff --git a/jni/libucommon/sources/BUILDS b/jni/libucommon/sources/BUILDS
new file mode 100644
index 0000000..6dee942
--- /dev/null
+++ b/jni/libucommon/sources/BUILDS
@@ -0,0 +1,99 @@
+Generic & Embedded Targets:
+
+By default, UCommon compiles with full support of C++ and the C++ ansi 
+library.  For deeply embedded targets, the stdc++ library (libstdc++ for 
+gcc) can be disabled, along with exception handling and other C++ 
+features that may add to runtime overhead.  This is done using the 
+--disable-stdcpp configure option.  Any modern C++ compiler and posix 
+platform with basic pthread support should be able to build UCommon 
+successfully.
+
+Whether UCommon is compiled with or without c++ ansi library support, it 
+should still be possible to mix and match UCommon code with software 
+that is built with standard C++ runtimes.  However, note that when std 
+c++ is disabled, in addition to stripping out some library routines 
+which depend on the C++ ansi library, exception handling and rtti is 
+also disabled for the ucommon library.
+
+When using only static linking, the c++ ansi libraries are also disabled 
+by default.  This is to prevent bloat from static linkage of the ansi 
+C++ library and static linkage is most common on embedded targets.  The 
+--enable-stdcpp option can be used to re-enable the full ansi c++ 
+library.
+
+Project Indiana/OpenSolaris specific notes:
+
+You need to install SUNWhea or configure will fail on the preprocessor.  
+You can use the Sun Studio 12 compiler as well as gcc.  When building 
+without Sun std c++ support (--disable-stdcpp), -lCrun is added alone 
+without -lCstd.
+
+To make autogen.sh work (or svn checkout) requires a bunch of packages 
+and setting the AUTOMAKE_SUFFIX="-1.10".  You need 
+SUNWgnome-common-devel, SUNWgm4, SUNWgmake, SUNWaconf, 
+SUNWautomake-1.10, and SUNWlibtool.
+
+Microsoft Windows & MingW32 specific notes:
+
+For Microsoft Windows targets, we primarily focus on using debian hosted 
+mingw32 cross-builds.  Since libstdc++ is statically linked, we use the 
+c model and build the ucommon subset by default, as otherwise software 
+that uses plugins would be hugely bloated.  Full libstdc++ support can 
+always be re-enabled explicitly using --enable-stdcpp.
+
+It should be possible to build ucommon using Microsoft native compilers, and if
+people wish to submit patches for code changes based on using native Microsoft
+compilers, they will be accepted so long as they do not break other build
+environments.  Native Microsoft Visual studio files may be generated using
+cmake.  We do not recommend the use of proprietary compilers on proprietary
+operating systems, and we will continue to work to make the debian hosted mingw
+build environment as effective for building our packages as we can.
+
+Support for older GCC (<3.x):
+
+UCommon, like GNU Common C++, is meant to compile anywhere a C++ 
+compiler exists.  However, there are specific limitations in gcc < 3, 
+particularly in relation to namespace support.  For this reason, we 
+disable libstdc++ support by default, although again it can be enabled 
+using --enable-stdcpp.
+
+QNX (Neutrino) Hosts & Targets:
+
+QNX distributes and uses both gcc 2.95.3 and 3.3.1, but the latter is 
+only with the latest 6.3.x series release.  The userland build tools are 
+old and broken for svn checkout to automake build, including libtool 
+1.4.x.  Nontheless we are able to support direct hosting and builds of 
+ucommon on QNX.  Those using tarballs from official distributions should 
+not have these problems.
+
+Since gcc 2.95 is the default, the default builds without stdc++.  Even 
+worse, if you enable libstdc++ (--enable-stdcpp), the resulting 
+executables will compile and link, but will fail at runtime with symbol 
+link errors.  However, executables built and linked with ucommon with 
+stdcpp disabled do link and run fine (and the "make check" tests will 
+pass).  Strange.
+
+Minix and other non-pthread posix targets:
+
+Starting with 1.8.1, uCommon will optionally build with GNU pth.  This 
+can be used to establish uCommon C++ threaded design architecture on 
+platforms which do not natively support true threading, such as Minix.  
+On platforms that attempt to simulate threading with user mode non 
+pre-emptive threading, it is recommended to use uCommon with GNU pth 
+even if there is a local library that simulates pthread functionality.  
+The reason is that uCommon also wraps and schedules I/O operations 
+through the pth I/O functions.
+
+Recent Platforms and Versions Tested:
+
+GNU/Linux gcc		6.0.0	x86, x86_64, arm, mipsel
+GNU/Linux clang		6.0.0	x86_64
+OpenBSD4		6.0.0	i386
+NetBSD5			4.0.0	i386		
+OpenSolaris sunwpro	6.0.0	x86_64	    (double) conv of DateTime fails,
+						applog.cpp std::map failure
+OS/X			6.0.0	ppc, x86	
+QNX (gcc 2.95)		1.8.1	i386
+MingW/cross		6.0.0	i386, x86   ipv6 broken in wine unit tests
+Cygwin			1.8.0	i386
+
diff --git a/jni/libucommon/sources/CMakeLists.txt b/jni/libucommon/sources/CMakeLists.txt
new file mode 100644
index 0000000..43610f4
--- /dev/null
+++ b/jni/libucommon/sources/CMakeLists.txt
@@ -0,0 +1,593 @@
+# Copyright (C) 2009 David Sugar, Tycho Softworks
+#
+# This file is free software; as a special exception the author 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.
+#
+# This is a simplified build system for GNU uCommon.  In particular, it
+# offers limited cmodel linkage support, at least for mingw32 support (and
+# probably visual c 6 also).  If one really needs to do such things outside
+# these use cases, it is suggested to continue using the existing autotools
+# configure script driven build environment instead.  Mostly the cmake one is
+# meant for generating project files for those working with IDE's to do
+# otherwise generic builds of the library and supporting applications.
+
+cmake_minimum_required(VERSION 2.6)
+PROJECT(ucommon)
+set (VERSION 6.0.7)
+
+set(RC_VERSION ${VERSION})
+STRING(REGEX REPLACE "[.]" "," RC_VERSION ${RC_VERSION})
+set(RC_VERSION "${RC_VERSION},0")
+
+set(SOVERSION ${VERSION})
+STRING(REGEX REPLACE "[.].*$" "" SOVERSION ${SOVERSION})
+
+# when we override default install prefix, assume full path is used...
+
+set(INSTALL_INCLUDEDIR include)
+set(INSTALL_BINDIR bin)
+
+if(WIN32)
+    set(INSTALL_MANDIR man)
+    set(INSTALL_DOCDIR doc/${PROJECT_NAME})
+    set(INSTALL_LOCALE locale)
+    set(INSTALL_LIBDIR bin)
+    set(INSTALL_SBINDIR bin)
+    set(INSTALL_INFODIR info)
+    set(SYSCONFDIR "etc" CACHE PATH "config directory")
+    set(STATEDIR "var" CACHE PATH "state directory")
+else()
+    if (NOT LIB_SUFFIX)
+        if (NOT EXISTS /etc/debian_version)
+            if (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
+                set(LIB_SUFFIX 64)
+            endif()
+        endif()
+    endif()
+    set(INSTALL_SBINDIR sbin)
+    set(INSTALL_MANDIR share/man)
+    set(INSTALL_LOCALE share/locale)
+    set(INSTALL_DOCDIR share/doc/${PROJECT_NAME})
+    set(INSTALL_INFODIR share/info)
+    set(INSTALL_LIBDIR lib${LIB_SUFFIX})
+    set(SYSCONFDIR "/etc" CACHE PATH "config directory")
+    set(STATEDIR "/var" CACHE PATH "state directory")
+endif()
+
+set(UCOMMON_LOCALE ${CMAKE_INSTALL_PREFIX}/${INSTALL_LOCALE})
+set(UCOMMON_PREFIX ${CMAKE_INSTALL_PREFIX})
+
+set(UCOMMON_CFGPATH ${SYSCONFDIR})
+set(UCOMMON_VARPATH ${STATEDIR})
+
+# project options
+
+if(MSVC60)
+    set(BUILD_STATIC ON CACHE BOOL "static linking only" FORCE)
+    set(BUILD_STDLIB OFF CACHE BOOL "disable C++ stdlib" FORCE)
+    set(POSIX_TIMERS OFF CACHE BOOL "does not use posix timers" FORCE)
+    set(GCC_ATOMICS OFF CACHE BOOL "does not use gcc atomics" FORCE)
+    MARK_AS_ADVANCED(FORCE BUILD_STDLIB BUILD_STATIC POSIX_TIMERS GCC_ATOMICS)
+elseif(WIN32)
+        option(BUILD_RUNTIME "Set to OFF to build static runtime" ON)
+        if(BUILD_RUNTIME)
+            set(BUILD_RUNTIME_TYPE SHARED)
+        endif()
+    option(BUILD_STATIC "Set to OFF to build shared libraries" ON)
+    option(BUILD_STDLIB "Set to OFF to disable C++ stdlib" ON)
+    set(POSIX_TIMERS OFF CACHE BOOL "does not use posix timers" FORCE)
+    set(GCC_ATOMICS OFF CACHE BOOL "does not use gcc atomics" FORCE)
+else()
+    option(BUILD_STATIC "Set to ON to build static libraries" OFF)
+    option(BUILD_STDLIB "Set to OFF to disable C++ stdlib" ON)
+    option(POSIX_TIMERS "Set to ON to enable" OFF)
+    option(GCC_ATOMICS "Set to ON to enable" OFF)
+endif()
+
+MARK_AS_ADVANCED(POSIX_TIMERS GCC_ATOMICS)
+
+option(BUILD_TESTING "Set to ON to build test programs" OFF)
+
+MESSAGE( STATUS "Configuring GNU ${PROJECT_NAME} ${VERSION}...")
+include(CheckFunctionExists)
+include(CheckLibraryExists)
+include(CheckIncludeFiles)
+include(CTest)
+
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_NAME} library")
+SET(CPACK_PACKAGE_VENDOR              "David Sugar")
+SET(CPACK_PACKAGE_DESCRIPTION_FILE    "${CMAKE_CURRENT_SOURCE_DIR}/README")
+SET(CPACK_RESOURCE_FILE_LICENSE       "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
+set(PACKAGE_FILE_NAME                 ${PROJECT_NAME})
+set(PACKAGE_FILE_VERSION              ${VERSION})
+
+IF (WIN32)
+    SET(CPACK_PACKAGE_FILE_NAME "${PACKAGE_FILE_NAME}-${PACKAGE_FILE_VERSION}")
+ELSE (WIN32)
+    SET(CPACK_PACKAGE_FILE_NAME "${PACKAGE_FILE_NAME}-bin-${PACKAGE_FILE_VERSION}")
+    if (NOT CPACK_GENERATOR)
+        SET(CPACK_GENERATOR "TBZ2")
+    endif()
+ENDIF (WIN32)
+
+IF(WIN32 AND NOT UNIX)
+    SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_FILE_NAME}")
+
+    # There is a bug in NSI that does not handle full unix paths properly. Make
+    # sure there is at least one set of four (4) backlasshes.
+    # SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp")
+    # SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\MyExecutable.exe")
+    SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}$")
+    SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.gnutelephony.org")
+    SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.gnutelephony.org")
+    SET(CPACK_NSIS_CONTACT "dyfet@gnutelephony.org")
+    SET(CPACK_NSIS_MODIFY_PATH ON)
+
+ENDIF(WIN32 AND NOT UNIX)
+
+set(CPACK_COMPONENTS_ALL libraries headers)
+set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
+set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME   "C++ Headers")
+set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION  "Dynamic library")
+set(CPACK_COMPONENT_HEADERS_DESCRIPTION
+    "Header files needed to build applications using ucommon library")
+
+# The following components are regex's to match anywhere (unless anchored)
+# in absolute path + filename to find files or directories to be excluded
+# from source tarball.
+SET (CPACK_SOURCE_IGNORE_FILES
+#svn, git files
+"\\\\.svn/" "\\\\.cvsignore$" "/\\\\.git/"
+# temporary files
+"\\\\.swp$"
+# backup files
+"~$"
+# eclipse, kdevelop and othe IDE files
+"\\\\.cdtproject$" "\\\\.cproject$" "\\\\.project$" "\\\\.settings/" "\\\\.kdev4/" "\\\\.kdev4$"
+# others
+"\\\\.#" "/#"
+# don't copy build and other dirs used for building
+"/build/" "/autom4te\\\\.cache/" "/_build/"
+# used before
+"/CVS/" "/\\\\.libs/" "/\\\\.deps/" "\\\\.o$" "\\\\.lo$" "\\\\.la$" "\\\\.sh$" "Makefile\\\\.in$")
+
+SET(CPACK_SOURCE_GENERATOR "TBZ2")
+SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${PACKAGE_FILE_NAME}-${PACKAGE_FILE_VERSION}")
+
+# This must always be last!
+INCLUDE(CPack)
+
+# set to true for debug and trace during CMakeLists development
+set(CMAKE_VERBOSE_MAKEFILE FALSE)
+
+# add module path of project if it exists...
+if (EXISTS "${CMAKE_SOURCE_DIR}/inc/")
+    set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/inc/")
+endif()
+
+include (inc/ucommon.cmake)
+
+find_package(Threads)
+if (CMAKE_HAVE_PTHREAD_H)
+    set(HAVE_PTHREAD_H TRUE)
+endif()
+set (UCOMMON_LIBS ${UCOMMON_LIBS} ${CMAKE_THREAD_LIBS_INIT} ${WITH_LDFLAGS})
+
+if (MINGW OR MSYS)
+    set (UCOMMON_LIBS ${UCOMMON_LIBS} mingwex mingw32)
+else()
+    if (WIN32 AND CMAKE_COMPILER_IS_GNUCXX)
+        set (UCOMMON_LIBS ${UCOMMON_LIBS} mingwex mingw32)
+    endif()
+endif()
+
+if (WIN32 OR MINGW OR MSYS OR CMAKE_SYSTEM MATCHES "Windows")
+    set (UCOMMON_LIBS ${UCOMMON_LIBS} crypt32 advapi32 user32 ws2_32 wsock32 kernel32)
+endif()
+
+if(UNIX AND NOT BUILD_STDLIB)
+    set(UCOMMON_LIBS ${UCOMMON_LIBS} c)
+endif()
+
+if(MSYS OR MINGW)
+    set(UCOMMON_LIBS ${UCOMMON_LIBS} msvcrt)
+endif()
+
+if(CMAKE_COMPILER_IS_GNUCXX AND NOT BUILD_STDLIB)
+    check_library_exists(gcc __modsi3 "" HAVE_GCC_LIB)
+    if(HAVE_GCC_LIB)
+            set(UCOMMON_LIBS ${UCOMMON_LIBS} gcc)
+    endif()
+endif()
+
+
+if(UNIX OR MSYS OR MINGW OR CYGWIN)
+    check_library_exists(dl dlopen "" HAVE_DL_LIB)
+    if (HAVE_DL_LIB)
+        set (UCOMMON_LIBS ${UCOMMON_LIBS} dl)
+    else()
+        check_library_exists(compat dlopen "" HAVE_COMPAT_LIB)
+        if(HAVE_COMPAT_LIB)
+            set (UCOMMON_LIBS ${UCOMMON_LIBS} compat)
+        endif()
+    endif()
+
+    check_library_exists(dld shl_load "" HAVE DLD_LIB)
+    if (HAVE_DLD_LIB)
+        set (UCOMMON_LIBS ${UCOMMON_LIBS} dld)
+    endif()
+
+    check_library_exists(socket socket "" HAVE_SOCKET_LIB)
+    if (HAVE_SOCKET_LIB)
+        set (UCOMMON_LIBS ${UCOMMON_LIBS} socket)
+    endif()
+
+    check_library_exists(posix4 sem_wait "" HAVE_POSIX4_LIB)
+    if (HAVE_POSIX4_LIB)
+        set(UCOMMON_LIBS ${UCOMMON_LIBS} posix4)
+    endif()
+
+    check_library_exists(rt clock_gettime "" HAVE_RT_LIB)
+    if (HAVE_RT_LIB)
+        set(UCOMMON_LIBS ${UCOMMON_LIBS} rt)
+    endif()
+endif()
+
+set (CMAKE_REQUIRED_LIBRARIES ${UCOMMON_LIBS})
+check_function_exists(getaddrinfo HAVE_GETADDRINFO)
+check_function_exists(socketpair HAVE_SOCKETPAIR)
+check_function_exists(inet_ntop HAVE_INET_NTOP)
+check_function_exists(gethostbyname2 HAVE_GETHOSTBYNAME2)
+check_function_exists(strcoll HAVE_STRCOLL)
+check_function_exists(stricmp HAVE_STRICMP)
+check_function_exists(stristr HAVE_STRISTR)
+check_function_exists(sysconf HAVE_SYSCONF)
+check_function_exists(posix_memalign HAVE_POSIX_MEMALIGN)
+check_function_exists(dlopen HAVE_DLOPEN)
+check_function_exists(shl_open HAVE_SHL_OPEN)
+check_function_exists(pthread_condattr_setclock HAVE_PTHREAD_CONDATTR_SETCLOCK)
+check_function_exists(pthread_setconcurrency HAVE_PTHREAD_SETCONCURRENCY)
+check_function_exists(pthread_yield HAVE_PTHREAD_YIELD)
+check_function_exists(pthread_yield_np HAVE_PTHREAD_YIELD_NP)
+check_function_exists(pthread_delay HAVE_PTHREAD_DELAY)
+check_function_exists(pthread_delay_np HAVE_PTHREAD_DELAY_NP)
+check_function_exists(pthread_setschedprio HAVE_PTHREAD_SETSCHEDPRIO)
+check_function_exists(ftok HAVE_FTOK)
+check_function_exists(shm_open HAVE_SHM_OPEN)
+check_function_exists(localtime_r HAVE_LOCALTIME_R)
+check_function_exists(gmtime_r HAVE_GMTIME_R)
+check_function_exists(strerror_r HAVE_STRERROR_R)
+check_function_exists(nanosleep HAVE_NANOSLEEP)
+check_function_exists(clock_nanosleep HAVE_CLOCK_NANOSLEEP)
+check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
+check_function_exists(posix_fadvise HAVE_POSIX_FADVISE)
+check_function_exists(ftruncate HAVE_FTRUNCATE)
+check_function_exists(pwrite HAVE_PWRITE)
+check_function_exists(setpgrp HAVE_SETPGRP)
+check_function_exists(setlocale HAVE_SETLOCALE)
+check_function_exists(gettext HAVE_GETTEXT)
+check_function_exists(execvp HAVE_EXECVP)
+check_function_exists(atexit HAVE_ATEXIT)
+check_function_exists(lstat HAVE_LSTAT)
+check_function_exists(realpath HAVE_REALPATH)
+check_function_exists(symlink HAVE_SYMLINK)
+check_function_exists(readlink HAVE_READLINK)
+check_function_exists(waitpid HAVE_WAITPID)
+check_function_exists(wait4 HAVE_WAIT4)
+
+check_include_files(sys/stat.h HAVE_SYS_STAT_H)
+check_include_files(strings.h HAVE_STRINGS_H)
+check_include_files(stdlib.h HAVE_STDLIB_H)
+check_include_files(string.h HAVE_STRING_H)
+check_include_files(memory.h HAVE_MEMORY_H)
+check_include_files(inttypes.h HAVE_INTTYPES_H)
+check_include_files(dlfcn.h HAVE_DLFCN_H)
+check_include_files(stdint.h HAVE_STDINT_H)
+check_include_files(poll.h HAVE_POLL_H)
+check_include_files(sys/mman.h HAVE_SYS_MMAN_H)
+check_include_files(sys/shm.h HAVE_SYS_SHM_H)
+check_include_files(sys/poll.h HAVE_SYS_POLL_H)
+check_include_files(sys/timeb.h HAVE_SYS_TIMEB_H)
+check_include_files(sys/types.h HAVE_SYS_TYPES_H)
+check_include_files(sys/wait.h HAVE_SYS_WAIT_H)
+check_include_files(endian.h HAVE_ENDIAN_H)
+check_include_files(sys/filio.h HAVE_SYS_FILIO_H)
+check_include_files(dirent.h HAVE_DIRENT_H)
+check_include_files(unistd.h HAVE_UNISTD_H)
+check_include_files(sys/resource.h HAVE_SYS_RESOURCE_H)
+check_include_files(wchar.h HAVE_WCHAR_H)
+check_include_files(mach/clock.h HAVE_MACH_CLOCK_H)
+check_include_files(mach-o/dyld.h HAVE_MACH_O_DYLD_H)
+check_include_files(linux/version.h HAVE_LINUX_VERSION_H)
+check_include_files(regex.h HAVE_REGEX_H)
+check_include_files(sys/inotify.h HAVE_SYS_INOTIFY_H)
+check_include_files(sys/event.h HAVE_SYS_EVENT_H)
+check_include_files(syslog.h HAVE_SYSLOG_H)
+check_include_files(openssl/ssl.h HAVE_OPENSSL)
+check_include_files(openssl/fips.h HAVE_OPENSSL_FIPS_H)
+check_include_files(libintl.h HAVE_LIBINTL_H)
+check_include_files(netinet/in.h HAVE_NETINET_IN_H)
+check_include_files(net/if.h HAVE_NET_IF_H)
+check_include_files(fcntl.h HAVE_FCNTL_H)
+check_include_files(termios.h HAVE_TERMIOS_H)
+check_include_files(termio.h HAVE_TERMIO_H)
+check_include_files(sys/param.h HAVE_SYS_PARAM_H)
+check_include_files(sys/file.h HAVE_SYS_FILE_H)
+check_include_files(sys/lockf.h HAVE_SYS_LOCKF_H)
+check_include_files(regex.h HAVE_REGEX_H)
+
+if(HAVE_REGEX_H)
+    check_library_exists(regex regfree "" HAVE_REGEX_LIB)
+    if(HAVE_REGEX_LIB OR MINGW OR MSYS)
+        set(UCOMMON_LIBS ${UCOMMON_LIBS} "regex")
+    endif()
+endif()
+
+set(UCOMMON_LIBS ${UCOMMON_LIBS} ${UCOMMON_LINKING})
+
+# for some reason, normal library searches always fail on broken windows
+if (WIN32 AND NOT UNIX AND NOT MINGW AND NOT MSYS)
+    set(HAVE_GETADDRINFO True)
+    set(HAVE_INET_NTOP True)
+endif()
+
+# we can mklink a build framework to top directory of a project...
+# this is done because we may have a project specific optimized build of
+# common libraries such as openssl...
+if(WIN32 AND EXISTS "${CMAKE_BINARY_DIR}/Frameworks/OpenSSL")
+    set(OPENSSL_FOUND TRUE)
+    if(EXISTS ${CMAKE_BINARY_DIR}/Frameworks/OpenSSL/inc32)
+        set(OPENSSL_INCLUDE_DIR ${CMAKE_BINARY_DIR}/Frameworks/OpenSSL/inc32)
+    else()
+        set(OPENSSL_INCLUDE_DIR ${CMAKE_BINARY_DIR}/Frameworks/OpenSSL/include)
+    endif()
+    if(NOT BUILD_STATIC AND EXISTS ${CMAKE_BINARY_DIR}/Frameworks/OpenSSL/out32dll)
+        set(OPENSSL_LIBRARIES ${CMAKE_BINARY_DIR}/Frameworks/OpenSSL/out32dll/ssleay32.lib ${CMAKE_BINARY_DIR}/Frameworks/OpenSSL/lib/libeay32.lib)
+    else()
+        set(OPENSSL_LIBRARIES ${CMAKE_BINARY_DIR}/Frameworks/OpenSSL/out32dll/ssleay32.lib ${CMAKE_BINARY_DIR}/Frameworks/OpenSSL/lib/libeay32.lib)
+    endif()
+endif()
+
+# alternate we use generic cmake openssl search...
+if(NOT HAVE_OPENSSL AND NOT OPENSSL_FOUND)
+    FIND_PACKAGE(OpenSSL)
+endif()
+
+# common build options can be passed to cmake using WITH_CFLAGS, WITH_LIBS,
+# and WITH_INCLUDES.
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/inc ${WITH_INCLUDES})
+add_definitions(${UCOMMON_FLAGS} ${WITH_CFLAGS})
+link_libraries(${WITH_LIBS})
+
+# by default we build static libs for windows, shared libs for unix.
+# we may also set this from a top level cmake or -DWITH_XX_LIBS
+
+if(BUILD_STATIC)
+    set(BUILD_LIBRARY_TYPE STATIC)
+else()
+    set(BUILD_LIBRARY_TYPE SHARED)
+endif()
+
+if(NOT BUILD_RUNTIME_TYPE)
+    set(BUILD_RUNTIME_TYPE ${BUILD_LIBRARY_TYPE})
+endif()
+
+file(GLOB common_src corelib/*.cpp)
+file(GLOB ucommon_inc inc/ucommon/*.h)
+file(GLOB commoncpp_src commoncpp/*.cpp)
+file(GLOB commoncpp_inc inc/commoncpp/*.h)
+file(GLOB ucommon_man utils/*.1)
+set(ucommon_man commoncpp-config.1 ucommon-config.1 ${ucommon_man})
+list(REMOVE_ITEM ucommon_inc inc/ucommon/secure.h)
+
+if(HAVE_OPENSSL)
+    set(secure_inc inc/ucommon/secure.h)
+    file(GLOB secure_src openssl/*.cpp openssl/*.h)
+    list(APPEND secure_src nossl/common.cpp)
+    if(MINGW)
+        set(SECURE_LIBS ssl crypto gdi32 z)
+    elseif(WIN32 AND NOT CYGWIN)
+        set(SECURE_LIBS ssleay32 libeay32 gdi32)
+    else()
+        set(SECURE_LIBS ssl crypto)
+    endif()
+elseif(OPENSSL_FOUND)
+    file(GLOB secure_src openssl/*.cpp openssl/*.h)
+    list(APPEND secure_src nossl/common.cpp)
+    include_directories(${OPENSSL_INCLUDE_DIR})
+    set(SECURE_LIBS ${OPENSSL_LIBRARIES})
+else()
+    file(GLOB secure_src nossl/*.cpp nossl/*.h)
+endif()
+
+if(NOT WIN32)
+    foreach(flag ${UCOMMON_FLAGS})
+        set(PACKAGE_FLAGS "${PACKAGE_FLAGS} ${flag}")
+    endforeach()
+    foreach(lib ${UCOMMON_LIBS})
+        STRING(REGEX REPLACE "^[-]l" "" slib ${lib})
+        set(PACKAGE_LIBS "${PACKAGE_LIBS} -l${slib}")
+    endforeach()
+    foreach(lib ${SECURE_LIBS})
+        STRING(REGEX REPLACE "^[-]l" "" slib ${lib})
+        set(ADDITIONAL_LIBS "${ADDITIONAL_LIBS} -l${slib}")
+    endforeach()
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc)
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config)
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}.spec.cmake ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.spec @ONLY)
+
+    if(BUILD_STDLIB)
+        configure_file(${CMAKE_CURRENT_SOURCE_DIR}/commoncpp.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/commoncpp.pc)
+        configure_file(${CMAKE_CURRENT_SOURCE_DIR}/commoncpp-config.cmake ${CMAKE_CURRENT_BINARY_DIR}/commoncpp-config)
+    endif()
+endif(NOT WIN32)
+
+configure_file(ucommon-config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/ucommon-config.h)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+add_library(ucommon ${BUILD_RUNTIME_TYPE} ${common_src} ${ucommon_inc})
+set_target_properties(ucommon PROPERTIES VERSION ${VERSION} SOVERSION ${SOVERSION})
+target_link_libraries(ucommon ${UCOMMON_LIBS} ${WITH_LIBS})
+
+add_library(usecure ${BUILD_LIBRARY_TYPE} ${secure_src} ${secure_inc})
+set_target_properties(usecure PROPERTIES VERSION ${VERSION} SOVERSION ${SOVERSION})
+target_link_libraries(usecure ucommon ${WITH_LIBS} ${SECURE_LIBS} ${UCOMMON_LIBS})
+add_dependencies(usecure ucommon)
+
+if(BUILD_STDLIB)
+    add_library(commoncpp ${BUILD_LIBRARY_TYPE} ${commoncpp_src} ${commoncpp_inc})
+    set_target_properties(commoncpp PROPERTIES VERSION ${VERSION} SOVERSION ${SOVERSION})
+    target_link_libraries(commoncpp ucommon ${UCOMMON_LIBS} ${WITH_LIBS} ${SECURE_LIBS})
+    add_dependencies(commoncpp ucommon)
+endif()
+
+add_executable(ucommon-args utils/args.cpp)
+add_dependencies(ucommon-args ucommon)
+set_target_properties(ucommon-args PROPERTIES OUTPUT_NAME args)
+target_link_libraries(ucommon-args ucommon ${UCOMMON_LIBS} ${WITH_LIBS})
+
+add_executable(usecure-car utils/car.cpp)
+add_dependencies(usecure-car usecure ucommon)
+set_target_properties(usecure-car PROPERTIES OUTPUT_NAME car)
+target_link_libraries(usecure-car usecure ucommon ${SECURE_LIBS} ${UCOMMON_LIBS} ${WITH_LIBS})
+
+add_executable(ucommon-pdetach utils/pdetach.cpp)
+add_dependencies(ucommon-pdetach ucommon)
+set_target_properties(ucommon-pdetach PROPERTIES OUTPUT_NAME pdetach)
+target_link_libraries(ucommon-pdetach ucommon ${UCOMMON_LIBS} ${WITH_LIBS})
+
+add_executable(ucommon-sockaddr utils/sockaddr.cpp)
+add_dependencies(ucommon-sockaddr ucommon)
+set_target_properties(ucommon-sockaddr PROPERTIES OUTPUT_NAME sockaddr)
+target_link_libraries(ucommon-sockaddr ucommon ${UCOMMON_LIBS} ${WITH_LIBS})
+
+add_executable(usecure-scrub utils/scrub.cpp)
+add_dependencies(usecure-scrub usecure ucommon)
+set_target_properties(usecure-scrub PROPERTIES OUTPUT_NAME scrub-files)
+target_link_libraries(usecure-scrub usecure ucommon ${SECURE_LIBS} ${UCOMMON_LIBS} ${WITH_LIBS})
+
+add_executable(usecure-mdsum utils/mdsum.cpp)
+add_dependencies(usecure-mdsum usecure ucommon)
+set_target_properties(usecure-mdsum PROPERTIES OUTPUT_NAME mdsum)
+target_link_libraries(usecure-mdsum usecure ucommon ${SECURE_LIBS} ${UCOMMON_LIBS} ${WITH_LIBS})
+
+add_executable(usecure-zerofill utils/zerofill.cpp)
+add_dependencies(usecure-zerofill usecure ucommon)
+set_target_properties(usecure-zerofill PROPERTIES OUTPUT_NAME zerofill)
+target_link_libraries(usecure-zerofill usecure ucommon ${SECURE_LIBS} ${UCOMMON_LIBS} ${WITH_LIBS})
+
+find_package(Doxygen)
+
+if (DOXYGEN_FOUND)
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.cmake
+        ${CMAKE_CURRENT_BINARY_DIR}/doxy.config
+        @ONLY )
+
+    seT(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
+
+    #add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${DOXY_CONFIG})
+    add_custom_target(doc
+                    ${DOXYGEN_EXECUTABLE} ${DOXY_CONFIG}
+                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+                    COMMENT "Generating API documentation with Doxygen" VERBATIM
+                   )
+
+    #
+    # TODO an: taken from internet, to be tested
+    #
+    # create a windows help .chm file using hhc.exe
+    # HTMLHelp DLL must be in path!
+    # fallback: use hhw.exe interactively
+    IF    (WIN32)
+        FIND_PACKAGE(HTMLHelp)
+        IF   (HTML_HELP_COMPILER)
+            SET (TMP "${CMAKE_CURRENT_BINARY_DIR}\\Doc\\html\\index.hhp")
+            STRING(REGEX REPLACE "[/]" "\\\\" HHP_FILE ${TMP} )
+            # MESSAGE(SEND_ERROR "DBG  HHP_FILE=${HHP_FILE}")
+            ADD_CUSTOM_TARGET(winhelp ${HTML_HELP_COMPILER} ${HHP_FILE})
+            ADD_DEPENDENCIES (winhelp doc)
+
+            IF (NOT TARGET_DOC_SKIP_INSTALL)
+                # install windows help?
+                # determine useful name for output file
+                # should be project and version unique to allow installing
+                # multiple projects into one global directory
+                IF   (EXISTS "${PROJECT_BINARY_DIR}/Doc/html/index.chm")
+                    IF   (PROJECT_NAME)
+                        SET(OUT "${PROJECT_NAME}")
+                    ELSE (PROJECT_NAME)
+                        SET(OUT "Documentation") # default
+                    ENDIF(PROJECT_NAME)
+                    IF   (${PROJECT_NAME}_VERSION_MAJOR)
+                        SET(OUT "${OUT}-${${PROJECT_NAME}_VERSION_MAJOR}")
+                        IF   (${PROJECT_NAME}_VERSION_MINOR)
+                            SET(OUT  "${OUT}.${${PROJECT_NAME}_VERSION_MINOR}")
+                            IF   (${PROJECT_NAME}_VERSION_PATCH)
+                                SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_PATCH}")
+                            ENDIF(${PROJECT_NAME}_VERSION_PATCH)
+                        ENDIF(${PROJECT_NAME}_VERSION_MINOR)
+                    ENDIF(${PROJECT_NAME}_VERSION_MAJOR)
+                    # keep suffix
+                    SET(OUT  "${OUT}.chm")
+
+                    #MESSAGE("DBG ${PROJECT_BINARY_DIR}/Doc/html/index.chm \n${OUT}")
+                    # create target used by install and package commands
+                    INSTALL(FILES "${PROJECT_BINARY_DIR}/Doc/html/index.chm"
+                        DESTINATION ${INSTALL_DOCDIR} RENAME "${OUT}")
+                ENDIF(EXISTS "${PROJECT_BINARY_DIR}/Doc/html/index.chm")
+            ENDIF(NOT TARGET_DOC_SKIP_INSTALL)
+
+        ENDIF(HTML_HELP_COMPILER)
+        # MESSAGE(SEND_ERROR "HTML_HELP_COMPILER=${HTML_HELP_COMPILER}")
+    ENDIF (WIN32)
+ENDIF(DOXYGEN_FOUND)
+
+
+message (STATUS)
+message (STATUS "-------------------------------------------------------------------------------")
+message (STATUS "CMAKE_INSTALL_PREFIX " ${CMAKE_INSTALL_PREFIX} )
+message (STATUS "LIB_SUFFIX           " ${LIB_SUFFIX})
+message (STATUS "BUILD_STATIC         " ${BUILD_STATIC})
+message (STATUS "BUILD STDLIB         " ${BUILD_STDLIB})
+message (STATUS "BUILD_TESTING        " ${BUILD_TESTING})
+message (STATUS "-------------------------------------------------------------------------------")
+message (STATUS)
+message (STATUS "Change a value with: cmake -D<Variable>=<Value>")
+message (STATUS)
+
+if (BUILD_TESTING)
+    ENABLE_TESTING()
+    add_subdirectory(test)
+endif()
+
+if(NOT WIN32)
+    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${INSTALL_LIBDIR}/pkgconfig)
+    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ucommon-config DESTINATION ${INSTALL_BINDIR})
+    if(BUILD_STDLIB)
+        install(FILES ${CMAKE_CURRENT_BINARY_DIR}/commoncpp-config DESTINATION ${INSTALL_BINDIR})
+        install(FILES ${CMAKE_CURRENT_BINARY_DIR}/commoncpp.pc DESTINATION ${INSTALL_LIBDIR}/pkgconfig)
+    endif()
+endif(NOT WIN32)
+
+install(FILES ${ucommon_inc} ${secure_inc} DESTINATION ${INSTALL_INCLUDEDIR}/ucommon    COMPONENT headers)
+install(FILES ${commoncpp_inc} DESTINATION ${INSTALL_INCLUDEDIR}/commoncpp  COMPONENT headers)
+
+if(BUILD_STDLIB)
+    install(TARGETS commoncpp DESTINATION ${INSTALL_LIBDIR} COMPONENT libraries)
+endif()
+
+install(TARGETS ucommon usecure DESTINATION ${INSTALL_LIBDIR} COMPONENT libraries)
+install(TARGETS ucommon-args ucommon-pdetach usecure-car usecure-scrub usecure-mdsum ucommon-sockaddr usecure-zerofill DESTINATION ${INSTALL_BINDIR})
+install(FILES ${ucommon_man} DESTINATION ${INSTALL_MANDIR}/man1)
+
+if(CMAKE_GENERATOR MATCHES "Unix Makefiles")
+    add_custom_target(uninstall
+        WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+        COMMAND xargs <install_manifest.txt
+    )
+endif()
diff --git a/jni/libucommon/sources/COPYING b/jni/libucommon/sources/COPYING
new file mode 100644
index 0000000..4432540
--- /dev/null
+++ b/jni/libucommon/sources/COPYING
@@ -0,0 +1,676 @@
+
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+ 
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+  
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public 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.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+
diff --git a/jni/libucommon/sources/COPYING.LESSER b/jni/libucommon/sources/COPYING.LESSER
new file mode 100644
index 0000000..fc8a5de
--- /dev/null
+++ b/jni/libucommon/sources/COPYING.LESSER
@@ -0,0 +1,165 @@
+		   GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+  This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+  0. Additional Definitions. 
+
+  As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+  "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+  An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+  A "Combined Work" is a work produced by combining or linking an
+Application with the Library.  The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+  The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+  The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+  1. Exception to Section 3 of the GNU GPL.
+
+  You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+  2. Conveying Modified Versions.
+
+  If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+   a) under this License, provided that you make a good faith effort to
+   ensure that, in the event an Application does not supply the
+   function or data, the facility still operates, and performs
+   whatever part of its purpose remains meaningful, or
+
+   b) under the GNU GPL, with none of the additional permissions of
+   this License applicable to that copy.
+
+  3. Object Code Incorporating Material from Library Header Files.
+
+  The object code form of an Application may incorporate material from
+a header file that is part of the Library.  You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+   a) Give prominent notice with each copy of the object code that the
+   Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the object code with a copy of the GNU GPL and this license
+   document.
+
+  4. Combined Works.
+
+  You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+   a) Give prominent notice with each copy of the Combined Work that
+   the Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the Combined Work with a copy of the GNU GPL and this license
+   document.
+
+   c) For a Combined Work that displays copyright notices during
+   execution, include the copyright notice for the Library among
+   these notices, as well as a reference directing the user to the
+   copies of the GNU GPL and this license document.
+
+   d) Do one of the following:
+
+       0) Convey the Minimal Corresponding Source under the terms of this
+       License, and the Corresponding Application Code in a form
+       suitable for, and under terms that permit, the user to
+       recombine or relink the Application with a modified version of
+       the Linked Version to produce a modified Combined Work, in the
+       manner specified by section 6 of the GNU GPL for conveying
+       Corresponding Source.
+
+       1) Use a suitable shared library mechanism for linking with the
+       Library.  A suitable mechanism is one that (a) uses at run time
+       a copy of the Library already present on the user's computer
+       system, and (b) will operate properly with a modified version
+       of the Library that is interface-compatible with the Linked
+       Version. 
+
+   e) Provide Installation Information, but only if you would otherwise
+   be required to provide such information under section 6 of the
+   GNU GPL, and only to the extent that such information is
+   necessary to install and execute a modified version of the
+   Combined Work produced by recombining or relinking the
+   Application with a modified version of the Linked Version. (If
+   you use option 4d0, the Installation Information must accompany
+   the Minimal Corresponding Source and Corresponding Application
+   Code. If you use option 4d1, you must provide the Installation
+   Information in the manner specified by section 6 of the GNU GPL
+   for conveying Corresponding Source.)
+
+  5. Combined Libraries.
+
+  You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+   a) Accompany the combined library with a copy of the same work based
+   on the Library, uncombined with any other library facilities,
+   conveyed under the terms of this License.
+
+   b) Give prominent notice with the combined library that part of it
+   is a work based on the Library, and explaining where to find the
+   accompanying uncombined form of the same work.
+
+  6. Revised Versions of the GNU Lesser General Public License.
+
+  The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public 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.
+
+  Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+  If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
diff --git a/jni/libucommon/sources/COPYRIGHT b/jni/libucommon/sources/COPYRIGHT
new file mode 100644
index 0000000..a4d4548
--- /dev/null
+++ b/jni/libucommon/sources/COPYRIGHT
@@ -0,0 +1,17 @@
+This package is collectively known as GNU uCommon C++.
+
+This package is collectively licensed using the GNU Lesser General Public
+License version 3.0 or later.  The Common CPP subpackage is presently licensed
+using the GNU General Public License 2 or later with an explicit link exception
+that accomplishes the same thing.  To reduce complexity and any inconsistency,
+this will be updated to L-GPL 3.0 or later.
+
+The primary copyright holder is David Sugar and Tycho Softworks, both directly
+and through copyright assignment.
+
+Some specific individual classes in the library may have additional individual
+copyright holders or copyrighted by the Free Software Foundation. 
+
+Our preference is that all contributions are copyright assigned to the Free
+Software Foundation.
+
diff --git a/jni/libucommon/sources/ChangeLog b/jni/libucommon/sources/ChangeLog
new file mode 100644
index 0000000..62e391d
--- /dev/null
+++ b/jni/libucommon/sources/ChangeLog
@@ -0,0 +1,693 @@
+from ucommon 6.0.6 to 6.0.7
+- error state in fsys open fixed
+- fsys error reset inline added
+
+from ucommon 6.0.5 to 6.0.6
+- small cleanup of useless validator assignments
+- fix gnutls casting and warnings
+- modernized automake support
+
+from ucommon 6.0.4 to 6.0.5
+- additional constructors to pass pre-allocated memory
+
+from ucommon 6.0.3 to 6.0.4
+- fix for address list comparison issue
+
+from ucommon 6.0.2 to 6.0.3
+- fixes for older gnutls releases
+
+from ucommon 6.0.1 to 6.0.2
+- digest stream operators
+- auto memory erasing keystring and keyrandom template
+- common code shared for secure library
+- some fixes for gnutls support
+
+from ucommon 6.0.0 to 6.0.1
+- fixes for gnutls support
+- elimination of gcrypt in gnutls
+
+from ucommon 5.5.1 to 6.0.0
+- new version 6 api
+- fixed string + concat operation
+- made StringPager proper base class by naming conventions
+- new device access mode and name checking for fsys
+- fbuf refocused on process pipe and device access
+- more consistent abi naming conventions
+- depreciated methods removed
+- access base classes now consistent with protocols
+- reorg of datetime classes
+- allocation and access fault handling
+
+from ucommon 5.5.0 to 5.5.1
+- regex checks also for lib, mingw support
+- pedantic cleanup of mingw
+- anaselli fix for applog and pipes
+
+from ucommon 5.4.3 to 5.5.0
+- mapof and listof added
+- semaphore default for commoncpp set to 0
+- simplify config, no longer separate stdlib and compat
+- resolved issues with XOPEN_SOURCE and broken BSD headers 
+- many mingw 32 and 64 bit fixes, build fixes for out of source binary builds
+
+from ucommon 5.4.2 to 5.4.3
+- fixes for supporting ancient gcc compilers (at least >=2.96!)
+- bug in Conditional gettimeout, stack and queue suggested by Pollak
+
+from ucommon 5.4.1 to 5.4.2
+- fixes for older gcc builds and template issues.
+- bugfix for ConditionalAccess constructor.
+- bugfix for commoncpp address functions.
+
+from ucommon 5.4.0 to 5.4.1
+- fixes for windows build.
+
+from ucommon 5.3.0 to 5.4.0
+- cleanup for ide use.
+- NamedList sort uses system collation.
+- some convenience string methods added.
+- search and replace, regular expression support.
+- UString extended with copy/cut/paste/left/right operations.
+- stringpager extended with set/replace method and split.
+- added fsys::pipe and fsys::noexec.
+- removed unused pipeio subsystem.
+
+from ucommon 5.2.2 to 5.3.0
+- sort specific string collation functions added
+- more stringpager manipulations possible
+- use of stringlist_t for new fsys exec.
+- string inpuit and output for bufpager.
+
+from ucommon 5.2.1 to 5.2.2
+- use strcoll for sorting when possible
+- common c++ object linking, maps, and ref counted pointers added back
+- stringpager supports ordered add and sorting
+- directory pager and list type added
+- no -L or -I paths in default installs (multi-arch issue)
+
+from ucommon 5.2.0 to 5.2.1
+- fixed issue with static linking initialization order
+- shell release method
+
+from ucommon 5.1.2 to 5.2.0
+- improved shell::detach support and new pdetach utility
+- fsys generic basic file operations
+- commoncpp file and dso compatibility support added
+
+from ucommon 5.1.1 to 5.1.2
+- corrected copyright.  since cc libs were moved to bayonne and commoncpp
+  had been added, ALL of ucommon (including commoncpp2) are L-GPL, not just
+  the "core" library.
+- more standardized manpages
+
+from ucommon 5.1.0 to 5.1.1
+- better handling of strerror_r support.
+
+from ucommon 5.0.7 to 5.1.0
+- Pollak's suggestion for peek method for queue added to queue, stack, buffer,
+  and templates.
+- new stringpager class to hold simple expanding tables of strings.
+- commoncpp strerror_r fix from list.
+
+from ucommon 5.0.6 to 5.0.7
+- use debian move xopen forward patch
+- joinable thread self-join does cleanup of run state
+
+from ucommon 5.0.5 to 5.0.6
+- generic object save/auto-restore.
+- separation of shell::error() from shell::errexit(0,...)
+- separation of runtime and non-runtime libs
+- disable posix_fadvise if header definitions missing (debian kfreebsd bug)
+
+from ucommon 5.0.4 to 5.0.5
+- fix for commoncpp emulation when no direct parent commoncpp thread.
+- rename scrub to scrub files to avoid name conflict.
+- some enhacement in cmake
+
+from ucommon 5.0.3 to 5.0.4
+- set without explicit this in templates conflicts with std inherited classes.
+
+from ucommon 5.0.2 to 5.0.3
+- specialization to use linked_pointer<struct sockaddr> to walk address lists.
+- fix for cmake build of car.
+- sockaddr util added to show address resolution lists.
+
+from ucommon 5.0.1 to 5.0.2
+- fix for termios support.
+- shell getpass and inkey methods.
+- extended cipher key management methods.
+- crytographic archiver (car) added.
+- openssl fips support added.
+
+from ucommon 5.0.0 to 5.0.1
+- missing commoncpp/numbers.h header.
+
+from ucommon 4.3.3 to 5.0.0
+- thread objects fully inheritable.
+
+from ucommon 4.3.2 to 4.3.3
+- service control path added for dropfile info.
+- generics dup template added.
+
+from ucommon 4.3.1 to 4.3.2
+- cmake unit tests added and automated.
+- extensions to mapping, copy and mapped_view get.
+- certificate paths now part of usecure.
+- sorting and named list issues resolved.
+
+from ucommon 4.3.0 to 4.3.1
+- fix for access to keyfile::create().
+- new -xxx and +xxx numeric parser option.
+
+from ucommon 4.2.2 to 4.3.0
+- shell::path added.
+- fsys for descriptor.
+- keyfile extended.
+- symlink handling in fsys.
+
+from ucommon 4.2.1 to 4.2.2
+- reorg how we do cmake path configurations.
+
+from ucommon 4.2.0 to 4.2.1
+- proposed barrier dec from Leon.
+- added fsys::islink symlink check function.
+- keyfile::save method added, registry interfaces.
+
+from ucommon 4.1.7 to 4.2.0
+- some clarification of linked object abi.
+
+from ucommon 4.1.6 to 4.1.7
+- small fixes in cmake to add includes to projects, etc.
+
+from ucommon 4.1.5 to 4.1.6
+- fixed permission of shared memory, now world readable if not umasked.
+
+from ucommon 4.1.4 to 4.1.5
+- posix timers have become experimental since seems broken on some platforms
+
+from ucommon 4.1.3 to 4.1.4
+- revised cmake for unix builds, fixed cmake bug with non-stdlib
+
+from ucommon 4.1.2 to 4.1.3
+- new check for posix timing and monotomic clocking
+- thread unit test expanded to verify timed operations
+
+from ucommon 4.1.1 to 4.1.2
+- configuration clearification for posix timers
+- linkage fix for secure and sstream; no copy constructor
+
+from ucommon 4.1.0 to 4.1.1
+- rexlock try method and better thread inheritence
+- timer fix for dll linkage, again broken windows
+- thread specific storage
+- fixes for cmake builds with openssl and intl support
+- mingw32, windows header and openssl link issues
+
+from ucommon 4.0.5 to 4.1.0
+- security system logging.
+- cleanup of cmake.
+- clearer idea of what shell::errexit is.
+- cleanup of pointer templates, Object pointers now object_pointer, temporary
+  is now temporary object, new "generic" smart pointer to be added.
+- new containers.h to seperate use of contained resources from thread.h and
+  basic threading primitives.
+- linked_allocator template added for easy access to a free list managed
+  object pool.
+
+from ucommon 4.0.4 to 4.0.5
+- smarter openssl search.
+- simplified service handling.
+- exiting critical handler added.
+
+from ucommon 4.0.3 to 4.0.4
+- make it easier to subclass cipher key for special purposes.
+- component naming of binaries for combining ucommon with other subprojects.
+
+from ucommon 4.0.2 to 4.0.3
+- some changes in file stat macros.
+
+from ucommon 4.0.1 to 4.0.2
+- introduction of scrub utility for secure file deletion.
+- introduction of mdsub utility for computing file hashes.
+- shell::printf always flushes output for console.
+- Digest::reset now resets even for cleared contexts.
+
+from ucommon 4.0.0 to 4.0.1
+- fix for misnamed library in ucommon-config.
+
+from ucommon 3.4.0 to 4.0.0
+- introduction of protocols as abstract bases for mixin classes.
+- Socket class tracks last error and has iowait/blocking property.
+- Socket int methods return errno() rather than -1 on error.
+- buffer protocol created.
+- string no longer has dependency on socket.
+- ssl and tcp classes reorganized for consistent naming.
+- file handling in charfile through character protocol.
+- unicode conversions use character protocol.
+- templates updated so []'s always emit value references.
+
+from ucommon 3.3.7 to 3.4.0
+- simplified to better focus on core runtime mission.
+- packaging simplified.
+- ccscript moved to bayonne
+- ccaudio detached
+
+from ucommon 3.3.6 to 3.3.7
+- small change in how ucommon components can be pre-set.
+- missing local header for gnutls.
+
+from ucommon 3.3.5 to 3.3.6
+- grouping operator for usage help.
+- script merge operation by images.
+- doxygen generation now supported from cmake, from Angelo Naselli.
+
+from ucommon 3.3.4 to 3.3.5
+- make sure gettext is actually buildable before we build with it.
+
+from ucommon 3.3.3 to 3.3.4
+- broken sym lookup fixed.
+
+from ucommon 3.3.2 to 3.3.3
+- process detach and restart handling.
+- more complete string to numeric conversions.
+- syms were not initialized in all shell constructors.
+- some inline templates that contain generic values redone as typename.
+
+from ucommon 3.3.1 to 3.3.2
+- shell debug message logging output.
+- restart method to hook debuggers.
+- local thread-safe symbol space.
+
+from ucommon 3.3.0 to 3.3.1
+- expand args to directory and recursive operations.
+- fix cstring initialization.
+- set methods to initialize shell options.
+- basic logging added.
+
+from ucommon 3.2.2 to 3.3.0
+- internationalization bindings with gnu gettext support.
+- use shell parser in audiotool code.
+- small fixes in shell option parsing.
+
+from ucommon 3.2.1 to 3.2.2
+- xml parser for buffered i/o objects and files.
+- bidirectional socket descriptor to FILE.
+- OrderedIndex reset method.
+- numeric format conversion and scanning operator "%".
+
+from ucommon 3.2.0 to 3.2.1
+- splitting shell parser so that it is possible to create tool style parsers.
+- string hexpack and hexdump functions.
+- traditional, random, and digest uuid functions.
+- make sure we always ignore pthread/pth if msw targets (fedora mingw32).
+- barrier patch from Leon Pollak.
+
+from ucommon 3.1.2 to 3.2.0
+- added explicit add and remove for NamedObject to make keymap easier to use.
+- created new keypager type to allocate named objects on demand.
+- fixed option crash when not defining a long option.
+- improved shell header documentation.
+- shell spawn and process management functions.
+- shell io for buffered pipes and stdio handling.
+
+from ucommon 3.1.1 to 3.1.2
+- some attention to the question of padding cipher blocks.
+- gnutls can now also be used in place of openssl.
+- make sure all keys are destroyed cleanly when secure objects are released.
+
+from ucommon 3.1.0 to 3.1.1
+- some attention to the shell functions.
+
+from ucommon 3.0.6 to 3.1.0
+- encapuslate select() bit mask operations into select class.
+- new read/write based stream methods.
+- socket cannot be private in TCPSocket.
+- fixed doxygen generated docs, now much more complete.
+- introduced new secure library for ssl sockets, digests, ciphers, etc.
+
+from ucommon 3.0.5 to 3.0.6
+- optional socks proxy support possible with --enable-socks configure flag.
+- new Socket methods to wrap more socket functionality and new init method.
+
+from ucommon 3.0.4 to 3.0.5
+- new socket option for nodelay.
+- copyright notices fixed for consistency.
+- fix for conflict between stream and macros.
+
+from ucommon 3.0.3 to 3.0.4
+- buffer purge method added.
+- new flush io buffer virtual method.
+- buffering support and tcp socket for non-blocking i/o.
+
+from ucommon 3.0.2 to 3.0.3
+- new biderectional buffered i/o support added.
+- new buffered file and buffered tcp socket classes added.
+- bug in ReusableAllocator freelist assignment.
+- creation of connected sockets.
+- standardized host and service name resolution.
+
+from ucommon 3.0.1 to 3.0.2
+- atomic counter and lock class added.
+- shell no longer a second class member of ucommon.
+- unit tests conditional by component selection.
+- audio::init for static linkage issues.
+- fsys::trunc method added.
+- unicode utf8 file character operations.
+
+from ucommon 3.0.0 to 3.0.1
+- bug fix and unit test for queueof.
+- initialization template function added.
+- small cmake fixes.
+- refinement of stackof and queueof templates.
+
+From ucommon 2.1.4 to 3.0.0
+- merged ccscript and ccaudio into ucommon core framework.
+- extended configuration support for includes and plugins.
+- expanded configure for framework component selection.
+
+From ucommon 2.1.3 to 2.1.4
+- new utf8_pointer string class and further unicode support.
+- new component access api for datetime objects.
+- New object containers for object lists, fifo's, and queues.
+
+From ucommon 2.1.2 to 2.1.3
+- unicode string support and utf8 string processing.
+
+From ucommon 2.1.1 to 2.1.2
+- set() methods for date, time, and datetime added.
+- new defines for buffer sizes added.
+- new date and time related auto string classes.
+- fixups for netbsd and openbsd.
+
+From ucommon 2.1.0 to 2.1.1
+- fix for Time string conversion
+- size fields for date and time strings.
+
+From ucommon 2.0.8 to 2.1.0
+- new abi for fsys seek and drop
+- Added NamedTree/treemap copy constructor and changed id behavior
+- Improved cmake support using proper build options and adding cpack
+- Common use of "eq()" inlines for string and other data types
+- fix for lseek (also patched in 2.0.9)
+- all int fsys functions now return errno on failure, not -1
+- Common C++ number string manip classes
+- greater use of const in abi
+- datetime class support added
+- timer class expanded for operators
+- fix for generated docs
+
+From ucommon 2.0.7 to 2.0.8
+- support for optional cmake based build system being added
+
+From ucommon 2.0.6 to 2.0.7
+- strict aliasing, socket address manipulations, and gcc 4.4
+- doc generation cleanup
+
+From ucommon 2.0.5 to 2.0.6
+- spec file updated per redhat/fedora packaging policies
+- fixed install scripts handling
+- added man page for ucommon-config.
+
+From ucommon 2.0.4 to 2.0.5
+- small code cleanup.
+- added fsync to fsys as fsys::sync() method.
+- added missing destructors for queue and stack when no mempager is used.
+
+From ucommon 2.0.3 to 2.0.4
+- fixed bug in reusable object handoff to free list.
+- basic dccp socket support added.
+
+From ucommon 2.0.2 to 2.0.3
+- documented behavior and use case for ...Thread::exit() methods changed.
+
+From ucommon 2.0.1 to 2.0.2
+- fix for missing functions in mingw32 cross-builds.
+
+From ucommon 2.0.0 to 2.0.1
+- fix for failed dlopen detection in lc and false libcompat check for netbsd
+- general code cleanup with pedantic, some subtle header changes
+- fix for generic interface routing in ipv6 multicast operations
+- improved sunwpro support for --disable-stdcpp by using no%Cstd and CXX model
+
+From ucommon 1.9.9 to 2.0.0
+- fsys stream and random access modes with posix_fadvise support.
+- new fsys drop method to drop used pages in streaming applications.
+- license changes to lgplv3+
+- mempager/memalloc "zalloc" method  added.
+- keyfile based on memalloc, not mempager.
+
+From ucommon 1.9.8 to 1.9.9
+- critical fix for assignment template for auto pointers.
+
+From ucommon 1.9.7 to 1.9.8
+- new NamedTree listing methods for moving and re-ordering tree branches.
+- getIndexed methods for accessing a linked list by index.
+- some clarification of internet socket address types.
+- smart pointer can be initially assigned NULL...
+- new memalloc because I needed a mempager without mutexes...
+
+From ucommon 1.9.6 to 1.9.7
+- lots of code cleanup for final release candidate for 2.0.
+
+From ucommon 1.9.5 to 1.9.6
+- better address list management, including unique insert and remove.
+- copy constructor and address duplication for Socket::address.
+- fixup of reader/writer pool locking and addition of gaurd objects.
+- hopefully final core api for real 2.0 release!
+
+From ucommon 1.9.4 to 1.9.5
+- mutex::gaurd for scope mutex locking arbitrary objects.
+- read/write locking access control for arbitrary objects.
+- multi-distro spec file.
+- simplified abi numbering.
+
+From ucommon 1.9.3 to 1.9.4
+- string equality tests.
+- Socket isNull/isNumeric can parse inside a field...
+- container policies for cidr's
+- behavior of ID reset for named objects can now be overriden by virtual.
+- string format conversion base class for use in string classes and operators.
+
+From ucommon 1.9.2 to 1.9.3
+- fixed join/drop issue in multicast reported by Michael Freedman.
+- module loader error handling.
+
+From ucommon 1.9.1 to 1.9.2
+- added Socket::isNull and Socket::isNumeric checks.
+- added keyhost hash key indexing on host only.
+- fixed uninitialized getsockname len argument in gethint.
+- updated spec file.
+
+From ucommon 1.9.0 to 1.9.1
+- bug in string::token parsing fixed.
+- unit test to validate string::token fix.
+- keyfile/keydata classes added for generic config file parsing.
+- unit test added for keydata processing.
+
+From ucommon 1.8.2 to 1.9.0
+- pipestream interface normalized for shell execution.
+- new "shell" class for generic parsing and argument expansion.
+- v4mapped() added to enable/disable ipv4 to ipv6 mapping support.
+- fsys::isfile/isdir added.
+- some rework of timer events to better support updating in arm & disarm.
+
+From ucommon 1.8.1 to 1.8.2
+- doxygen updates.
+- fix related to libstdc++/ansi c++ library design defect.
+
+From ucommon 1.8.0 to 1.8.1
+- use entirely safe string operations everywhere.
+- keyassoc keydata constructor changed to pass size of string buffer.
+- basic optional GNU pth support completed.
+
+From ucommon 1.7.2 to 1.8.0
+- support for forced ipv4/ipv6 in init.  ipv6 unit testing.
+- new family method for query default.
+- further refinement of socket api.
+- ipv6 support for opensolaris and -lnsl.
+
+From ucommon 1.7.1 to 1.7.2
+- small fix in type mismatch in stream allocate methods.
+- do not remap undefined error codes, as can break switch blocks.
+- fix for mingw32 address conversion functions.
+
+From ucommon 1.7.0 to 1.7.1
+- extended errno mapping for sockets.
+
+From ucommon 1.6.2 to 1.7.0
+- updated abi for fsys, rebuilt to unify file handling and to use a common
+  type and functions for files, directory access, and loader.
+- simplified TimedEvent completion port handling and new static members.
+- refactored socket api around supporting use of native socket_t.  Minimal
+  api for abstract socket class used for protocol building.
+- refactored containers to use references in assignment to avoid stack frame
+  constructions.
+- added stream classes for fsys (threaded i/o) and piping.
+
+From ucommon 1.6.1 to 1.6.2
+- improved support for using Socket::address as referenced type.  New set &
+  add methods.
+
+From ucommon 1.6.0 to 1.6.1
+- fix for loader.
+- simplified fsys r/w calls.
+- fsys.h documented.
+
+From ucommon 1.5.0 to 1.6.0
+- some small cleanups for opensolaris builds.
+- additional is() and isnull() template operators, template swap.
+- automatic rules for default selection with/without ansi C++ library (see
+  BUILDS).
+- new fsys wrapper class for threaded portable i/o operations.
+- cmodel.sh support for broken libtool versions.
+- lots of tcpstream/socket bug fixes and new tcpstream unit test added.
+- changes in tcpstream abi to use address objects by reference.
+- dynamic loader support added.
+
+From ucommon 1.4.2 to 1.5.0
+- added gnu common c++ based tcp streaming class to ucommon.
+- added gnu common c++ based xml sax parser to ucommon with better support for
+  parsing embedded xml data structures.
+- Daniel Silverstone's persistence engine from gnu common c++ added.
+
+From ucommon 1.4.1 to 1.4.2
+- get address entry by family from list.
+- MultiMap/multimap multiply pathed lists/associated key objects.
+- remove complex automake rules; use new cmodel.sh to reset libtool when
+  building pure c mode link for c++ objects for deep embedding without
+  libstdc++.
+- changes to support QNX target builds.
+
+From ucommon 1.4.0 to 1.4.1
+- internalized getaddrinfo substituted on targets without addrinfo support.
+- small correction to socket::address::add to pass socket type.
+- cygwin support
+- fixups for Solaris support
+
+From ucommon 1.3.3 to 1.4.0
+- socket::address constructors reorganized
+- added mapped (shared memory) to ucommon library
+- improved mingw32 support
+- support for gcc < 3.0 (gcc 2.96, rhel-2.1 for example)
+- socket initialization for msw.
+
+From ucommon 1.3.2 to 1.3.3
+- initialization of socket hinting for BSD stack.
+- further clarify asserts.
+- fixes for NetBSD 4; clock_nanosleep and pthread_setconcurrency support.
+- fixes for gcc < 3.4 (such as openbsd...)
+- fixes for embedded linux kernel targets
+
+From ucommon 1.3.1 to 1.3.2
+- clarified assertions for argument preconditions for correctness.
+
+From ucommon 1.3.0 to 1.3.1
+- many testing asserts added to library for function argument preconditions.
+
+From ucommon 1.2.5 to 1.3.0
+- dynamic mutex resource locking, with new interface and supporting templates
+  to automate operation.  This allows one to create exclusive access regions
+  on demand without having to embed initialized mutexes in each instance of
+  an object that requires serialization protection.
+
+From ucommon 1.2.4 to 1.2.5
+- restore sharing level at ConditionalLock commit if recursive locked.
+
+From ucommon 1.2.3 to 1.2.4
+- default initialization of socket address list to NULL required.
+
+From ucommon 1.2.2 to 1.2.3
+- small change in use of sched.h for portability.
+- unitialized mempager and reorg treemap purge.
+
+From ucommon 1.2.1 to 1.2.2
+- typo in exclusive conditional lock.
+
+From ucommon 1.2.0 to 1.2.1
+- conditional modify access can be asserted during active recursive share.
+
+From ucommon 1.1.1 to 1.2.0
+- adding conditional policies, ConditionalLock::concurrency() and
+  ConditionalRW::sharing().
+- Recursive support in conditional locking.
+- SharedPointer derived from ConditionalRW and optimized.
+
+From ucommon 1.1.1 to 1.1.2
+- fix for OS/X.
+
+From ucommon 1.1.0 to 1.1.1
+- adjusted definition of priority scheduling and added realtime thread policies.
+
+From ucommon 1.0.0 to 1.1.0
+- fixed spec file to support uses_stdcpp definition.
+- fixed new operator when using stdcpp.
+- conditionalrw locking scheme integrated for scheduling optimization.
+
+From ucommon 0.9.2 to 1.0.0
+- use std::runtime_exception instead of abort when using c++ runtime library
+- crit macro allows std::runtime_exception processing for c++ runtime library
+- check for old and new style c++ stream i/o classes, added OLD_STDCPP
+- replaced NOSTDCPP with reversed & revised NEW_STDCPP flag unless OLD_STDCPP
+- classes documented and doxygenized.
+- expanded linked list support with head/tail and insert options.
+- barrier with timed wait.
+
+From ucommon 0.9.1 to 0.9.2
+- fix critical bug in Socket::equal tests...
+
+From ucommon 0.9.0 to 0.9.1
+- removed AutoObject
+- migrated thread functions to use pure win32 threading for mingw32; no
+  more redhat pthread-win32.  This became possible when we dropped
+  cancellable threads.
+- fixed cc mode library build because libtool still forces libstdc++!
+
+From ucommon 0.8.2 to 0.9.0
+- slight change to thread init for pthread-win32 static libs.
+- new steplock formed purely from staircase mutexes.
+- new event timer for timed completion event signalling.
+- removed cancellable thread concepts to simplify thread model!
+
+From ucommon 0.8.1 to 0.8.2
+- conditional lock protect for shared recursive/short lock use.
+
+From ucommon 0.8.0 to 0.8.1
+- fix for pthread without setschedprio.
+
+From ucommon 0.7.0 to 0.8.0
+- fix for timerqueue class.
+- potential writer starvation issues resolved in rwlock/condlock classes.
+- consolidated and improved Conditional timed waits.
+- introduction of transformable conditional locking.
+- access shared locking extended to cover transformable conditional locks.
+- default compile mode is now stdcpp; first step in gnu common c++ merge.
+
+From ucommon 0.6.1 to 0.7.0
+- added basic thread priority support
+- changed base configure options to avoid collisions with other packages
+- added getservice interface to get socket port #
+- added charbuf template
+- cidr policy chains simplified
+- some rationalization and improvement in socket class with the ability
+  to compare addresses, manipulate address lists, etc.
+- string finding with deliminators.
+- first pass at offering real documentation for the library via doxygen.
+
+From ucommon 0.6.0 to 0.6.1
+- support for static libpthreadGC2
+- support for w32 address conversion
+
+From ucommon 0.5.0 to 0.6.0
+- detached & pooled thread exit support fixed
+- equal test for socket address
+- getinterface to find interface to destination address
+- subnet test for socket address comparison
+- getaddress replaces hosttostr
+
+From ucommon 0.4.0 to 0.5.0
+- rwlock now also recursive writers
+- clarification of conditional locking
+- generic rexlock type replaces recursive mutex
+
+Initial Release 0.4.0
+
diff --git a/jni/libucommon/sources/Doxyfile b/jni/libucommon/sources/Doxyfile
new file mode 100644
index 0000000..1dce9fc
--- /dev/null
+++ b/jni/libucommon/sources/Doxyfile
@@ -0,0 +1,79 @@
+PROJECT_NAME    = "UCommon"
+OUTPUT_DIRECTORY = doc
+OUTPUT_LANGUAGE = English
+FULL_PATH_NAMES = YES
+STRIP_FROM_PATH = inc
+SHORT_NAMES = YES
+TAB_SIZE = 4
+INPUT = inc/ucommon/platform.h inc/ucommon
+EXAMPLE_PATH = test
+FILE_PATTERNS = *.h
+RECURSIVE = NO
+ALIASES = "license=\par License:\n"
+JAVADOC_AUTOBRIEF = YES
+OPTIMIZE_OUTPUT_FOR_C = YES
+OPTIMIZE_OUTPUT_JAVA = NO
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = NO
+EXTRACT_STATIC = NO
+HIDE_UNDOC_CLASSES = YES
+HIDE_UNDOC_MEMBERS = NO
+CASE_SENSE_NAMES = NO
+SHOW_INCLUDE_FILES = YES
+SORT_BY_SCOPE_NAME = YES
+SORT_GROUP_NAMES = YES
+SORT_BRIEF_DOCS = YES
+SORT_MEMBER_DOCS = YES
+SEARCH_INCLUDES = YES
+INCLUDE_PATH = inc /usr/include /usr/local/include
+GENERATE_TODOLIST = YES
+GENERATE_TESTLIST = YES
+GENERATE_BUGLIST = YES
+GENERATE_DEPRECATEDLIST = YES
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = YES
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
+ALPHABETICAL_INDEX = YES
+COLS_IN_ALPHA_INDEX = 5
+GENERATE_HTML = YES
+HTML_ALIGN_MEMBERS = YES
+GENERATE_HTMLHELP = YES
+GENERATE_TREEVIEW = YES
+TREEVIEW_WIDTH = 256
+GENERATE_LATEX = YES
+COMPACT_LATEX = YES
+PDF_HYPERLINKS = YES
+USE_PDFLATEX = NO
+LATEX_BATCHMODE = YES
+LATEX_HIDE_INDICES = NO
+GENERATE_RTF = YES
+COMPACT_RTF = YES
+RTF_HYPERLINKS = NO
+GENERATE_MAN = NO
+GENERATE_XML = NO
+GENERATE_PERLMOD = NO
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = YES
+EXPAND_ONLY_PREDEF = NO
+SEARCH_INCLUDES = YES
+PREDEFINED = AF_INET6 NEW_STDCPP
+CLASS_DIAGRAMS = YES
+COLLABORATION_GRAPH = YES
+HIDE_UNDOC_RELATIONS = NO
+HAVE_DOT = YES
+CLASS_GRAPH = YES
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+CALL_GRAPH = YES
+SOURCE_BROWSER = YES
+GRAPHICAL_HIERARCHY = YES
+DOT_IMAGE_FORMAT = png
+DOT_TRANSPARENT = YES
+# MAX_DOT_GRAPH_WIDTH = 1024
+# MAX_DOT_GRAPH_HEIGHT = 1024
+TEMPLATE_RELATIONS = NO
+GENERATE_LEGEND = YES
+SEARCHENGINE = NO
+WARN_IF_UNDOCUMENTED = NO
+
diff --git a/jni/libucommon/sources/INSTALL b/jni/libucommon/sources/INSTALL
new file mode 100644
index 0000000..007e939
--- /dev/null
+++ b/jni/libucommon/sources/INSTALL
@@ -0,0 +1,370 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
+Inc.
+
+   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
+more-detailed instructions are generic; see the `README' file for
+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
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+   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.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package, generally using the just-built uninstalled binaries.
+
+  4. Type `make install' to install the programs and any data files and
+     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
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+  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
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+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 `..'.  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
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+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', where PREFIX must be an
+absolute file name.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+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.  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'.
+
+   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
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+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
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./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
+to try
+
+     ./configure CC="cc"
+
+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
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     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
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+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 limitation.  Until the limitation is lifted, you can use
+this workaround:
+
+     CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
diff --git a/jni/libucommon/sources/Makefile b/jni/libucommon/sources/Makefile
new file mode 100644
index 0000000..c385068
--- /dev/null
+++ b/jni/libucommon/sources/Makefile
@@ -0,0 +1,1040 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2013 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.
+
+
+
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+
+
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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)/ucommon
+pkgincludedir = $(includedir)/ucommon
+pkglibdir = $(libdir)/ucommon
+pkglibexecdir = $(libexecdir)/ucommon
+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 = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+target_triplet = x86_64-unknown-linux-gnu
+subdir = .
+DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
+	$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/configure $(am__configure_deps) \
+	$(srcdir)/ucommon-config.h.in $(srcdir)/directive.in \
+	$(srcdir)/commoncpp.pc.in $(srcdir)/ucommon.pc.in \
+	$(srcdir)/ucommon.spec.in $(srcdir)/ucommon-config.in \
+	$(srcdir)/commoncpp-config.in COPYING COPYING.LESSER TODO \
+	autoconf/config.guess autoconf/config.sub autoconf/install-sh \
+	autoconf/missing autoconf/ltmain.sh \
+	$(top_srcdir)/autoconf/config.guess \
+	$(top_srcdir)/autoconf/config.sub \
+	$(top_srcdir)/autoconf/install-sh \
+	$(top_srcdir)/autoconf/ltmain.sh \
+	$(top_srcdir)/autoconf/missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = ucommon-config.h
+CONFIG_CLEAN_FILES = directive commoncpp.pc ucommon.pc ucommon.spec \
+	ucommon-config commoncpp-config
+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)$(scriptdir)" "$(DESTDIR)$(man1dir)" \
+	"$(DESTDIR)$(pkgconfigdir)"
+SCRIPTS = $(script_SCRIPTS)
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+am__v_at_1 = 
+depcomp =
+am__depfiles_maybe =
+SOURCES =
+DIST_SOURCES =
+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
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man_MANS)
+DATA = $(pkgconfig_DATA)
+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)ucommon-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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_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 $(distdir).shar.gz $(distdir).zip
+GZIP_ENV = --best
+DIST_TARGETS = dist-shar dist-gzip dist-zip
+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 = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing aclocal-1.13
+AMTAR = $${TAR-tar}
+AM_DEFAULT_VERBOSITY = 1
+AR = ar
+AS = as
+AUTOCONF = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoconf
+AUTOHEADER = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoheader
+AUTOMAKE = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing automake-1.13
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CHECKFLAGS = 
+COMPAT = commoncpp
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS =  -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DLLTOOL = dlltool
+DOXYGEN = /usr/bin/doxygen
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /usr/bin/grep -E
+EXEEXT = 
+FGREP = /usr/bin/grep -F
+GNUTLS_CFLAGS = 
+GNUTLS_LIBS = -lgnutls
+GREP = /usr/bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+LT_GENERIC = $(SHELL) $(top_builddir)/libtool
+LT_VERSION = 6:3:0
+MAKEINFO = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing makeinfo
+MANIFEST_TOOL = :
+MKDIR_P = /usr/bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_CFLAGS = 
+OPENSSL_LIBS = -lssl -lcrypto -lz 
+OTOOL = 
+OTOOL64 = 
+PACKAGE = ucommon
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = ucommon
+PACKAGE_STRING = ucommon 6.0.7
+PACKAGE_TARNAME = ucommon
+PACKAGE_URL = 
+PACKAGE_VERSION = 6.0.7
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PKG_CONFIG_LIBDIR = 
+PKG_CONFIG_PATH = 
+RANLIB = ranlib
+SECURE = gnutls
+SECURE_LIBS = -lgnutls
+SECURE_LOCAL = ../gnutls/libusecure.la -lgnutls
+SED = /usr/bin/sed
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = strip
+UCOMMON_CFGPATH = /etc
+UCOMMON_CLINK =  -lc
+UCOMMON_FLAGS =  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+UCOMMON_INCLUDES = /usr/local/include/ucommon
+UCOMMON_LIBC = -lc
+UCOMMON_LIBS =   -lrt  -ldl -lpthread -lc
+UCOMMON_LINKED =   -lrt  -ldl -lpthread
+UCOMMON_LOCALE = /usr/local/share/locale
+UCOMMON_MODEL = CXX
+UCOMMON_PREFIX = /usr/local
+UCOMMON_VARPATH = /var
+UCOMMON_VISIBILITY = 1
+VERSION = 6.0.7
+abs_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+abs_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+abs_top_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+abs_top_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+includes = ${includedir}/ucommon
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+libs = /usr/local/lib
+localedir = ${datarootdir}/locale
+localstatedir = /var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = /etc
+target = x86_64-unknown-linux-gnu
+target_alias = 
+target_cpu = x86_64
+target_os = linux-gnu
+target_vendor = unknown
+top_build_prefix = 
+top_builddir = .
+top_srcdir = .
+AUTOMAKE_OPTIONS = no-dependencies dist-zip
+EXTRA_DIST = autogen.sh README* *.pc.in *.spec.in *.spec *-config.in \
+    *-config.1 Doxyfile cmodel.sh BUILDS SUPPORT COPYING* COPYRIGHT \
+    CMakeLists.txt ucommon-config.cmake ucommon.pc.cmake \
+    commoncpp-config.cmake commoncpp.pc.cmake ucommon.spec.cmake \
+    ucommon-config.h.cmake doxy.config.cmake directive.in
+
+DIST_SUBDIRS = corelib commoncpp openssl gnutls nossl utils inc test
+SUBDIRS = corelib gnutls commoncpp utils inc test
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = ucommon.pc commoncpp.pc
+scriptdir = $(bindir)
+script_SCRIPTS = ucommon-config commoncpp-config
+man_MANS = ucommon-config.1 commoncpp-config.1
+all: ucommon-config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+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) --gnu'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+ucommon-config.h: stamp-h1
+	@if test ! -f $@; then rm -f stamp-h1; else :; fi
+	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+
+stamp-h1: $(srcdir)/ucommon-config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status ucommon-config.h
+$(srcdir)/ucommon-config.h.in:  $(am__configure_deps) 
+	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f ucommon-config.h stamp-h1
+directive: $(top_builddir)/config.status $(srcdir)/directive.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+commoncpp.pc: $(top_builddir)/config.status $(srcdir)/commoncpp.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+ucommon.pc: $(top_builddir)/config.status $(srcdir)/ucommon.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+ucommon.spec: $(top_builddir)/config.status $(srcdir)/ucommon.spec.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+ucommon-config: $(top_builddir)/config.status $(srcdir)/ucommon-config.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+commoncpp-config: $(top_builddir)/config.status $(srcdir)/commoncpp-config.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+install-scriptSCRIPTS: $(script_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	@list='$(script_SCRIPTS)'; test -n "$(scriptdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(scriptdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(scriptdir)" || 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)$(scriptdir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(scriptdir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-scriptSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(script_SCRIPTS)'; test -n "$(scriptdir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	dir='$(DESTDIR)$(scriptdir)'; $(am__uninstall_files_from_dir)
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool config.lt
+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)
+install-pkgconfigDATA: $(pkgconfig_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+	done
+
+uninstall-pkgconfigDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(pkgconfigdir)'; $(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.
+$(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//`; \
+	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; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(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"
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: 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; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+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) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+	test ! -s cscope.files \
+	  || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+	-rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-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)
+	$(am__remove_distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(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
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    $(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="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	$(MAKE) $(AM_MAKEFLAGS) \
+	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
+	  dist-hook
+	-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)"
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__post_remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+	$(am__post_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
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__post_remove_distdir)
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__post_remove_distdir)
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__post_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
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  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) gzip -dc $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir)
+	chmod u+w $(distdir)
+	mkdir $(distdir)/_build $(distdir)/_inst
+	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && 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:
+	@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)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(SCRIPTS) $(MANS) $(DATA) ucommon-config.h
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(scriptdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+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:
+
+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-recursive
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-man install-pkgconfigDATA \
+	install-scriptSCRIPTS
+
+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-man1
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-man uninstall-pkgconfigDATA \
+	uninstall-scriptSCRIPTS
+
+uninstall-man: uninstall-man1
+
+.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 clean-local cscope cscopelist-am ctags ctags-am \
+	dist dist-all dist-bzip2 dist-gzip dist-hook dist-lzip \
+	dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \
+	distclean-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-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-pkgconfigDATA install-ps \
+	install-ps-am install-scriptSCRIPTS 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-am uninstall \
+	uninstall-am uninstall-man uninstall-man1 \
+	uninstall-pkgconfigDATA uninstall-scriptSCRIPTS
+
+
+.phony:	doxy
+
+doxy:
+	-rm -rf doc
+	$(DOXYGEN) Doxyfile
+
+clean-local:
+	-rm -rf doc
+
+dist-hook:  cleandist
+
+cleandist:
+	@rm -f ${PACKAGE}-[0-9]*.tar.gz
+	@rm -f ${PACKAGE}-[0-9]*.tar.bz2
+	@rm -f ${PACKAGE}-[0-9]*.shar.gz
+	@rm -f ${PACKAGE}-[0-9]*.zip
+	@rm -f *${PACKAGE}*.rpm
+	@rm -f *${PACKAGE}*.deb
+	@rm -f ${PACKAGE}_*.gz
+	@rm -f ${PACKAGE}_*.dsc
+	@rm -f *.changes
+
+# 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/jni/libucommon/sources/Makefile.am b/jni/libucommon/sources/Makefile.am
new file mode 100644
index 0000000..7829845
--- /dev/null
+++ b/jni/libucommon/sources/Makefile.am
@@ -0,0 +1,50 @@
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+AUTOMAKE_OPTIONS = no-dependencies dist-zip
+EXTRA_DIST = autogen.sh README* *.pc.in *.spec.in *.spec *-config.in \
+    *-config.1 Doxyfile cmodel.sh BUILDS SUPPORT COPYING* COPYRIGHT \
+    CMakeLists.txt ucommon-config.cmake ucommon.pc.cmake \
+    commoncpp-config.cmake commoncpp.pc.cmake ucommon.spec.cmake \
+    ucommon-config.h.cmake doxy.config.cmake directive.in
+
+DIST_SUBDIRS = corelib commoncpp openssl gnutls nossl utils inc test
+SUBDIRS = corelib @SECURE@ @COMPAT@ utils inc test
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = ucommon.pc commoncpp.pc
+
+scriptdir = $(bindir)
+script_SCRIPTS = ucommon-config commoncpp-config
+
+man_MANS = ucommon-config.1 commoncpp-config.1
+
+.phony:	doxy
+
+doxy:
+	-rm -rf doc
+	$(DOXYGEN) Doxyfile
+
+clean-local:
+	-rm -rf doc
+
+dist-hook:  cleandist
+
+cleandist:
+	@rm -f ${PACKAGE}-[0-9]*.tar.gz
+	@rm -f ${PACKAGE}-[0-9]*.tar.bz2
+	@rm -f ${PACKAGE}-[0-9]*.shar.gz
+	@rm -f ${PACKAGE}-[0-9]*.zip
+	@rm -f *${PACKAGE}*.rpm
+	@rm -f *${PACKAGE}*.deb
+	@rm -f ${PACKAGE}_*.gz
+	@rm -f ${PACKAGE}_*.dsc
+	@rm -f *.changes
+
diff --git a/jni/libucommon/sources/Makefile.in b/jni/libucommon/sources/Makefile.in
new file mode 100644
index 0000000..d71ea2f
--- /dev/null
+++ b/jni/libucommon/sources/Makefile.in
@@ -0,0 +1,1040 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 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@
+
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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@
+target_triplet = @target@
+subdir = .
+DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
+	$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/configure $(am__configure_deps) \
+	$(srcdir)/ucommon-config.h.in $(srcdir)/directive.in \
+	$(srcdir)/commoncpp.pc.in $(srcdir)/ucommon.pc.in \
+	$(srcdir)/ucommon.spec.in $(srcdir)/ucommon-config.in \
+	$(srcdir)/commoncpp-config.in COPYING COPYING.LESSER TODO \
+	autoconf/config.guess autoconf/config.sub autoconf/install-sh \
+	autoconf/missing autoconf/ltmain.sh \
+	$(top_srcdir)/autoconf/config.guess \
+	$(top_srcdir)/autoconf/config.sub \
+	$(top_srcdir)/autoconf/install-sh \
+	$(top_srcdir)/autoconf/ltmain.sh \
+	$(top_srcdir)/autoconf/missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = ucommon-config.h
+CONFIG_CLEAN_FILES = directive commoncpp.pc ucommon.pc ucommon.spec \
+	ucommon-config commoncpp-config
+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)$(scriptdir)" "$(DESTDIR)$(man1dir)" \
+	"$(DESTDIR)$(pkgconfigdir)"
+SCRIPTS = $(script_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 = 
+depcomp =
+am__depfiles_maybe =
+SOURCES =
+DIST_SOURCES =
+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
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man_MANS)
+DATA = $(pkgconfig_DATA)
+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)ucommon-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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_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 $(distdir).shar.gz $(distdir).zip
+GZIP_ENV = --best
+DIST_TARGETS = dist-shar dist-gzip dist-zip
+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@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECKFLAGS = @CHECKFLAGS@
+COMPAT = @COMPAT@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_GENERIC = @LT_GENERIC@
+LT_VERSION = @LT_VERSION@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+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@
+RANLIB = @RANLIB@
+SECURE = @SECURE@
+SECURE_LIBS = @SECURE_LIBS@
+SECURE_LOCAL = @SECURE_LOCAL@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UCOMMON_CFGPATH = @UCOMMON_CFGPATH@
+UCOMMON_CLINK = @UCOMMON_CLINK@
+UCOMMON_FLAGS = @UCOMMON_FLAGS@
+UCOMMON_INCLUDES = @UCOMMON_INCLUDES@
+UCOMMON_LIBC = @UCOMMON_LIBC@
+UCOMMON_LIBS = @UCOMMON_LIBS@
+UCOMMON_LINKED = @UCOMMON_LINKED@
+UCOMMON_LOCALE = @UCOMMON_LOCALE@
+UCOMMON_MODEL = @UCOMMON_MODEL@
+UCOMMON_PREFIX = @UCOMMON_PREFIX@
+UCOMMON_VARPATH = @UCOMMON_VARPATH@
+UCOMMON_VISIBILITY = @UCOMMON_VISIBILITY@
+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_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+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@
+includes = @includes@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libs = @libs@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = no-dependencies dist-zip
+EXTRA_DIST = autogen.sh README* *.pc.in *.spec.in *.spec *-config.in \
+    *-config.1 Doxyfile cmodel.sh BUILDS SUPPORT COPYING* COPYRIGHT \
+    CMakeLists.txt ucommon-config.cmake ucommon.pc.cmake \
+    commoncpp-config.cmake commoncpp.pc.cmake ucommon.spec.cmake \
+    ucommon-config.h.cmake doxy.config.cmake directive.in
+
+DIST_SUBDIRS = corelib commoncpp openssl gnutls nossl utils inc test
+SUBDIRS = corelib @SECURE@ @COMPAT@ utils inc test
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = ucommon.pc commoncpp.pc
+scriptdir = $(bindir)
+script_SCRIPTS = ucommon-config commoncpp-config
+man_MANS = ucommon-config.1 commoncpp-config.1
+all: ucommon-config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+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) --gnu'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+ucommon-config.h: stamp-h1
+	@if test ! -f $@; then rm -f stamp-h1; else :; fi
+	@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+
+stamp-h1: $(srcdir)/ucommon-config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status ucommon-config.h
+$(srcdir)/ucommon-config.h.in:  $(am__configure_deps) 
+	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f ucommon-config.h stamp-h1
+directive: $(top_builddir)/config.status $(srcdir)/directive.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+commoncpp.pc: $(top_builddir)/config.status $(srcdir)/commoncpp.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+ucommon.pc: $(top_builddir)/config.status $(srcdir)/ucommon.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+ucommon.spec: $(top_builddir)/config.status $(srcdir)/ucommon.spec.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+ucommon-config: $(top_builddir)/config.status $(srcdir)/ucommon-config.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+commoncpp-config: $(top_builddir)/config.status $(srcdir)/commoncpp-config.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+install-scriptSCRIPTS: $(script_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	@list='$(script_SCRIPTS)'; test -n "$(scriptdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(scriptdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(scriptdir)" || 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)$(scriptdir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(scriptdir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-scriptSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(script_SCRIPTS)'; test -n "$(scriptdir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	dir='$(DESTDIR)$(scriptdir)'; $(am__uninstall_files_from_dir)
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+	-rm -f libtool config.lt
+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)
+install-pkgconfigDATA: $(pkgconfig_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+	done
+
+uninstall-pkgconfigDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(pkgconfigdir)'; $(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.
+$(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//`; \
+	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; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(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"
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: 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; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+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) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+	test ! -s cscope.files \
+	  || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+	-rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-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)
+	$(am__remove_distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(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
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    $(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="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	$(MAKE) $(AM_MAKEFLAGS) \
+	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
+	  dist-hook
+	-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)"
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__post_remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+	$(am__post_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
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__post_remove_distdir)
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__post_remove_distdir)
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__post_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
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  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) gzip -dc $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir)
+	chmod u+w $(distdir)
+	mkdir $(distdir)/_build $(distdir)/_inst
+	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && 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:
+	@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)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(SCRIPTS) $(MANS) $(DATA) ucommon-config.h
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(scriptdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgconfigdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+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:
+
+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-recursive
+
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-man install-pkgconfigDATA \
+	install-scriptSCRIPTS
+
+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-man1
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-man uninstall-pkgconfigDATA \
+	uninstall-scriptSCRIPTS
+
+uninstall-man: uninstall-man1
+
+.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 clean-local cscope cscopelist-am ctags ctags-am \
+	dist dist-all dist-bzip2 dist-gzip dist-hook dist-lzip \
+	dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \
+	distclean-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-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-pkgconfigDATA install-ps \
+	install-ps-am install-scriptSCRIPTS 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-am uninstall \
+	uninstall-am uninstall-man uninstall-man1 \
+	uninstall-pkgconfigDATA uninstall-scriptSCRIPTS
+
+
+.phony:	doxy
+
+doxy:
+	-rm -rf doc
+	$(DOXYGEN) Doxyfile
+
+clean-local:
+	-rm -rf doc
+
+dist-hook:  cleandist
+
+cleandist:
+	@rm -f ${PACKAGE}-[0-9]*.tar.gz
+	@rm -f ${PACKAGE}-[0-9]*.tar.bz2
+	@rm -f ${PACKAGE}-[0-9]*.shar.gz
+	@rm -f ${PACKAGE}-[0-9]*.zip
+	@rm -f *${PACKAGE}*.rpm
+	@rm -f *${PACKAGE}*.deb
+	@rm -f ${PACKAGE}_*.gz
+	@rm -f ${PACKAGE}_*.dsc
+	@rm -f *.changes
+
+# 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/jni/libucommon/sources/NEWS b/jni/libucommon/sources/NEWS
new file mode 100644
index 0000000..d227dc0
--- /dev/null
+++ b/jni/libucommon/sources/NEWS
@@ -0,0 +1,37 @@
+uCommon Library NEWS -- history of visible user changes. Updated 2008-04-15.
+
+uCommon C++ 0.4 codebase completed and ready for release with the introduction
+of the GNU GPL V3.  This is a complete rewrite of UCommon as a C++ library for
+threading and design patterns suitable for deeply embedded targets.
+
+uCommon C++ 0.7 codebase now has core documentation and basic library theory in
+header files.  This documentation can be generated with doxygen or by using
+"make doxy".
+
+uCommon C++ 1.0 release has been simplified, fully documented, and modified in
+specific ways to simplify the migration and merge with GNU Common C++ to form
+GNU Common C++ 2.0.
+
+uCommon C++ 1.5 release begins the process of migrating GNU Common C++ into the
+core GNU uCommon C++ codebase. Some GNU Common C++ classes, including tcp
+streaming, xml parser, and persist, have been revised and integrated for the
+1.5.0 release itself.  Other GNU Common C++ classes will be integrated as
+requested and needed.  The 1.5/1.x series will actually be the last UCommon
+release sets, as GNU uCommon C++ 2.0 will instead be released as GNU Common C++
+2 2.0.
+
+uCommon C++ 2.0 released under the GNU Lesser General Public License, Version 3
+or later.
+
+uCommon C++ 2.1 is considered a refactored abi release offering greater
+clarity, consistency of use, and additional features that were migrated from
+Common C++. The 2.1 release series may continue to introduce additional
+classes.
+
+ucommon 3.0 merges other ucommon related libraries to create a single ucommon
+framework for application development.
+
+ucommon 3.1 introduced the ucommon secure framework with support for ssl
+sockets, random number generation, ciphering, and digest computation.
+Further cryptographic features will be added over time.
+
diff --git a/jni/libucommon/sources/README b/jni/libucommon/sources/README
new file mode 100644
index 0000000..873b2f9
--- /dev/null
+++ b/jni/libucommon/sources/README
@@ -0,0 +1,82 @@
+GNU uCommon C++ is meant as a very light-weight C++ library to facilitate using
+C++ design patterns even for very deeply embedded applications, such as for
+systems using uclibc along with posix threading support.  For this reason,
+uCommon disables language features that consume memory or introduce runtime
+overhead, such as rtti and exception handling, and assumes one will mostly be
+linking applications with other pure C based libraries rather than using the
+overhead of the standard C++ library and other class frameworks.
+
+GNU uCommon C++ by default does build with support for the bloated ansi
+standard c++ library unless this is changed at configure time with the
+--disable-stdcpp option.  This is to assure maximum portability and will be
+used to merge UCommon with GNU Common C++ to form GNU Common C++ 2.0.  Some
+specific features are tested for when stdc++ is enabled, and these will be used
+to add back in GNU Common C++ classes such as TCP Stream and serialization.
+
+GNU uCommon C++ introduces some Objective-C based design patterns, such as
+reference counted objects, memory pools, smart pointers, and offers dynamic
+typing through very light use of inline templates for pure type translation
+that are then tied to concrete base classes to avoid template instantiation
+issues.  C++ auto-variable automation is also used to enable referenced objects
+to be deleted and threading locks to be released that are acquired
+automatically when methods return rather than requiring one to explicitly code
+for these things.
+
+GNU uCommon C++ depends on and when necessary will introduce some portable C
+replacement functions, especially for sockets, such as adding getaddrinfo for
+platforms which do not have it, or when threadsafe versions of existing C
+library functions are needed.  Basic socket support for connecting to named
+destinations and multicast addresses, and binding to interfaces with IPV4 and
+IPV6 addresses is directly supported.  Support for high resolution timing and
+Posix realtime clocks are also used when available.
+
+While GNU uCommon C++ has been influenced by GNU Common C++, it introduces some
+new concepts for handling of thread locking and synchronization.  GNU uCommon
+C++ also builds all higher level thread synchronization objects directly from
+conditionals.  Hence, on platforms which for example do not have rwlocks,
+barriers, or semaphores, these are still found in uCommon.  A common and
+consistent call methodology is used for all locks, whether mutex, rw, or
+semaphore, based on whether used for exclusive or "shared" locking.  
+
+GNU uCommon C++ requires some knowledge of compiler switches and options to
+disable language features, the C++ runtime and stdlibs, and associated C++
+headers. The current version supports compiling with GCC, which is commonly
+found on GNU/Linux, OS/X, BSD based systems, and many other platforms; and
+the Sun Workshop compiler, which is offered as an example how to adapt UCommon
+for additional compilers.  GNU uCommon C++ may also be built with GCC cross
+compiling for mingw32 to build Microsoft Windows targets natively.  The cmake
+build system can also be used, to create project files for various platforms
+including xcode for OS/X and various Microsoft Visual Studio project file
+formats.
+
+The minimum platform support for uCommon is a modern and working posix pthread
+threading library.  I use a subset of posix threads to assure wider portability
+by avoiding more specialized features like process shared synchronization
+objects, pthread rwlocks and pthread semaphores, as these are not implemented
+on all platforms that I have found.  I also eliminate the practice and
+dependency on pthread automatic cancellation behavior, which otherwise
+introduces much greater complexity to user applications and can often lead to
+defective coding practices.
+
+The first three releases of uCommon were introduced in 1999-2000 as a pure "C"
+library for embedded targets, and had not seen an update in 7 years.  Hence I
+have had the package name in use for a very long time.  Work on what became
+uCommon C++ 0.4 was originally intended as a refactoring effort for GNU Common
+C++ to better support IPV6, and became something different as entirely new code
+was written in 2006.  I originally hoped to release GNU uCommon C++ in March of
+2007 as a new package under the GNU GPL V3, but the license was unavoidably
+delayed.  GNU uCommon C++ will merge code from and replace GNU Common C++ in
+future releases.
+
+GNU uCommon C++ is a linkable library distributed under the GNU General Public
+License, Version 3 or later.  As of version 2.0, we are now using the GNU
+Lesser General Public License, Version 3 or later, to remain consistent and
+compatible with past GNU Common C++ licensing.  A new release series of GNU
+uCommon C++ is 2.1 involved refactoring the abi release from prior 2.0.x
+releases, offering greater clarity, consistency of use, and some new features
+that were migrated from Common C++.
+
+To better focus on standardizing secure and runtime services, uCommon was
+somewhat simplified in release 3.4.  ccscript is now part of GNU Bayonne,
+and ccaudio has been separated again.
+
diff --git a/jni/libucommon/sources/README.secure b/jni/libucommon/sources/README.secure
new file mode 100644
index 0000000..9bf10a0
--- /dev/null
+++ b/jni/libucommon/sources/README.secure
@@ -0,0 +1,20 @@
+The GNU uCommon C++ secure library component (and the core GNU uCommon C++
+library) is licensed under the GNU Lesser General Public License 3.0 or later.
+It is generally believed that openssl can be linked with GNU L-GPL licensed
+software, and with GNU GPL licensed software as well, when appearing as a
+"default system library" on a target platform.  However, we generally recommend
+using the GNU tls (gnutls) library build of the GNU uCommon C++ secure library
+component rather than openssl unless gnutls is not available for your target
+platform of choice.
+
+We strive to maintain feature parity between the gnutls and openssl crypto
+implementations.  We may also add nss as a secure backend in the future.
+Programming to the GNU uCommon C++ secure api is intended to avoid the need
+entirely of using openssl, gnutls, or other library specific functions.  This
+means the total size of the secure library will grow as we add additional
+common features, such as pki support. In the past as there has been no
+generally agreed upon crypto library, so developers building new apps would use
+a library they already know, or that is best optimized for the platform they
+are using.  Our goal is to remove this complexity of supporting different
+crypto libraries by offering a single API for secure application development.
+
diff --git a/jni/libucommon/sources/SUPPORT b/jni/libucommon/sources/SUPPORT
new file mode 100644
index 0000000..7481841
--- /dev/null
+++ b/jni/libucommon/sources/SUPPORT
@@ -0,0 +1,16 @@
+uCommon has been accepted as part of the GNU Project for use as GNU
+Common C++ 2 "2.0" and is used in GNU Telephony.
+
+Web resources:
+
+	http://www.gnu.org/software/commoncpp/
+	http://www.gnutelephony.org
+	http://savannah.gnu.org/projects/gnucomm
+
+Mailing lists and email contacts:
+
+	mailto:dyfet@gnutelephony.org
+	mailto:sipwitch-devel@gnu.org
+	mailto:bug-commoncpp@gnu.org
+	http://lists.gnu.org/mailman/listinfo/bug-commoncpp
+
diff --git a/jni/libucommon/sources/TODO b/jni/libucommon/sources/TODO
new file mode 100644
index 0000000..98e1952
--- /dev/null
+++ b/jni/libucommon/sources/TODO
@@ -0,0 +1,63 @@
+Proposed changes (likely deferred to 6.0.0)
+
+	fsys.cpp & file.cpp split into part that truly requires
+	_XOPEN_SOURCE >= 600 and rest
+
+	
+	FetchProtocol for string >> operator?
+
+	Use NSPR as an alternate thread runtime base like we do with GNU pth...
+	Especially convenient with common use of NSS for future tls.  Do we
+	still keep GNU pth option if we do this?
+
+	Use NSPR code base for simulating msw conditional variables for direct
+	native msw threading if better than code we have in ucommon, or maybe
+	use NSPR in place of native msw threading entirely?
+
+	Add NSS backend for secure alongside openssl & gnutls.
+
+	SSLBuffer does not do validation and peer methods missing.  We should 
+	load all ca certificates rather than depend on using a directory path
+	for using multiple CA's because the latter depends on hash mapped
+	directories for openssl and may not exist as a feature in gnutls.  
+
+	Should we have a new generic ca archive format and ca management tool?
+
+	Certificate paths should be exposed and changable.  Base-name of
+	certificate service should be changable.
+
+	PKI related functions in secure library.
+
+	shell parser support for +options, auto collating of short options to
+	remove duplicates.
+
+	unicode shell options?
+
+Rejected changes:
+
+	DetachedThread delete this into dealloc() virtual...
+		- use Thread::exit() virtual for this purpose instead
+
+	in script engine make expression operands virtuals or expression
+	operation itself virtual. - ccscript moved into bayonne, no longer
+	needed if there, either.
+
+	changed new operators confined to namespace for include file issues
+	with std lib - build and compile issues if not global
+
+	ssl socket low level methods and bio rather than just upper level stream.
+
+	Add serialio and logging class? - rejected; in siot
+
+	Redu and split ucommon.pc and usecure.pc.  This is to get cleaner
+	linkages in derived projects.  Also or alternately change 
+	ucommon-config to have a with & without secure mode. - for now added
+	minimal linking
+
+	move spawn/proc stuff from shell into new proc::, move fsys:: 
+	inherited redirect methods and pipe into proc.  This is to clean
+	up static linking uses and interdependence of some things.  Maybe
+	also proc::release and detach from shell...  ??
+
+	separate enhanced string format and numbers library
+
diff --git a/jni/libucommon/sources/aclocal.m4 b/jni/libucommon/sources/aclocal.m4
new file mode 100644
index 0000000..c059bbb
--- /dev/null
+++ b/jni/libucommon/sources/aclocal.m4
@@ -0,0 +1,9880 @@
+# generated automatically by aclocal 1.13.4 -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[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'.])])
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+#                 Foundation, Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+# 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.
+
+m4_define([_LT_COPYING], [dnl
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010, 2011 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.
+#
+# 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.
+])
+
+# serial 57 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+       [m4_default([$3],
+		   [m4_fatal([Libtool version $1 or higher is required],
+		             63)])],
+       [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+  *\ * | *\	*)
+    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+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
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+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"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+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 "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+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
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_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
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# 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"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    _LT_PATH_MAGIC
+  fi
+  ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_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'
+# 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,
+# 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"
+])# _LT_PROG_LTMAIN
+
+
+
+# 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'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME.  Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+	[m4_ifval([$1], [$1], [$2])])
+    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+    m4_ifval([$4],
+	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+    lt_dict_add_subkey([lt_decl_dict], [$2],
+	[tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+  [0], [m4_fatal([$0: too few arguments: $#])],
+  [1], [m4_fatal([$0: too few arguments: $#: $1])],
+  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+     m4_if([$2], [],
+	   m4_quote(lt_decl_varnames),
+	m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _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
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly.  In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+#    <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)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# 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
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+#    # Some comment about what VAR is for.
+#    visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+					   [description])))[]dnl
+m4_pushdef([_libtool_name],
+    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+    [0], [_libtool_name=[$]$1],
+    [1], [_libtool_name=$lt_[]$1],
+    [2], [_libtool_name=$lt_[]$1],
+    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+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'
+# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# 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
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+	dnl If the libtool generation code has been placed in $CONFIG_LT,
+	dnl instead of duplicating it all over again into config.status,
+	dnl then we will have config.status run $CONFIG_LT later, so it
+	dnl needs to know what name is stored there:
+        [AC_CONFIG_COMMANDS([libtool],
+            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+    dnl If the libtool generation code is destined for config.status,
+    dnl expand the accumulated commands and init code now:
+    [AC_CONFIG_COMMANDS([libtool],
+        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# 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
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+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 \\\\""\\\\\$\$var"\\\\"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+_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 $lt_write_fail = 0 && chmod +x $1[]dnl
+m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+lt_cl_silent=false
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+  echo
+  AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+  -h, --help      print this help, then exit
+  -V, --version   print version number, then exit
+  -q, --quiet     do not print progress messages
+  -d, --debug     don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+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) 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
+do
+  case $[1] in
+    --version | --v* | -V )
+      echo "$lt_cl_version"; exit 0 ;;
+    --help | --h* | -h )
+      echo "$lt_cl_help"; exit 0 ;;
+    --debug | --d* | -d )
+      debug=: ;;
+    --quiet | --q* | --silent | --s* | -q )
+      lt_cl_silent=: ;;
+
+    -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+    *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+  esac
+  shift
+done
+
+if $lt_cl_silent; then
+  exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# 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.
+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)
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars.  Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_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
+    # commands through without removal of \ escapes.
+    if test -n "${ZSH_VERSION+set}" ; then
+      setopt NO_GLOB_SUBST
+    fi
+
+    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
+# 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.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_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
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+_LT_EOF
+    ;;
+  esac
+
+  _LT_PROG_LTMAIN
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
+
+  _LT_PROG_REPLACE_SHELLFNS
+
+   mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+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)],
+  [Windows Resource],	[_LT_LANG(RC)],
+  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+    [_LT_LANG($1)],
+    [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+  [LT_SUPPORTED_TAG([$1])dnl
+  m4_append([_LT_TAGS], [$1 ])dnl
+  m4_define([_LT_LANG_]$1[_enabled], [])dnl
+  _LT_LANG_$1_CONFIG($1)])dnl
+])# _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],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+  [LT_LANG(CXX)],
+  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+  [LT_LANG(F77)],
+  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+  [LT_LANG(FC)],
+  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+  [LT_LANG(GCJ)],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+    [LT_LANG(GCJ)],
+    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+      [LT_LANG(GCJ)],
+      [m4_ifdef([AC_PROG_GCJ],
+	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([A][M_PROG_GCJ],
+	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(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)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+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
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+  case $host_os in
+    rhapsody* | darwin*)
+    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+    AC_CHECK_TOOL([LIPO], [lipo], [:])
+    AC_CHECK_TOOL([OTOOL], [otool], [:])
+    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+    _LT_DECL([], [DSYMUTIL], [1],
+      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+    _LT_DECL([], [NMEDIT], [1],
+      [Tool to change global to local symbols on Mac OS X])
+    _LT_DECL([], [LIPO], [1],
+      [Tool to manipulate fat objects and archives on Mac OS X])
+    _LT_DECL([], [OTOOL], [1],
+      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+    _LT_DECL([], [OTOOL64], [1],
+      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+    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
+	# 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
+	# link flags.
+	rm -rf libconftest.dylib*
+	echo "int foo(void){return 1;}" > conftest.c
+	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+	# 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 $_lt_result -eq 0; then
+	  lt_cv_apple_cc_single_mod=yes
+	else
+	  cat conftest.err >&AS_MESSAGE_LOG_FD
+	fi
+	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
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+	[lt_cv_ld_exported_symbols_list=yes],
+	[lt_cv_ld_exported_symbols_list=no])
+	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 $_lt_result -eq 0 && $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' ;;
+    darwin1.*)
+      _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' ;;
+	10.*)
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; 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'
+    else
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES([TAG])
+# ---------------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+  _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_automatic, $1)=yes
+  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  if test "$lt_cv_ld_force_load" = "yes"; 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"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; 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}"
+    fi
+],[])
+  else
+  _LT_TAGVAR(ld_shlibs, $1)=no
+  fi
+])
+
+# _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
+if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+  lt_aix_libpath_sed='[
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }]'
+  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi],[])
+  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
+  fi
+  ])
+  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
+fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[m4_divert_text([M4SH-INIT], [$1
+])])# _LT_SHELL_INIT
+
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# 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 which will find a shell with a builtin
+# printf (which we can use as an echo command).
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[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
+  # Use this function as a fallback that always works.
+  func_fallback_echo ()
+  {
+    eval 'cat <<_LTECHO_EOF
+$[]1
+_LTECHO_EOF'
+  }
+  ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*" 
+}
+
+case "$ECHO" in
+  printf*) AC_MSG_RESULT([printf]) ;;
+  print*) AC_MSG_RESULT([print -r]) ;;
+  *) AC_MSG_RESULT([cat]) ;;
+esac
+
+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" )])])
+
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_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],
+[  --with-sysroot[=DIR] Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted.  We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+   if test "$GCC" = yes; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   AC_MSG_RESULT([${with_sysroot}])
+   AC_MSG_ERROR([The sysroot must be an absolute path.])
+   ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and in which our libraries should be installed.])])
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[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
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+      *ELF-32*)
+	HPUX_IA64_MODE="32"
+	;;
+      *ELF-64*)
+	HPUX_IA64_MODE="64"
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    if test "$lt_cv_prog_gnu_ld" = yes; then
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -melf32bsmip"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -melf32bmipn32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -melf64bmip"
+	;;
+      esac
+    else
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -32"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -n32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -64"
+	  ;;
+      esac
+    fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+      *32-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_i386_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_i386"
+	    ;;
+	  powerpc64le-*linux*)
+	    LD="${LD-ld} -m elf32lppclinux"
+	    ;;
+	  powerpc64-*linux*)
+	    LD="${LD-ld} -m elf32ppclinux"
+	    ;;
+	  s390x-*linux*)
+	    LD="${LD-ld} -m elf_s390"
+	    ;;
+	  sparc64-*linux*)
+	    LD="${LD-ld} -m elf32_sparc"
+	    ;;
+	esac
+	;;
+      *64-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_x86_64_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_x86_64"
+	    ;;
+	  powerpcle-*linux*)
+	    LD="${LD-ld} -m elf64lppc"
+	    ;;
+	  powerpc-*linux*)
+	    LD="${LD-ld} -m elf64ppc"
+	    ;;
+	  s390*-*linux*|s390*-*tpf*)
+	    LD="${LD-ld} -m elf64_s390"
+	    ;;
+	  sparc*-*linux*)
+	    LD="${LD-ld} -m elf64_sparc"
+	    ;;
+	esac
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+    [AC_LANG_PUSH(C)
+     AC_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
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*)
+        case $host in
+        i?86-*-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"
+	fi
+	;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_PROG_AR
+# -----------
+m4_defun([_LT_PROG_AR],
+[AC_CHECK_TOOLS(AR, [ar], false)
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+  [lt_cv_ar_at_file=no
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+     [echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
+      AC_TRY_EVAL([lt_ar_try])
+      if test "$ac_status" -eq 0; then
+	# Ensure the archiver fails upon bogus file names.
+	rm -f conftest.$ac_objext libconftest.a
+	AC_TRY_EVAL([lt_ar_try])
+	if test "$ac_status" -ne 0; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
+     ])
+  ])
+
+if test "x$lt_cv_ar_at_file" = xno; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
+_LT_DECL([], [archiver_list_spec], [1],
+  [How to feed a file listing to the archiver])
+])# _LT_PROG_AR
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[_LT_PROG_AR
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+    [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+    ;;
+  esac
+  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
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+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"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$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:$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 "$_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
+     fi
+   fi
+   $RM conftest*
+])
+
+if test x"[$]$2" = xyes; then
+    m4_if([$5], , :, [$5])
+else
+    m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                  [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $3"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&AS_MESSAGE_LOG_FD
+       $ECHO "$_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
+       fi
+     else
+       $2=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+    m4_if([$4], , :, [$4])
+else
+    m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+  i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw* | cegcc*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  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*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  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
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      # 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
+        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"`env echo "$teststring$teststring" 2>/dev/null` \
+	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on
+      # massive amounts of additional arguments before passing them to the
+      # linker.  It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+  AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+    [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+  [$4]
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_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 -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+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 AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_dlunknown|x*) $3 ;;
+    esac
+  else :
+    # compilation failed
+    $3
+  fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32* | 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
+    AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ])
+    ;;
+
+  *)
+    AC_CHECK_FUNC([shl_load],
+	  [lt_cv_dlopen="shl_load"],
+      [AC_CHECK_LIB([dld], [shl_load],
+	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+	[AC_CHECK_FUNC([dlopen],
+	      [lt_cv_dlopen="dlopen"],
+	  [AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+	    [AC_CHECK_LIB([svld], [dlopen],
+		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+	      [AC_CHECK_LIB([dld], [dld_link],
+		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+	      ])
+	    ])
+	  ])
+	])
+      ])
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    AC_CACHE_CHECK([whether a program can dlopen itself],
+	  lt_cv_dlopen_self, [dnl
+	  _LT_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+    ])
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+	  lt_cv_dlopen_self_static, [dnl
+	  _LT_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+      ])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+	 [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+	 [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+	 [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$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:$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 "$_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
+     fi
+   fi
+   chmod u+w . 2>&AS_MESSAGE_LOG_FD
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+	[Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+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
+  # do not overwrite the value of need_locks provided by the user
+  AC_MSG_CHECKING([if we can lock with hard links])
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  AC_MSG_RESULT([$hard_links])
+  if test "$hard_links" = no; then
+    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_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.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_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
+
+  # We can hardcode non-existent directories.
+  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_TAGVAR(hardcode_action, $1)=unsupported
+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
+  # 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
+_LT_TAGDECL([], [hardcode_action], [0],
+    [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+  darwin*)
+    if test -n "$STRIP" ; then
+      striplib="$STRIP -x"
+      old_striplib="$STRIP -S"
+      AC_MSG_RESULT([yes])
+    else
+      AC_MSG_RESULT([no])
+    fi
+    ;;
+  *)
+    AC_MSG_RESULT([no])
+    ;;
+  esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+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
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+	[], [
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  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 '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.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+  # 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"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux # 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'
+  ;;
+
+aix[[4-9]]*)
+  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
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[[01]] | aix4.[[01]].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<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
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  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}'
+    ;;
+  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=`func_echo_all "$lib" | $SED '\''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'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[[45]]*)
+  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'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  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'\''`~
+      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'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+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}'
+      ;;
+    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.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
+    ;;
+
+  *)
+    # Assume MSVC wrapper
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
+    ;;
+  esac
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux # 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
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[[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}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2.*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux # 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
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+haiku*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  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=yes
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+  postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
+  ;;
+
+interix[[3-9]]*)
+  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'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux # 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}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+
+  # Some binutils ld are patched to set DT_RUNPATH
+  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+    [lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+	 [lt_cv_shlibpath_overrides_runpath=yes])])
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+    ])
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux # 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
+  ;;
+
+*nto* | *qnx*)
+  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'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux # 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
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux # 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=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 # 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
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = 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"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+    [Variables whose values should be saved in libtool wrapper scripts and
+    restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+    [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+    [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+    [[List of archive names.  First name is the real one, the rest are links.
+    The last name is the one that the linker finds with -lNAME]])
+_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],
+    [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+    [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+    [[As "finish_cmds", except a single script fragment to be evaled but
+    not shown]])
+_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_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which 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_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"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  AC_MSG_RESULT($MAGIC_CMD)
+else
+  AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which 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
+  if test -n "$ac_tool_prefix"; then
+    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+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],
+    [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by $CC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+  lt_cv_ld_reload_flag,
+  [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test "$GCC" != yes; then
+      reload_cmds=false
+    fi
+    ;;
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[[45]]*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    # 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*)
+  # 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'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+haiku*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-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_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix[[3-9]]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+tpf*)
+  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
+
+_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"])
+_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
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+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"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  if test -n "$DUMPBIN"; then :
+    # Let the user override the test.
+  else
+    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
+  AC_SUBST([DUMPBIN])
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_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:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&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:$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"
+  fi
+  rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+# --------------------------------
+# how to determine the name of the shared library
+# associated with a specific link library.
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+m4_require([_LT_DECL_DLLTOOL])
+AC_CACHE_CHECK([how to associate runtime and link libraries],
+lt_cv_sharedlib_from_linklib_cmd,
+[lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+  # two different shell functions defined in ltmain.sh
+  # decide which to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  ;;
+esac
+])
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+    [Command to associate shared and link libraries])
+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+
+
+# _LT_PATH_MANIFEST_TOOL
+# ----------------------
+# locate the manifest tool
+m4_defun([_LT_PATH_MANIFEST_TOOL],
+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+  [lt_cv_path_mainfest_tool=no
+  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+    lt_cv_path_mainfest_tool=yes
+  fi
+  rm -f conftest*])
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+  MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-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(m, cos, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; 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,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+	[Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+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
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[[BCDEGRST]]'
+  ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
+  ;;
+solaris*)
+  symcode='[[BDRT]]'
+  ;;
+sco3.2v5*)
+  symcode='[[DT]]'
+  ;;
+sysv4.2uw2*)
+  symcode='[[DT]]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[[ABDT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# 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'"
+
+# 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'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  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.
+    # 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};"\
+"     \$ 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))}"\
+"     ' 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
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_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
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT@&t@_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT@&t@_DLSYM_CONST
+#else
+# define LT@&t@_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+	  cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols.  */
+LT@&t@_DLSYM_CONST struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext 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
+	    pipe_works=yes
+	  fi
+	  LIBS=$lt_globsym_save_LIBS
+	  CFLAGS=$lt_globsym_save_CFLAGS
+	else
+	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+    fi
+  else
+    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  AC_MSG_RESULT(failed)
+else
+  AC_MSG_RESULT(ok)
+fi
+
+# 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_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_file_list_spec], [1],
+    [Specify filename containing input files for $NM])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+m4_if([$1], [CXX], [
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; 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
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      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'.
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    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).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # 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.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+    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
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+    *)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix[[4-9]]*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	else
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+      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++*)
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	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_pic, $1)='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    ;;
+	  ecpc* )
+	    # 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'
+	    ;;
+	  icpc* )
+	    # Intel C++, used to be incompatible with GCC.
+	    # ICC 10 doesn't accept -KPIC any more.
+	    _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* | pgcpp*)
+	    # Portland Group 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)='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  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'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *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)='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+        ;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  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'
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+	;;
+    esac
+  fi
+],
+[
+  if test "$GCC" = yes; 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
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      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'.
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    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).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_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
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	# +Z the default
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+
+    *)
+      _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
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      else
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    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'])
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	;;
+      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'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      case $cc_basename in
+      # 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'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+	;;
+      nagfor*)
+	# NAG Fortran compiler
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
+      ccc*)
+        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        # All Alpha code is PIC.
+        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        ;;
+      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,'
+	  ;;
+        *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'
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    newsos6)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    rdos*)
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    solaris*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    unicos*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+
+    uts4*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *)
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+    esac
+  fi
+])
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _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_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.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+     "" | " "*) ;;
+     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     esac],
+    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+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.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+  $lt_tmp_static_flag,
+  [],
+  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+	[Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+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
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+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
+    # Also, AIX nm treats weak defined symbols like other global defined
+    # symbols, whereas GNU nm marks them as "W".
+    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") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { 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'
+    fi
+    ;;
+  pw32*)
+    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+    ;;
+  cygwin* | mingw* | cegcc*)
+    case $cc_basename in
+    cl*)
+      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+      ;;
+    *)
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+      ;;
+    esac
+    ;;
+  *)
+    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+    ;;
+  esac
+], [
+  runpath_var=
+  _LT_TAGVAR(allow_undefined_flag, $1)=
+  _LT_TAGVAR(always_export_symbols, $1)=no
+  _LT_TAGVAR(archive_cmds, $1)=
+  _LT_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_TAGVAR(compiler_needs_object, $1)=no
+  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_TAGVAR(hardcode_automatic, $1)=no
+  _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_TAGVAR(inherit_rpath, $1)=no
+  _LT_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_TAGVAR(module_cmds, $1)=
+  _LT_TAGVAR(module_expsym_cmds, $1)=
+  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_TAGVAR(whole_archive_flag_spec, $1)=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # 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'.
+  _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
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  _LT_TAGVAR(ld_shlibs, $1)=yes
+
+  # 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 "$with_gnu_ld" = yes; 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 "$lt_use_gnu_ld_interface" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    _LT_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'
+    else
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 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 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[[3-9]]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** 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 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
+      ;;
+
+    amigaos*)
+      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_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; 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'
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=no
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _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'
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    haiku*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    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'
+      ;;
+
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; 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
+      then
+	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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	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' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
+	  tmp_sharedflag='--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; 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'
+
+        if test "x$supports_anon_versioning" = xyes; 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'
+        fi
+
+	case $cc_basename in
+	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)='${wl}-rpath ${wl}$libdir'
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; 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 $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	_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
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_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
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+	_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
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  # For security reasons, it is highly recommended that you always
+	  # use absolute paths for naming shared libraries, and exclude the
+	  # DT_RUNPATH tag from executables and libraries.  But doing so
+	  # requires that you compile everything twice, which is a pain.
+	  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'
+	  else
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_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
+      runpath_var=
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=yes
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	_LT_TAGVAR(hardcode_direct, $1)=unsupported
+      fi
+      ;;
+
+    aix[[4-9]]*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	# Also, AIX nm treats weak defined symbols like other global
+	# defined symbols, whereas GNU nm marks them as "W".
+	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") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { 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'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+	  for ld_flag in $LDFLAGS; do
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	    aix_use_runtimelinking=yes
+	    break
+	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      _LT_TAGVAR(archive_cmds, $1)=''
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _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,'
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[[012]]|aix4.[[012]].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	  # We have reworked collect2
+	  :
+	  else
+	  # We have old collect2
+	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      _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
+	# 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([$1])
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+	if test "$host_cpu" = ia64; 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"
+	else
+	 # Determine the default libpath from the value encoded in an
+	 # empty executable.
+	 _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'
+	  if test "$with_gnu_ld" = yes; 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'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      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_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[[45]]*)
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      case $cc_basename in
+      cl*)
+	# Native MSVC
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	_LT_TAGVAR(always_export_symbols, $1)=yes
+	_LT_TAGVAR(file_list_spec, $1)='@'
+	# Tell ltmain to make .lib files, not .a files.
+	libext=lib
+	# Tell ltmain to make .dll files, not .so files.
+	shrext_cmds=".dll"
+	# FIXME: Setting linknames here is a bad hack.
+	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	  else
+	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	  fi~
+	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	  linknames='
+	# The linker will not automatically build a static lib if we build a DLL.
+	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	_LT_TAGVAR(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*)
+      _LT_DARWIN_LINKER_FEATURES($1)
+      ;;
+
+    dgux*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    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
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      _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 $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      _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'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; 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_separator, $1)=:
+	_LT_TAGVAR(hardcode_direct, $1)=yes
+	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	_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
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  _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 $pic_flag ${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}+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'
+	  ;;
+	ia64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  _LT_TAGVAR(hardcode_direct, $1)=no
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  ;;
+	*)
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	  _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
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; 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.
+	# This should be the same for all languages, so no per-tag cache variable.
+	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
+	  [lt_cv_irix_exported_symbol],
+	  [save_LDFLAGS="$LDFLAGS"
+	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+	   AC_LINK_IFELSE(
+	     [AC_LANG_SOURCE(
+	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+			      [C++], [[int foo (void) { return 0; }]],
+			      [Fortran 77], [[
+      subroutine foo
+      end]],
+			      [Fortran], [[
+      subroutine foo
+      end]])])],
+	      [lt_cv_irix_exported_symbol=yes],
+	      [lt_cv_irix_exported_symbol=no])
+           LDFLAGS="$save_LDFLAGS"])
+	if test "$lt_cv_irix_exported_symbol" = yes; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+	fi
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _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
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    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_separator, $1)=:
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    openbsd*)
+      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
+	  _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'
+	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
+	fi
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    os2*)
+      _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'
+      ;;
+
+    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" && 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" && 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_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} $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" && 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 "-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'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    solaris*)
+      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+      if test "$GCC" = yes; 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 $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_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'
+	  ;;
+	*)
+	  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'
+	  ;;
+	esac
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      case $host_os in
+      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  _LT_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
+	;;
+      esac
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	_LT_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
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+	  _LT_TAGVAR(hardcode_direct, $1)=no
+        ;;
+	motorola)
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4.3*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	_LT_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _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'
+      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'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      _LT_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_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _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'
+      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'
+      fi
+      ;;
+
+    uts4*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      _LT_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	_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
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+    [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_TAGVAR(archive_cmds, $1) in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      AC_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
+  ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+    [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+    [enable_shared_with_static_runtimes], [0],
+    [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+    [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+    [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+    [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+    [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+    [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+    [Commands used to build a loadable module if different from building
+    a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+    [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+    [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+    [Flag that enforces no undefined symbols])
+_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_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
+    DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+    [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
+    library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+    into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+    into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+    [Set to "yes" if building a shared library automatically hardcodes DIR
+    into the library and all subsequent libraries and executables linked
+    against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+    [Set to yes if linker adds runtime paths of dependent libraries
+    to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+    [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [always_export_symbols], [0],
+    [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+    [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+    [Symbols that should not be listed in the preloaded symbols])
+_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
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl    [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_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'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+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_SYS_DYNAMIC_LINKER($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+  LT_SYS_DLOPEN_SELF
+  _LT_CMD_STRIPLIB
+
+  # Report which library types will actually be built
+  AC_MSG_CHECKING([if libtool supports shared libraries])
+  AC_MSG_RESULT([$can_build_shared])
+
+  AC_MSG_CHECKING([whether to build shared libraries])
+  test "$can_build_shared" = "no" && enable_shared=no
+
+  # On AIX, shared libraries and static libraries use the same namespace, and
+  # are all built from PIC.
+  case $host_os in
+  aix3*)
+    test "$enable_shared" = yes && enable_static=no
+    if test -n "$RANLIB"; then
+      archive_cmds="$archive_cmds~\$RANLIB \$lib"
+      postinstall_cmds='$RANLIB $lib'
+    fi
+    ;;
+
+  aix[[4-9]]*)
+    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+      test "$enable_shared" = yes && enable_static=no
+    fi
+    ;;
+  esac
+  AC_MSG_RESULT([$enable_shared])
+
+  AC_MSG_CHECKING([whether to build static libraries])
+  # Make sure either enable_shared or enable_static is yes.
+  test "$enable_shared" = yes || enable_static=yes
+  AC_MSG_RESULT([$enable_static])
+
+  _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _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'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+else
+  _lt_caught_CXX_error=yes
+fi
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_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_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_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
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# 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
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="int some_variable = 0;"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_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_LD=$LD
+  lt_save_GCC=$GCC
+  GCC=$GXX
+  lt_save_with_gnu_ld=$with_gnu_ld
+  lt_save_path_LD=$lt_cv_path_LD
+  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+  else
+    $as_unset lt_cv_prog_gnu_ld
+  fi
+  if test -n "${lt_cv_path_LDCXX+set}"; then
+    lt_cv_path_LD=$lt_cv_path_LDCXX
+  else
+    $as_unset lt_cv_path_LD
+  fi
+  test -z "${LDCXX+set}" || LD=$LDCXX
+  CC=${CXX-"c++"}
+  CFLAGS=$CXXFLAGS
+  compiler=$CC
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+
+  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
+      _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
+      # 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 $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'
+
+        # If archive_cmds runs LD, not CC, wlarc should be empty
+        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+        #     investigate it a little bit more. (MM)
+        wlarc='${wl}'
+
+        # ancient GNU ld didn't support --whole-archive et. al.
+        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+	  $GREP 'no-whole-archive' > /dev/null; then
+          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+        else
+          _LT_TAGVAR(whole_archive_flag_spec, $1)=
+        fi
+      else
+        with_gnu_ld=no
+        wlarc=
+
+        # A generic and very simple default shared library creation
+        # command for GNU C++ for the case where it uses the native
+        # linker, instead of GNU ld.  If possible, this setting should
+        # overridden to take advantage of the native linker features on
+        # the platform it is being used on.
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      fi
+
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+    else
+      GXX=no
+      with_gnu_ld=no
+      wlarc=
+    fi
+
+    # PORTME: fill in a description of your system's C++ link characteristics
+    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+    _LT_TAGVAR(ld_shlibs, $1)=yes
+    case $host_os in
+      aix3*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+      aix[[4-9]]*)
+        if test "$host_cpu" = ia64; then
+          # On IA64, the linker does run time linking by default, so we don't
+          # have to do anything special.
+          aix_use_runtimelinking=no
+          exp_sym_flag='-Bexport'
+          no_entry_flag=""
+        else
+          aix_use_runtimelinking=no
+
+          # Test if we are trying to use run time linking or normal
+          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+          # need to do runtime linking.
+          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+	    for ld_flag in $LDFLAGS; do
+	      case $ld_flag in
+	      *-brtl*)
+	        aix_use_runtimelinking=yes
+	        break
+	        ;;
+	      esac
+	    done
+	    ;;
+          esac
+
+          exp_sym_flag='-bexport'
+          no_entry_flag='-bnoentry'
+        fi
+
+        # When large executables or shared objects are built, AIX ld can
+        # have problems creating the table of contents.  If linking a library
+        # or program results in "error TOC overflow" add -mminimal-toc to
+        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+        _LT_TAGVAR(archive_cmds, $1)=''
+        _LT_TAGVAR(hardcode_direct, $1)=yes
+        _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,'
+
+        if test "$GXX" = yes; then
+          case $host_os in aix4.[[012]]|aix4.[[012]].*)
+          # We only want to do this on AIX 4.2 and lower, the check
+          # below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	    # We have reworked collect2
+	    :
+	  else
+	    # We have old collect2
+	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
+	    # It fails to find uninstalled libraries when the uninstalled
+	    # path is not listed in the libpath.  Setting hardcode_minus_L
+	    # to unsupported forces relinking
+	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+          esac
+          shared_flag='-shared'
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag="$shared_flag "'${wl}-G'
+	  fi
+        else
+          # not using gcc
+          if test "$host_cpu" = ia64; then
+	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	  # chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+          else
+	    if test "$aix_use_runtimelinking" = yes; then
+	      shared_flag='${wl}-G'
+	    else
+	      shared_flag='${wl}-bM:SRE'
+	    fi
+          fi
+        fi
+
+        _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
+          # 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([$1])
+          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        else
+          if test "$host_cpu" = ia64; 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"
+          else
+	    # Determine the default libpath from the value encoded in an
+	    # empty executable.
+	    _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'
+	    if test "$with_gnu_ld" = yes; 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'
+          fi
+        fi
+        ;;
+
+      beos*)
+	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; 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'
+	else
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+
+      chorus*)
+        case $cc_basename in
+          *)
+	  # FIXME: insert proper C++ library support
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	  ;;
+        esac
+        ;;
+
+      cygwin* | mingw* | pw32* | cegcc*)
+	case $GXX,$cc_basename in
+	,cl* | no,cl*)
+	  # Native MSVC
+	  # hardcode_libdir_flag_spec is actually meaningless, as there is
+	  # no search path for DLLs.
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	  _LT_TAGVAR(always_export_symbols, $1)=yes
+	  _LT_TAGVAR(file_list_spec, $1)='@'
+	  # Tell ltmain to make .lib files, not .a files.
+	  libext=lib
+	  # Tell ltmain to make .dll files, not .so files.
+	  shrext_cmds=".dll"
+	  # FIXME: Setting linknames here is a bad hack.
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	    else
+	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	    fi~
+	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	    linknames='
+	  # The linker will not automatically build a static lib if we build a DLL.
+	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	  # Don't use ranlib
+	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+	    lt_tool_outputfile="@TOOL_OUTPUT@"~
+	    case $lt_outputfile in
+	      *.exe|*.EXE) ;;
+	      *)
+		lt_outputfile="$lt_outputfile.exe"
+		lt_tool_outputfile="$lt_tool_outputfile.exe"
+		;;
+	    esac~
+	    func_to_tool_file "$lt_outputfile"~
+	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	      $RM "$lt_outputfile.manifest";
+	    fi'
+	  ;;
+	*)
+	  # g++
+	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+	  # as there is no search path for DLLs.
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	  _LT_TAGVAR(always_export_symbols, $1)=no
+	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	    # If the export-symbols file already is a .def file (1st line
+	    # is EXPORTS), use it as is; otherwise, prepend...
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	      cp $export_symbols $output_objdir/$soname.def;
+	    else
+	      echo EXPORTS > $output_objdir/$soname.def;
+	      cat $export_symbols >> $output_objdir/$soname.def;
+	    fi~
+	    $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	  else
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	  ;;
+	esac
+	;;
+      darwin* | rhapsody*)
+        _LT_DARWIN_LINKER_FEATURES($1)
+	;;
+
+      dgux*)
+        case $cc_basename in
+          ec++*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          ghcx*)
+	    # Green Hills C++ Compiler
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      freebsd2.*)
+        # C++ shared libraries reported to be fairly broken before
+	# switch to ELF
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      freebsd-elf*)
+        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+        ;;
+
+      freebsd* | dragonfly*)
+        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+        # conventions
+        _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_separator, $1)=:
+        _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
+				             # location of the library.
+
+        case $cc_basename in
+          CC*)
+            # FIXME: insert proper C++ library support
+            _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'
+            # Commands to make compiler produce verbose output that lists
+            # what "hidden" libraries, object files and flags are used when
+            # linking a shared library.
+            #
+            # There doesn't appear to be a way to prevent this compiler from
+            # explicitly linking system object files so we need to strip them
+            # from the output so that they don't get included in the library
+            # dependencies.
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $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 $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            else
+              # FIXME: insert proper C++ library support
+              _LT_TAGVAR(ld_shlibs, $1)=no
+            fi
+            ;;
+        esac
+        ;;
+
+      hpux10*|hpux11*)
+        if test $with_gnu_ld = no; 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'
+              ;;
+          esac
+        fi
+        case $host_cpu in
+          hppa*64*|ia64*)
+            _LT_TAGVAR(hardcode_direct, $1)=no
+            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+            ;;
+          *)
+            _LT_TAGVAR(hardcode_direct, $1)=yes
+            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+					         # but as the default
+					         # location of the library.
+            ;;
+        esac
+
+        case $cc_basename in
+          CC*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          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'
+	        ;;
+	      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}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	    esac
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test $with_gnu_ld = no; 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'
+	            ;;
+	          ia64*)
+	            _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 $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	        esac
+	      fi
+	    else
+	      # FIXME: insert proper C++ library support
+	      _LT_TAGVAR(ld_shlibs, $1)=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      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'
+	;;
+      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" && 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
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    _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 $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 $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_separator, $1)=:
+        _LT_TAGVAR(inherit_rpath, $1)=yes
+        ;;
+
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    _LT_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.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+
+	    _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.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+	    ;;
+	  icpc* | ecpc* )
+	    # Intel C++
+	    with_gnu_ld=yes
+	    # version 8.0 and above of icpc choke on multiply defined symbols
+	    # if we add $predep_objects and $postdep_objects, however 7.1 and
+	    # earlier do not add the objects themselves.
+	    case `$CC -V 2>&1` in
+	      *"Version 7."*)
+	        _LT_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'
+		;;
+	    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'
+	    ;;
+          pgCC* | pgcpp*)
+            # Portland Group C++ compiler
+	    case `$CC -V` in
+	    *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 | 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 | 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 | 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 | sort | $NL2SP` $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; 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'
+
+	    runpath_var=LD_RUN_PATH
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $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.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`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* | 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(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'
+	    fi
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *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(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; 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='func_echo_all'
+
+	      # Archives containing C++ object files must be created using
+	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	      # necessary to make sure instantiated templates are included
+	      # in the archive.
+	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+
+      lynxos*)
+        # FIXME: insert proper C++ library support
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      m88k*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      mvs*)
+        case $cc_basename in
+          cxx*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+	  *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+	esac
+	;;
+
+      netbsd*)
+        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+	  wlarc=
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	fi
+	# Workaround some broken pre-1.5 toolchains
+	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+	;;
+
+      *nto* | *qnx*)
+        _LT_TAGVAR(ld_shlibs, $1)=yes
+	;;
+
+      openbsd2*)
+        # C++ shared libraries are fairly broken
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      openbsd*)
+	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'
+	  fi
+	  output_verbose_link_cmd=func_echo_all
+	else
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+
+      osf3* | osf4* | osf5*)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    _LT_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_separator, $1)=:
+
+	    # Archives containing C++ object files must be created using
+	    # the KAI C++ compiler.
+	    case $host in
+	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+	    esac
+	    ;;
+          RCC*)
+	    # Rational C++ 2.4.1
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          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" && 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" && 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 "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
+	          $RM $lib.exp'
+	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+		;;
+	    esac
+
+	    _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.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`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}\*'
+	      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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	        *)
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	      esac
+
+	      _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 -v "^Configured with:" | $GREP "\-L"'
+
+	    else
+	      # FIXME: insert proper C++ library support
+	      _LT_TAGVAR(ld_shlibs, $1)=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      psos*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      sunos4*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.x
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          lcc*)
+	    # Lucid
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      solaris*)
+        case $cc_basename in
+          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_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	    case $host_os in
+	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+	      *)
+		# The compiler driver will combine and reorder linker options,
+		# but understands `-z linker_flag'.
+	        # Supported since Solaris 2.6 (maybe 2.5.1?)
+		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	        ;;
+	    esac
+	    _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+	    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
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	    ;;
+          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'
+
+	    # 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 $CC --version | $GREP -v '^2\.7' > /dev/null; then
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        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
+	        # 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_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+	      fi
+
+	      _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'
+		  ;;
+	      esac
+	    fi
+	    ;;
+        esac
+        ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _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 -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
+	# 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(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_separator, $1)=':'
+	_LT_TAGVAR(link_all_deplibs, $1)=yes
+	_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(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'
+	    ;;
+	esac
+      ;;
+
+      tandem*)
+        case $cc_basename in
+          NCC*)
+	    # NonStop-UX NCC 3.20
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      vxworks*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      *)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+    esac
+
+    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+    _LT_TAGVAR(GCC, $1)="$GXX"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## 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...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+  LDCXX=$LD
+  LD=$lt_save_LD
+  GCC=$lt_save_GCC
+  with_gnu_ld=$lt_save_with_gnu_ld
+  lt_cv_path_LDCXX=$lt_cv_path_LD
+  lt_cv_path_LD=$lt_save_path_LD
+  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+#
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+AC_REQUIRE([_LT_DECL_SED])
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+func_stripname_cnf ()
+{
+  case ${2} in
+  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+  esac
+} # func_stripname_cnf
+])# _LT_FUNC_STRIPNAME_CNF
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# 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)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library.  It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer a
+      a=0
+      return
+      end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+_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
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  for p in `eval "$output_verbose_link_cmd"`; do
+    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
+	 prev=$p
+	 continue
+       fi
+
+       # Expand the sysroot to ease extracting the directories later.
+       if test -z "$prev"; then
+         case $p in
+         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+         esac
+       fi
+       case $p in
+       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+       esac
+       if test "$pre_test_object_deps_done" = no; then
+	 case ${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}"
+	   else
+	     _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
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+	 else
+	   _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.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+	   _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"
+	 else
+	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  _LT_TAGVAR(predep_objects,$1)=
+  _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* | sunCC*)
+    # 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
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+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!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+    [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+    [Dependencies to place before and after the objects being linked to
+    create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+    [The library search path used internally by the compiler when linking
+    a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _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'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_LANG_PUSH(Fortran 77)
+if test -z "$F77" || test "X$F77" = "Xno"; then
+  _lt_disable_F77=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_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_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_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
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# 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
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code="\
+      program t
+      end
+"
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_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_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
+  CC=${F77-"f77"}
+  CFLAGS=$FFLAGS
+  compiler=$CC
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+  GCC=$G77
+  if test -n "$compiler"; then
+    AC_MSG_CHECKING([if libtool supports shared libraries])
+    AC_MSG_RESULT([$can_build_shared])
+
+    AC_MSG_CHECKING([whether to build shared libraries])
+    test "$can_build_shared" = "no" && enable_shared=no
+
+    # On AIX, shared libraries and static libraries use the same namespace, and
+    # are all built from PIC.
+    case $host_os in
+      aix3*)
+        test "$enable_shared" = yes && enable_static=no
+        if test -n "$RANLIB"; then
+          archive_cmds="$archive_cmds~\$RANLIB \$lib"
+          postinstall_cmds='$RANLIB $lib'
+        fi
+        ;;
+      aix[[4-9]]*)
+	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+	  test "$enable_shared" = yes && enable_static=no
+	fi
+        ;;
+    esac
+    AC_MSG_RESULT([$enable_shared])
+
+    AC_MSG_CHECKING([whether to build static libraries])
+    # Make sure either enable_shared or enable_static is yes.
+    test "$enable_shared" = yes || enable_static=yes
+    AC_MSG_RESULT([$enable_static])
+
+    _LT_TAGVAR(GCC, $1)="$G77"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## 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...
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC="$lt_save_CC"
+  CFLAGS="$lt_save_CFLAGS"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _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'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_LANG_PUSH(Fortran)
+
+if test -z "$FC" || test "X$FC" = "Xno"; then
+  _lt_disable_FC=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_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_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_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
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# 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
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code="\
+      program t
+      end
+"
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_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_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
+  CC=${FC-"f95"}
+  CFLAGS=$FCFLAGS
+  compiler=$CC
+  GCC=$ac_cv_fc_compiler_gnu
+
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+
+  if test -n "$compiler"; then
+    AC_MSG_CHECKING([if libtool supports shared libraries])
+    AC_MSG_RESULT([$can_build_shared])
+
+    AC_MSG_CHECKING([whether to build shared libraries])
+    test "$can_build_shared" = "no" && enable_shared=no
+
+    # On AIX, shared libraries and static libraries use the same namespace, and
+    # are all built from PIC.
+    case $host_os in
+      aix3*)
+        test "$enable_shared" = yes && enable_static=no
+        if test -n "$RANLIB"; then
+          archive_cmds="$archive_cmds~\$RANLIB \$lib"
+          postinstall_cmds='$RANLIB $lib'
+        fi
+        ;;
+      aix[[4-9]]*)
+	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+	  test "$enable_shared" = yes && enable_static=no
+	fi
+        ;;
+    esac
+    AC_MSG_RESULT([$enable_shared])
+
+    AC_MSG_CHECKING([whether to build static libraries])
+    # Make sure either enable_shared or enable_static is yes.
+    test "$enable_shared" = yes || enable_static=yes
+    AC_MSG_RESULT([$enable_static])
+
+    _LT_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
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# 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'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_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=${GCJ-"gcj"}
+CFLAGS=$GCJFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_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
+
+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_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
+
+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'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_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=
+CC=${RC-"windres"}
+CFLAGS=
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+  :
+  _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+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"
+      AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+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],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_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
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && continue
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# 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%"$_lt_dummy"}, \
+      = c,a/b,b/c, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+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
+  lt_unset=unset
+else
+  lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
+# ------------------------------------------------------
+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
+m4_defun([_LT_PROG_FUNCTION_REPLACE],
+[dnl {
+sed -e '/^$1 ()$/,/^} # $1 /c\
+$1 ()\
+{\
+m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+])
+
+
+# _LT_PROG_REPLACE_SHELLFNS
+# -------------------------
+# Replace existing portable implementations of several shell functions with
+# equivalent extended shell implementations where those features are available..
+m4_defun([_LT_PROG_REPLACE_SHELLFNS],
+[if test x"$xsi_shell" = xyes; then
+  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
+    case ${1} in
+      */*) func_dirname_result="${1%/*}${2}" ;;
+      *  ) func_dirname_result="${3}" ;;
+    esac])
+
+  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
+    func_basename_result="${1##*/}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
+    case ${1} in
+      */*) func_dirname_result="${1%/*}${2}" ;;
+      *  ) func_dirname_result="${3}" ;;
+    esac
+    func_basename_result="${1##*/}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
+    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+    # positional parameters, so assign one to ordinary parameter first.
+    func_stripname_result=${3}
+    func_stripname_result=${func_stripname_result#"${1}"}
+    func_stripname_result=${func_stripname_result%"${2}"}])
+
+  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
+    func_split_long_opt_name=${1%%=*}
+    func_split_long_opt_arg=${1#*=}])
+
+  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
+    func_split_short_opt_arg=${1#??}
+    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
+
+  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
+    case ${1} in
+      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+      *)    func_lo2o_result=${1} ;;
+    esac])
+
+  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
+
+  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
+
+  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
+fi
+
+if test x"$lt_shell_append" = xyes; then
+  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
+    func_quote_for_eval "${2}"
+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
+    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
+
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
+fi
+])
+
+# _LT_PATH_CONVERSION_FUNCTIONS
+# -----------------------------
+# Determine which file name conversion functions should be used by
+# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
+# for certain cross-compile configurations and native mingw.
+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_MSG_CHECKING([how to convert $build file names to $host format])
+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+[case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
+    ;;
+  *-*-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
+])
+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
+
+# Helper functions for option handling.                    -*- Autoconf -*-
+#
+#   Copyright (C) 2004, 2005, 2007, 2008, 2009 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 7 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
+# saved as a flag.
+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
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+		      [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME.  If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+    [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+  dnl
+  dnl Simply set some default values (i.e off) if boolean options were not
+  dnl specified:
+  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+  ])
+  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+  ])
+  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 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_SET_OPTIONS
+
+
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+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.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS],      [1], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_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.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+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'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+    _LT_DECL([build_libtool_libs], [enable_shared], [0],
+	[Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+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'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+    _LT_DECL([build_old_libs], [enable_static], [0],
+	[Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+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'.
+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],
+    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+	 [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+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.])
+])
+
+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.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# 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'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
+	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [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=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+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.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+		 [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+		 [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+		 [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+		 [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+		 [m4_define([_LTDL_TYPE], [convenience])])
+
+# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 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 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+       [$#], [2], [[$2]],
+       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# 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])],
+       [$#], 1, [],
+       [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# 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
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+	     [m4_foreach([_Lt_suffix],
+		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+		 [lt_append([$1], [$2], [$3])$4],
+		 [$5])],
+	  [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+	[$5],
+    [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+  [lt_join(m4_quote(m4_default([$4], [[, ]])),
+           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
+
+# ltversion.m4 -- version numbers			-*- Autoconf -*-
+#
+#   Copyright (C) 2004 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.
+
+# @configure_input@
+
+# serial 3337 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.4.2])
+m4_define([LT_PACKAGE_REVISION], [1.3337])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.4.2'
+macro_revision='1.3337'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
+
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
+#
+#   Copyright (C) 2004, 2005, 2007, 2009 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 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)
+# 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.
+#
+# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# 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. 
+#
+# 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
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
+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_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])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+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])])
+
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# serial 1 (pkg-config-0.24)
+# 
+# Copyright © 2004 Scott James Remnant <scott@netsplit.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 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+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
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+# only at the first occurence in configure.ac, so if the first place
+# it's called might be skipped (such as if it is within an "if", you
+# 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])
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+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
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+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
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# 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
+])# PKG_CHECK_MODULES
+
+
+# PKG_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable pkgconfigdir as the location where a module
+# should install pkg-config .pc files. By default the directory is
+# $libdir/pkgconfig, but the default can be changed by passing
+# DIRECTORY. The user can override through the --with-pkgconfigdir
+# 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
+
+
+# PKG_NOARCH_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable noarch_pkgconfigdir as the location where a
+# module should install arch-independent pkg-config .pc files. By
+# default the directory is $datadir/pkgconfig, but the default can be
+# changed by passing DIRECTORY. The user can override through the
+# --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
+
+
+# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# -------------------------------------------
+# 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
+])# PKG_CHECK_VAR
+
+# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.13'
+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.13.4], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.13.4])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is '.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997-2013 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_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[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='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999-2013 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.
+
+
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "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
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+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],
+[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_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  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
+    # 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_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE([dependency-tracking], [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-2013 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_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # 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
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named 'Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running 'make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "$am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # 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'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each '.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.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
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[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], [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
+
+# 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])
+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.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+			     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+		  [_AM_DEPENDENCIES([CC])],
+		  [m4_define([AC_PROG_CC],
+			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+		  [_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])],
+		  [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
+])
+
+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
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != 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-2013 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.
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
+
+# Copyright (C) 2001-2013 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_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[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.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# 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_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997-2013 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_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it 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
+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=
+  AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+
+#  -*- Autoconf -*-
+# Obsolete and "removed" macros, that must however still report explicit
+# error messages when used, to smooth transition.
+#
+# Copyright (C) 1996-2013 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.
+
+AC_DEFUN([AM_CONFIG_HEADER],
+[AC_DIAGNOSE([obsolete],
+['$0': this macro is obsolete.
+You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
+AC_CONFIG_HEADERS($@)])
+
+AC_DEFUN([AM_PROG_CC_STDC],
+[AC_PROG_CC
+am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
+AC_DIAGNOSE([obsolete],
+['$0': this macro is obsolete.
+You should simply use the 'AC][_PROG_CC' macro instead.
+Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
+but upon 'ac_cv_prog_cc_stdc'.])])
+
+AC_DEFUN([AM_C_PROTOTYPES],
+         [AC_FATAL([automatic de-ANSI-fication support has been removed])])
+AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001-2013 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_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 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])
+# 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 (
+   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
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+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-2013 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-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor 'install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in "make install-strip", and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip".  However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# 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-2013 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_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+#
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.  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'
+
+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
+
+    # 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
+
+  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
+
diff --git a/jni/libucommon/sources/autoconf/config.guess b/jni/libucommon/sources/autoconf/config.guess
new file mode 100755
index 0000000..1804e9f
--- /dev/null
+++ b/jni/libucommon/sources/autoconf/config.guess
@@ -0,0 +1,1535 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012, 2013 Free Software Foundation, Inc.
+
+timestamp='2012-12-29'
+
+# 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.
+#
+# 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 Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner. 
+#
+# 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 with a ChangeLog entry to config-patches@gnu.org.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
+2012, 2013 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the 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
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep -q __ELF__
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+		os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit ;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+	exit ;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    alpha:OSF1:*:*)
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	# 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
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+	echo powerpc-ibm-os400
+	exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit ;;
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7; exit ;;
+	esac ;;
+    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.*:*)
+	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
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+	echo m68k-unknown-mint${UNAME_RELEASE}
+	exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit ;;
+    AViiON:dgux:*:*)
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+	exit ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit ;;
+    *:AIX:*:[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`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case "${sc_cpu_version}" in
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case "${sc_kernel_bits}" in
+			  32) HP_ARCH="hppa2.0n" ;;
+			  64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+			esac ;;
+		    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^		//' << EOF >$dummy.c
+
+		#define _HPUX_SOURCE
+		#include <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);
+
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep -q __LP64__
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	echo unknown-hitachi-hiuxwe2
+	exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+	exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+	exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+	exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+	exit ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    5000:UNIX_System_V:4.*:*)
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:FreeBSD:*:*)
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case ${UNAME_PROCESSOR} in
+	    amd64)
+		echo x86_64-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 ;;
+    i*:MSYS*:*)
+	echo ${UNAME_MACHINE}-pc-msys
+	exit ;;
+    i*:windows32*:*)
+	# uname -m includes "-pc" on this system.
+	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit ;;
+    *:Interix*:*)
+	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    authenticamd | genuineintel | EM64T)
+		echo x86_64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	    IA64)
+		echo ia64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
+    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
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    *:GNU:*:*)
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	exit ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit ;;
+    aarch64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+	esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${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
+	else
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	    else
+		echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+	    fi
+	fi
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    cris:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-gnu
+	exit ;;
+    crisv32:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    hexagon:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    i*86:Linux:*:*)
+	LIBC=gnu
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef ${UNAME_MACHINE}
+	#undef ${UNAME_MACHINE}el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=${UNAME_MACHINE}el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=${UNAME_MACHINE}
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    or32:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    padre:Linux:*:*)
+	echo sparc-unknown-linux-gnu
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit ;;
+    sh64*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-gnu
+	exit ;;
+    x86_64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    xtensa*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+	# Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit ;;
+    i*86:*:5:[678]*)
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming 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 ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
+    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 ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit ;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <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
+	echo hppa1.1-stratus-sysv4
+	exit ;;
+    *:*:*:FTX*)
+	# From seanf@swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo hppa1.1-stratus-vos
+	exit ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+		echo mips-nec-sysv${UNAME_RELEASE}
+	else
+		echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+	exit ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit ;;
+    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 ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
+	    i386)
+		eval $set_cc_for_build
+		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		      grep IS_64BIT_ARCH >/dev/null
+		  then
+		      UNAME_PROCESSOR="x86_64"
+		  fi
+		fi ;;
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSE-*:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit ;;
+    SEI:*:*:SEIUX)
+	echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+    i*86:AROS:*:*)
+	echo ${UNAME_MACHINE}-pc-aros
+	exit ;;
+    x86_64:VMkernel:*:*)
+	echo ${UNAME_MACHINE}-unknown-esx
+	exit ;;
+esac
+
+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
+	exit ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    c34*)
+	echo c34-convex-bsd
+	exit ;;
+    c38*)
+	echo c38-convex-bsd
+	exit ;;
+    c4*)
+	echo c4-convex-bsd
+	exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/jni/libucommon/sources/autoconf/config.sub b/jni/libucommon/sources/autoconf/config.sub
new file mode 100755
index 0000000..52f04bc
--- /dev/null
+++ b/jni/libucommon/sources/autoconf/config.sub
@@ -0,0 +1,1790 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+#   2011, 2012, 2013 Free Software Foundation, Inc.
+
+timestamp='2012-12-29'
+
+# 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.
+#
+# 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 Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches with a ChangeLog entry 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.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <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, 2009, 2010, 2011,
+2012, 2013 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
+  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 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis | -knuth | -cray | -microblaze*)
+		os=
+		basic_machine=$1
+		;;
+	-bluegene*)
+		os=-cnk
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+	-chorusrdb)
+		os=-chorusrdb
+		basic_machine=$1
+		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*178)
+		os=-lynxos178
+		;;
+	-lynx*5)
+		os=-lynxos5
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| 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[2-8] | armv[3-8][lb] | armv7[arm] \
+	| avr | avr32 \
+	| be32 | be64 \
+	| bfin \
+	| c4x | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| epiphany \
+	| fido | fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| hexagon \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| le32 | le64 \
+	| lm32 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64octeon | mips64octeonel \
+	| mips64orion | mips64orionel \
+	| mips64r5900 | mips64r5900el \
+	| mips64vr | mips64vrel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| moxie \
+	| mt \
+	| msp430 \
+	| nds32 | nds32le | nds32be \
+	| nios | nios2 \
+	| ns16k | ns32k \
+	| open8 \
+	| or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
+	| pyramid \
+	| rl78 | rx \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+	| ubicom32 \
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+	| we32k \
+	| x86 | xc16x | xstormy16 | xtensa \
+	| z8k | z80)
+		basic_machine=$basic_machine-unknown
+		;;
+	c54x)
+		basic_machine=tic54x-unknown
+		;;
+	c55x)
+		basic_machine=tic55x-unknown
+		;;
+	c6x)
+		basic_machine=tic6x-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+	ms1)
+		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.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| aarch64-* | aarch64_be-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* | avr32-* \
+	| be32-* | be64-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
+	| clipper-* | craynv-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| hexagon-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| le32-* | le64-* \
+	| lm32-* \
+	| m32c-* | m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+	| microblaze-* | microblazeel-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64octeon-* | mips64octeonel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64r5900-* | mips64r5900el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
+	| msp430-* \
+	| nds32-* | nds32le-* | nds32be-* \
+	| nios-* | nios2-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+	| pyramid-* \
+	| 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-* | sv1-* | sx?-* \
+	| tahoe-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tile*-* \
+	| tron-* \
+	| ubicom32-* \
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+	| vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
+	| xstormy16-* | xtensa*-* \
+	| ymp-* \
+	| z8k-* | z80-*)
+		;;
+	# Recognize the basic CPU types without company name, with glob match.
+	xtensa*)
+		basic_machine=$basic_machine-unknown
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	abacus)
+		basic_machine=abacus-unknown
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aros)
+		basic_machine=i386-pc
+		os=-aros
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	blackfin)
+		basic_machine=bfin-unknown
+		os=-linux
+		;;
+	blackfin-*)
+		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
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16 | cr16-*)
+		basic_machine=cr16-unknown
+		os=-elf
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dicos)
+		basic_machine=i686-pc
+		os=-dicos
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m68knommu)
+		basic_machine=m68k-unknown
+		os=-linux
+		;;
+	m68knommu-*)
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	microblaze*)
+		basic_machine=microblaze-xilinx
+		;;
+	mingw64)
+		basic_machine=x86_64-pc
+		os=-mingw64
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
+	msys)
+		basic_machine=i386-pc
+		os=-msys
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	nacl)
+		basic_machine=le32-unknown
+		os=-nacl
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	openrisc | openrisc-*)
+		basic_machine=or32-unknown
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	parisc)
+		basic_machine=hppa-unknown
+		os=-linux
+		;;
+	parisc-*)
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc | ppcbe)	basic_machine=powerpc-unknown
+		;;
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rdos | rdos64)
+		basic_machine=x86_64-pc
+		os=-rdos
+		;;
+	rdos32)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sde)
+		basic_machine=mipsisa32-sde
+		os=-elf
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh5el)
+		basic_machine=sh5le-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tile*)
+		basic_machine=$basic_machine-unknown
+		os=-linux-gnu
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	z80-*-coff)
+		basic_machine=z80-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+	# First match some system type aliases
+	# that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-auroraux)
+		os=-auroraux
+		;;
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+	      | -sym* | -kopensolaris* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* | -aros* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -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* | -cegcc* \
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+	-os400*)
+		os=-os400
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-syllable*)
+		os=-syllable
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+	-tpf*)
+		os=-tpf
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-dicos*)
+		os=-dicos
+		;;
+	-nacl*)
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	score-*)
+		os=-elf
+		;;
+	spu-*)
+		os=-elf
+		;;
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	hexagon-*)
+		os=-elf
+		;;
+	tic54x-*)
+		os=-coff
+		;;
+	tic55x-*)
+		os=-coff
+		;;
+	tic6x-*)
+		os=-coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mep-*)
+		os=-elf
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-haiku)
+		os=-haiku
+		;;
+	*-ibm)
+		os=-aix
+		;;
+	*-knuth)
+		os=-mmixware
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-cnk*|-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-os400*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-tpf*)
+				vendor=ibm
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/jni/libucommon/sources/autoconf/depcomp b/jni/libucommon/sources/autoconf/depcomp
new file mode 100755
index 0000000..4ebd5b3
--- /dev/null
+++ b/jni/libucommon/sources/autoconf/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-2013 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:
diff --git a/jni/libucommon/sources/autoconf/install-sh b/jni/libucommon/sources/autoconf/install-sh
new file mode 100755
index 0000000..377bb86
--- /dev/null
+++ b/jni/libucommon/sources/autoconf/install-sh
@@ -0,0 +1,527 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2011-11-20.07; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# 'make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" ""	$nl"
+
+# 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
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+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.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
+
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+	shift;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
+
+    -o) chowncmd="$chownprog $2"
+	shift;;
+
+    -s) stripcmd=$stripprog;;
+
+    -t) 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;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)	shift
+	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
+
+    *)  break;;
+  esac
+  shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+    # Protect names problematic for 'test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call 'install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if 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.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names problematic for 'test' and other utilities.
+  case $src in
+    -* | [=\(\)!]) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+    dst=$dst_arg
+
+    # 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
+      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'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  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-writable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+	/*) prefix='/';;
+	[-=\(\)!]*) prefix='./';;
+	*)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+	test X"$d" = X && continue
+
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
+	else
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
+	fi
+	prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+	# Now remove or move aside any old file at destination location.
+	# We try this two ways since rm can't unlink itself on some
+	# systems and the destination file might be busy for other
+	# reasons.  In this case, the final cleanup might fail but the new
+	# file should still install successfully.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
+
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/jni/libucommon/sources/autoconf/ltmain.sh b/jni/libucommon/sources/autoconf/ltmain.sh
new file mode 100644
index 0000000..63ae69d
--- /dev/null
+++ b/jni/libucommon/sources/autoconf/ltmain.sh
@@ -0,0 +1,9655 @@
+
+# libtool (GNU libtool) 2.4.2
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008, 2009, 2010, 2011 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
+#       --no-quiet, --no-silent
+#                            print informational messages (default)
+#       --no-warn            don't display warning messages
+#       --tag=TAG            use configuration variables from tag TAG
+#   -v, --verbose            print more informational messages than default
+#       --no-verbose         don't print the extra informational messages
+#       --version            print version information
+#   -h, --help, --help-all   print short, long, or detailed 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)
+#         $progname:	(GNU libtool) 2.4.2
+#         automake:	$automake_version
+#         autoconf:	$autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+# General help using GNU software: <http://www.gnu.org/gethelp/>.
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION=2.4.2
+TIMESTAMP=""
+package_revision=1.3337
+
+# 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
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# NLS nuisances: We save the old values to restore during execute mode.
+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
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
+
+$lt_unset CDPATH
+
+
+# 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"
+
+
+
+: ${CP="cp -f"}
+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${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 file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+    func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+    if test "X$func_dirname_result" = "X${1}"; then
+      func_dirname_result="${3}"
+    else
+      func_dirname_result="$func_dirname_result${2}"
+    fi
+} # func_dirname may be replaced by extended shell implementation
+
+
+# func_basename file
+func_basename ()
+{
+    func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+} # func_basename may be replaced by extended shell implementation
+
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   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 "${1}" | $SED -e "$dirname"`
+    if test "X$func_dirname_result" = "X${1}"; then
+      func_dirname_result="${3}"
+    else
+      func_dirname_result="$func_dirname_result${2}"
+    fi
+    func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
+} # func_dirname_and_basename may be replaced by extended shell implementation
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+    case ${2} in
+      .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+      *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+    esac
+} # func_stripname may be replaced by extended shell implementation
+
+
+# These SED scripts presuppose an absolute path with a trailing slash.
+pathcar='s,^/\([^/]*\).*$,\1,'
+pathcdr='s,^/[^/]*,,'
+removedotparts=':dotsl
+		s@/\./@/@g
+		t dotsl
+		s,/\.$,/,'
+collapseslashes='s@/\{1,\}@/@g'
+finalslash='s,/*$,/,'
+
+# 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.
+#             value returned in "$func_normal_abspath_result"
+func_normal_abspath ()
+{
+  # 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 "$removedotparts" -e "$collapseslashes" -e "$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 "$pathcar"`
+    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$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_normal_abspath_result=$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_relative_path SRCDIR DSTDIR
+# generates a relative path from SRCDIR to DSTDIR, with a trailing
+# slash if non-empty, suitable for immediately appending a filename
+# without needing to append a separator.
+#             value returned in "$func_relative_path_result"
+func_relative_path ()
+{
+  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 "x$func_relative_path_tlibdir" = x ; 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 "x$func_stripname_result" != x ; then
+    func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+  fi
+
+  # Normalisation. If bindir is libdir, return empty string,
+  # else relative path ending with a slash; either way, target
+  # file name can be directly appended.
+  if test ! -z "$func_relative_path_result"; then
+    func_stripname './' '' "$func_relative_path_result/"
+    func_relative_path_result=$func_stripname_result
+  fi
+}
+
+# The name of this program:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+
+# 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=${PATH_SEPARATOR-:}
+     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'
+
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
+
+# Sed substitution that converts a w32 file name or path
+# which contains forward slashes, into one that contains
+# (escaped) backslashes.  A very naive implementation.
+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# 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: ${opt_mode+$opt_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_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*"
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+    $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+    $opt_warning && $ECHO "$progname: ${opt_mode+$opt_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 "$my_directory_path" | $SED -e "$dirname"`
+      done
+      my_dir_list=`$ECHO "$my_dir_list" | $SED '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 "$my_tmpdir"
+}
+
+
+# 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 "$1" | $SED "$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 "$1" | $SED \
+	    -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_tr_sh
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result.  All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+  case $1 in
+  [0-9]* | *[!a-zA-Z0-9_]*)
+    func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+    ;;
+  * )
+    func_tr_sh_result=$1
+    ;;
+  esac
+}
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+    $opt_debug
+
+    $SED -n '/(C)/!b go
+	:more
+	/\./!{
+	  N
+	  s/\n# / /
+	  b more
+	}
+	:go
+	/^# '$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 ()
+{
+    $opt_debug
+
+    $SED -n '/^# Usage:/,/^#  *.*--help/ {
+        s/^# //
+	s/^# *$//
+	s/\$progname/'$progname'/
+	p
+    }' < "$progpath"
+    echo
+    $ECHO "run \`$progname --help | more' for full usage"
+    exit $?
+}
+
+# func_help [NOEXIT]
+# Echo long help message to standard output and exit,
+# unless 'noexit' is passed as argument.
+func_help ()
+{
+    $opt_debug
+
+    $SED -n '/^# Usage:/,/# Report bugs to/ {
+	:print
+        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-automake} --version) 2>/dev/null |$SED 1q`"'/
+	s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
+	p
+	d
+     }
+     /^# .* home page:/b print
+     /^# General help using/b print
+     ' < "$progpath"
+    ret=$?
+    if test -z "$1"; then
+      exit $ret
+    fi
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+    $opt_debug
+
+    func_error "missing argument for $1."
+    exit_cmd=exit
+}
+
+
+# func_split_short_opt shortopt
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+func_split_short_opt ()
+{
+    my_sed_short_opt='1s/^\(..\).*$/\1/;q'
+    my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
+
+    func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
+    func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
+} # func_split_short_opt may be replaced by extended shell implementation
+
+
+# func_split_long_opt longopt
+# Set func_split_long_opt_name and func_split_long_opt_arg shell
+# variables after splitting LONGOPT at the `=' sign.
+func_split_long_opt ()
+{
+    my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+    my_sed_long_arg='1s/^--[^=]*=//'
+
+    func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
+    func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
+} # func_split_long_opt may be replaced by extended shell implementation
+
+exit_cmd=:
+
+
+
+
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+nonopt=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+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=
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+    eval "${1}=\$${1}\${2}"
+} # func_append may be replaced by extended shell implementation
+
+# func_append_quoted var value
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+func_append_quoted ()
+{
+    func_quote_for_eval "${2}"
+    eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
+} # func_append_quoted may be replaced by extended shell implementation
+
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+    func_arith_result=`expr "${@}"`
+} # func_arith may be replaced by extended shell implementation
+
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+    func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
+} # func_len may be replaced by extended shell implementation
+
+
+# func_lo2o object
+func_lo2o ()
+{
+    func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
+} # func_lo2o may be replaced by extended shell implementation
+
+
+# func_xform libobj-or-source
+func_xform ()
+{
+    func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
+} # func_xform may be replaced by extended shell implementation
+
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+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
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+  if test "$package_revision" != "$macro_revision"; then
+    if test "$VERSION" != "$macro_version"; then
+      if test -z "$macro_version"; then
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      else
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      fi
+    else
+      cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+    fi
+
+    exit $EXIT_MISMATCH
+  fi
+}
+
+
+# Shorthand for --mode=foo, only valid as the first argument
+case $1 in
+clean|clea|cle|cl)
+  shift; set dummy --mode clean ${1+"$@"}; shift
+  ;;
+compile|compil|compi|comp|com|co|c)
+  shift; set dummy --mode compile ${1+"$@"}; shift
+  ;;
+execute|execut|execu|exec|exe|ex|e)
+  shift; set dummy --mode execute ${1+"$@"}; shift
+  ;;
+finish|finis|fini|fin|fi|f)
+  shift; set dummy --mode finish ${1+"$@"}; shift
+  ;;
+install|instal|insta|inst|ins|in|i)
+  shift; set dummy --mode install ${1+"$@"}; shift
+  ;;
+link|lin|li|l)
+  shift; set dummy --mode link ${1+"$@"}; shift
+  ;;
+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+  shift; set dummy --mode uninstall ${1+"$@"}; shift
+  ;;
+esac
+
+
+
+# Option defaults:
+opt_debug=:
+opt_dry_run=false
+opt_config=false
+opt_preserve_dup_deps=false
+opt_features=false
+opt_finish=false
+opt_help=false
+opt_help_all=false
+opt_silent=:
+opt_warning=:
+opt_verbose=:
+opt_silent=false
+opt_verbose=false
+
+
+# Parse options once, thoroughly.  This comes as soon as possible in the
+# script to make things like `--version' happen as quickly as we can.
+{
+  # this just eases exit handling
+  while test $# -gt 0; do
+    opt="$1"
+    shift
+    case $opt in
+      --debug|-x)	opt_debug='set -x'
+			func_echo "enabling shell trace mode"
+			$opt_debug
+			;;
+      --dry-run|--dryrun|-n)
+			opt_dry_run=:
+			;;
+      --config)
+			opt_config=:
+func_config
+			;;
+      --dlopen|-dlopen)
+			optarg="$1"
+			opt_dlopen="${opt_dlopen+$opt_dlopen
+}$optarg"
+			shift
+			;;
+      --preserve-dup-deps)
+			opt_preserve_dup_deps=:
+			;;
+      --features)
+			opt_features=:
+func_features
+			;;
+      --finish)
+			opt_finish=:
+set dummy --mode finish ${1+"$@"}; shift
+			;;
+      --help)
+			opt_help=:
+			;;
+      --help-all)
+			opt_help_all=:
+opt_help=': help-all'
+			;;
+      --mode)
+			test $# = 0 && func_missing_arg $opt && break
+			optarg="$1"
+			opt_mode="$optarg"
+case $optarg in
+  # Valid mode arguments:
+  clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+  # Catch anything else as an error
+  *) func_error "invalid argument for $opt"
+     exit_cmd=exit
+     break
+     ;;
+esac
+			shift
+			;;
+      --no-silent|--no-quiet)
+			opt_silent=false
+func_append preserve_args " $opt"
+			;;
+      --no-warning|--no-warn)
+			opt_warning=false
+func_append preserve_args " $opt"
+			;;
+      --no-verbose)
+			opt_verbose=false
+func_append preserve_args " $opt"
+			;;
+      --silent|--quiet)
+			opt_silent=:
+func_append preserve_args " $opt"
+        opt_verbose=false
+			;;
+      --verbose|-v)
+			opt_verbose=:
+func_append preserve_args " $opt"
+opt_silent=false
+			;;
+      --tag)
+			test $# = 0 && func_missing_arg $opt && break
+			optarg="$1"
+			opt_tag="$optarg"
+func_append preserve_args " $opt $optarg"
+func_enable_tag "$optarg"
+			shift
+			;;
+
+      -\?|-h)		func_usage				;;
+      --help)		func_help				;;
+      --version)	func_version				;;
+
+      # Separate optargs to long options:
+      --*=*)
+			func_split_long_opt "$opt"
+			set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
+			shift
+			;;
+
+      # Separate non-argument short options:
+      -\?*|-h*|-n*|-v*)
+			func_split_short_opt "$opt"
+			set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
+			shift
+			;;
+
+      --)		break					;;
+      -*)		func_fatal_help "unrecognized option \`$opt'" ;;
+      *)		set dummy "$opt" ${1+"$@"};	shift; break  ;;
+    esac
+  done
+
+  # Validate options:
+
+  # save first non-option argument
+  if test "$#" -gt 0; then
+    nonopt="$opt"
+    shift
+  fi
+
+  # preserve --debug
+  test "$opt_debug" = : || func_append preserve_args " --debug"
+
+  case $host in
+    *cygwin* | *mingw* | *pw32* | *cegcc*)
+      # 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
+
+    if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+      func_fatal_configuration "not configured to build any kind of library"
+    fi
+
+    # Darwin sucks
+    eval std_shrext=\"$shrext_cmds\"
+
+    # Only execute mode is allowed to have -dlopen flags.
+    if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
+      func_error "unrecognized option \`-dlopen'"
+      $ECHO "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Change the help message to a mode-specific one.
+    generic_help="$help"
+    help="Try \`$progname --help --mode=$opt_mode' for more information."
+  }
+
+
+  # Bail if the options were screwed
+  $exit_cmd $EXIT_FAILURE
+}
+
+
+
+
+## ----------- ##
+##    Main.    ##
+## ----------- ##
+
+# 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_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 ()
+{
+    $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_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 ()
+{
+    $opt_debug
+    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 "$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}"
+    }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+  $opt_debug
+  func_convert_core_file_wine_to_w32_result="$1"
+  if test -n "$1"; then
+    # Unfortunately, winepath does not exit with a non-zero error code, so we
+    # are forced to check the contents of stdout. On the other hand, if the
+    # command is not found, the shell will set an exit code of 127 and print
+    # *an error message* to stdout. So we must check for both error code of
+    # zero AND non-empty stdout, which explains the odd construction:
+    func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+    if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
+      func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+        $SED -e "$lt_sed_naive_backslashify"`
+    else
+      func_convert_core_file_wine_to_w32_result=
+    fi
+  fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+  $opt_debug
+  # unfortunately, winepath doesn't convert paths, only file names
+  func_convert_core_path_wine_to_w32_result=""
+  if test -n "$1"; then
+    oldIFS=$IFS
+    IFS=:
+    for func_convert_core_path_wine_to_w32_f in $1; do
+      IFS=$oldIFS
+      func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+      if test -n "$func_convert_core_file_wine_to_w32_result" ; then
+        if test -z "$func_convert_core_path_wine_to_w32_result"; then
+          func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
+        else
+          func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+        fi
+      fi
+    done
+    IFS=$oldIFS
+  fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+  $opt_debug
+  if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+    func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+    if test "$?" -ne 0; then
+      # on failure, ensure result is empty
+      func_cygpath_result=
+    fi
+  else
+    func_cygpath_result=
+    func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
+  fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format.  Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+  $opt_debug
+  # awkward: cmd appends spaces to result
+  func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+    $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+  $opt_debug
+  if test -z "$2" && test -n "$1" ; then
+    func_error "Could not determine host file name corresponding to"
+    func_error "  \`$1'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback:
+    func_to_host_file_result="$1"
+  fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+  $opt_debug
+  if test -z "$4" && test -n "$3"; then
+    func_error "Could not determine the host path corresponding to"
+    func_error "  \`$3'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback.  This is a deliberately simplistic "conversion" and
+    # should not be "improved".  See libtool.info.
+    if test "x$1" != "x$2"; then
+      lt_replace_pathsep_chars="s|$1|$2|g"
+      func_to_host_path_result=`echo "$3" |
+        $SED -e "$lt_replace_pathsep_chars"`
+    else
+      func_to_host_path_result="$3"
+    fi
+  fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+  $opt_debug
+  case $4 in
+  $1 ) func_to_host_path_result="$3$func_to_host_path_result"
+    ;;
+  esac
+  case $4 in
+  $2 ) func_append func_to_host_path_result "$3"
+    ;;
+  esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via `$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+  $opt_debug
+  $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result.  If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+  $opt_debug
+  case ,$2, in
+    *,"$to_tool_file_cmd",*)
+      func_to_tool_file_result=$1
+      ;;
+    *)
+      $to_tool_file_cmd "$1"
+      func_to_tool_file_result=$func_to_host_file_result
+      ;;
+  esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+  func_to_host_file_result="$1"
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_to_host_file_result="$func_convert_core_msys_to_w32_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+    # LT_CYGPATH in this case.
+    func_to_host_file_result=`cygpath -m "$1"`
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format.  Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_file_wine_to_w32 "$1"
+    func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_msys_to_w32_result"
+    func_to_host_file_result="$func_cygpath_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format.  Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set.  Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+    func_convert_core_file_wine_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+    func_to_host_file_result="$func_cygpath_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via `$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format.  If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+#   file name conversion function    : func_convert_file_X_to_Y ()
+#   path conversion function         : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same.  If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+  $opt_debug
+  if test -z "$to_host_path_cmd"; then
+    func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+    to_host_path_cmd="func_convert_path_${func_stripname_result}"
+  fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+  $opt_debug
+  func_init_to_host_path_cmd
+  $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+  func_to_host_path_result="$1"
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # Remove leading and trailing path separator characters from ARG.  MSYS
+    # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+    # and winepath ignores them completely.
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result="$func_convert_core_msys_to_w32_result"
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format.  Requires a wine environment and
+# a working winepath.  Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+    func_to_host_path_result="$func_cygpath_result"
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format.  Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set.  Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # Remove leading and trailing path separator characters from
+    # ARG. msys behavior is inconsistent here, cygpath turns them
+    # into '.;' and ';.', and winepath ignores them completely.
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+    func_to_host_path_result="$func_cygpath_result"
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+    $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)
+          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 "$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 "$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 "$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
+      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 "$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
+	func_append command " -o $lobj"
+      fi
+
+      func_show_eval_locale "$command"	\
+          'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+      if test "$need_locks" = warn &&
+	 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
+	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 "$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 "$opt_mode" = compile && 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
+  -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 ()
+{
+    $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 $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 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 "$opt_mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+    $opt_debug
+    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_silent && 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 "$opt_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.
+       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=no
+    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=yes ;;
+      -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$prev" = x-m && 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=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.
+	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
+	    ;;
+	  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 "$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 "$lib" | $SED '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 "$relink_command" | $SED '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 "$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 "$opt_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
+
+#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 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+	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 "$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
+
+	  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[];
+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) ;;
+	  *) 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"'
+
+	# 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_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+  $opt_debug
+  win32_libid_type="unknown"
+  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
+      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
+		}
+	    }'`
+      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 ()
+{
+  $opt_debug
+  sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+  $opt_debug
+  match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+  $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+    $SED '/^Contents of section '"$match_literal"':/{
+      # Place marker at beginning of archive member dllname section
+      s/.*/====MARK====/
+      p
+      d
+    }
+    # These lines can sometimes be longer than 43 characters, but
+    # are always uninteresting
+    /:[	 ]*file format pe[i]\{,1\}-/d
+    /^In archive [^:]*:/d
+    # Ensure marker is printed
+    /^====MARK====/p
+    # Remove all lines with less than 43 characters
+    /^.\{43\}/!d
+    # From remaining lines, remove first 43 characters
+    s/^.\{43\}//' |
+    $SED -n '
+      # Join marker and all lines until next marker into a single line
+      /^====MARK====/ b para
+      H
+      $ b para
+      b
+      :para
+      x
+      s/\n//g
+      # Remove the marker
+      s/^====MARK====//
+      # Remove trailing dots and whitespace
+      s/[\. \t]*$//
+      # Print
+      /./p' |
+    # we now have a list, one entry per line, of the stringified
+    # contents of the appropriate section of all members of the
+    # archive which possess that section. Heuristic: eliminate
+    # all those which have a first or second character that is
+    # a '.' (that is, objdump's representation of an unprintable
+    # character.) This should work for all archives with less than
+    # 0x302f exports -- but will fail for DLLs whose name actually
+    # begins with a literal '.' or a single character followed by
+    # a '.'.
+    #
+    # Of those that remain, print the first one.
+    $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+  $opt_debug
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+  test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+  $opt_debug
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+  test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+#    $sharedlib_from_linklib_cmd
+# Result is available in the variable
+#    $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+  $opt_debug
+  if func_cygming_gnu_implib_p "$1" ; then
+    # binutils import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+  elif func_cygming_ms_implib_p "$1" ; then
+    # ms-generated import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+  else
+    # unknown
+    sharedlib_from_linklib_result=""
+  fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    $opt_debug
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+    if test "$lock_old_archive_extraction" = yes; 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 "$lock_old_archive_extraction" = yes; 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 ()
+{
+    $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 | 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 in which 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$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.
+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/ which is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options which 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$TIMESTAMP) $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 "$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"
+
+	# fixup the dll searchpath if we need to.
+	#
+	# Fix the DLL searchpath if we need to.  Do this before prepending
+	# to shlibpath, because on Windows, both are PATH and uninstalled
+	# libraries must come first.
+	if test -n "$dllsearchpath"; then
+	  $ECHO "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	  $ECHO "\
+    # 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$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.
+*/
+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>
+
+/* 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 platforms) ... */
+#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
+# ifndef _INTPTR_T_DEFINED
+#  define _INTPTR_T_DEFINED
+#  define intptr_t int
+# endif
+#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 ((void *) 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
+volatile 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_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 "$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-"
+
+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;
+  intptr_t rval = 127;
+
+  int i;
+
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  newargz = XMALLOC (char *, 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 (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"
+	  lt_dump_script (stdout);
+	  return 0;
+	}
+      if (strcmp (argv[i], debug_opt) == 0)
+	{
+          lt_debug = 1;
+          continue;
+	}
+      if (strcmp (argv[i], ltwrapper_option_prefix) == 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 (__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$TIMESTAMP) $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 = _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];
+  int 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 = 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 (strcmp (str, pat) == 0)
+	*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
+    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;
+}
+
+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 #' */
+      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)
+{
+  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 ()
+{
+    $opt_debug
+    case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+    *import*) : ;;
+    *) false ;;
+    esac
+}
+
+# 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
+    bindir=
+    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
+	bindir)
+	  bindir="$arg"
+	  prev=
+	  continue
+	  ;;
+	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
+	      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
+	  ;;
+	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 "$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
+		      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 "$prev" = dlprefiles; 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 "$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 "*) ;;
+	    *) 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$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"
+	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$arg" = "X-lc" || test "X$arg" = "X-lm"; 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$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
+	    func_append 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
+	func_append 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|--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
+	;;
+
+      -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
+      # @file                GCC response files
+      # -tp=*                Portland pgcc target processor selection
+      # --sysroot=*          for sysroot support
+      # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+      -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*|-flto*|-fwhopr*|-fuse-linker-plugin)
+        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
+        ;;
+
+      # 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 "$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
+		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 "$prev" = dlprefiles; 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 "$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.
+	func_append deplibs " $arg"
+	func_append old_deplibs " $arg"
+	continue
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	func_resolve_sysroot "$arg"
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  func_append dlfiles " $func_resolve_sysroot_result"
+	  prev=
+	elif test "$prev" = dlprefiles; 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 "$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 \"\${$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\"
+
+    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 "$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 "*) 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=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% $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=
+	  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 "$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|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    func_append compiler_flags " $deplib"
+	    if test "$linkmode" = lib ; then
+		case "$new_inherited_linker_flags " in
+		    *" $deplib "*) ;;
+		    * ) func_append new_inherited_linker_flags " $deplib" ;;
+		esac
+	    fi
+	  fi
+	  continue
+	  ;;
+	-l*)
+	  if test "$linkmode" != lib && test "$linkmode" != prog; then
+	    func_warning "\`-l' is ignored for archives/objects"
+	    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 "*) ;;
+		    * ) func_append 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"
+	    func_resolve_sysroot "$func_stripname_result"
+	    func_append newlib_search_path " $func_resolve_sysroot_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"
+	    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 "$pass" = link; 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 "$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 \"$deplib\"" 2>/dev/null | $SED 10q \
+		    | $EGREP "$match_pattern_regex" > /dev/null; then
+		    valid_a_lib=yes
+		  fi
+		;;
+		pass_all)
+		  valid_a_lib=yes
+		;;
+	      esac
+	      if test "$valid_a_lib" != yes; then
+		echo
+		$ECHO "*** Warning: Trying to link with static lib archive $deplib."
+		echo "*** I have the capability to make that library automatically link in when"
+		echo "*** you link to this library.  But I can only do this if you have a"
+		echo "*** shared version of the library, which you do not appear to have"
+		echo "*** because the file extensions .$libext of this argument makes me believe"
+		echo "*** that it is just a static archive that I should not 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.
+	      func_append newdlprefiles " $deplib"
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      func_append 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 "$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 "$linkmode,$pass" = "lib,link" ||
+	   test "$linkmode,$pass" = "prog,scan" ||
+	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+	  test -n "$dlopen" && func_append dlfiles " $dlopen"
+	  test -n "$dlpreopen" && func_append 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.
+	    func_append convenience " $ladir/$objdir/$old_library"
+	    func_append 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_preserve_dup_deps ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+	      esac
+	    fi
+	    func_append tmp_libs " $deplib"
+	  done
+	  continue
+	fi # $pass = conv
+
+
+	# Get the name of the library we link against.
+	linklib=
+	if test -n "$old_library" &&
+	   { test "$prefer_static_libs" = yes ||
+	     test "$prefer_static_libs,$installed" = "built,no"; }; 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 "$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.
+	    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 "X$installed" = Xyes; 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 "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
+	    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 "$pass" = dlpreopen; then
+	  if test -z "$libdir" && test "$linkmode" = prog; then
+	    func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+	  fi
+	  case "$host" in
+	    # special handling for platforms with PE-DLLs.
+	    *cygwin* | *mingw* | *cegcc* )
+	      # Linker will automatically link against shared library if both
+	      # static and shared are present.  Therefore, ensure we extract
+	      # symbols from the import library if a shared library is present
+	      # (otherwise, the dlopen module name will be incorrect).  We do
+	      # this by putting the import library name into $newdlprefiles.
+	      # We recover the dlopen module name by 'saving' the la file
+	      # name in a special purpose variable, and (later) extracting the
+	      # dlname from the la file.
+	      if test -n "$dlname"; then
+	        func_tr_sh "$dir/$linklib"
+	        eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+	        func_append newdlprefiles " $dir/$linklib"
+	      else
+	        func_append newdlprefiles " $dir/$old_library"
+	        # Keep a list of preopened convenience libraries to check
+	        # that they are being used correctly in the link pass.
+	        test -z "$libdir" && \
+	          func_append dlpreconveniencelibs " $dir/$old_library"
+	      fi
+	    ;;
+	    * )
+	      # Prefer using a static library (so that no silly _DYNAMIC symbols
+	      # are required to link).
+	      if test -n "$old_library"; then
+	        func_append newdlprefiles " $dir/$old_library"
+	        # Keep a list of preopened convenience libraries to check
+	        # that they are being used correctly in the link pass.
+	        test -z "$libdir" && \
+	          func_append dlpreconveniencelibs " $dir/$old_library"
+	      # Otherwise, use the dlname, so that lt_dlopen finds it.
+	      elif test -n "$dlname"; then
+	        func_append newdlprefiles " $dir/$dlname"
+	      else
+	        func_append newdlprefiles " $dir/$linklib"
+	      fi
+	    ;;
+	  esac
+	fi # $pass = dlpreopen
+
+	if test -z "$libdir"; then
+	  # Link the convenience library
+	  if test "$linkmode" = lib; then
+	    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
+	  func_append newlib_search_path " $ladir"
+	  deplibs="$lib $deplibs"
+
+	  linkalldeplibs=no
+	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
+	     test "$build_libtool_libs" = no; then
+	    linkalldeplibs=yes
+	  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 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_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 "$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:"*) ;;
+	      *) 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 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
+	      func_append notinst_deplibs " $lib"
+	      need_relink=no
+	    ;;
+	  *)
+	    if test "$installed" = no; 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 "$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 "*) ;;
+	      *) 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*)
+	        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 "$opt_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$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 "$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:"*) ;;
+	      *) func_append 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:"*) ;;
+		*) func_append finalize_shlibpath "$libdir:" ;;
+		esac
+	      fi
+	    fi
+	  fi
+
+	  if test "$linkmode" = prog || test "$opt_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:"*) ;;
+	      *) func_append 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
+		  [\\/]*)
+		    func_append 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 "*) ;;
+		   *) 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 "$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"
+	    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 "$link_all_deplibs" != no; 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 "$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 " $new_inherited_linker_flags" | $SED '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 "*) ;;
+	    *) func_append 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 "*) ;;
+	      *) func_append tmp_libs " $deplib" ;;
+	      esac
+	      ;;
+	    *) func_append 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
+	  func_append 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"
+      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 "$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!"
+	  func_append 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
+	  # correct linux to gnu/linux during the next big refactor
+	  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|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
+	    ;;
+	  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) # 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 "$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.
+	  func_append 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"
+      func_append libobjs " $symfileobj"
+      test "X$libobjs" = "X " && libobjs=
+
+      if test "$opt_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
+	       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 "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; 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 "$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 "*) ;;
+	*) 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 "$build_libtool_libs" = yes; 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 "$build_libtool_need_lc" = "yes"; 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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; 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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; 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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; 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 "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  if test "$want_nocaseglob" = yes; then
+		    shopt -s nocaseglob
+		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+		    $nocaseglob
+		  else
+		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+		  fi
+		  for potent_lib in $potential_libs; do
+		      # Follow soft links.
+		      if ls -lLd "$potent_lib" 2>/dev/null |
+			 $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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; 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 "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 " $tmp_deplibs" | $SED "s,$i,,"`
+	    done
+	  fi
+	  case $tmp_deplibs in
+	  *[!\	\ ]*)
+	    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
+	    ;;
+	  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 "$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 " $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 "$build_libtool_libs" = yes; then
+	# Remove ${wl} instances when linking with ld.
+	# FIXME: should test the right _cmds variable.
+	case $archive_cmds in
+	  *\$LD\ *) wl= ;;
+        esac
+	if test "$hardcode_into_libs" = yes; then
+	  # Hardcode the library paths
+	  hardcode_libdirs=
+	  dep_rpath=
+	  rpath="$finalize_rpath"
+	  test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
+	  for libdir in $rpath; do
+	    if test -n "$hardcode_libdir_flag_spec"; then
+	      if test -n "$hardcode_libdir_separator"; then
+		func_replace_sysroot "$libdir"
+		libdir=$func_replace_sysroot_result
+		if test -z "$hardcode_libdirs"; then
+		  hardcode_libdirs="$libdir"
+		else
+		  # 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 "$opt_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
+	  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
+	    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 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 "$try_normal_branch" = yes \
+		 && { test "$len" -lt "$max_cmd_len" \
+		      || test "$max_cmd_len" -le -1; }
+	      then
+		func_show_eval "$cmd" 'exit $?'
+		skipped_export=false
+	      elif test -n "$nm_file_list_spec"; then
+		func_basename "$output"
+		output_la=$func_basename_result
+		save_libobjs=$libobjs
+		save_output=$output
+		output=${output_objdir}/${output_la}.nm
+		func_to_tool_file "$output"
+		libobjs=$nm_file_list_spec$func_to_tool_file_result
+		func_append delfiles " $output"
+		func_verbose "creating $NM input file list: $output"
+		for obj in $save_libobjs; do
+		  func_to_tool_file "$obj"
+		  $ECHO "$func_to_tool_file_result"
+		done > "$output"
+		eval cmd=\"$cmd1\"
+		func_show_eval "$cmd" 'exit $?'
+		output=$save_output
+		libobjs=$save_libobjs
+		skipped_export=false
+	      else
+		# The command line is too long to execute in one step.
+		func_verbose "using reloadable object file for export list..."
+		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 "$include_expsyms" | $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
+	  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 "$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"
+	    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 "$thread_safe" = yes && 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 "$opt_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
+	  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 "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
+	      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 "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
+	      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 "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.
+		    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
+
+	    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 "$opt_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 "$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
+	  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"
+	  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="$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 "$opt_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 "$opt_mode" = relink; then
+	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+	  if test -n "$convenience"; then
+	    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 "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+	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 "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      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 " $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 "$tagname" = CXX ; 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 "$build_old_libs" = yes; 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@" "no"
+
+      # template prelinking step
+      if test -n "$prelink_cmds"; then
+	func_execute_cmds "$prelink_cmds" 'exit $?'
+      fi
+
+      wrappers_required=yes
+      case $host in
+      *cegcc* | *mingw32ce*)
+        # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+        wrappers_required=no
+        ;;
+      *cygwin* | *mingw* )
+        if test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      *)
+        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 "$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
+      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
+	    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 "$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 "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$opt_dry_run || $RM $output
+	# Link the executable and exit
+	func_show_eval "$link_command" 'exit $?'
+
+	if test -n "$postlink_cmds"; then
+	  func_to_tool_file "$output"
+	  postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+	  func_execute_cmds "$postlink_cmds" 'exit $?'
+	fi
+
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+	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 "$compile_var$compile_command$compile_rpath" | $SED '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 "$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
+
+      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
+	    func_append oldobjs " $symfileobj"
+	  fi
+	fi
+	addlibs="$old_convenience"
+      fi
+
+      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 "$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"
+	  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 "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 "$relink_command" | $SED "$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"
+		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 "x$bindir" != x ;
+	      then
+		func_relative_path "$install_libdir" "$bindir"
+		tdlname=$func_relative_path_result$dlname
+	      else
+		# Otherwise fall back on heuristic.
+		tdlname=../bin/$dlname
+	      fi
+	      ;;
+	  esac
+	  $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# 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 "$opt_mode" = link || test "$opt_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) func_append RM " $arg"; rmforce=yes ;;
+      -*) 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 "X$dir" = X.; then
+	odir="$objdir"
+      else
+	odir="$dir/$objdir"
+      fi
+      func_basename "$file"
+      name="$func_basename_result"
+      test "$opt_mode" = uninstall && odir="$dir"
+
+      # Remember odir for removal later, being careful to avoid duplicates
+      if test "$opt_mode" = clean; 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 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
+	    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" '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
+	    func_append rmfiles " $dir/$pic_object"
+	  fi
+
+	  # Add non-PIC object to the list of files to remove.
+	  if test -n "$non_pic_object" &&
+	     test "$non_pic_object" != none; then
+	    func_append rmfiles " $dir/$non_pic_object"
+	  fi
+	fi
+	;;
+
+      *)
+	if test "$opt_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
+	    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 "$fast_install" = yes && 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
+}
+
+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
+    func_mode_uninstall ${1+"$@"}
+
+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
+# 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/jni/libucommon/sources/autoconf/missing b/jni/libucommon/sources/autoconf/missing
new file mode 100755
index 0000000..cdea514
--- /dev/null
+++ b/jni/libucommon/sources/autoconf/missing
@@ -0,0 +1,215 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2012-06-26.16; # UTC
+
+# Copyright (C) 1996-2013 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 'automa4te' 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/jni/libucommon/sources/autoconf/test-driver b/jni/libucommon/sources/autoconf/test-driver
new file mode 100755
index 0000000..32bf39e
--- /dev/null
+++ b/jni/libucommon/sources/autoconf/test-driver
@@ -0,0 +1,127 @@
+#! /bin/sh
+# test-driver - basic testsuite driver script.
+
+scriptversion=2012-06-27.10; # UTC
+
+# Copyright (C) 2011-2013 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
+The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+END
+}
+
+# TODO: better error handling in option parsing (in particular, ensure
+# TODO: $log_file, $trs_file and $test_name are defined).
+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'";;
+  esac
+  shift
+done
+
+if test $color_tests = yes; then
+  # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
+  red='' # Red.
+  grn='' # Green.
+  lgn='' # Light green.
+  blu='' # Blue.
+  mgn='' # Magenta.
+  std=''     # 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
+  estatus=1
+fi
+
+case $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 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/jni/libucommon/sources/autogen.sh b/jni/libucommon/sources/autogen.sh
new file mode 100755
index 0000000..2ddb8dc
--- /dev/null
+++ b/jni/libucommon/sources/autogen.sh
@@ -0,0 +1,98 @@
+#!/bin/sh
+# Copyright (C) 2006-2007 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+WANT_AUTOCONF_2_5=1
+export WANT_AUTOCONF_2_5
+
+rm -rf autoconf auto*.cache libtool
+if test ! -d autoconf ; then mkdir autoconf ; fi
+
+libtoolize="libtoolize"
+for lt in glibtoolize libtoolize15 libtoolize14 libtoolize13 ; do
+    if test -x /usr/bin/$lt ; then
+        libtoolize=$lt ; break
+    fi
+    if test -x /usr/local/bin/$lt ; then
+        libtoolize=$lt ; break
+    fi
+done
+$libtoolize --copy --force
+
+AUTOMAKE_FLAGS=""
+case $libtoolize in
+*glibtoolize)
+    AUTOMAKE_FLAGS="-i"
+    ;;
+esac
+
+ACLOCALDIRS=""
+if test -d m4 ; then
+    ACLOCALDIRS="-I m4" ; fi
+
+if test ! -z "$ACLOCAL" ; then
+    ACLOCALDIRS="$ACLOCALDIRS "${ACLOCAL}
+elif test ! -z "$ACLOCAL_FLAGS" ; then
+    ACLOCALDIRS="$ACLOCALDIRS $ACLOCAL_FLAGS" ; fi
+
+reconf=""
+if test -f ~/.configure ; then
+    reconf=`grep ^reconfig: ~/.configure | sed -e s/^reconfig://`
+elif test -f /etc/configure.conf ; then
+    reconf=`grep ^reconfig: /etc/configure.conf | sed -e s/^reconfig://` ; fi
+if test ! -z "$reconf" ; then ACLOCALDIRS="$ACLOCALDIRS $reconf" ; fi
+
+if [ -d ~/share/aclocal ] ; then
+    ACLOCALDIRS="$ACLOCALDIRS -I ~/share/aclocal"
+elif [ -d /usr/local/share/aclocal ] ; then
+    ACLOCALDIRS="$ACLOCALDIRS -I /usr/local/share/aclocal"
+fi
+
+if test ! -z "$1" -o ! -z "${AUTOCONF_SUFFIX}" ; then
+    ver="$1"
+else
+    for v in 2.53 2.57 ; do
+        if test -f /usr/bin/autoconf-$v ; then
+                ver=$v
+        fi
+    done
+fi
+
+if test "$ver" = "2.53" -a -z "$AUTOMAKE_SUFFIX" ; then
+    if test -f /usr/bin/automake-1.5 ; then
+        AUTOMAKE_SUFFIX="-1.5"
+    fi
+fi
+
+aclocal${AUTOMAKE_SUFFIX} $ACLOCALDIRS
+
+if test -f /usr/bin/autoheader-$ver ; then
+    /usr/bin/autoheader-$ver
+else
+    autoheader${AUTOCONF_SUFFIX}
+fi
+
+automake${AUTOMAKE_SUFFIX} --add-missing --copy ${AUTOMAKE_FLAGS}
+
+if test -f /usr/bin/autoconf-$ver ; then
+    /usr/bin/autoconf-$ver
+else
+    autoconf${AUTOCONF_SUFFIX}
+fi
+rm -f config.cache
+
+# fix for some broken...
+
+if test -f /usr/bin/automake-1.4 ; then
+    if test -f ltmain.sh ; then
+        cp ltmain.sh autoconf/ltmain.sh
+    fi
+fi
+
diff --git a/jni/libucommon/sources/autom4te.cache/output.0 b/jni/libucommon/sources/autom4te.cache/output.0
new file mode 100644
index 0000000..e9c87c2
--- /dev/null
+++ b/jni/libucommon/sources/autom4te.cache/output.0
@@ -0,0 +1,22380 @@
+@%:@! /bin/sh
+@%:@ Guess values for system-dependent variables and create Makefiles.
+@%:@ Generated by GNU Autoconf 2.69 for ucommon 6.0.7.
+@%:@ 
+@%:@ 
+@%:@ 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. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # 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_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+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
+# 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
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in @%:@(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+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
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+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
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# 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='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# 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 -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
+    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+    PATH=/empty FPATH=/empty; export PATH FPATH
+    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
+      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+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 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 @S|@? 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 "@S|@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 @S|@as_val. Take advantage of shells that can avoid forks. The arguments
+@%:@ must be portable across @S|@(()) 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 @S|@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
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# 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_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 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
+}
+
+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
+
+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 -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 mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+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'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# 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.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIB@&t@OBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='ucommon'
+PACKAGE_TARNAME='ucommon'
+PACKAGE_VERSION='6.0.7'
+PACKAGE_STRING='ucommon 6.0.7'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_unique_file="inc/ucommon/ucommon.h"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIB@&t@OBJS
+LT_GENERIC
+LT_VERSION
+COMPAT
+SECURE
+SECURE_LIBS
+SECURE_LOCAL
+UCOMMON_LIBS
+UCOMMON_LIBC
+UCOMMON_CLINK
+UCOMMON_FLAGS
+UCOMMON_MODEL
+UCOMMON_LINKED
+UCOMMON_VISIBILITY
+CHECKFLAGS
+DOXYGEN
+UCOMMON_PREFIX
+UCOMMON_VARPATH
+UCOMMON_CFGPATH
+UCOMMON_LOCALE
+UCOMMON_INCLUDES
+GNUTLS_LIBS
+GNUTLS_CFLAGS
+OPENSSL_LIBS
+OPENSSL_CFLAGS
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+libs
+includes
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+MANIFEST_TOOL
+AWK
+RANLIB
+STRIP
+ac_ct_AR
+AR
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+EGREP
+GREP
+SED
+LIBTOOL
+OBJDUMP
+DLLTOOL
+AS
+CXXCPP
+ac_ct_CXX
+CXXFLAGS
+CXX
+CPP
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
+enable_dependency_tracking
+enable_silent_rules
+enable_posix_timers
+enable_stdcpp
+with_sslstack
+with_libc
+enable_debug
+enable_socks
+enable_atomics
+enable_pth
+with_pkg_config
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+CXX
+CXXFLAGS
+CCC
+CXXCPP
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+OPENSSL_CFLAGS
+OPENSSL_LIBS
+GNUTLS_CFLAGS
+GNUTLS_LIBS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) 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.
+    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 ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $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}"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  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'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_myself" : 'X\(//\)[^/]' \| \
+	 X"$as_myself" : 'X\(//\)$' \| \
+	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures ucommon 6.0.7 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking ...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          @<:@@S|@ac_default_prefix@:>@
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          @<:@PREFIX@:>@
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root @<:@DATAROOTDIR/doc/ucommon@:>@
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of ucommon 6.0.7:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-shared@<:@=PKGS@:>@  build shared libraries @<:@default=yes@:>@
+  --enable-static@<:@=PKGS@:>@  build static libraries @<:@default=yes@:>@
+  --enable-fast-install@<:@=PKGS@:>@ 
+                          optimize for fast installation @<:@default=yes@:>@
+  --disable-libtool-lock  avoid locking (might break parallel builds)
+  --enable-dependency-tracking 
+                          do not reject slow dependency extractors
+  --disable-dependency-tracking 
+                          speeds up one-time build
+  --enable-silent-rules   less verbose build output (undo: "make V=1")
+  --disable-silent-rules  verbose build output (undo: "make V=0")
+  --enable-posix-timers   enable posix timers
+  --disable-stdcpp        compile without stdc++ runtime overhead
+  --enable-debug          compile for debugging
+  --enable-socks          compile with socks proxy support
+
+      --enable-atomics        enable gcc atomic support
+
+      --enable-pth            always use GNU pth for threading
+
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-pic@<:@=PKGS@:>@       try to use only PIC/non-PIC objects @<:@default=use
+                          both@:>@
+  --with-gnu-ld           assume the C compiler uses GNU ld @<:@default=no@:>@
+  --with-sysroot=DIR Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).
+  --with-sslstack=lib     specify which ssl stack to build
+  --with-libc=path        specify path to alternate libc
+  --with-pkg-config       enable support for pkg-config
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  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    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  CXXCPP      C++ preprocessor
+  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
+  OPENSSL_CFLAGS 
+              C compiler flags for OPENSSL, overriding pkg-config
+  OPENSSL_LIBS 
+              linker flags for OPENSSL, overriding pkg-config
+  GNUTLS_CFLAGS 
+              C compiler flags for GNUTLS, overriding pkg-config
+  GNUTLS_LIBS linker flags for GNUTLS, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+ucommon configure 6.0.7
+generated by GNU Autoconf 2.69
+
+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
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+@%:@ ac_fn_c_try_compile LINENO
+@%:@ --------------------------
+@%:@ Try to compile conftest.@S|@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
+
+	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.@S|@ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  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
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} @%:@ ac_fn_c_try_cpp
+
+@%:@ ac_fn_cxx_try_compile LINENO
+@%:@ ----------------------------
+@%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded.
+ac_fn_cxx_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_cxx_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
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} @%:@ ac_fn_cxx_try_compile
+
+@%:@ ac_fn_cxx_try_cpp LINENO
+@%:@ ------------------------
+@%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_cpp ()
+{
+  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_cxx_preproc_warn_flag$ac_cxx_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
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} @%:@ ac_fn_cxx_try_cpp
+
+@%:@ ac_fn_c_try_link LINENO
+@%:@ -----------------------
+@%:@ Try to link conftest.@S|@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
+
+	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
+
+} @%:@ ac_fn_c_try_link
+
+@%:@ 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
+
+@%:@ ac_fn_c_try_run LINENO
+@%:@ ----------------------
+@%:@ Try to link conftest.@S|@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
+
+} @%:@ ac_fn_c_try_run
+
+@%:@ 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
+
+/* 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.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* 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
+
+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
+
+@%:@ ac_fn_cxx_try_link LINENO
+@%:@ -------------------------
+@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded.
+ac_fn_cxx_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_cxx_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
+
+	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
+
+} @%:@ ac_fn_cxx_try_link
+
+@%:@ 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; }
+
+# 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; }
+
+# 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;}
+    ;;
+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
+
+} @%:@ ac_fn_c_check_header_mongrel
+
+@%:@ ac_fn_cxx_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_cxx_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_cxx_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; }
+
+# 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_cxx_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; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_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;}
+    ;;
+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
+
+} @%:@ ac_fn_cxx_check_header_mongrel
+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 ucommon $as_me 6.0.7, 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;}
+
+# 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
+
+    $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
+
+    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
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+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
+
+# 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
+
+
+
+
+LT_VERSION="6:3:0"
+OPENSSL_REQUIRES="0.9.7"
+
+ac_aux_dir=
+for ac_dir in autoconf "$srcdir"/autoconf; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in autoconf \"$srcdir\"/autoconf" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${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_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${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_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if ${ac_cv_target+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$target_alias" = x; then
+  ac_cv_target=$ac_cv_host
+else
+  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+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
+  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
+
+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
+
+
+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:${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
+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
+
+  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
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $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
+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
+
+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
+
+
+  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
+  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:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $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
+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$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
+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
+
+
+    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 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="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_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
+
+  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
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# 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.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_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:${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:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $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=
+
+else
+  ac_file=''
+fi
+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
+
+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
+  { { $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; }
+
+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 ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+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:${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; }
+  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:${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
+    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; }
+
+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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $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
+
+{ { $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
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $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
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $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
+  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 ()
+{
+
+  ;
+  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.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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
+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;
+}
+
+/* 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"
+  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 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
+      # 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 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 :
+  
+else
+  # 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
+
+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
+
+    done
+    ac_cv_prog_CPP=$CPP
+  
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  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
+if ac_fn_c_try_cpp "$LINENO"; then :
+  
+else
+  # 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
+
+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 :
+  
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+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
+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
+  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
+
+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
+
+
+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:${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
+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
+
+  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
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $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
+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
+
+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
+
+
+  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
+  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:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $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
+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$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
+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
+
+
+    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 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="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_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
+
+  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
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $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
+  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 ()
+{
+
+  ;
+  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.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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
+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;
+}
+
+/* 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"
+  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=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if ${ac_cv_prog_cxx_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+else
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  
+else
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+ac_ext=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=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $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; }
+if test -z "$CXXCPP"; then
+  if ${ac_cv_prog_CXXCPP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <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_cxx_try_cpp "$LINENO"; then :
+  
+else
+  # 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_cxx_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
+
+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
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+  
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <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_cxx_try_cpp "$LINENO"; then :
+  
+else
+  # 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_cxx_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
+
+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 :
+  
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+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=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if ${ac_cv_prog_cxx_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+else
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  
+else
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+ac_ext=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
+
+enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; 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_AS+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AS"; then
+  ac_cv_prog_AS="$AS" # 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_AS="${ac_tool_prefix}as"
+    $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
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+  ac_ct_AS=$AS
+  # Extract the first word of "as", so it can be a program name with args.
+set dummy as; 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_AS+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AS"; then
+  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # 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_AS="as"
+    $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_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_AS" = x; then
+    AS="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
+    AS=$ac_ct_AS
+  fi
+else
+  AS="$ac_cv_prog_AS"
+fi
+
+  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
+
+  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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump"
+    $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
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_OBJDUMP="objdump"
+    $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_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OBJDUMP" = x; then
+    OBJDUMP="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
+    OBJDUMP=$ac_ct_OBJDUMP
+  fi
+else
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+  ;;
+esac
+
+test -z "$AS" && AS=as
+
+    
+    
+    
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+    
+    
+    
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+    
+    
+    
+
+
+
+case `pwd` in
+  *\ * | *\	*)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.4.2'
+macro_revision='1.3337'
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+$as_echo_n "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='printf %s\n'
+else
+  # Use this function as a fallback that always works.
+  func_fallback_echo ()
+  {
+    eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+  }
+  ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "" 
+}
+
+case "$ECHO" in
+  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+$as_echo "printf" >&6; } ;;
+  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+$as_echo "print -r" >&6; } ;;
+  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+$as_echo "cat" >&6; } ;;
+esac
+
+
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $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
+  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
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+{ $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
+
+      $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
+
+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"
+ 
+
+{ $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
+
+      $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
+
+   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"
+ 
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+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
+   then ac_cv_path_FGREP="$GREP -F"
+   else
+     if test -z "$FGREP"; then
+  ac_path_FGREP_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 fgrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+      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
+*GNU*)
+  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_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 '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
+    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"
+      ac_path_FGREP_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_FGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_FGREP"; then
+    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_FGREP=$FGREP
+fi
+
+   fi
+fi
+{ $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"
+ 
+
+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
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $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:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+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
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $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 ${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.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $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
+
+
+
+
+    
+    
+    
+
+
+{ $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 ${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"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  : ${lt_cv_path_NM=no}
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DUMPBIN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DUMPBIN"; then
+  ac_cv_prog_DUMPBIN="$DUMPBIN" # 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_DUMPBIN="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$DUMPBIN" && break
+  done
+fi
+if test -z "$DUMPBIN"; then
+  ac_ct_DUMPBIN=$DUMPBIN
+  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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DUMPBIN"; then
+  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # 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_DUMPBIN="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_DUMPBIN" && break
+done
+
+  if test "x$ac_ct_DUMPBIN" = x; then
+    DUMPBIN=":"
+  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
+    DUMPBIN=$ac_ct_DUMPBIN
+  fi
+fi
+
+    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
+  
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+
+
+    
+    
+    
+
+{ $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 ${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:$LINENO: $ac_compile\"" >&5)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&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:$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:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&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:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ $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 ${lt_cv_sys_max_cmd_len+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+    i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw* | cegcc*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  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*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  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
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      # 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
+        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"`env echo "$teststring$teststring" 2>/dev/null` \
+	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on
+      # massive amounts of additional arguments before passing them to the
+      # linker.  It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+  { $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:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+    
+    
+    
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,b/c, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+fi
+
+    
+    
+    
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
+
+    
+    
+    
+
+    
+    
+    
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
+if ${lt_cv_to_host_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
+    ;;
+  *-*-cygwin* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_noop
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+        ;;
+    esac
+    ;;
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
+    ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+
+    
+    
+    
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
+if ${lt_cv_to_tool_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+        ;;
+    esac
+    ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+
+    
+    
+    
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if ${lt_cv_ld_reload_flag+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+{ $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
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test "$GCC" != yes; then
+      reload_cmds=false
+    fi
+    ;;
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump"
+    $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
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_OBJDUMP="objdump"
+    $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_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OBJDUMP" = x; then
+    OBJDUMP="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
+    OBJDUMP=$ac_ct_OBJDUMP
+  fi
+else
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+{ $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 ${lt_cv_deplibs_check_method+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[45]*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    # 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*)
+  # 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'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+haiku*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-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_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix[3-9]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+  case $host_os in
+  mingw* | pw32*)
+    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+      want_nocaseglob=yes
+    else
+      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+    fi
+    ;;
+  esac
+fi
+
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${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 to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
+    
+    
+    
+
+
+
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in ar
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$AR" && break
+  done
+fi
+if test -z "$AR"; then
+  ac_ct_AR=$AR
+  for ac_prog in ar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_AR" && break
+done
+
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+fi
+
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
+if ${lt_cv_ar_at_file+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ar_at_file=no
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+      if test "$ac_status" -eq 0; then
+	# Ensure the archiver fails upon bogus file names.
+	rm -f conftest.$ac_objext libconftest.a
+	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+	if test "$ac_status" -ne 0; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
+     
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
+
+if test "x$lt_cv_ar_at_file" = xno; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
+
+    
+    
+    
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if 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
+IFS=$as_save_IFS
+
+fi
+fi
+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:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $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_STRIP+:} false; 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 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
+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:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $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
+
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $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
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $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_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $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_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  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
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+    
+    
+    
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+    ;;
+  esac
+  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
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} 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
+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_AWK="$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
+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:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+
+    
+    
+    
+
+    
+    
+    
+
+    
+    
+    
+
+    
+    
+    
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $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 ${lt_cv_sys_global_symbol_pipe+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDEGRST]'
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[BCDEGRST]'
+  ;;
+osf*)
+  symcode='[BCDEGQRST]'
+  ;;
+solaris*)
+  symcode='[BDRT]'
+  ;;
+sco3.2v5*)
+  symcode='[DT]'
+  ;;
+sysv4.2uw2*)
+  symcode='[DT]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[ABDT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
+
+# 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'"
+
+# 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'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  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.
+    # 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};"\
+"     \$ 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))}"\
+"     ' 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
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+  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
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
+  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
+  ac_status=$?
+  $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"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT@&t@_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT@&t@_DLSYM_CONST
+#else
+# define LT@&t@_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+	  cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols.  */
+LT@&t@_DLSYM_CONST struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_globsym_save_LIBS=$LIBS
+	  lt_globsym_save_CFLAGS=$CFLAGS
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS=$lt_globsym_save_LIBS
+	  CFLAGS=$lt_globsym_save_CFLAGS
+	else
+	  echo "cannot find nm_test_func in $nlist" >&5
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&5
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+    fi
+  else
+    echo "$progname: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+  { $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 "$GCC" = yes; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
+$as_echo "${with_sysroot}" >&6; }
+   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+   ;;
+esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
+
+    
+    
+    
+
+@%:@ Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+  enableval=$enable_libtool_lock; 
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+      *ELF-32*)
+	HPUX_IA64_MODE="32"
+	;;
+      *ELF-64*)
+	HPUX_IA64_MODE="64"
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    if test "$lt_cv_prog_gnu_ld" = yes; then
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -melf32bsmip"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -melf32bmipn32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -melf64bmip"
+	;;
+      esac
+    else
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -32"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -n32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -64"
+	  ;;
+      esac
+    fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.o` in
+      *32-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_i386_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_i386"
+	    ;;
+	  powerpc64le-*linux*)
+	    LD="${LD-ld} -m elf32lppclinux"
+	    ;;
+	  powerpc64-*linux*)
+	    LD="${LD-ld} -m elf32ppclinux"
+	    ;;
+	  s390x-*linux*)
+	    LD="${LD-ld} -m elf_s390"
+	    ;;
+	  sparc64-*linux*)
+	    LD="${LD-ld} -m elf32_sparc"
+	    ;;
+	esac
+	;;
+      *64-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_x86_64_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_x86_64"
+	    ;;
+	  powerpcle-*linux*)
+	    LD="${LD-ld} -m elf64lppc"
+	    ;;
+	  powerpc-*linux*)
+	    LD="${LD-ld} -m elf64ppc"
+	    ;;
+	  s390*-*linux*|s390*-*tpf*)
+	    LD="${LD-ld} -m elf64_s390"
+	    ;;
+	  sparc*-*linux*)
+	    LD="${LD-ld} -m elf64_sparc"
+	    ;;
+	esac
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  { $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 ${lt_cv_cc_needs_belf+:} 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
+
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_cc_needs_belf=yes
+else
+  lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*)
+        case $host in
+        i?86-*-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"
+	fi
+	;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${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 "x$lt_cv_path_mainfest_tool" != xyes; then
+  MANIFEST_TOOL=:
+fi
+
+    
+    
+    
+
+
+  case $host_os in
+    rhapsody* | darwin*)
+    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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DSYMUTIL"; then
+  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="${ac_tool_prefix}dsymutil"
+    $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
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DSYMUTIL"; then
+  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # 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_DSYMUTIL="dsymutil"
+    $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_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_DSYMUTIL" = x; then
+    DSYMUTIL=":"
+  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
+    DSYMUTIL=$ac_ct_DSYMUTIL
+  fi
+else
+  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_NMEDIT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$NMEDIT"; then
+  ac_cv_prog_NMEDIT="$NMEDIT" # 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_NMEDIT="${ac_tool_prefix}nmedit"
+    $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
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_NMEDIT"; then
+  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # 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_NMEDIT="nmedit"
+    $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_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_NMEDIT" = x; then
+    NMEDIT=":"
+  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
+    NMEDIT=$ac_ct_NMEDIT
+  fi
+else
+  NMEDIT="$ac_cv_prog_NMEDIT"
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LIPO+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LIPO"; then
+  ac_cv_prog_LIPO="$LIPO" # 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_LIPO="${ac_tool_prefix}lipo"
+    $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
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_LIPO"; then
+  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # 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_LIPO="lipo"
+    $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_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_LIPO" = x; then
+    LIPO=":"
+  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
+    LIPO=$ac_ct_LIPO
+  fi
+else
+  LIPO="$ac_cv_prog_LIPO"
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL"; then
+  ac_cv_prog_OTOOL="$OTOOL" # 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_OTOOL="${ac_tool_prefix}otool"
+    $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
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL"; then
+  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # 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_OTOOL="otool"
+    $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_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OTOOL" = x; then
+    OTOOL=":"
+  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
+    OTOOL=$ac_ct_OTOOL
+  fi
+else
+  OTOOL="$ac_cv_prog_OTOOL"
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL64"; then
+  ac_cv_prog_OTOOL64="$OTOOL64" # 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_OTOOL64="${ac_tool_prefix}otool64"
+    $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
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL64"; then
+  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # 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_OTOOL64="otool64"
+    $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_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OTOOL64" = x; then
+    OTOOL64=":"
+  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
+    OTOOL64=$ac_ct_OTOOL64
+  fi
+else
+  OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+    
+    
+    
+    
+
+    
+    
+    
+    
+
+    
+    
+    
+    
+
+    
+    
+    
+    
+
+    
+    
+    
+    
+
+
+    { $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 ${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
+	# 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
+	# link flags.
+	rm -rf libconftest.dylib*
+	echo "int foo(void){return 1;}" > conftest.c
+	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+	# 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 $_lt_result -eq 0; then
+	  lt_cv_apple_cc_single_mod=yes
+	else
+	  cat conftest.err >&5
+	fi
+	rm -rf libconftest.dylib*
+	rm -f conftest.*
+      fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
+  $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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_ld_exported_symbols_list=yes
+else
+  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"
+    
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+$as_echo_n "checking for -force_load linker flag... " >&6; }
+if ${lt_cv_ld_force_load+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_force_load=no
+      cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+      echo "$AR cru libconftest.a conftest.o" >&5
+      $AR cru libconftest.a conftest.o 2>&5
+      echo "$RANLIB libconftest.a" >&5
+      $RANLIB libconftest.a 2>&5
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+      _lt_result=$?
+      if test -s conftest.err && $GREP force_load conftest.err; then
+	cat conftest.err >&5
+      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
+	lt_cv_ld_force_load=yes
+      else
+	cat conftest.err >&5
+      fi
+        rm -f conftest.err libconftest.a conftest conftest.c
+        rm -rf conftest.dSYM
+    
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+$as_echo "$lt_cv_ld_force_load" >&6; }
+    case $host_os in
+    rhapsody* | darwin1.[012])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+      _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' ;;
+	10.*)
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; 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'
+    else
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+
+
+{ $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 ()
+{
+
+  ;
+  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>
+
+_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 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 :
+  
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat 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
+  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
+{ $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
+
+done
+
+
+for ac_header in dlfcn.h
+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 HAVE_DLFCN_H 1
+_ACEOF
+ 
+fi
+
+done
+
+
+
+
+func_stripname_cnf ()
+{
+  case ${2} in
+  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+  esac
+} # func_stripname_cnf
+
+
+
+
+
+# Set options
+
+
+
+        enable_dlopen=no
+  
+
+  
+            @%:@ Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+  enableval=$enable_shared; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_shared=yes
+fi
+
+
+    
+    
+    
+    
+
+
+
+  @%:@ Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+  enableval=$enable_static; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_static=yes
+fi
+
+
+    
+    
+    
+    
+
+
+
+  
+@%:@ Check whether --with-pic was given.
+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
+
+
+    
+    
+    
+
+
+  @%:@ Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+  enableval=$enable_fast_install; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_fast_install=yes
+fi
+
+
+
+    
+    
+    
+
+
+  
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+    
+    
+    
+
+    
+    
+    
+
+    
+    
+    
+
+    
+    
+    
+
+    
+    
+    
+
+    
+    
+    
+
+    
+    
+    
+test -z "$LN_S" && LN_S="ln -s"
+
+    
+    
+    
+
+    
+    
+    
+
+    
+    
+    
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if ${lt_cv_objdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+    
+    
+    
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LT_OBJDIR "$lt_cv_objdir/"
+_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
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# 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"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+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 "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+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:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+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_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+    
+    
+    
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+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_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  else
+    MAGIC_CMD=:
+  fi
+fi
+
+  fi
+  ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+## 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_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+  case $cc_basename in
+  nvcc*)
+    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+  *)
+    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+  esac
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+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"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&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 "$_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
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+    
+    
+    
+
+
+  lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic='-fPIC'
+        ;;
+      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'.
+            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    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).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
+
+    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
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='-fPIC'
+	;;
+      esac
+      ;;
+
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
+
+    *)
+      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
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      else
+	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    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'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-KPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='--shared'
+	lt_prog_compiler_static='--static'
+	;;
+      nagfor*)
+	# NAG Fortran compiler
+	lt_prog_compiler_wl='-Wl,-Wl,,'
+	lt_prog_compiler_pic='-PIC'
+	lt_prog_compiler_static='-Bstatic'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fpic'
+	lt_prog_compiler_static='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      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,'
+	  ;;
+        *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'
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+	lt_prog_compiler_wl='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic='-Kconform_pic'
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
+  fi
+
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic@&t@ -DPIC"
+    ;;
+esac
+
+{ $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:${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 ${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@&t@ -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&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 "$_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
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+     esac
+else
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+    
+    
+    
+
+
+
+    
+    
+    
+
+#
+# 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:${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 ${lt_cv_prog_compiler_static_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "$_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
+       fi
+     else
+       lt_cv_prog_compiler_static_works=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
+
+
+    
+    
+    
+
+
+  { $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 ${lt_cv_prog_compiler_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&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 "$_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
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+    
+    
+    
+
+
+  { $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 ${lt_cv_prog_compiler_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&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 "$_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
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $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
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+    
+    
+    
+
+
+  { $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=
+  allow_undefined_flag=
+  always_export_symbols=no
+  archive_cmds=
+  archive_expsym_cmds=
+  compiler_needs_object=no
+  enable_shared_with_static_runtimes=no
+  export_dynamic_flag_spec=
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  hardcode_automatic=no
+  hardcode_direct=no
+  hardcode_direct_absolute=no
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_separator=
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  inherit_rpath=no
+  link_all_deplibs=unknown
+  module_cmds=
+  module_expsym_cmds=
+  old_archive_from_new_cmds=
+  old_archive_from_expsyms_cmds=
+  thread_safe_flag_spec=
+  whole_archive_flag_spec=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_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
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs=yes
+
+  # 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 "$with_gnu_ld" = yes; 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 "$lt_use_gnu_ld_interface" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&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 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[3-9]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** 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 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
+      ;;
+
+    amigaos*)
+      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_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	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'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _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/;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'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    haiku*)
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      link_all_deplibs=yes
+      ;;
+
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; 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
+      then
+	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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	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' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  whole_archive_flag_spec=
+	  tmp_sharedflag='--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; 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'
+
+        if test "x$supports_anon_versioning" = xyes; then
+          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	    echo "local: *; };" >> $output_objdir/$libname.ver~
+	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+        fi
+
+	case $cc_basename in
+	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='${wl}-rpath ${wl}$libdir'
+	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; 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 $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        ld_shlibs=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds='$CC -shared $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
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	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
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  # For security reasons, it is highly recommended that you always
+	  # use absolute paths for naming shared libraries, and exclude the
+	  # DT_RUNPATH tag from executables and libraries.  But doing so
+	  # requires that you compile everything twice, which is a pain.
+	  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'
+	  else
+	    ld_shlibs=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $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
+      runpath_var=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct=unsupported
+      fi
+      ;;
+
+    aix[4-9]*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	# Also, AIX nm treats weak defined symbols like other global
+	# defined symbols, whereas GNU nm marks them as "W".
+	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") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	  for ld_flag in $LDFLAGS; do
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	    aix_use_runtimelinking=yes
+	    break
+	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_direct_absolute=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      file_list_spec='${wl}-f,'
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	  # We have reworked collect2
+	  :
+	  else
+	  # We have old collect2
+	  hardcode_direct=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  hardcode_minus_L=yes
+	  hardcode_libdir_flag_spec='-L$libdir'
+	  hardcode_libdir_separator=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      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
+	# 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.
+        if test "${lt_cv_aix_libpath+set}" = 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
+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
+
+  aix_libpath=$lt_cv_aix_libpath_
+fi
+
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag="-z nodefs"
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an
+	 # empty executable.
+	 if test "${lt_cv_aix_libpath+set}" = 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
+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
+
+  aix_libpath=$lt_cv_aix_libpath_
+fi
+
+	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag=' ${wl}-bernotok'
+	  allow_undefined_flag=' ${wl}-berok'
+	  if test "$with_gnu_ld" = yes; 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'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      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_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      case $cc_basename in
+      cl*)
+	# Native MSVC
+	hardcode_libdir_flag_spec=' '
+	allow_undefined_flag=unsupported
+	always_export_symbols=yes
+	file_list_spec='@'
+	# Tell ltmain to make .lib files, not .a files.
+	libext=lib
+	# Tell ltmain to make .dll files, not .so files.
+	shrext_cmds=".dll"
+	# FIXME: Setting linknames here is a bad hack.
+	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	  else
+	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	  fi~
+	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	  linknames='
+	# The linker will not automatically build a static lib if we build a DLL.
+	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+	enable_shared_with_static_runtimes=yes
+	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*)
+      
+  
+  archive_cmds_need_lc=no
+  hardcode_direct=no
+  hardcode_automatic=yes
+  hardcode_shlibpath_var=unsupported
+  if test "$lt_cv_ld_force_load" = "yes"; 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"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; 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
+  fi
+
+      ;;
+
+    dgux*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2.*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds='$CC -shared $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 $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; 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_separator=:
+	hardcode_direct=yes
+	hardcode_direct_absolute=yes
+	export_dynamic_flag_spec='${wl}-E'
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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 x"$lt_cv_prog_compiler__b" = xyes; 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'
+	hardcode_libdir_separator=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+	  ;;
+	*)
+	  hardcode_direct=yes
+	  hardcode_direct_absolute=yes
+	  export_dynamic_flag_spec='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared $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.
+	# 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
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_irix_exported_symbol=yes
+else
+  lt_cv_irix_exported_symbol=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+           LDFLAGS="$save_LDFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+	if test "$lt_cv_irix_exported_symbol" = yes; then
+          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+	fi
+      else
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      inherit_rpath=yes
+      link_all_deplibs=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    openbsd*)
+      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
+	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+	fi
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && 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" && 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_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} $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" && 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 "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_separator=:
+      ;;
+
+    solaris*)
+      no_undefined_flag=' -z defs'
+      if test "$GCC" = yes; 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 $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_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'
+	  ;;
+	*)
+	  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'
+	  ;;
+	esac
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      link_all_deplibs=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds='$CC -r -o $output$reload_objs'
+	  hardcode_direct=no
+        ;;
+	motorola)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag='${wl}-z,text'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-R,$libdir'
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      ld_shlibs=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	export_dynamic_flag_spec='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
+  fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+    
+    
+    
+
+    
+    
+    
+
+    
+    
+    
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $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; }
+if ${lt_cv_archive_cmds_need_lc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  $RM conftest*
+	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } 2>conftest.err; then
+	  soname=conftest
+	  lib=conftest
+	  libobjs=conftest.$ac_objext
+	  deplibs=
+	  wl=$lt_prog_compiler_wl
+	  pic_flag=$lt_prog_compiler_pic
+	  compiler_flags=-v
+	  linker_flags=-v
+	  verstring=
+	  output_objdir=.
+	  libname=conftest
+	  lt_save_allow_undefined_flag=$allow_undefined_flag
+	  allow_undefined_flag=
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+	  then
+	    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
+  ;;
+esac
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  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 '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.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[lt_foo]++; }
+  if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+  # 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"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux # 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'
+  ;;
+
+aix[4-9]*)
+  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
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<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
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  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}'
+    ;;
+  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=`func_echo_all "$lib" | $SED '\''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'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  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'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  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'\''`~
+      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'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+
+      sys_lib_search_path_spec="$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}'
+      ;;
+    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.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
+    ;;
+
+  *)
+    # Assume MSVC wrapper
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
+    ;;
+  esac
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux # 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
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[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}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2.*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux # 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
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+haiku*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  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=yes
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+  postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
+  ;;
+
+interix[3-9]*)
+  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'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux # 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}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-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
+  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
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+    
+fi
+
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux # 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
+  ;;
+
+*nto* | *qnx*)
+  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'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux # 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
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux # 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=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 # 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 "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = 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"
+fi
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+  { $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 "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:${as_lineno-$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
+
+    
+    
+    
+
+
+  if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32* | 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
+    
+fi
+
+    ;;
+
+  *)
+    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.  */
+
+/* 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.  */
+
+/* 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.  */
+
+/* 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
+{ $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 "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:${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 "$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 $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 -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+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 "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self_static+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  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 -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+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 which 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 "$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:${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 "$enable_shared" = yes || 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"
+
+      if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $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; }
+if test -z "$CXXCPP"; then
+  if ${ac_cv_prog_CXXCPP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <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_cxx_try_cpp "$LINENO"; then :
+  
+else
+  # 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_cxx_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
+
+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
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+  
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <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_cxx_try_cpp "$LINENO"; then :
+  
+else
+  # 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_cxx_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
+
+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 :
+  
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+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
+
+else
+  _lt_caught_CXX_error=yes
+fi
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+compiler_needs_object_CXX=no
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_direct_absolute_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+inherit_rpath_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+reload_flag_CXX=$reload_flag
+reload_cmds_CXX=$reload_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# No sense in running all these tests if we already determined that
+# 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
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="int some_variable = 0;"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+  # save warnings/boilerplate of simple test code
+  ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+  ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC=$CC
+  lt_save_CFLAGS=$CFLAGS
+  lt_save_LD=$LD
+  lt_save_GCC=$GCC
+  GCC=$GXX
+  lt_save_with_gnu_ld=$with_gnu_ld
+  lt_save_path_LD=$lt_cv_path_LD
+  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+  else
+    $as_unset lt_cv_prog_gnu_ld
+  fi
+  if test -n "${lt_cv_path_LDCXX+set}"; then
+    lt_cv_path_LD=$lt_cv_path_LDCXX
+  else
+    $as_unset lt_cv_path_LD
+  fi
+  test -z "${LDCXX+set}" || LD=$LDCXX
+  CC=${CXX-"c++"}
+  CFLAGS=$CXXFLAGS
+  compiler=$CC
+  compiler_CXX=$CC
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+
+
+  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
+      lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+    else
+      lt_prog_compiler_no_builtin_flag_CXX=
+    fi
+
+    if test "$GXX" = yes; then
+      # Set up default GNU C++ configuration
+
+      
+
+@%:@ Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $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
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $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:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+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
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $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 ${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.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $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
+
+
+
+
+
+
+
+      # Check if GNU C++ uses GNU ld as the underlying linker, since the
+      # archiving commands below assume that GNU ld is being used.
+      if test "$with_gnu_ld" = yes; then
+        archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+        export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+        # If archive_cmds runs LD, not CC, wlarc should be empty
+        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+        #     investigate it a little bit more. (MM)
+        wlarc='${wl}'
+
+        # ancient GNU ld didn't support --whole-archive et. al.
+        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+	  $GREP 'no-whole-archive' > /dev/null; then
+          whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+        else
+          whole_archive_flag_spec_CXX=
+        fi
+      else
+        with_gnu_ld=no
+        wlarc=
+
+        # A generic and very simple default shared library creation
+        # command for GNU C++ for the case where it uses the native
+        # linker, instead of GNU ld.  If possible, this setting should
+        # overridden to take advantage of the native linker features on
+        # the platform it is being used on.
+        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      fi
+
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+    else
+      GXX=no
+      with_gnu_ld=no
+      wlarc=
+    fi
+
+    # PORTME: fill in a description of your system's C++ link characteristics
+    { $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; }
+    ld_shlibs_CXX=yes
+    case $host_os in
+      aix3*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+      aix[4-9]*)
+        if test "$host_cpu" = ia64; then
+          # On IA64, the linker does run time linking by default, so we don't
+          # have to do anything special.
+          aix_use_runtimelinking=no
+          exp_sym_flag='-Bexport'
+          no_entry_flag=""
+        else
+          aix_use_runtimelinking=no
+
+          # Test if we are trying to use run time linking or normal
+          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+          # need to do runtime linking.
+          case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	    for ld_flag in $LDFLAGS; do
+	      case $ld_flag in
+	      *-brtl*)
+	        aix_use_runtimelinking=yes
+	        break
+	        ;;
+	      esac
+	    done
+	    ;;
+          esac
+
+          exp_sym_flag='-bexport'
+          no_entry_flag='-bnoentry'
+        fi
+
+        # When large executables or shared objects are built, AIX ld can
+        # have problems creating the table of contents.  If linking a library
+        # or program results in "error TOC overflow" add -mminimal-toc to
+        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+        archive_cmds_CXX=''
+        hardcode_direct_CXX=yes
+        hardcode_direct_absolute_CXX=yes
+        hardcode_libdir_separator_CXX=':'
+        link_all_deplibs_CXX=yes
+        file_list_spec_CXX='${wl}-f,'
+
+        if test "$GXX" = yes; then
+          case $host_os in aix4.[012]|aix4.[012].*)
+          # We only want to do this on AIX 4.2 and lower, the check
+          # below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	    # We have reworked collect2
+	    :
+	  else
+	    # We have old collect2
+	    hardcode_direct_CXX=unsupported
+	    # It fails to find uninstalled libraries when the uninstalled
+	    # path is not listed in the libpath.  Setting hardcode_minus_L
+	    # to unsupported forces relinking
+	    hardcode_minus_L_CXX=yes
+	    hardcode_libdir_flag_spec_CXX='-L$libdir'
+	    hardcode_libdir_separator_CXX=
+	  fi
+          esac
+          shared_flag='-shared'
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag="$shared_flag "'${wl}-G'
+	  fi
+        else
+          # not using gcc
+          if test "$host_cpu" = ia64; then
+	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	  # chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+          else
+	    if test "$aix_use_runtimelinking" = yes; then
+	      shared_flag='${wl}-G'
+	    else
+	      shared_flag='${wl}-bM:SRE'
+	    fi
+          fi
+        fi
+
+        export_dynamic_flag_spec_CXX='${wl}-bexpall'
+        # It seems that -bexpall does not export symbols beginning with
+        # underscore (_), so it is better to generate a list of symbols to
+	# export.
+        always_export_symbols_CXX=yes
+        if test "$aix_use_runtimelinking" = yes; then
+          # Warning - without using the other runtime loading flags (-brtl),
+          # -berok will link without error, but may produce a broken library.
+          allow_undefined_flag_CXX='-berok'
+          # Determine the default libpath from the value encoded in an empty
+          # executable.
+          if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath__CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  if test -z "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+  fi
+  
+fi
+
+  aix_libpath=$lt_cv_aix_libpath__CXX
+fi
+
+          hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+          archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        else
+          if test "$host_cpu" = ia64; then
+	    hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+	    allow_undefined_flag_CXX="-z nodefs"
+	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+          else
+	    # Determine the default libpath from the value encoded in an
+	    # empty executable.
+	    if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath__CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  if test -z "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+  fi
+  
+fi
+
+  aix_libpath=$lt_cv_aix_libpath__CXX
+fi
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+	    # Warning - without using the other run time loading flags,
+	    # -berok will link without error, but may produce a broken library.
+	    no_undefined_flag_CXX=' ${wl}-bernotok'
+	    allow_undefined_flag_CXX=' ${wl}-berok'
+	    if test "$with_gnu_ld" = yes; then
+	      # We only use this code for GNU lds that support --whole-archive.
+	      whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    else
+	      # Exported symbols can be pulled into shared objects from archives
+	      whole_archive_flag_spec_CXX='$convenience'
+	    fi
+	    archive_cmds_need_lc_CXX=yes
+	    # This is similar to how AIX traditionally builds its shared
+	    # libraries.
+	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+          fi
+        fi
+        ;;
+
+      beos*)
+	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	  allow_undefined_flag_CXX=unsupported
+	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+	  # support --undefined.  This deserves some investigation.  FIXME
+	  archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	else
+	  ld_shlibs_CXX=no
+	fi
+	;;
+
+      chorus*)
+        case $cc_basename in
+          *)
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	  ;;
+        esac
+        ;;
+
+      cygwin* | mingw* | pw32* | cegcc*)
+	case $GXX,$cc_basename in
+	,cl* | no,cl*)
+	  # Native MSVC
+	  # hardcode_libdir_flag_spec is actually meaningless, as there is
+	  # no search path for DLLs.
+	  hardcode_libdir_flag_spec_CXX=' '
+	  allow_undefined_flag_CXX=unsupported
+	  always_export_symbols_CXX=yes
+	  file_list_spec_CXX='@'
+	  # Tell ltmain to make .lib files, not .a files.
+	  libext=lib
+	  # Tell ltmain to make .dll files, not .so files.
+	  shrext_cmds=".dll"
+	  # FIXME: Setting linknames here is a bad hack.
+	  archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	  archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	    else
+	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	    fi~
+	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	    linknames='
+	  # The linker will not automatically build a static lib if we build a DLL.
+	  # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
+	  enable_shared_with_static_runtimes_CXX=yes
+	  # Don't use ranlib
+	  old_postinstall_cmds_CXX='chmod 644 $oldlib'
+	  postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
+	    lt_tool_outputfile="@TOOL_OUTPUT@"~
+	    case $lt_outputfile in
+	      *.exe|*.EXE) ;;
+	      *)
+		lt_outputfile="$lt_outputfile.exe"
+		lt_tool_outputfile="$lt_tool_outputfile.exe"
+		;;
+	    esac~
+	    func_to_tool_file "$lt_outputfile"~
+	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	      $RM "$lt_outputfile.manifest";
+	    fi'
+	  ;;
+	*)
+	  # g++
+	  # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+	  # as there is no search path for DLLs.
+	  hardcode_libdir_flag_spec_CXX='-L$libdir'
+	  export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
+	  allow_undefined_flag_CXX=unsupported
+	  always_export_symbols_CXX=no
+	  enable_shared_with_static_runtimes_CXX=yes
+
+	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	    # If the export-symbols file already is a .def file (1st line
+	    # is EXPORTS), use it as is; otherwise, prepend...
+	    archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	      cp $export_symbols $output_objdir/$soname.def;
+	    else
+	      echo EXPORTS > $output_objdir/$soname.def;
+	      cat $export_symbols >> $output_objdir/$soname.def;
+	    fi~
+	    $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	  else
+	    ld_shlibs_CXX=no
+	  fi
+	  ;;
+	esac
+	;;
+      darwin* | rhapsody*)
+        
+  
+  archive_cmds_need_lc_CXX=no
+  hardcode_direct_CXX=no
+  hardcode_automatic_CXX=yes
+  hardcode_shlibpath_var_CXX=unsupported
+  if test "$lt_cv_ld_force_load" = "yes"; then
+    whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+    
+  else
+    whole_archive_flag_spec_CXX=''
+  fi
+  link_all_deplibs_CXX=yes
+  allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=func_echo_all
+    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+       if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+    fi
+
+  else
+  ld_shlibs_CXX=no
+  fi
+
+	;;
+
+      dgux*)
+        case $cc_basename in
+          ec++*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          ghcx*)
+	    # Green Hills C++ Compiler
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
+
+      freebsd2.*)
+        # C++ shared libraries reported to be fairly broken before
+	# switch to ELF
+        ld_shlibs_CXX=no
+        ;;
+
+      freebsd-elf*)
+        archive_cmds_need_lc_CXX=no
+        ;;
+
+      freebsd* | dragonfly*)
+        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+        # conventions
+        ld_shlibs_CXX=yes
+        ;;
+
+      gnu*)
+        ;;
+
+      haiku*)
+        archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        link_all_deplibs_CXX=yes
+        ;;
+
+      hpux9*)
+        hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator_CXX=:
+        export_dynamic_flag_spec_CXX='${wl}-E'
+        hardcode_direct_CXX=yes
+        hardcode_minus_L_CXX=yes # Not in the search PATH,
+				             # but as the default
+				             # location of the library.
+
+        case $cc_basename in
+          CC*)
+            # FIXME: insert proper C++ library support
+            ld_shlibs_CXX=no
+            ;;
+          aCC*)
+            archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            # Commands to make compiler produce verbose output that lists
+            # what "hidden" libraries, object files and flags are used when
+            # linking a shared library.
+            #
+            # There doesn't appear to be a way to prevent this compiler from
+            # explicitly linking system object files so we need to strip them
+            # from the output so that they don't get included in the library
+            # dependencies.
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+            ;;
+          *)
+            if test "$GXX" = yes; then
+              archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            else
+              # FIXME: insert proper C++ library support
+              ld_shlibs_CXX=no
+            fi
+            ;;
+        esac
+        ;;
+
+      hpux10*|hpux11*)
+        if test $with_gnu_ld = no; then
+	  hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
+
+          case $host_cpu in
+            hppa*64*|ia64*)
+              ;;
+            *)
+	      export_dynamic_flag_spec_CXX='${wl}-E'
+              ;;
+          esac
+        fi
+        case $host_cpu in
+          hppa*64*|ia64*)
+            hardcode_direct_CXX=no
+            hardcode_shlibpath_var_CXX=no
+            ;;
+          *)
+            hardcode_direct_CXX=yes
+            hardcode_direct_absolute_CXX=yes
+            hardcode_minus_L_CXX=yes # Not in the search PATH,
+					         # but as the default
+					         # location of the library.
+            ;;
+        esac
+
+        case $cc_basename in
+          CC*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          aCC*)
+	    case $host_cpu in
+	      hppa*64*)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      ia64*)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      *)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	    esac
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test $with_gnu_ld = no; then
+	        case $host_cpu in
+	          hppa*64*)
+	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          ia64*)
+	            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          *)
+	            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	        esac
+	      fi
+	    else
+	      # FIXME: insert proper C++ library support
+	      ld_shlibs_CXX=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      interix[3-9]*)
+	hardcode_direct_CXX=no
+	hardcode_shlibpath_var_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec_CXX='${wl}-E'
+	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+	# Instead, shared libraries are loaded at an image base (0x10000000 by
+	# default) and relocated if they conflict, which is a slow very memory
+	# consuming and fragmenting process.  To avoid this, we pick a random,
+	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+	archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	;;
+      irix5* | irix6*)
+        case $cc_basename in
+          CC*)
+	    # SGI C++
+	    archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && 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
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test "$with_gnu_ld" = no; then
+	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	      else
+	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+	      fi
+	    fi
+	    link_all_deplibs_CXX=yes
+	    ;;
+        esac
+        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+        hardcode_libdir_separator_CXX=:
+        inherit_rpath_CXX=yes
+        ;;
+
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	    old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+	    ;;
+	  icpc* | ecpc* )
+	    # Intel C++
+	    with_gnu_ld=yes
+	    # version 8.0 and above of icpc choke on multiply defined symbols
+	    # if we add $predep_objects and $postdep_objects, however 7.1 and
+	    # earlier do not add the objects themselves.
+	    case `$CC -V 2>&1` in
+	      *"Version 7."*)
+	        archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	      *)  # Version 8.0 or newer
+	        tmp_idyn=
+	        case $host_cpu in
+		  ia64*) tmp_idyn=' -i_dynamic';;
+		esac
+	        archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	    esac
+	    archive_cmds_need_lc_CXX=no
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    ;;
+          pgCC* | pgcpp*)
+            # Portland Group C++ compiler
+	    case `$CC -V` in
+	    *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
+	      prelink_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+	      old_archive_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+		$RANLIB $oldlib'
+	      archive_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      archive_expsym_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    *) # Version 6 and above use weak symbols
+	      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    esac
+
+	    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+            ;;
+	  cxx*)
+	    # Compaq C++
+	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	    runpath_var=LD_RUN_PATH
+	    hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	    hardcode_libdir_separator_CXX=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`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* | mpixl* | bgxl*)
+	    # IBM XL 8.0 on PPC, with GNU ld
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    if test "x$supports_anon_versioning" = xyes; then
+	      archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
+		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+		echo "local: *; };" >> $output_objdir/$libname.ver~
+		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	    fi
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      no_undefined_flag_CXX=' -zdefs'
+	      archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	      hardcode_libdir_flag_spec_CXX='-R$libdir'
+	      whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	      compiler_needs_object_CXX=yes
+
+	      # Not sure whether something based on
+	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+	      # would be better.
+	      output_verbose_link_cmd='func_echo_all'
+
+	      # Archives containing C++ object files must be created using
+	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	      # necessary to make sure instantiated templates are included
+	      # in the archive.
+	      old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+
+      lynxos*)
+        # FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+
+      m88k*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+	;;
+
+      mvs*)
+        case $cc_basename in
+          cxx*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+	  *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+	esac
+	;;
+
+      netbsd*)
+        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	  archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+	  wlarc=
+	  hardcode_libdir_flag_spec_CXX='-R$libdir'
+	  hardcode_direct_CXX=yes
+	  hardcode_shlibpath_var_CXX=no
+	fi
+	# Workaround some broken pre-1.5 toolchains
+	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+	;;
+
+      *nto* | *qnx*)
+        ld_shlibs_CXX=yes
+	;;
+
+      openbsd2*)
+        # C++ shared libraries are fairly broken
+	ld_shlibs_CXX=no
+	;;
+
+      openbsd*)
+	if test -f /usr/libexec/ld.so; then
+	  hardcode_direct_CXX=yes
+	  hardcode_shlibpath_var_CXX=no
+	  hardcode_direct_absolute_CXX=yes
+	  archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	    archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+	    export_dynamic_flag_spec_CXX='${wl}-E'
+	    whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+	  fi
+	  output_verbose_link_cmd=func_echo_all
+	else
+	  ld_shlibs_CXX=no
+	fi
+	;;
+
+      osf3* | osf4* | osf5*)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    hardcode_libdir_separator_CXX=:
+
+	    # Archives containing C++ object files must be created using
+	    # the KAI C++ compiler.
+	    case $host in
+	      osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
+	      *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
+	    esac
+	    ;;
+          RCC*)
+	    # Rational C++ 2.4.1
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          cxx*)
+	    case $host in
+	      osf3*)
+	        allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+		;;
+	      *)
+	        allow_undefined_flag_CXX=' -expect_unresolved \*'
+	        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	        archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	          echo "-hidden">> $lib.exp~
+	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
+	          $RM $lib.exp'
+	        hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+		;;
+	    esac
+
+	    hardcode_libdir_separator_CXX=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    ;;
+	  *)
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	      case $host in
+	        osf3*)
+	          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	        *)
+	          archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	      esac
+
+	      hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	      hardcode_libdir_separator_CXX=:
+
+	      # Commands to make compiler produce verbose output that lists
+	      # what "hidden" libraries, object files and flags are used when
+	      # linking a shared library.
+	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+	    else
+	      # FIXME: insert proper C++ library support
+	      ld_shlibs_CXX=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      psos*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+
+      sunos4*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.x
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          lcc*)
+	    # Lucid
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
+
+      solaris*)
+        case $cc_basename in
+          CC* | sunCC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+            archive_cmds_need_lc_CXX=yes
+	    no_undefined_flag_CXX=' -zdefs'
+	    archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	    hardcode_libdir_flag_spec_CXX='-R$libdir'
+	    hardcode_shlibpath_var_CXX=no
+	    case $host_os in
+	      solaris2.[0-5] | solaris2.[0-5].*) ;;
+	      *)
+		# The compiler driver will combine and reorder linker options,
+		# but understands `-z linker_flag'.
+	        # Supported since Solaris 2.6 (maybe 2.5.1?)
+		whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+	        ;;
+	    esac
+	    link_all_deplibs_CXX=yes
+
+	    output_verbose_link_cmd='func_echo_all'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	    ;;
+          gcx*)
+	    # Green Hills C++ Compiler
+	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	    # The C++ compiler must be used to create the archive.
+	    old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    # GNU C++ compiler with Solaris linker
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        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
+	        # platform.
+	        archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+	      fi
+
+	      hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+	      case $host_os in
+		solaris2.[0-5] | solaris2.[0-5].*) ;;
+		*)
+		  whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+		  ;;
+	      esac
+	    fi
+	    ;;
+        esac
+        ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag_CXX='${wl}-z,text'
+      archive_cmds_need_lc_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      runpath_var='LD_RUN_PATH'
+
+      case $cc_basename in
+        CC*)
+	  archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+      esac
+      ;;
+
+      sysv5* | sco3.2v5* | sco5v6*)
+	# Note: We can NOT use -z defs as we might desire, because we do not
+	# link with -lc, and that would cause any symbols used from libc to
+	# always be unresolved, which means just about no library would
+	# ever link correctly.  If we're not using GNU ld we use -z text
+	# though, which does catch some bad symbols but isn't as heavy-handed
+	# as -z defs.
+	no_undefined_flag_CXX='${wl}-z,text'
+	allow_undefined_flag_CXX='${wl}-z,nodefs'
+	archive_cmds_need_lc_CXX=no
+	hardcode_shlibpath_var_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+	hardcode_libdir_separator_CXX=':'
+	link_all_deplibs_CXX=yes
+	export_dynamic_flag_spec_CXX='${wl}-Bexport'
+	runpath_var='LD_RUN_PATH'
+
+	case $cc_basename in
+          CC*)
+	    archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
+	      '"$old_archive_cmds_CXX"
+	    reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
+	      '"$reload_cmds_CXX"
+	    ;;
+	  *)
+	    archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	esac
+      ;;
+
+      tandem*)
+        case $cc_basename in
+          NCC*)
+	    # NonStop-UX NCC 3.20
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
+
+      vxworks*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+
+      *)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+    esac
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+    test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+    GCC_CXX="$GXX"
+    LD_CXX="$LD"
+
+    ## 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...
+    # Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+_LT_EOF
+
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+esac
+
+if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  for p in `eval "$output_verbose_link_cmd"`; do
+    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
+	 prev=$p
+	 continue
+       fi
+
+       # Expand the sysroot to ease extracting the directories later.
+       if test -z "$prev"; then
+         case $p in
+         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+         esac
+       fi
+       case $p in
+       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+       esac
+       if test "$pre_test_object_deps_done" = no; then
+	 case ${prev} in
+	 -L | -R)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$compiler_lib_search_path_CXX"; then
+	     compiler_lib_search_path_CXX="${prev}${p}"
+	   else
+	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$postdeps_CXX"; then
+	   postdeps_CXX="${prev}${p}"
+	 else
+	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+	 fi
+       fi
+       prev=
+       ;;
+
+    *.lto.$objext) ;; # Ignore GCC LTO objects
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$predep_objects_CXX"; then
+	   predep_objects_CXX="$p"
+	 else
+	   predep_objects_CXX="$predep_objects_CXX $p"
+	 fi
+       else
+	 if test -z "$postdep_objects_CXX"; then
+	   postdep_objects_CXX="$p"
+	 else
+	   postdep_objects_CXX="$postdep_objects_CXX $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix[3-9]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  predep_objects_CXX=
+  postdep_objects_CXX=
+  postdeps_CXX=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC* | sunCC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+ compiler_lib_search_dirs_CXX=
+if test -n "${compiler_lib_search_path_CXX}"; then
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    lt_prog_compiler_wl_CXX='-Wl,'
+    lt_prog_compiler_static_CXX='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_CXX='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic_CXX='-fPIC'
+        ;;
+      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'.
+            lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    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).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_CXX='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      lt_prog_compiler_pic_CXX=
+      ;;
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      lt_prog_compiler_static_CXX=
+      ;;
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_CXX=-Kconform_pic
+      fi
+      ;;
+    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
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	;;
+      *)
+	lt_prog_compiler_pic_CXX='-fPIC'
+	;;
+      esac
+      ;;
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic_CXX='-fPIC -shared'
+      ;;
+    *)
+      lt_prog_compiler_pic_CXX='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix[4-9]*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  lt_prog_compiler_static_CXX='-Bstatic'
+	else
+	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+      mingw* | cygwin* | os2* | pw32* | cegcc*)
+	# This hack is so that the source file can tell whether it is being
+	# built for inclusion in a dll (and should export symbols for example).
+	lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+	;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      lt_prog_compiler_pic_CXX='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      lt_prog_compiler_pic_CXX='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    ;;
+	  ecpc* )
+	    # old Intel C++ for x86_64 which still supported -KPIC.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  icpc* )
+	    # Intel C++, used to be incompatible with GCC.
+	    # ICC 10 doesn't accept -KPIC any more.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  pgCC* | pgcpp*)
+	    # Portland Group C++ compiler
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fpic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
+	    # IBM XL 8.0, 9.0 on PPC and BlueGene
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-qpic'
+	    lt_prog_compiler_static_CXX='-qstaticlink'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      lt_prog_compiler_pic_CXX='-KPIC'
+	      lt_prog_compiler_static_CXX='-Bstatic'
+	      lt_prog_compiler_wl_CXX='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    lt_prog_compiler_pic_CXX='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        lt_prog_compiler_pic_CXX='-fPIC -shared'
+        ;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC* | sunCC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    lt_prog_compiler_wl_CXX='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    lt_prog_compiler_pic_CXX='-pic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	lt_prog_compiler_can_build_shared_CXX=no
+	;;
+    esac
+  fi
+
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_CXX=
+    ;;
+  *)
+    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX@&t@ -DPIC"
+    ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
+lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
+if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_works_CXX=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_CXX@&t@ -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&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 "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works_CXX=yes
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+    case $lt_prog_compiler_pic_CXX in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+     esac
+else
+    lt_prog_compiler_pic_CXX=
+     lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ $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 ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works_CXX=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works_CXX=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works_CXX=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+    :
+else
+    lt_prog_compiler_static_CXX=
+fi
+
+
+
+
+    { $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 ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&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 "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+    { $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 ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&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 "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+
+
+    { $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; }
+
+  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+  case $host_os in
+  aix[4-9]*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    # Also, AIX nm treats weak defined symbols like other global defined
+    # symbols, whereas GNU nm marks them as "W".
+    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    else
+      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    export_symbols_cmds_CXX="$ltdll_cmds"
+    ;;
+  cygwin* | mingw* | cegcc*)
+    case $cc_basename in
+    cl*)
+      exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+      ;;
+    *)
+      export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+      exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+      ;;
+    esac
+    ;;
+  *)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+    ;;
+  esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+with_gnu_ld_CXX=$with_gnu_ld
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_CXX=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_CXX in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $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; }
+if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  $RM conftest*
+	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } 2>conftest.err; then
+	  soname=conftest
+	  lib=conftest
+	  libobjs=conftest.$ac_objext
+	  deplibs=
+	  wl=$lt_prog_compiler_wl_CXX
+	  pic_flag=$lt_prog_compiler_pic_CXX
+	  compiler_flags=-v
+	  linker_flags=-v
+	  verstring=
+	  output_objdir=.
+	  libname=conftest
+	  lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+	  allow_undefined_flag_CXX=
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+  (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+	  then
+	    lt_cv_archive_cmds_need_lc_CXX=no
+	  else
+	    lt_cv_archive_cmds_need_lc_CXX=yes
+	  fi
+	  allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+	else
+	  cat conftest.err 1>&5
+	fi
+	$RM conftest*
+	
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
+      archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux # 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'
+  ;;
+
+aix[4-9]*)
+  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
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<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
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  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}'
+    ;;
+  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=`func_echo_all "$lib" | $SED '\''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'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  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'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  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'\''`~
+      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'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      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.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
+    ;;
+
+  *)
+    # Assume MSVC wrapper
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
+    ;;
+  esac
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux # 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
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[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}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2.*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux # 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
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+haiku*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  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=yes
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+  postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
+  ;;
+
+interix[3-9]*)
+  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'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux # 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}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-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
+  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
+	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_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
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+    
+fi
+
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux # 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
+  ;;
+
+*nto* | *qnx*)
+  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'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux # 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
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux # 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=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 # 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 "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = 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"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $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_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" ||
+   test -n "$runpath_var_CXX" ||
+   test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct_CXX" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+     test "$hardcode_minus_L_CXX" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_CXX=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_CXX=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_CXX=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
+$as_echo "$hardcode_action_CXX" >&6; }
+
+if test "$hardcode_action_CXX" = relink ||
+   test "$inherit_rpath_CXX" = yes; then
+  # 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
+
+
+
+
+    
+
+
+  fi # test -n "$compiler"
+
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+  LDCXX=$LD
+  LD=$lt_save_LD
+  GCC=$lt_save_GCC
+  with_gnu_ld=$lt_save_with_gnu_ld
+  lt_cv_path_LDCXX=$lt_cv_path_LD
+  lt_cv_path_LD=$lt_save_path_LD
+  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+       
+       
+
+
+
+
+
+        ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+am__api_version='1.13'
+
+# 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
+  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 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
+
+  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
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$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}'
+
+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}" != 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 ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if 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
+IFS=$as_save_IFS
+
+fi
+fi
+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:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $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_STRIP+:} false; 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 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
+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:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $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
+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
+  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
+	   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
+
+  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+{ $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
+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
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+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
+
+
+{ $as_echo "$as_me:${as_lineno-$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
+
+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
+
+
+@%:@ Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules; 
+fi
+
+case $enable_silent_rules in @%:@ (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+    AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  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='ucommon'
+ VERSION='6.0.7'
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE "$PACKAGE"
+_ACEOF
+
+ 
+cat >>confdefs.h <<_ACEOF
+@%:@define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# 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)'
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar  pax cpio none'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+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
+
+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
+
+ 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
+
+
+depcc="$CXX"  am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if 
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+
+ac_config_headers="$ac_config_headers ucommon-config.h"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
+$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
+if ${ac_cv_c_restrict+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_restrict=no
+   # The order here caters to the fact that C++ does not require restrict.
+   for ac_kw in __restrict __restrict__ _Restrict restrict; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+typedef int * int_ptr;
+	int foo (int_ptr $ac_kw ip) {
+	return ip[0];
+       }
+int
+main ()
+{
+int s[1];
+	int * $ac_kw t = s;
+	t[0] = 0;
+	return foo(t)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_restrict=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     test "$ac_cv_c_restrict" != no && break
+   done
+  
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
+$as_echo "$ac_cv_c_restrict" >&6; }
+ 
+ case $ac_cv_c_restrict in
+   restrict) ;;
+   no) $as_echo "@%:@define restrict /**/" >>confdefs.h
+ ;;
+   *)  cat >>confdefs.h <<_ACEOF
+@%:@define restrict $ac_cv_c_restrict
+_ACEOF
+ ;;
+ esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
+$as_echo_n "checking for working volatile... " >&6; }
+if ${ac_cv_c_volatile+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+volatile int x;
+int * volatile y = (int *) 0;
+return !x && !y;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_volatile=yes
+else
+  ac_cv_c_volatile=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_volatile" >&5
+$as_echo "$ac_cv_c_volatile" >&6; }
+if test $ac_cv_c_volatile = no; then
+  
+$as_echo "@%:@define volatile /**/" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+    ;;
+esac
+
+
+UCOMMON_VISIBILITY="0"
+UCOMMON_FLAGS=""
+UCOMMON_MODEL="CXX"
+UCOMMON_CLINK=""
+UCOMMON_LIBC="-lc"
+UCOMMON_LIBS=""
+OPENSSL_LINK=""
+
+CHECKFLAGS="$CHECKFLAGS"
+
+case "$with_crypto" in
+ssl|openssl)
+    ssl="openssl"
+    ;;
+gnutls|gnu)
+    ssl="gnutls"
+    ;;
+none|nossl)
+    ssl="nossl"
+    ;;
+*)
+    ssl="detect"
+    ;;
+esac
+
+have_gettext="no"
+socket_lib=""
+posix4_lib=""
+rt_lib=""
+
+test -z "$localedir" && localedir='${datadir}/locale'
+
+
+
+# for very old gcc and for minix we disable full ucommon build by default
+# we also disable for mingw32 or when no "shared" library support because
+# libstdc++ is not dll and really bloats in linkage of plugins.  Any case,
+# you can always override with --enable-stdcpp...
+
+if test -z "$enable_stdcpp" ; then
+    if test "x$GCC" = "xyes" ; then
+        gccver=`$CC -dumpversion | cut -f1 -d.`
+    fi
+    if test -z "$gccver" ; then
+        gccver="3"
+    fi
+    if test "$gccver" -lt "3" ; then
+        enable_stdcpp="no"
+    fi
+    if test "x$enable_shared" = "xno" ; then
+        enable_stdcpp="no"
+    fi
+    case "$target_os" in
+    *minix*|mingw*)
+        enable_stdcpp="no"
+        ;;
+    esac
+fi
+
+@%:@ Check whether --enable-posix-timers was given.
+if test "${enable_posix_timers+set}" = set; then :
+  enableval=$enable_posix_timers; 
+fi
+
+
+if test "x$enable_posix_timers" = "xyes" ; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -DPOSIX_TIMERS"
+fi
+
+@%:@ Check whether --enable-stdcpp was given.
+if test "${enable_stdcpp+set}" = set; then :
+  enableval=$enable_stdcpp; 
+fi
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking full c++ support and linking model" >&5
+$as_echo_n "checking full c++ support and linking model... " >&6; }
+
+if test "x$enable_stdcpp" = "xno" ; then
+    UCOMMON_MODEL="CC"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    COMPAT=""
+else
+    COMPAT="commoncpp"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+
+
+@%:@ Check whether --with-sslstack was given.
+if test "${with_sslstack+set}" = set; then :
+  withval=$with_sslstack; 
+    if test x$with_sslstack != x ; then
+        ssl="${with_sslstack}" ; fi
+
+fi
+
+
+
+@%:@ Check whether --with-libc was given.
+if test "${with_libc+set}" = set; then :
+  withval=$with_libc; 
+    if test x$with_libc != x ; then
+        clib=`echo ${with_libc} | sed s/-l//`
+        UCOMMON_LIBC=-l${clib} ; fi
+
+fi
+
+
+@%:@ Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+  enableval=$enable_debug; 
+fi
+
+if test -z "$enable_debug" ; then
+    enable_debug="no"
+elif test $enable_debug = "yes" ; then
+    CXXFLAGS="${CXXFLAGS} -g -DDEBUG"
+fi
+
+
+
+threading="none"
+clib=`echo ${UCOMMON_LIBC} | sed s/-l//`
+tlib=""
+
+for ac_header in stdint.h poll.h sys/mman.h sys/shm.h sys/poll.h sys/timeb.h endian.h sys/filio.h dirent.h sys/resource.h wchar.h netinet/in.h net/if.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
+
+done
+
+for ac_header in mach/clock.h mach-o/dyld.h linux/version.h sys/inotify.h sys/event.h syslog.h sys/wait.h termios.h termio.h fcntl.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
+
+done
+
+for ac_header in sys/param.h sys/lockf.h sys/file.h dlfcn.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
+
+done
+
+
+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 :
+  
+    
+$as_echo "@%:@define HAVE_REGEX_H 1" >>confdefs.h
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regfree in -lregex" >&5
+$as_echo_n "checking for regfree in -lregex... " >&6; }
+if ${ac_cv_lib_regex_regfree+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lregex  $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 regfree ();
+int
+main ()
+{
+return regfree ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_regex_regfree=yes
+else
+  ac_cv_lib_regex_regfree=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_regex_regfree" >&5
+$as_echo "$ac_cv_lib_regex_regfree" >&6; }
+if test "x$ac_cv_lib_regex_regfree" = xyes; then :
+  
+        UCOMMON_LIBS="$UCOMMON_LIBS -lregex"
+    
+fi
+
+
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fopen in -lmsvcrt" >&5
+$as_echo_n "checking for fopen in -lmsvcrt... " >&6; }
+if ${ac_cv_lib_msvcrt_fopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmsvcrt  $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 fopen ();
+int
+main ()
+{
+return fopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_msvcrt_fopen=yes
+else
+  ac_cv_lib_msvcrt_fopen=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_msvcrt_fopen" >&5
+$as_echo "$ac_cv_lib_msvcrt_fopen" >&6; }
+if test "x$ac_cv_lib_msvcrt_fopen" = xyes; then :
+  
+    threading="msw"
+    clib="msvcrt"
+    UCOMMON_VISIBILITY="0"
+    UCOMMON_LIBS="--enable-stdcall-fixup $UCOMMON_LIBS -lmingwex -lmingw32 -lcrypt32 -ladvapi32 -luser32 -lws2_32 -lwsock32 -lkernel32"
+    UCOMMON_LIBC="-lmsvcrt -lgcc"
+    OPENSSL_LINK="-lgdi32"
+    
+$as_echo "@%:@define HAVE_INET_NTOP 1" >>confdefs.h
+
+    
+$as_echo "@%:@define HAVE_GETADDRINFO 1" >>confdefs.h
+
+
+else
+  
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __modsi3 in -lgcc" >&5
+$as_echo_n "checking for __modsi3 in -lgcc... " >&6; }
+if ${ac_cv_lib_gcc___modsi3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgcc  $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 __modsi3 ();
+int
+main ()
+{
+return __modsi3 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gcc___modsi3=yes
+else
+  ac_cv_lib_gcc___modsi3=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_gcc___modsi3" >&5
+$as_echo "$ac_cv_lib_gcc___modsi3" >&6; }
+if test "x$ac_cv_lib_gcc___modsi3" = xyes; then :
+  
+        UCOMMON_LIBC="$UCOMMON_LIBC -lgcc"
+    
+fi
+
+    as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_socketpair" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair in -l$clib" >&5
+$as_echo_n "checking for socketpair in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 socketpair ();
+int
+main ()
+{
+return socketpair ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+        
+$as_echo "@%:@define HAVE_SOCKETPAIR 1" >>confdefs.h
+
+    
+else
+  
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair in -lsocket" >&5
+$as_echo_n "checking for socketpair in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_socketpair+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $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 socketpair ();
+int
+main ()
+{
+return socketpair ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_socketpair=yes
+else
+  ac_cv_lib_socket_socketpair=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_socket_socketpair" >&5
+$as_echo "$ac_cv_lib_socket_socketpair" >&6; }
+if test "x$ac_cv_lib_socket_socketpair" = xyes; then :
+  
+$as_echo "@%:@define HAVE_SOCKETPAIR 1" >>confdefs.h
+
+fi
+
+    
+fi
+
+    as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_getaddrinfo" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -l$clib" >&5
+$as_echo_n "checking for getaddrinfo in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 getaddrinfo ();
+int
+main ()
+{
+return getaddrinfo ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+        
+$as_echo "@%:@define HAVE_GETADDRINFO 1" >>confdefs.h
+
+    
+else
+  
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lsocket" >&5
+$as_echo_n "checking for getaddrinfo in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_getaddrinfo+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $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 getaddrinfo ();
+int
+main ()
+{
+return getaddrinfo ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_getaddrinfo=yes
+else
+  ac_cv_lib_socket_getaddrinfo=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_socket_getaddrinfo" >&5
+$as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; }
+if test "x$ac_cv_lib_socket_getaddrinfo" = xyes; then :
+  
+$as_echo "@%:@define HAVE_GETADDRINFO 1" >>confdefs.h
+
+fi
+
+    
+fi
+
+    as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_gethostbyname2" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname2 in -l$clib" >&5
+$as_echo_n "checking for gethostbyname2 in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 gethostbyname2 ();
+int
+main ()
+{
+return gethostbyname2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+        
+$as_echo "@%:@define HAVE_GETHOSTBYNAME2 1" >>confdefs.h
+
+    
+else
+  
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname2 in -lsocket" >&5
+$as_echo_n "checking for gethostbyname2 in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_gethostbyname2+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $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 gethostbyname2 ();
+int
+main ()
+{
+return gethostbyname2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_gethostbyname2=yes
+else
+  ac_cv_lib_socket_gethostbyname2=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_socket_gethostbyname2" >&5
+$as_echo "$ac_cv_lib_socket_gethostbyname2" >&6; }
+if test "x$ac_cv_lib_socket_gethostbyname2" = xyes; then :
+  
+$as_echo "@%:@define HAVE_GETHOSTBYNAME2 1" >>confdefs.h
+
+fi
+
+    
+fi
+
+
+    as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_inet_ntop" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntop in -l$clib" >&5
+$as_echo_n "checking for inet_ntop in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 inet_ntop ();
+int
+main ()
+{
+return inet_ntop ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+        
+$as_echo "@%:@define HAVE_INET_NTOP 1" >>confdefs.h
+
+    
+else
+  
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntop in -lsocket" >&5
+$as_echo_n "checking for inet_ntop in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_inet_ntop+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $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 inet_ntop ();
+int
+main ()
+{
+return inet_ntop ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_inet_ntop=yes
+else
+  ac_cv_lib_socket_inet_ntop=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_socket_inet_ntop" >&5
+$as_echo "$ac_cv_lib_socket_inet_ntop" >&6; }
+if test "x$ac_cv_lib_socket_inet_ntop" = xyes; then :
+  
+            
+$as_echo "@%:@define HAVE_INET_NTOP 1" >>confdefs.h
+
+        
+else
+  
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntop in -lnsl" >&5
+$as_echo_n "checking for inet_ntop in -lnsl... " >&6; }
+if ${ac_cv_lib_nsl_inet_ntop+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $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 inet_ntop ();
+int
+main ()
+{
+return inet_ntop ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_nsl_inet_ntop=yes
+else
+  ac_cv_lib_nsl_inet_ntop=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_nsl_inet_ntop" >&5
+$as_echo "$ac_cv_lib_nsl_inet_ntop" >&6; }
+if test "x$ac_cv_lib_nsl_inet_ntop" = xyes; then :
+  
+                
+$as_echo "@%:@define HAVE_INET_NTOP 1" >>confdefs.h
+
+                socket_lib="$socket_lib -lnsl"
+            
+fi
+
+        
+fi
+
+    
+fi
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
+$as_echo_n "checking for socket in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_socket+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $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 socket ();
+int
+main ()
+{
+return socket ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_socket=yes
+else
+  ac_cv_lib_socket_socket=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_socket_socket" >&5
+$as_echo "$ac_cv_lib_socket_socket" >&6; }
+if test "x$ac_cv_lib_socket_socket" = xyes; then :
+  
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair in -lsocket" >&5
+$as_echo_n "checking for socketpair in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_socketpair+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $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 socketpair ();
+int
+main ()
+{
+return socketpair ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_socketpair=yes
+else
+  ac_cv_lib_socket_socketpair=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_socket_socketpair" >&5
+$as_echo "$ac_cv_lib_socket_socketpair" >&6; }
+if test "x$ac_cv_lib_socket_socketpair" = xyes; then :
+  
+            
+$as_echo "@%:@define HAVE_SOCKETPAIR 1" >>confdefs.h
+
+        
+fi
+
+        socket_lib="-lsocket"
+    
+fi
+
+
+fi
+
+
+@%:@ Check whether --enable-socks was given.
+if test "${enable_socks+set}" = set; then :
+  enableval=$enable_socks; 
+fi
+
+
+if test "x$enable_socks" = "xyes" ; then
+    enable_socks="no"
+    for ac_header in socks.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "socks.h" "ac_cv_header_socks_h" "$ac_includes_default"
+if test "x$ac_cv_header_socks_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SOCKS_H 1
+_ACEOF
+ 
+        enable_socks="yes"
+    
+fi
+
+done
+
+else
+    enable_socks="no"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socks proxy support" >&5
+$as_echo_n "checking for socks proxy support... " >&6; }
+
+if test "x$enable_socks" = "xyes" ; then
+    socket_lib="-lsocksd $socket_lib"
+    
+$as_echo "@%:@define HAVE_SOCKS 1" >>confdefs.h
+
+    { $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_ac_Lib=`$as_echo "ac_cv_lib_$clib''_lstat" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat in -l$clib" >&5
+$as_echo_n "checking for lstat in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 lstat ();
+int
+main ()
+{
+return lstat ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+    
+$as_echo "@%:@define HAVE_LSTAT 1" >>confdefs.h
+
+
+fi
+
+
+as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_strcoll" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcoll in -l$clib" >&5
+$as_echo_n "checking for strcoll in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 strcoll ();
+int
+main ()
+{
+return strcoll ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+    
+$as_echo "@%:@define HAVE_STRCOLL 1" >>confdefs.h
+
+
+fi
+
+
+as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_stricmp" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stricmp in -l$clib" >&5
+$as_echo_n "checking for stricmp in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 stricmp ();
+int
+main ()
+{
+return stricmp ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+    
+$as_echo "@%:@define HAVE_STRICMP 1" >>confdefs.h
+
+
+fi
+
+
+as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_stristr" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stristr in -l$clib" >&5
+$as_echo_n "checking for stristr in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 stristr ();
+int
+main ()
+{
+return stristr ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+    
+$as_echo "@%:@define HAVE_STRISTR 1" >>confdefs.h
+
+
+fi
+
+
+as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_sysconf" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf in -l$clib" >&5
+$as_echo_n "checking for sysconf in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 sysconf ();
+int
+main ()
+{
+return sysconf ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+    
+$as_echo "@%:@define HAVE_SYSCONF 1" >>confdefs.h
+
+
+fi
+
+
+as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_posix_memalign" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for posix_memalign in -l$clib" >&5
+$as_echo_n "checking for posix_memalign in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 posix_memalign ();
+int
+main ()
+{
+return posix_memalign ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+    
+$as_echo "@%:@define HAVE_POSIX_MEMALIGN 1" >>confdefs.h
+
+
+fi
+
+
+as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_dlopen" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -l$clib" >&5
+$as_echo_n "checking for dlopen in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_LIB$clib" | $as_tr_cpp` 1
+_ACEOF
+
+  LIBS="-l$clib $LIBS"
+
+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.  */
+
+/* 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 :
+  UCOMMON_LIBS="$UCOMMON_LIBS -ldl"
+else
+  
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lcompat" >&5
+$as_echo_n "checking for dlopen in -lcompat... " >&6; }
+if ${ac_cv_lib_compat_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcompat  $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_compat_dlopen=yes
+else
+  ac_cv_lib_compat_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_compat_dlopen" >&5
+$as_echo "$ac_cv_lib_compat_dlopen" >&6; }
+if test "x$ac_cv_lib_compat_dlopen" = xyes; then :
+  UCOMMON_LIBS="$UCOMMON_LIBS -lcompat"
+fi
+
+        { $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.  */
+
+/* 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 :
+  
+            
+$as_echo "@%:@define HAVE_SHL_LOAD 1" >>confdefs.h
+
+            UCOMMON_LIBS="$UCOMMON_LIBS -ldld"
+        
+fi
+
+    
+fi
+
+
+fi
+
+
+PTHREAD_FLAGS=""
+
+if test "$enable_shared" = "no" ; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -DUCOMMON_STATIC" ; fi
+
+@%:@ Check whether --enable-atomics was given.
+if test "${enable_atomics+set}" = set; then :
+  enableval=$enable_atomics; 
+    
+$as_echo "@%:@define HAVE_GCC_ATOMICS 1" >>confdefs.h
+
+
+fi
+
+
+@%:@ Check whether --enable-pth was given.
+if test "${enable_pth+set}" = set; then :
+  enableval=$enable_pth; 
+fi
+
+
+if test "$threading" = "none" ; then
+    if test "$enable_pth" != "yes" ; then
+        ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes; then :
+  
+            PTHREAD_FLAGS="-mt -pthread -pthreads"
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
+$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_create+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $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 pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_pthread_create=yes
+else
+  ac_cv_lib_pthread_pthread_create=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_pthread_pthread_create" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
+  
+                tlib="pthread"
+                UCOMMON_LIBS="$UCOMMON_LIBS -lpthread"
+            
+fi
+
+            if test -z "$tlib" ; then
+                as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_pthread_create" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -l$clib" >&5
+$as_echo_n "checking for pthread_create in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  tlib="$clib"
+fi
+
+            fi
+            if test -z "$tlib" ; then
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
+$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
+if ${ac_cv_lib_c_r_pthread_create+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $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 pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_c_r_pthread_create=yes
+else
+  ac_cv_lib_c_r_pthread_create=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_c_r_pthread_create" >&5
+$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
+if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
+  
+                    tlib="c_r"
+                    if test "$clib" = "c" ; then
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc in -lc_r" >&5
+$as_echo_n "checking for malloc in -lc_r... " >&6; }
+if ${ac_cv_lib_c_r_malloc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $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 malloc ();
+int
+main ()
+{
+return malloc ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_c_r_malloc=yes
+else
+  ac_cv_lib_c_r_malloc=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_c_r_malloc" >&5
+$as_echo "$ac_cv_lib_c_r_malloc" >&6; }
+if test "x$ac_cv_lib_c_r_malloc" = xyes; then :
+  clib="c_r"
+fi
+
+                    fi
+                
+fi
+
+            fi
+            if test ! -z "$tlib" ; then
+                as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_pthread_condattr_setclock" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_condattr_setclock in -l$tlib" >&5
+$as_echo_n "checking for pthread_condattr_setclock in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 pthread_condattr_setclock ();
+int
+main ()
+{
+return pthread_condattr_setclock ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+                    
+$as_echo "@%:@define HAVE_PTHREAD_CONDATTR_SETCLOCK 1" >>confdefs.h
+
+                
+fi
+
+                as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_pthread_setconcurrency" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setconcurrency in -l$tlib" >&5
+$as_echo_n "checking for pthread_setconcurrency in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 pthread_setconcurrency ();
+int
+main ()
+{
+return pthread_setconcurrency ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+                    
+$as_echo "@%:@define HAVE_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
+
+                
+fi
+
+
+                as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_pthread_yield" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_yield in -l$tlib" >&5
+$as_echo_n "checking for pthread_yield in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 pthread_yield ();
+int
+main ()
+{
+return pthread_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+                    
+$as_echo "@%:@define HAVE_PTHREAD_YIELD 1" >>confdefs.h
+
+                
+fi
+
+
+                as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_pthread_delay" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_delay in -l$tlib" >&5
+$as_echo_n "checking for pthread_delay in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 pthread_delay ();
+int
+main ()
+{
+return pthread_delay ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+                    
+$as_echo "@%:@define HAVE_PTHREAD_DELAY 1" >>confdefs.h
+
+                
+fi
+
+                as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_pthread_delay_np" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_delay_np in -l$tlib" >&5
+$as_echo_n "checking for pthread_delay_np in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 pthread_delay_np ();
+int
+main ()
+{
+return pthread_delay_np ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+                    
+$as_echo "@%:@define HAVE_PTHREAD_DELAY_NP 1" >>confdefs.h
+
+                
+fi
+
+                as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_pthread_setschedprio" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setschedprio in -l$tlib" >&5
+$as_echo_n "checking for pthread_setschedprio in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 pthread_setschedprio ();
+int
+main ()
+{
+return pthread_setschedprio ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+                    
+$as_echo "@%:@define HAVE_PTHREAD_SETSCHEDPRIO 1" >>confdefs.h
+
+                
+fi
+
+            fi
+        
+else
+  
+            ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
+if test "x$ac_cv_header_windows_h" = xyes; then :
+  
+else
+  
+                ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
+if test "x$ac_cv_header_pth_h" = xyes; then :
+  
+                    UCOMMON_LIBS="$UCOMMON_LIBS -lpth"
+                    UCOMMON_FLAGS="$UCOMMON_FLAGS -D__PTH__"
+                
+else
+  
+                    as_fn_error $? "\"pthread or GNU pth support required\"" "$LINENO" 5
+                
+fi
+
+
+            
+fi
+
+
+        
+fi
+
+
+    else
+        ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
+if test "x$ac_cv_header_pth_h" = xyes; then :
+  
+            UCOMMON_LIBS="$UCOMMON_LIBS -lpth"
+            UCOMMON_FLAGS="$UCOMMON_FLAGS -D__PTH__"
+        
+else
+  
+            as_fn_error $? "\"GNU pth required\"" "$LINENO" 5
+        
+fi
+
+
+    fi
+fi
+
+for func in ftok shm_open nanosleep clock_nanosleep clock_gettime strerror_r localtime_r gmtime_r posix_fadvise ftruncate pwrite setpgrp setlocale gettext execvp atexit realpath symlink readlink waitpid wait4 ; do
+    found="no"
+    as_ac_var=`$as_echo "ac_cv_func_$func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  
+        found=$func
+    
+else
+  
+        as_ac_Lib=`$as_echo "ac_cv_lib_posix4_$func" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $func in -lposix4" >&5
+$as_echo_n "checking for $func in -lposix4... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix4  $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 $func ();
+int
+main ()
+{
+return $func ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+            found=$func
+            posix4_lib="-lposix4"
+        
+else
+  
+            as_ac_Lib=`$as_echo "ac_cv_lib_rt_$func" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $func in -lrt" >&5
+$as_echo_n "checking for $func in -lrt... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $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 $func ();
+int
+main ()
+{
+return $func ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+                found=$func
+                rt_lib="-lrt"
+            
+else
+  
+                if test ! -z "$tlib" ; then
+                    as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_$func" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $func in -l$tlib" >&5
+$as_echo_n "checking for $func in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 $func ();
+int
+main ()
+{
+return $func ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+                        found=$func
+                    
+fi
+
+                fi
+            
+fi
+
+        
+fi
+
+    
+fi
+
+    case $found in
+    shm_open)
+        
+$as_echo "@%:@define HAVE_SHM_OPEN 1" >>confdefs.h
+
+        ;;
+    setpgrp)
+        
+$as_echo "@%:@define HAVE_SETPGRP 1" >>confdefs.h
+
+        ;;
+    realpath)
+        
+$as_echo "@%:@define HAVE_REALPATH 1" >>confdefs.h
+
+        ;;
+    ftok)
+        
+$as_echo "@%:@define HAVE_FTOK 1" >>confdefs.h
+
+        ;;
+    gmtime_r)
+        
+$as_echo "@%:@define HAVE_GMTIME_R 1" >>confdefs.h
+
+        ;;
+    localtime_r)
+        
+$as_echo "@%:@define HAVE_LOCALTIME_R 1" >>confdefs.h
+
+        ;;
+    strerror_r)
+        
+$as_echo "@%:@define HAVE_STRERROR_R 1" >>confdefs.h
+
+        ;;
+    nanosleep)
+        
+$as_echo "@%:@define HAVE_NANOSLEEP 1" >>confdefs.h
+
+        ;;
+    clock_nanosleep)
+        
+$as_echo "@%:@define HAVE_CLOCK_NANOSLEEP 1" >>confdefs.h
+
+        ;;
+    clock_gettime)
+        
+$as_echo "@%:@define HAVE_CLOCK_GETTIME 1" >>confdefs.h
+
+        ;;
+    posix_fadvise)
+        
+$as_echo "@%:@define HAVE_POSIX_FADVISE 1" >>confdefs.h
+
+        ;;
+    ftruncate)
+        
+$as_echo "@%:@define HAVE_FTRUNCATE 1" >>confdefs.h
+
+        ;;
+    pwrite)
+        
+$as_echo "@%:@define HAVE_PWRITE 1" >>confdefs.h
+
+        ;;
+    setlocale)
+        
+$as_echo "@%:@define HAVE_SETLOCALE 1" >>confdefs.h
+
+        ;;
+    gettext)
+        
+$as_echo "@%:@define HAVE_GETTEXT 1" >>confdefs.h
+
+        have_gettext="yes"
+        ;;
+    execvp)
+        
+$as_echo "@%:@define HAVE_EXECVP 1" >>confdefs.h
+
+        ;;
+    symlink)
+        
+$as_echo "@%:@define HAVE_SYMLINK 1" >>confdefs.h
+
+        ;;
+    readlink)
+        
+$as_echo "@%:@define HAVE_READLINK 1" >>confdefs.h
+
+        ;;
+    waitpid)
+        
+$as_echo "@%:@define HAVE_WAITPID 1" >>confdefs.h
+
+        ;;
+    wait4)
+        
+$as_echo "@%:@define HAVE_WAIT4 1" >>confdefs.h
+
+        ;;
+    esac
+done
+
+UCOMMON_LINKED="$socket_lib $posix4_lib $rt_lib $UCOMMON_LIBS"
+UCOMMON_LIBS="$socket_lib $posix4_lib $rt_lib $UCOMMON_LIBS $UCOMMON_LIBC"
+
+if test "$UCOMMON_MODEL" = "CC" ; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf in -lSystemstubs" >&5
+$as_echo_n "checking for printf in -lSystemstubs... " >&6; }
+if ${ac_cv_lib_Systemstubs_printf+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lSystemstubs  $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 printf ();
+int
+main ()
+{
+return printf ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_Systemstubs_printf=yes
+else
+  ac_cv_lib_Systemstubs_printf=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_Systemstubs_printf" >&5
+$as_echo "$ac_cv_lib_Systemstubs_printf" >&6; }
+if test "x$ac_cv_lib_Systemstubs_printf" = xyes; then :
+  
+        UCOMMON_CLINK="$UCOMMON_CLINK -lSystemstubs"
+        UCOMMON_LIBC="$UCOMMON_LIBC -lgcc"
+    
+fi
+
+fi
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+COMPILER_FLAGS=""
+
+if test "x$GCC" = "xyes" ; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -Wno-long-long" ; fi
+
+for flag in $CXXFLAGS ; do
+    case "$flag" in
+    -f*exceptions|-f*rtti|-f*check-new|-f*enforce-eh-specs|-finline|-f*except)
+        if test "$UCOMMON_MODEL" = "CXX" ; then
+            UCOMMON_FLAGS="$UCOMMON_FLAGS $flag" ; fi
+        ;;
+    -fvisibility=*)
+        VISIBLE_FLAGS=""
+        COMPILER_FLAGS="$COMPILER_FLAGS $flag"
+        ;;
+    *)
+        COMPILER_FLAGS="$COMPILER_FLAGS $flag"
+        ;;
+    esac
+done
+export CXXFLAGS="$COMPILER_FLAGS"
+
+if test "$UCOMMON_MODEL" = "CC" ; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS"
+
+    if test x"$GCC" = "xyes" ; then
+        ucflags="-fno-exceptions -fno-rtti -fno-enforce-eh-specs"
+        lcflags="-nodefaultlibs -nostdinc++"
+    else
+        ucflags="-library=no%Cstd -features=no%except -features=namespace -features=no%rtti"
+        lcflags=""
+    fi
+
+    for flag in $ucflags ; do
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports $flag" >&5
+$as_echo_n "checking whether ${CXX} supports $flag... " >&6; }
+        echo 'void f(){}' >conftest.cpp
+        if test -z "`${CXX} $flag -c conftest.cpp 2>&1`"; then
+            UCOMMON_FLAGS="$UCOMMON_FLAGS $flag"
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+            if test "$flag" = "-library=no%Cstd" ; then
+                UCOMMON_MODEL="CXX" ; fi
+        else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        fi
+        rm -f conftest*
+    done
+
+    for flag in $lcflags ; do
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports $flag" >&5
+$as_echo_n "checking whether ${CXX} supports $flag... " >&6; }
+        echo 'void f(){}' >conftest.cpp
+        if test -z "`${CXX} $flag -c conftest.cpp 2>&1`"; then
+            UCOMMON_CLINK="$UCOMMON_CLINK $flag"
+            { $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
+        rm -f conftest*
+    done
+else
+    ac_save_CXXFLAGS="$CXXFLAGS"
+    CXXFLAGS=""
+    
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+    
+for ac_header in stdexcept
+do :
+  ac_fn_cxx_check_header_mongrel "$LINENO" "stdexcept" "ac_cv_header_stdexcept" "$ac_includes_default"
+if test "x$ac_cv_header_stdexcept" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STDEXCEPT 1
+_ACEOF
+ 
+fi
+
+done
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for old style iostream" >&5
+$as_echo_n "checking for old style iostream... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+        #include <iostream>
+        using namespace std;
+
+        class mystr : public streambuf, public iostream
+        {
+            mystr();
+        };
+
+        mystr::mystr() : streambuf(), iostream((streambuf *)this)
+        {
+        }
+    
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        UCOMMON_FLAGS="$UCOMMON_FLAGS -DNEW_STDCPP"
+    
+else
+  
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+        UCOMMON_FLAGS="$UCOMMON_FLAGS -DOLD_STDCPP"
+    
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+    CXXFLAGS="$ac_save_CXXFLAGS"
+fi
+
+if test ! -z "$PTHREAD_FLAGS" ; then
+    for flag in $PTHREAD_FLAGS ; do
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports $flag" >&5
+$as_echo_n "checking whether ${CXX} supports $flag... " >&6; }
+        echo 'void f(){}' >conftest.cpp
+        if test -z "`${CXX} $flag -c conftest.cpp 2>&1`"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+            UCOMMON_FLAGS="$UCOMMON_FLAGS $flag"
+            break
+        else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        fi
+    done
+fi
+
+export CXXFLAGS
+
+# libstdc++ on some targets broken badly if inlines hidden.  Might be
+# deeper issue with ansi c++ library model...
+flags="-fno-check-new -finline"
+if test "$UCOMMON_MODEL" = "CC" ; then
+    if test "$enable_shared" != "no" ; then
+        flags="$flags -fvisibility-inlines-hidden"
+    fi
+fi
+
+for flag in $flags ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports $flag" >&5
+$as_echo_n "checking whether ${CXX} supports $flag... " >&6; }
+    echo 'void f(){}' >conftest.cpp
+    if test -z "`${CXX} $flag -c conftest.cpp 2>&1`"; then
+        UCOMMON_FLAGS="$UCOMMON_FLAGS $flag"
+        { $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
+    rm -f conftest*
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports visibility" >&5
+$as_echo_n "checking whether ${CXX} supports visibility... " >&6; }
+echo 'void f(){}' >conftest.cpp
+if test -z "`${CXX} -fvisibility=hidden -c conftest.cpp 2>&1`"; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -fvisibility=hidden -DUCOMMON_VISIBILITY=1"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    UCOMMON_VISIBILITY="1"
+else
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -DUCOMMON_VISIBILITY=0"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f conftest*
+
+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
+
+
+
+        includes="$includedir"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$includes")`
+                includes=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$includes"\"
+                )`
+                result=`(echo "$includes")`
+        done
+        
+
+
+        libs="$libdir"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$libs")`
+                libs=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$libs"\"
+                )`
+                result=`(echo "$libs")`
+        done
+        
+
+
+case "$libs" in
+/usr/*)
+    ;;
+*)
+    UCOMMON_LINKED="-L$libs $UCOMMON_LINKED"
+    ;;
+esac
+
+case "$includes" in
+/usr/*)
+    ;;
+*)
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -I$includes"
+    ;;
+esac
+
+case "$target_os" in
+*bsd*)
+    if test "$UCOMMON_MODEL" = "CC" ; then
+        if test "$GCC" = "yes" -a "$UCOMMON_LIBC" = "-lc" ; then
+            UCOMMON_LIBC="-Wl,-lc"
+        elif test "$GCC" = "yes" -a "$UCOMMON_LIBC" = "-lc_r" ; then
+            UCOMMON_LIBC="-Wl,-lc_r"
+        fi
+    fi
+    ;;
+osf*)
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -D_POSIX_C_SOURCE=1 -D_OSF_SOURCE=1 -D__USE_STD_IOSTREAM"
+    ;;
+cygwin*|mingw*)
+    UCOMMON_LINKED="$UCOMMON_LINKED -no-undefined"
+    UCOMMON_LIBS="$UCOMMON_LIBS -no-undefined"
+    ;;
+esac
+
+UCOMMON_CLINK="$UCOMMON_CLINK $UCOMMON_LIBC"
+
+if test -z "$UCOMMON_SSLSTACK" ; then
+    UCOMMON_SSLSTACK="$sslstack" ; fi
+
+OPENSSL_LIBS=""
+GNUTLS_LIBS=""
+
+
+
+
+
+
+
+
+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
+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:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+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
+  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
+
+  ;;
+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
+
+  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
+
+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
+
+@%:@ Check whether --with-pkg-config was given.
+if test "${with_pkg_config+set}" = set; then :
+  withval=$with_pkg_config; 
+    
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
+$as_echo_n "checking for OPENSSL... " >&6; }
+
+if test -n "$OPENSSL_CFLAGS"; then
+    pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= \$OPENSSL_REQUIRES\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "openssl >= $OPENSSL_REQUIRES") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl >= $OPENSSL_REQUIRES" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes 
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$OPENSSL_LIBS"; then
+    pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= \$OPENSSL_REQUIRES\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "openssl >= $OPENSSL_REQUIRES") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl >= $OPENSSL_REQUIRES" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes 
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl >= $OPENSSL_REQUIRES" 2>&1`
+        else 
+	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl >= $OPENSSL_REQUIRES" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$OPENSSL_PKG_ERRORS" >&5
+
+	
+        OPENSSL_LIBS=""
+        for ac_header in openssl/ssl.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_OPENSSL_SSL_H 1
+_ACEOF
+ 
+            OPENSSL_LIBS="-lssl -lcrypto -lz $OPENSSL_LINK"
+        
+fi
+
+done
+
+        for ac_header in openssl/fips.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/fips.h" "ac_cv_header_openssl_fips_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_fips_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_OPENSSL_FIPS_H 1
+_ACEOF
+ 
+fi
+
+done
+
+    
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	
+        OPENSSL_LIBS=""
+        for ac_header in openssl/ssl.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_OPENSSL_SSL_H 1
+_ACEOF
+ 
+            OPENSSL_LIBS="-lssl -lcrypto -lz $OPENSSL_LINK"
+        
+fi
+
+done
+
+        for ac_header in openssl/fips.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/fips.h" "ac_cv_header_openssl_fips_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_fips_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_OPENSSL_FIPS_H 1
+_ACEOF
+ 
+fi
+
+done
+
+    
+else
+	OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS
+	OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	
+fi
+    
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNUTLS" >&5
+$as_echo_n "checking for GNUTLS... " >&6; }
+
+if test -n "$GNUTLS_CFLAGS"; then
+    pkg_cv_GNUTLS_CFLAGS="$GNUTLS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 2.8.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gnutls >= 2.8.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.8.0" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes 
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GNUTLS_LIBS"; then
+    pkg_cv_GNUTLS_LIBS="$GNUTLS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 2.8.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gnutls >= 2.8.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.8.0" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes 
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        GNUTLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gnutls >= 2.8.0" 2>&1`
+        else 
+	        GNUTLS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gnutls >= 2.8.0" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GNUTLS_PKG_ERRORS" >&5
+
+	GNUTLS_LIBS=""
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	GNUTLS_LIBS=""
+else
+	GNUTLS_CFLAGS=$pkg_cv_GNUTLS_CFLAGS
+	GNUTLS_LIBS=$pkg_cv_GNUTLS_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	
+fi
+
+else
+  
+    for ac_header in openssl/ssl.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_OPENSSL_SSL_H 1
+_ACEOF
+ 
+        OPENSSL_LIBS="-lssl -lcrypto -lz $OPENSSL_LINK"
+    
+fi
+
+done
+
+    for ac_header in openssl/fips.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/fips.h" "ac_cv_header_openssl_fips_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_fips_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_OPENSSL_FIPS_H 1
+_ACEOF
+ 
+fi
+
+done
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_init in -lgnutls" >&5
+$as_echo_n "checking for gnutls_init in -lgnutls... " >&6; }
+if ${ac_cv_lib_gnutls_gnutls_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgnutls  $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 gnutls_init ();
+int
+main ()
+{
+return gnutls_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gnutls_gnutls_init=yes
+else
+  ac_cv_lib_gnutls_gnutls_init=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_gnutls_gnutls_init" >&5
+$as_echo "$ac_cv_lib_gnutls_gnutls_init" >&6; }
+if test "x$ac_cv_lib_gnutls_gnutls_init" = xyes; then :
+  
+        GNUTLS_LIBS="-lgnutls"
+    
+fi
+
+
+fi
+
+
+
+SECURE=""
+case "$ssl" in
+secure|any|detect)
+    if test ! -z "$GNUTLS_LIBS" ; then
+        SECURE_LIBS="$GNUTLS_LIBS"
+        SECURE="gnutls"
+    fi
+    if test -z "$SECURE" ; then
+        if test ! -z "$OPENSSL_LIBS" ; then
+            SECURE_LIBS="$OPENSSL_LIBS"
+            SECURE="openssl"
+        fi
+    fi
+    ;;
+gnutls|gnu)
+    if test ! -z "$GNUTLS_LIBS" ; then
+        SECURE_LIBS="$GNUTLS_LIBS"
+        SECURE="gnutls"
+    fi
+    ;;
+openssl|ssl)
+    if test ! -z "$OPENSSL_LIBS" ; then
+        SECURE_LIBS="$OPENSSL_LIBS"
+        SECURE="openssl"
+    fi
+    ;;
+esac
+
+if test -z "$SECURE" ; then
+    SECURE_LIBS=""
+    SECURE="nossl"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking secure library mode" >&5
+$as_echo_n "checking secure library mode... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SECURE" >&5
+$as_echo "$SECURE" >&6; }
+
+SECURE_LOCAL="../$SECURE/libusecure.la $SECURE_LIBS"
+
+LT_GENERIC="${LIBTOOL}"
+if test "$UCOMMON_MODEL" = "CC" ; then
+    LIBTOOL='$(SHELL) $(top_srcdir)/cmodel.sh'" ${LIBTOOL}" ; fi
+
+includes='${includedir}/ucommon'
+
+if test "$sysconfdir" = '${prefix}/etc' ; then
+    sysconfdir="/etc" ; fi
+
+if test "$localstatedir" = '${prefix}/var' ; then
+    localstatedir="/var" ; fi
+
+ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
+if test "x$ac_cv_header_libintl_h" = xyes; then :
+  
+    
+$as_echo "@%:@define HAVE_LIBINTL_H 1" >>confdefs.h
+
+    if test "$have_gettext" = "no" ; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
+$as_echo_n "checking for gettext in -lintl... " >&6; }
+if ${ac_cv_lib_intl_gettext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $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 gettext ();
+int
+main ()
+{
+return gettext ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_intl_gettext=yes
+else
+  ac_cv_lib_intl_gettext=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_intl_gettext" >&5
+$as_echo "$ac_cv_lib_intl_gettext" >&6; }
+if test "x$ac_cv_lib_intl_gettext" = xyes; then :
+  
+            
+$as_echo "@%:@define HAVE_GETTEXT 1" >>confdefs.h
+
+            UCOMMON_LIBS="$UCOMMON_LIBS -lintl"
+        
+fi
+
+    fi
+
+fi
+
+
+
+if test "$prefix" = "NONE" ; then
+    prefixdir="$ac_default_prefix"
+else
+    prefixdir="$prefix" ; fi
+
+
+        UCOMMON_INCLUDES="$includes"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$UCOMMON_INCLUDES")`
+                UCOMMON_INCLUDES=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$UCOMMON_INCLUDES"\"
+                )`
+                result=`(echo "$UCOMMON_INCLUDES")`
+        done
+        
+
+
+        UCOMMON_LOCALE="$localedir"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$UCOMMON_LOCALE")`
+                UCOMMON_LOCALE=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$UCOMMON_LOCALE"\"
+                )`
+                result=`(echo "$UCOMMON_LOCALE")`
+        done
+        
+
+
+        UCOMMON_CFGPATH="$sysconfdir"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$UCOMMON_CFGPATH")`
+                UCOMMON_CFGPATH=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$UCOMMON_CFGPATH"\"
+                )`
+                result=`(echo "$UCOMMON_CFGPATH")`
+        done
+        
+
+
+        UCOMMON_VARPATH="$localstatedir"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$UCOMMON_VARPATH")`
+                UCOMMON_VARPATH=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$UCOMMON_VARPATH"\"
+                )`
+                result=`(echo "$UCOMMON_VARPATH")`
+        done
+        
+
+
+        UCOMMON_PREFIX="$prefixdir"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$UCOMMON_PREFIX")`
+                UCOMMON_PREFIX=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$UCOMMON_PREFIX"\"
+                )`
+                result=`(echo "$UCOMMON_PREFIX")`
+        done
+        
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define UCOMMON_PREFIX "$UCOMMON_PREFIX"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define UCOMMON_CFGPATH "$UCOMMON_CFGPATH"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define UCOMMON_VARPATH "$UCOMMON_VARPATH"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define UCOMMON_LOCALE "$UCOMMON_LOCALE"
+_ACEOF
+
+
+# Extract the first word of "doxygen", so it can be a program name with args.
+set dummy doxygen; 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_DOXYGEN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $DOXYGEN in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DOXYGEN="$DOXYGEN" # 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_DOXYGEN="$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
+
+  test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN="doxygen"
+  ;;
+esac
+fi
+DOXYGEN=$ac_cv_path_DOXYGEN
+if test -n "$DOXYGEN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5
+$as_echo "$DOXYGEN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_config_files="$ac_config_files Makefile corelib/Makefile commoncpp/Makefile openssl/Makefile gnutls/Makefile nossl/Makefile utils/Makefile inc/Makefile inc/ucommon/Makefile inc/commoncpp/Makefile test/Makefile directive commoncpp.pc ucommon.pc ucommon.spec ucommon-config commoncpp-config"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $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=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    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;}
+      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:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIB@&t@OBJS; 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.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIB@&t@OBJS=$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 -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
+
+: "${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:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+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.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+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 :
+  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_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+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
+# 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
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in @%:@(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+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
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+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
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# 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='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD]
+@%:@ ----------------------------------------
+@%:@ Output "`basename @S|@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 @S|@? 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 @S|@as_val. Take advantage of shells that can avoid forks. The arguments
+@%:@ must be portable across @S|@(()) 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
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# 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 @%:@(((((
+-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
+
+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 -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
+
+
+@%:@ as_fn_mkdir_p
+@%:@ -------------
+@%:@ Create "@S|@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='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+
+@%:@ 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'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+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 ucommon $as_me 6.0.7, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$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]... [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
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE] 
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE] 
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+ucommon config.status 6.0.7
+configured by $0, generated by GNU Autoconf 2.69,
+  with options \\"\$ac_cs_config\\"
+
+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."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+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_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $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
+    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
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    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 \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  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'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
+@%:@@%:@ Running $as_me. @%:@@%:@
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+
+
+# 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
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$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"`'
+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"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+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_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_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"`'
+sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
+predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
+postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
+predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
+postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
+LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
+reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
+reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
+GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
+inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
+always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
+include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
+prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
+predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
+postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
+predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
+postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in AS \
+DLLTOOL \
+OBJDUMP \
+SHELL \
+ECHO \
+PATH_SEPARATOR \
+SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+sharedlib_from_linklib_cmd \
+AR \
+AR_FLAGS \
+archiver_list_spec \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+nm_file_list_spec \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_pic \
+lt_prog_compiler_wl \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+MANIFEST_TOOL \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_separator \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+install_override_mode \
+finish_eval \
+old_striplib \
+striplib \
+compiler_lib_search_dirs \
+predep_objects \
+postdep_objects \
+predeps \
+postdeps \
+compiler_lib_search_path \
+LD_CXX \
+reload_flag_CXX \
+compiler_CXX \
+lt_prog_compiler_no_builtin_flag_CXX \
+lt_prog_compiler_pic_CXX \
+lt_prog_compiler_wl_CXX \
+lt_prog_compiler_static_CXX \
+lt_cv_prog_compiler_c_o_CXX \
+export_dynamic_flag_spec_CXX \
+whole_archive_flag_spec_CXX \
+compiler_needs_object_CXX \
+with_gnu_ld_CXX \
+allow_undefined_flag_CXX \
+no_undefined_flag_CXX \
+hardcode_libdir_flag_spec_CXX \
+hardcode_libdir_separator_CXX \
+exclude_expsyms_CXX \
+include_expsyms_CXX \
+file_list_spec_CXX \
+compiler_lib_search_dirs_CXX \
+predep_objects_CXX \
+postdep_objects_CXX \
+predeps_CXX \
+postdeps_CXX \
+compiler_lib_search_path_CXX; do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+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 \
+reload_cmds_CXX \
+old_archive_cmds_CXX \
+old_archive_from_new_cmds_CXX \
+old_archive_from_expsyms_cmds_CXX \
+archive_cmds_CXX \
+archive_expsym_cmds_CXX \
+module_cmds_CXX \
+module_expsym_cmds_CXX \
+export_symbols_cmds_CXX \
+prelink_cmds_CXX \
+postlink_cmds_CXX; do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+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
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'
+
+
+
+
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "ucommon-config.h") CONFIG_HEADERS="$CONFIG_HEADERS ucommon-config.h" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "corelib/Makefile") CONFIG_FILES="$CONFIG_FILES corelib/Makefile" ;;
+    "commoncpp/Makefile") CONFIG_FILES="$CONFIG_FILES commoncpp/Makefile" ;;
+    "openssl/Makefile") CONFIG_FILES="$CONFIG_FILES openssl/Makefile" ;;
+    "gnutls/Makefile") CONFIG_FILES="$CONFIG_FILES gnutls/Makefile" ;;
+    "nossl/Makefile") CONFIG_FILES="$CONFIG_FILES nossl/Makefile" ;;
+    "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
+    "inc/Makefile") CONFIG_FILES="$CONFIG_FILES inc/Makefile" ;;
+    "inc/ucommon/Makefile") CONFIG_FILES="$CONFIG_FILES inc/ucommon/Makefile" ;;
+    "inc/commoncpp/Makefile") CONFIG_FILES="$CONFIG_FILES inc/commoncpp/Makefile" ;;
+    "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
+    "directive") CONFIG_FILES="$CONFIG_FILES directive" ;;
+    "commoncpp.pc") CONFIG_FILES="$CONFIG_FILES commoncpp.pc" ;;
+    "ucommon.pc") CONFIG_FILES="$CONFIG_FILES ucommon.pc" ;;
+    "ucommon.spec") CONFIG_FILES="$CONFIG_FILES ucommon.spec" ;;
+    "ucommon-config") CONFIG_FILES="$CONFIG_FILES ucommon-config" ;;
+    "commoncpp-config") CONFIG_FILES="$CONFIG_FILES commoncpp-config" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  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 -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || 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.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+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'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+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 < "$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 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[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# 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 >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$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 `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $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.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || 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
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/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:${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
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+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' "$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;}
+
+  rm -f "$ac_tmp/stdin"
+  case $ac_file in
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && 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 "$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 "$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"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+	 X"$_am_arg" : 'X\(//\)$' \| \
+	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+  
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "libtool":C) 
+    
+    # See if we are running on zsh, and set the options which allow our
+    # commands through without removal of \ escapes.
+    if test -n "${ZSH_VERSION+set}" ; then
+      setopt NO_GLOB_SUBST
+    fi
+
+    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
+# 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.
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010, 2011 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.
+#
+# 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.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags="CXX "
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Assembler program.
+AS=$lt_AS
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Object dumper program.
+OBJDUMP=$lt_OBJDUMP
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# 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
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method = "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
+# The archiver.
+AR=$lt_AR
+
+# Flags to create an archive.
+AR_FLAGS=$lt_AR_FLAGS
+
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+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
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
+
+# The root where to search for dependent libraries,and in which our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# 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
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+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
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+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
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# 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
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using 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
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# 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
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects
+postdep_objects=$lt_postdep_objects
+predeps=$lt_predeps
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# ### END LIBTOOL CONFIG
+
+_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
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+_LT_EOF
+    ;;
+  esac
+
+  
+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 '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
+
+  if test x"$xsi_shell" = xyes; then
+  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_basename ()$/,/^} # func_basename /c\
+func_basename ()\
+{\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
+func_dirname_and_basename ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
+func_stripname ()\
+{\
+\    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
+\    # positional parameters, so assign one to ordinary parameter first.\
+\    func_stripname_result=${3}\
+\    func_stripname_result=${func_stripname_result#"${1}"}\
+\    func_stripname_result=${func_stripname_result%"${2}"}\
+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
+func_split_long_opt ()\
+{\
+\    func_split_long_opt_name=${1%%=*}\
+\    func_split_long_opt_arg=${1#*=}\
+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
+func_split_short_opt ()\
+{\
+\    func_split_short_opt_arg=${1#??}\
+\    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
+func_lo2o ()\
+{\
+\    case ${1} in\
+\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
+\      *)    func_lo2o_result=${1} ;;\
+\    esac\
+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_xform ()$/,/^} # func_xform /c\
+func_xform ()\
+{\
+    func_xform_result=${1%.*}.lo\
+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_arith ()$/,/^} # func_arith /c\
+func_arith ()\
+{\
+    func_arith_result=$(( $* ))\
+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_len ()$/,/^} # func_len /c\
+func_len ()\
+{\
+    func_len_result=${#1}\
+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+fi
+
+if test x"$lt_shell_append" = xyes; then
+  sed -e '/^func_append ()$/,/^} # func_append /c\
+func_append ()\
+{\
+    eval "${1}+=\\${2}"\
+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
+func_append_quoted ()\
+{\
+\    func_quote_for_eval "${2}"\
+\    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
+
+
+   mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+
+
+    cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag_CXX
+reload_cmds=$lt_reload_cmds_CXX
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_CXX
+
+# A language specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_CXX
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_CXX
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to "yes" if using 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
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_CXX
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_CXX
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_CXX
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds_CXX
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_CXX
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_CXX
+postdep_objects=$lt_postdep_objects_CXX
+predeps=$lt_predeps_CXX
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# ### END LIBTOOL TAG CONFIG: CXX
+_LT_EOF
+
+ ;;
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # 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
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named 'Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running 'make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "$am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # 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'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+
+  esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
diff --git a/jni/libucommon/sources/autom4te.cache/output.1 b/jni/libucommon/sources/autom4te.cache/output.1
new file mode 100644
index 0000000..3abb5f5
--- /dev/null
+++ b/jni/libucommon/sources/autom4te.cache/output.1
@@ -0,0 +1,22376 @@
+@%:@! /bin/sh
+@%:@ Guess values for system-dependent variables and create Makefiles.
+@%:@ Generated by GNU Autoconf 2.69 for ucommon 6.0.7.
+@%:@ 
+@%:@ 
+@%:@ 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. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # 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_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+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
+# 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
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in @%:@(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+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
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+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
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# 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='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# 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 -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
+    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+    PATH=/empty FPATH=/empty; export PATH FPATH
+    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
+      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+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 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 @S|@? 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 "@S|@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 @S|@as_val. Take advantage of shells that can avoid forks. The arguments
+@%:@ must be portable across @S|@(()) 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 @S|@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
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# 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_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 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
+}
+
+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
+
+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 -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 mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+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'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# 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.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIB@&t@OBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='ucommon'
+PACKAGE_TARNAME='ucommon'
+PACKAGE_VERSION='6.0.7'
+PACKAGE_STRING='ucommon 6.0.7'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_unique_file="inc/ucommon/ucommon.h"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIB@&t@OBJS
+LT_GENERIC
+LT_VERSION
+COMPAT
+SECURE
+SECURE_LIBS
+SECURE_LOCAL
+UCOMMON_LIBS
+UCOMMON_LIBC
+UCOMMON_CLINK
+UCOMMON_FLAGS
+UCOMMON_MODEL
+UCOMMON_LINKED
+UCOMMON_VISIBILITY
+CHECKFLAGS
+DOXYGEN
+UCOMMON_PREFIX
+UCOMMON_VARPATH
+UCOMMON_CFGPATH
+UCOMMON_LOCALE
+UCOMMON_INCLUDES
+GNUTLS_LIBS
+GNUTLS_CFLAGS
+OPENSSL_LIBS
+OPENSSL_CFLAGS
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+libs
+includes
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+MANIFEST_TOOL
+AWK
+RANLIB
+STRIP
+ac_ct_AR
+AR
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+EGREP
+GREP
+SED
+LIBTOOL
+OBJDUMP
+DLLTOOL
+AS
+CXXCPP
+ac_ct_CXX
+CXXFLAGS
+CXX
+CPP
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
+enable_dependency_tracking
+enable_silent_rules
+enable_posix_timers
+enable_stdcpp
+with_sslstack
+with_libc
+enable_debug
+enable_socks
+enable_atomics
+enable_pth
+with_pkg_config
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+CXX
+CXXFLAGS
+CCC
+CXXCPP
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+OPENSSL_CFLAGS
+OPENSSL_LIBS
+GNUTLS_CFLAGS
+GNUTLS_LIBS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) 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.
+    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 ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $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}"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  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'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_myself" : 'X\(//\)[^/]' \| \
+	 X"$as_myself" : 'X\(//\)$' \| \
+	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures ucommon 6.0.7 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking ...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          @<:@@S|@ac_default_prefix@:>@
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          @<:@PREFIX@:>@
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root @<:@DATAROOTDIR/doc/ucommon@:>@
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of ucommon 6.0.7:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-shared@<:@=PKGS@:>@  build shared libraries @<:@default=yes@:>@
+  --enable-static@<:@=PKGS@:>@  build static libraries @<:@default=yes@:>@
+  --enable-fast-install@<:@=PKGS@:>@ 
+                          optimize for fast installation @<:@default=yes@:>@
+  --disable-libtool-lock  avoid locking (might break parallel builds)
+  --enable-dependency-tracking 
+                          do not reject slow dependency extractors
+  --disable-dependency-tracking 
+                          speeds up one-time build
+  --enable-silent-rules   less verbose build output (undo: "make V=1")
+  --disable-silent-rules  verbose build output (undo: "make V=0")
+  --enable-posix-timers   enable posix timers
+  --disable-stdcpp        compile without stdc++ runtime overhead
+  --enable-debug          compile for debugging
+  --enable-socks          compile with socks proxy support
+
+      --enable-atomics        enable gcc atomic support
+
+      --enable-pth            always use GNU pth for threading
+
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-pic@<:@=PKGS@:>@       try to use only PIC/non-PIC objects @<:@default=use
+                          both@:>@
+  --with-gnu-ld           assume the C compiler uses GNU ld @<:@default=no@:>@
+  --with-sysroot=DIR Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).
+  --with-sslstack=lib     specify which ssl stack to build
+  --with-libc=path        specify path to alternate libc
+  --with-pkg-config       enable support for pkg-config
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  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    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  CXXCPP      C++ preprocessor
+  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
+  OPENSSL_CFLAGS 
+              C compiler flags for OPENSSL, overriding pkg-config
+  OPENSSL_LIBS 
+              linker flags for OPENSSL, overriding pkg-config
+  GNUTLS_CFLAGS 
+              C compiler flags for GNUTLS, overriding pkg-config
+  GNUTLS_LIBS linker flags for GNUTLS, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+ucommon configure 6.0.7
+generated by GNU Autoconf 2.69
+
+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
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+@%:@ ac_fn_c_try_compile LINENO
+@%:@ --------------------------
+@%:@ Try to compile conftest.@S|@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
+
+	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.@S|@ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  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
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} @%:@ ac_fn_c_try_cpp
+
+@%:@ ac_fn_cxx_try_compile LINENO
+@%:@ ----------------------------
+@%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded.
+ac_fn_cxx_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_cxx_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
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} @%:@ ac_fn_cxx_try_compile
+
+@%:@ ac_fn_cxx_try_cpp LINENO
+@%:@ ------------------------
+@%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_cpp ()
+{
+  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_cxx_preproc_warn_flag$ac_cxx_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
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} @%:@ ac_fn_cxx_try_cpp
+
+@%:@ ac_fn_c_try_link LINENO
+@%:@ -----------------------
+@%:@ Try to link conftest.@S|@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
+
+	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
+
+} @%:@ ac_fn_c_try_link
+
+@%:@ 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
+
+@%:@ ac_fn_c_try_run LINENO
+@%:@ ----------------------
+@%:@ Try to link conftest.@S|@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
+
+} @%:@ ac_fn_c_try_run
+
+@%:@ 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
+
+/* 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.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* 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
+
+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
+
+@%:@ ac_fn_cxx_try_link LINENO
+@%:@ -------------------------
+@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded.
+ac_fn_cxx_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_cxx_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
+
+	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
+
+} @%:@ ac_fn_cxx_try_link
+
+@%:@ 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; }
+
+# 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; }
+
+# 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;}
+    ;;
+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
+
+} @%:@ ac_fn_c_check_header_mongrel
+
+@%:@ ac_fn_cxx_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_cxx_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_cxx_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; }
+
+# 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_cxx_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; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_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;}
+    ;;
+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
+
+} @%:@ ac_fn_cxx_check_header_mongrel
+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 ucommon $as_me 6.0.7, 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;}
+
+# 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
+
+    $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
+
+    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
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+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
+
+# 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
+
+
+
+
+LT_VERSION="6:3:0"
+OPENSSL_REQUIRES="0.9.7"
+
+ac_aux_dir=
+for ac_dir in autoconf "$srcdir"/autoconf; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in autoconf \"$srcdir\"/autoconf" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${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_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${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_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if ${ac_cv_target+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$target_alias" = x; then
+  ac_cv_target=$ac_cv_host
+else
+  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+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
+  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
+
+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
+
+
+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:${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
+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
+
+  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
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $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
+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
+
+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
+
+
+  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
+  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:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $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
+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$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
+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
+
+
+    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 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="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_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
+
+  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
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# 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.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_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:${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:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $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=
+
+else
+  ac_file=''
+fi
+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
+
+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
+  { { $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; }
+
+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 ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+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:${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; }
+  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:${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
+    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; }
+
+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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $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
+
+{ { $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
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $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
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $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
+  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 ()
+{
+
+  ;
+  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.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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
+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;
+}
+
+/* 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"
+  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 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
+      # 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 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 :
+  
+else
+  # 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
+
+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
+
+    done
+    ac_cv_prog_CPP=$CPP
+  
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  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
+if ac_fn_c_try_cpp "$LINENO"; then :
+  
+else
+  # 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
+
+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 :
+  
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+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
+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
+  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
+
+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
+
+
+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:${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
+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
+
+  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
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $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
+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
+
+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
+
+
+  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
+  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:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $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
+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$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
+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
+
+
+    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 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="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_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
+
+  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
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $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
+  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 ()
+{
+
+  ;
+  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.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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
+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;
+}
+
+/* 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"
+  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=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if ${ac_cv_prog_cxx_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+else
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  
+else
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+ac_ext=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=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $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; }
+if test -z "$CXXCPP"; then
+  if ${ac_cv_prog_CXXCPP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <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_cxx_try_cpp "$LINENO"; then :
+  
+else
+  # 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_cxx_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
+
+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
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+  
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <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_cxx_try_cpp "$LINENO"; then :
+  
+else
+  # 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_cxx_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
+
+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 :
+  
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+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=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if ${ac_cv_prog_cxx_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+else
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  
+else
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+ac_ext=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
+
+enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; 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_AS+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AS"; then
+  ac_cv_prog_AS="$AS" # 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_AS="${ac_tool_prefix}as"
+    $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
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+  ac_ct_AS=$AS
+  # Extract the first word of "as", so it can be a program name with args.
+set dummy as; 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_AS+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AS"; then
+  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # 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_AS="as"
+    $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_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_AS" = x; then
+    AS="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
+    AS=$ac_ct_AS
+  fi
+else
+  AS="$ac_cv_prog_AS"
+fi
+
+  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
+
+  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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump"
+    $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
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_OBJDUMP="objdump"
+    $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_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OBJDUMP" = x; then
+    OBJDUMP="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
+    OBJDUMP=$ac_ct_OBJDUMP
+  fi
+else
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+  ;;
+esac
+
+test -z "$AS" && AS=as
+
+    
+    
+    
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+    
+    
+    
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+    
+    
+    
+
+
+
+case `pwd` in
+  *\ * | *\	*)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.4.2'
+macro_revision='1.3337'
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+$as_echo_n "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='printf %s\n'
+else
+  # Use this function as a fallback that always works.
+  func_fallback_echo ()
+  {
+    eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+  }
+  ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "" 
+}
+
+case "$ECHO" in
+  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+$as_echo "printf" >&6; } ;;
+  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+$as_echo "print -r" >&6; } ;;
+  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+$as_echo "cat" >&6; } ;;
+esac
+
+
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $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
+  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
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+{ $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
+
+      $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
+
+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"
+ 
+
+{ $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
+
+      $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
+
+   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"
+ 
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+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
+   then ac_cv_path_FGREP="$GREP -F"
+   else
+     if test -z "$FGREP"; then
+  ac_path_FGREP_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 fgrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+      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
+*GNU*)
+  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_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 '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
+    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"
+      ac_path_FGREP_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_FGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_FGREP"; then
+    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_FGREP=$FGREP
+fi
+
+   fi
+fi
+{ $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"
+ 
+
+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
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $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:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+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
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $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 ${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.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $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
+
+
+
+
+    
+    
+    
+
+
+{ $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 ${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"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  : ${lt_cv_path_NM=no}
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DUMPBIN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DUMPBIN"; then
+  ac_cv_prog_DUMPBIN="$DUMPBIN" # 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_DUMPBIN="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$DUMPBIN" && break
+  done
+fi
+if test -z "$DUMPBIN"; then
+  ac_ct_DUMPBIN=$DUMPBIN
+  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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DUMPBIN"; then
+  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # 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_DUMPBIN="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_DUMPBIN" && break
+done
+
+  if test "x$ac_ct_DUMPBIN" = x; then
+    DUMPBIN=":"
+  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
+    DUMPBIN=$ac_ct_DUMPBIN
+  fi
+fi
+
+    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
+  
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+
+
+    
+    
+    
+
+{ $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 ${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:$LINENO: $ac_compile\"" >&5)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&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:$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:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&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:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ $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 ${lt_cv_sys_max_cmd_len+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+    i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw* | cegcc*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  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*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  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
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      # 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
+        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"`env echo "$teststring$teststring" 2>/dev/null` \
+	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on
+      # massive amounts of additional arguments before passing them to the
+      # linker.  It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+  { $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:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+    
+    
+    
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,b/c, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+fi
+
+    
+    
+    
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
+
+    
+    
+    
+
+    
+    
+    
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
+if ${lt_cv_to_host_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
+    ;;
+  *-*-cygwin* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_noop
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+        ;;
+    esac
+    ;;
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
+    ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+
+    
+    
+    
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
+if ${lt_cv_to_tool_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+        ;;
+    esac
+    ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+
+    
+    
+    
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if ${lt_cv_ld_reload_flag+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+{ $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
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test "$GCC" != yes; then
+      reload_cmds=false
+    fi
+    ;;
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump"
+    $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
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_OBJDUMP="objdump"
+    $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_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OBJDUMP" = x; then
+    OBJDUMP="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
+    OBJDUMP=$ac_ct_OBJDUMP
+  fi
+else
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+{ $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 ${lt_cv_deplibs_check_method+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[45]*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    # 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*)
+  # 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'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+haiku*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-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_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix[3-9]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+  case $host_os in
+  mingw* | pw32*)
+    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+      want_nocaseglob=yes
+    else
+      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+    fi
+    ;;
+  esac
+fi
+
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${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 to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
+    
+    
+    
+
+
+
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in ar
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$AR" && break
+  done
+fi
+if test -z "$AR"; then
+  ac_ct_AR=$AR
+  for ac_prog in ar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_AR" && break
+done
+
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+fi
+
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
+if ${lt_cv_ar_at_file+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ar_at_file=no
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+      if test "$ac_status" -eq 0; then
+	# Ensure the archiver fails upon bogus file names.
+	rm -f conftest.$ac_objext libconftest.a
+	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+	if test "$ac_status" -ne 0; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
+     
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
+
+if test "x$lt_cv_ar_at_file" = xno; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
+
+    
+    
+    
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if 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
+IFS=$as_save_IFS
+
+fi
+fi
+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:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $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_STRIP+:} false; 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 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
+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:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $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
+
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $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
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $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_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $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_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  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
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+    
+    
+    
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+    ;;
+  esac
+  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
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} 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
+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_AWK="$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
+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:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+
+    
+    
+    
+
+    
+    
+    
+
+    
+    
+    
+
+    
+    
+    
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $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 ${lt_cv_sys_global_symbol_pipe+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDEGRST]'
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[BCDEGRST]'
+  ;;
+osf*)
+  symcode='[BCDEGQRST]'
+  ;;
+solaris*)
+  symcode='[BDRT]'
+  ;;
+sco3.2v5*)
+  symcode='[DT]'
+  ;;
+sysv4.2uw2*)
+  symcode='[DT]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[ABDT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
+
+# 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'"
+
+# 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'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  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.
+    # 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};"\
+"     \$ 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))}"\
+"     ' 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
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+  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
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
+  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
+  ac_status=$?
+  $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"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT@&t@_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT@&t@_DLSYM_CONST
+#else
+# define LT@&t@_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+	  cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols.  */
+LT@&t@_DLSYM_CONST struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_globsym_save_LIBS=$LIBS
+	  lt_globsym_save_CFLAGS=$CFLAGS
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS=$lt_globsym_save_LIBS
+	  CFLAGS=$lt_globsym_save_CFLAGS
+	else
+	  echo "cannot find nm_test_func in $nlist" >&5
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&5
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+    fi
+  else
+    echo "$progname: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+  { $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 "$GCC" = yes; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
+$as_echo "${with_sysroot}" >&6; }
+   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+   ;;
+esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
+
+    
+    
+    
+
+@%:@ Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+  enableval=$enable_libtool_lock; 
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+      *ELF-32*)
+	HPUX_IA64_MODE="32"
+	;;
+      *ELF-64*)
+	HPUX_IA64_MODE="64"
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    if test "$lt_cv_prog_gnu_ld" = yes; then
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -melf32bsmip"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -melf32bmipn32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -melf64bmip"
+	;;
+      esac
+    else
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -32"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -n32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -64"
+	  ;;
+      esac
+    fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.o` in
+      *32-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_i386_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_i386"
+	    ;;
+	  powerpc64le-*linux*)
+	    LD="${LD-ld} -m elf32lppclinux"
+	    ;;
+	  powerpc64-*linux*)
+	    LD="${LD-ld} -m elf32ppclinux"
+	    ;;
+	  s390x-*linux*)
+	    LD="${LD-ld} -m elf_s390"
+	    ;;
+	  sparc64-*linux*)
+	    LD="${LD-ld} -m elf32_sparc"
+	    ;;
+	esac
+	;;
+      *64-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_x86_64_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_x86_64"
+	    ;;
+	  powerpcle-*linux*)
+	    LD="${LD-ld} -m elf64lppc"
+	    ;;
+	  powerpc-*linux*)
+	    LD="${LD-ld} -m elf64ppc"
+	    ;;
+	  s390*-*linux*|s390*-*tpf*)
+	    LD="${LD-ld} -m elf64_s390"
+	    ;;
+	  sparc*-*linux*)
+	    LD="${LD-ld} -m elf64_sparc"
+	    ;;
+	esac
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  { $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 ${lt_cv_cc_needs_belf+:} 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
+
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_cc_needs_belf=yes
+else
+  lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*)
+        case $host in
+        i?86-*-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"
+	fi
+	;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${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 "x$lt_cv_path_mainfest_tool" != xyes; then
+  MANIFEST_TOOL=:
+fi
+
+    
+    
+    
+
+
+  case $host_os in
+    rhapsody* | darwin*)
+    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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DSYMUTIL"; then
+  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="${ac_tool_prefix}dsymutil"
+    $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
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DSYMUTIL"; then
+  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # 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_DSYMUTIL="dsymutil"
+    $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_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_DSYMUTIL" = x; then
+    DSYMUTIL=":"
+  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
+    DSYMUTIL=$ac_ct_DSYMUTIL
+  fi
+else
+  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_NMEDIT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$NMEDIT"; then
+  ac_cv_prog_NMEDIT="$NMEDIT" # 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_NMEDIT="${ac_tool_prefix}nmedit"
+    $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
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_NMEDIT"; then
+  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # 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_NMEDIT="nmedit"
+    $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_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_NMEDIT" = x; then
+    NMEDIT=":"
+  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
+    NMEDIT=$ac_ct_NMEDIT
+  fi
+else
+  NMEDIT="$ac_cv_prog_NMEDIT"
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LIPO+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LIPO"; then
+  ac_cv_prog_LIPO="$LIPO" # 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_LIPO="${ac_tool_prefix}lipo"
+    $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
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_LIPO"; then
+  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # 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_LIPO="lipo"
+    $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_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_LIPO" = x; then
+    LIPO=":"
+  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
+    LIPO=$ac_ct_LIPO
+  fi
+else
+  LIPO="$ac_cv_prog_LIPO"
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL"; then
+  ac_cv_prog_OTOOL="$OTOOL" # 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_OTOOL="${ac_tool_prefix}otool"
+    $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
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL"; then
+  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # 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_OTOOL="otool"
+    $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_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OTOOL" = x; then
+    OTOOL=":"
+  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
+    OTOOL=$ac_ct_OTOOL
+  fi
+else
+  OTOOL="$ac_cv_prog_OTOOL"
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL64"; then
+  ac_cv_prog_OTOOL64="$OTOOL64" # 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_OTOOL64="${ac_tool_prefix}otool64"
+    $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
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL64"; then
+  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # 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_OTOOL64="otool64"
+    $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_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OTOOL64" = x; then
+    OTOOL64=":"
+  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
+    OTOOL64=$ac_ct_OTOOL64
+  fi
+else
+  OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+    
+    
+    
+    
+
+    
+    
+    
+    
+
+    
+    
+    
+    
+
+    
+    
+    
+    
+
+    
+    
+    
+    
+
+
+    { $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 ${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
+	# 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
+	# link flags.
+	rm -rf libconftest.dylib*
+	echo "int foo(void){return 1;}" > conftest.c
+	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+	# 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 $_lt_result -eq 0; then
+	  lt_cv_apple_cc_single_mod=yes
+	else
+	  cat conftest.err >&5
+	fi
+	rm -rf libconftest.dylib*
+	rm -f conftest.*
+      fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
+  $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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_ld_exported_symbols_list=yes
+else
+  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"
+    
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+$as_echo_n "checking for -force_load linker flag... " >&6; }
+if ${lt_cv_ld_force_load+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_force_load=no
+      cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+      echo "$AR cru libconftest.a conftest.o" >&5
+      $AR cru libconftest.a conftest.o 2>&5
+      echo "$RANLIB libconftest.a" >&5
+      $RANLIB libconftest.a 2>&5
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+      _lt_result=$?
+      if test -s conftest.err && $GREP force_load conftest.err; then
+	cat conftest.err >&5
+      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
+	lt_cv_ld_force_load=yes
+      else
+	cat conftest.err >&5
+      fi
+        rm -f conftest.err libconftest.a conftest conftest.c
+        rm -rf conftest.dSYM
+    
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+$as_echo "$lt_cv_ld_force_load" >&6; }
+    case $host_os in
+    rhapsody* | darwin1.[012])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+      _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' ;;
+	10.*)
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; 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'
+    else
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+
+
+{ $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 ()
+{
+
+  ;
+  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>
+
+_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 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 :
+  
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat 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
+  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
+{ $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
+
+done
+
+
+for ac_header in dlfcn.h
+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 HAVE_DLFCN_H 1
+_ACEOF
+ 
+fi
+
+done
+
+
+
+
+func_stripname_cnf ()
+{
+  case ${2} in
+  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+  esac
+} # func_stripname_cnf
+
+
+
+
+
+# Set options
+
+
+
+        enable_dlopen=no
+  
+
+  
+            @%:@ Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+  enableval=$enable_shared; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_shared=yes
+fi
+
+
+    
+    
+    
+    
+
+
+
+  @%:@ Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+  enableval=$enable_static; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_static=yes
+fi
+
+
+    
+    
+    
+    
+
+
+
+  
+@%:@ Check whether --with-pic was given.
+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
+
+
+    
+    
+    
+
+
+  @%:@ Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+  enableval=$enable_fast_install; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_fast_install=yes
+fi
+
+
+
+    
+    
+    
+
+
+  
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+    
+    
+    
+
+    
+    
+    
+
+    
+    
+    
+
+    
+    
+    
+
+    
+    
+    
+
+    
+    
+    
+
+    
+    
+    
+test -z "$LN_S" && LN_S="ln -s"
+
+    
+    
+    
+
+    
+    
+    
+
+    
+    
+    
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if ${lt_cv_objdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+    
+    
+    
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LT_OBJDIR "$lt_cv_objdir/"
+_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
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# 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"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+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 "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+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:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+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_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+    
+    
+    
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+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_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  else
+    MAGIC_CMD=:
+  fi
+fi
+
+  fi
+  ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+if test -n "$compiler"; then
+  
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+  case $cc_basename in
+  nvcc*)
+    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+  *)
+    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+  esac
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+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"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&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 "$_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
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+    
+    
+    
+
+
+  lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic='-fPIC'
+        ;;
+      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'.
+            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    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).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
+
+    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
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='-fPIC'
+	;;
+      esac
+      ;;
+
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
+
+    *)
+      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
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      else
+	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    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'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-KPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='--shared'
+	lt_prog_compiler_static='--static'
+	;;
+      nagfor*)
+	# NAG Fortran compiler
+	lt_prog_compiler_wl='-Wl,-Wl,,'
+	lt_prog_compiler_pic='-PIC'
+	lt_prog_compiler_static='-Bstatic'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fpic'
+	lt_prog_compiler_static='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      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,'
+	  ;;
+        *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'
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+	lt_prog_compiler_wl='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic='-Kconform_pic'
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
+  fi
+
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic@&t@ -DPIC"
+    ;;
+esac
+
+{ $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:${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 ${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@&t@ -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&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 "$_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
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+     esac
+else
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+    
+    
+    
+
+
+
+    
+    
+    
+
+#
+# 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:${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 ${lt_cv_prog_compiler_static_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "$_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
+       fi
+     else
+       lt_cv_prog_compiler_static_works=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
+
+
+    
+    
+    
+
+
+  { $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 ${lt_cv_prog_compiler_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&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 "$_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
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+    
+    
+    
+
+
+  { $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 ${lt_cv_prog_compiler_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&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 "$_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
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $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
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+    
+    
+    
+
+
+  { $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=
+  allow_undefined_flag=
+  always_export_symbols=no
+  archive_cmds=
+  archive_expsym_cmds=
+  compiler_needs_object=no
+  enable_shared_with_static_runtimes=no
+  export_dynamic_flag_spec=
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  hardcode_automatic=no
+  hardcode_direct=no
+  hardcode_direct_absolute=no
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_separator=
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  inherit_rpath=no
+  link_all_deplibs=unknown
+  module_cmds=
+  module_expsym_cmds=
+  old_archive_from_new_cmds=
+  old_archive_from_expsyms_cmds=
+  thread_safe_flag_spec=
+  whole_archive_flag_spec=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_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
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs=yes
+
+  # 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 "$with_gnu_ld" = yes; 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 "$lt_use_gnu_ld_interface" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&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 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[3-9]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** 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 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
+      ;;
+
+    amigaos*)
+      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_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	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'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _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/;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'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    haiku*)
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      link_all_deplibs=yes
+      ;;
+
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; 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
+      then
+	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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	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' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  whole_archive_flag_spec=
+	  tmp_sharedflag='--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; 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'
+
+        if test "x$supports_anon_versioning" = xyes; then
+          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	    echo "local: *; };" >> $output_objdir/$libname.ver~
+	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+        fi
+
+	case $cc_basename in
+	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='${wl}-rpath ${wl}$libdir'
+	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; 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 $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        ld_shlibs=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds='$CC -shared $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
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	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
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  # For security reasons, it is highly recommended that you always
+	  # use absolute paths for naming shared libraries, and exclude the
+	  # DT_RUNPATH tag from executables and libraries.  But doing so
+	  # requires that you compile everything twice, which is a pain.
+	  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'
+	  else
+	    ld_shlibs=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $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
+      runpath_var=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct=unsupported
+      fi
+      ;;
+
+    aix[4-9]*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	# Also, AIX nm treats weak defined symbols like other global
+	# defined symbols, whereas GNU nm marks them as "W".
+	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") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	  for ld_flag in $LDFLAGS; do
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	    aix_use_runtimelinking=yes
+	    break
+	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_direct_absolute=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      file_list_spec='${wl}-f,'
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	  # We have reworked collect2
+	  :
+	  else
+	  # We have old collect2
+	  hardcode_direct=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  hardcode_minus_L=yes
+	  hardcode_libdir_flag_spec='-L$libdir'
+	  hardcode_libdir_separator=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      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
+	# 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.
+        if test "${lt_cv_aix_libpath+set}" = 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
+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
+
+  aix_libpath=$lt_cv_aix_libpath_
+fi
+
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag="-z nodefs"
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an
+	 # empty executable.
+	 if test "${lt_cv_aix_libpath+set}" = 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
+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
+
+  aix_libpath=$lt_cv_aix_libpath_
+fi
+
+	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag=' ${wl}-bernotok'
+	  allow_undefined_flag=' ${wl}-berok'
+	  if test "$with_gnu_ld" = yes; 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'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      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_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      case $cc_basename in
+      cl*)
+	# Native MSVC
+	hardcode_libdir_flag_spec=' '
+	allow_undefined_flag=unsupported
+	always_export_symbols=yes
+	file_list_spec='@'
+	# Tell ltmain to make .lib files, not .a files.
+	libext=lib
+	# Tell ltmain to make .dll files, not .so files.
+	shrext_cmds=".dll"
+	# FIXME: Setting linknames here is a bad hack.
+	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	  else
+	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	  fi~
+	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	  linknames='
+	# The linker will not automatically build a static lib if we build a DLL.
+	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+	enable_shared_with_static_runtimes=yes
+	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*)
+      
+  
+  archive_cmds_need_lc=no
+  hardcode_direct=no
+  hardcode_automatic=yes
+  hardcode_shlibpath_var=unsupported
+  if test "$lt_cv_ld_force_load" = "yes"; 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"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; 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
+  fi
+
+      ;;
+
+    dgux*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2.*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds='$CC -shared $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 $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; 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_separator=:
+	hardcode_direct=yes
+	hardcode_direct_absolute=yes
+	export_dynamic_flag_spec='${wl}-E'
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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 x"$lt_cv_prog_compiler__b" = xyes; 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'
+	hardcode_libdir_separator=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+	  ;;
+	*)
+	  hardcode_direct=yes
+	  hardcode_direct_absolute=yes
+	  export_dynamic_flag_spec='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared $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.
+	# 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
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_irix_exported_symbol=yes
+else
+  lt_cv_irix_exported_symbol=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+           LDFLAGS="$save_LDFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+	if test "$lt_cv_irix_exported_symbol" = yes; then
+          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+	fi
+      else
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      inherit_rpath=yes
+      link_all_deplibs=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    openbsd*)
+      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
+	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+	fi
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && 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" && 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_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} $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" && 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 "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_separator=:
+      ;;
+
+    solaris*)
+      no_undefined_flag=' -z defs'
+      if test "$GCC" = yes; 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 $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_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'
+	  ;;
+	*)
+	  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'
+	  ;;
+	esac
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      link_all_deplibs=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds='$CC -r -o $output$reload_objs'
+	  hardcode_direct=no
+        ;;
+	motorola)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag='${wl}-z,text'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-R,$libdir'
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      ld_shlibs=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	export_dynamic_flag_spec='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
+  fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+    
+    
+    
+
+    
+    
+    
+
+    
+    
+    
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $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; }
+if ${lt_cv_archive_cmds_need_lc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  $RM conftest*
+	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } 2>conftest.err; then
+	  soname=conftest
+	  lib=conftest
+	  libobjs=conftest.$ac_objext
+	  deplibs=
+	  wl=$lt_prog_compiler_wl
+	  pic_flag=$lt_prog_compiler_pic
+	  compiler_flags=-v
+	  linker_flags=-v
+	  verstring=
+	  output_objdir=.
+	  libname=conftest
+	  lt_save_allow_undefined_flag=$allow_undefined_flag
+	  allow_undefined_flag=
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+	  then
+	    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
+  ;;
+esac
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  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 '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.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[lt_foo]++; }
+  if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+  # 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"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux # 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'
+  ;;
+
+aix[4-9]*)
+  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
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<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
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  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}'
+    ;;
+  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=`func_echo_all "$lib" | $SED '\''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'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  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'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  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'\''`~
+      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'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+
+      sys_lib_search_path_spec="$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}'
+      ;;
+    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.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
+    ;;
+
+  *)
+    # Assume MSVC wrapper
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
+    ;;
+  esac
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux # 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
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[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}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2.*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux # 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
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+haiku*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  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=yes
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+  postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
+  ;;
+
+interix[3-9]*)
+  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'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux # 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}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-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
+  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
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+    
+fi
+
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux # 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
+  ;;
+
+*nto* | *qnx*)
+  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'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux # 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
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux # 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=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 # 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 "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = 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"
+fi
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+  { $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 "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:${as_lineno-$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
+
+    
+    
+    
+
+
+  if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32* | 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
+    
+fi
+
+    ;;
+
+  *)
+    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.  */
+
+/* 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.  */
+
+/* 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.  */
+
+/* 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
+{ $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 "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:${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 "$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 $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 -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+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 "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self_static+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  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 -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+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 which 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 "$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:${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 "$enable_shared" = yes || 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"
+
+      if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $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; }
+if test -z "$CXXCPP"; then
+  if ${ac_cv_prog_CXXCPP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <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_cxx_try_cpp "$LINENO"; then :
+  
+else
+  # 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_cxx_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
+
+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
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+  
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <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_cxx_try_cpp "$LINENO"; then :
+  
+else
+  # 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_cxx_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
+
+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 :
+  
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+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
+
+else
+  _lt_caught_CXX_error=yes
+fi
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+compiler_needs_object_CXX=no
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_direct_absolute_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+inherit_rpath_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+reload_flag_CXX=$reload_flag
+reload_cmds_CXX=$reload_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# No sense in running all these tests if we already determined that
+# 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
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="int some_variable = 0;"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+  # save warnings/boilerplate of simple test code
+  ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+  ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC=$CC
+  lt_save_CFLAGS=$CFLAGS
+  lt_save_LD=$LD
+  lt_save_GCC=$GCC
+  GCC=$GXX
+  lt_save_with_gnu_ld=$with_gnu_ld
+  lt_save_path_LD=$lt_cv_path_LD
+  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+  else
+    $as_unset lt_cv_prog_gnu_ld
+  fi
+  if test -n "${lt_cv_path_LDCXX+set}"; then
+    lt_cv_path_LD=$lt_cv_path_LDCXX
+  else
+    $as_unset lt_cv_path_LD
+  fi
+  test -z "${LDCXX+set}" || LD=$LDCXX
+  CC=${CXX-"c++"}
+  CFLAGS=$CXXFLAGS
+  compiler=$CC
+  compiler_CXX=$CC
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+
+
+  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
+      lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+    else
+      lt_prog_compiler_no_builtin_flag_CXX=
+    fi
+
+    if test "$GXX" = yes; then
+      # Set up default GNU C++ configuration
+
+      
+
+@%:@ Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $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
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $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:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+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
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $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 ${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.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $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
+
+
+
+
+
+
+
+      # Check if GNU C++ uses GNU ld as the underlying linker, since the
+      # archiving commands below assume that GNU ld is being used.
+      if test "$with_gnu_ld" = yes; then
+        archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+        export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+        # If archive_cmds runs LD, not CC, wlarc should be empty
+        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+        #     investigate it a little bit more. (MM)
+        wlarc='${wl}'
+
+        # ancient GNU ld didn't support --whole-archive et. al.
+        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+	  $GREP 'no-whole-archive' > /dev/null; then
+          whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+        else
+          whole_archive_flag_spec_CXX=
+        fi
+      else
+        with_gnu_ld=no
+        wlarc=
+
+        # A generic and very simple default shared library creation
+        # command for GNU C++ for the case where it uses the native
+        # linker, instead of GNU ld.  If possible, this setting should
+        # overridden to take advantage of the native linker features on
+        # the platform it is being used on.
+        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      fi
+
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+    else
+      GXX=no
+      with_gnu_ld=no
+      wlarc=
+    fi
+
+    # PORTME: fill in a description of your system's C++ link characteristics
+    { $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; }
+    ld_shlibs_CXX=yes
+    case $host_os in
+      aix3*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+      aix[4-9]*)
+        if test "$host_cpu" = ia64; then
+          # On IA64, the linker does run time linking by default, so we don't
+          # have to do anything special.
+          aix_use_runtimelinking=no
+          exp_sym_flag='-Bexport'
+          no_entry_flag=""
+        else
+          aix_use_runtimelinking=no
+
+          # Test if we are trying to use run time linking or normal
+          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+          # need to do runtime linking.
+          case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	    for ld_flag in $LDFLAGS; do
+	      case $ld_flag in
+	      *-brtl*)
+	        aix_use_runtimelinking=yes
+	        break
+	        ;;
+	      esac
+	    done
+	    ;;
+          esac
+
+          exp_sym_flag='-bexport'
+          no_entry_flag='-bnoentry'
+        fi
+
+        # When large executables or shared objects are built, AIX ld can
+        # have problems creating the table of contents.  If linking a library
+        # or program results in "error TOC overflow" add -mminimal-toc to
+        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+        archive_cmds_CXX=''
+        hardcode_direct_CXX=yes
+        hardcode_direct_absolute_CXX=yes
+        hardcode_libdir_separator_CXX=':'
+        link_all_deplibs_CXX=yes
+        file_list_spec_CXX='${wl}-f,'
+
+        if test "$GXX" = yes; then
+          case $host_os in aix4.[012]|aix4.[012].*)
+          # We only want to do this on AIX 4.2 and lower, the check
+          # below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	    # We have reworked collect2
+	    :
+	  else
+	    # We have old collect2
+	    hardcode_direct_CXX=unsupported
+	    # It fails to find uninstalled libraries when the uninstalled
+	    # path is not listed in the libpath.  Setting hardcode_minus_L
+	    # to unsupported forces relinking
+	    hardcode_minus_L_CXX=yes
+	    hardcode_libdir_flag_spec_CXX='-L$libdir'
+	    hardcode_libdir_separator_CXX=
+	  fi
+          esac
+          shared_flag='-shared'
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag="$shared_flag "'${wl}-G'
+	  fi
+        else
+          # not using gcc
+          if test "$host_cpu" = ia64; then
+	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	  # chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+          else
+	    if test "$aix_use_runtimelinking" = yes; then
+	      shared_flag='${wl}-G'
+	    else
+	      shared_flag='${wl}-bM:SRE'
+	    fi
+          fi
+        fi
+
+        export_dynamic_flag_spec_CXX='${wl}-bexpall'
+        # It seems that -bexpall does not export symbols beginning with
+        # underscore (_), so it is better to generate a list of symbols to
+	# export.
+        always_export_symbols_CXX=yes
+        if test "$aix_use_runtimelinking" = yes; then
+          # Warning - without using the other runtime loading flags (-brtl),
+          # -berok will link without error, but may produce a broken library.
+          allow_undefined_flag_CXX='-berok'
+          # Determine the default libpath from the value encoded in an empty
+          # executable.
+          if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath__CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  if test -z "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+  fi
+  
+fi
+
+  aix_libpath=$lt_cv_aix_libpath__CXX
+fi
+
+          hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+          archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        else
+          if test "$host_cpu" = ia64; then
+	    hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+	    allow_undefined_flag_CXX="-z nodefs"
+	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+          else
+	    # Determine the default libpath from the value encoded in an
+	    # empty executable.
+	    if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath__CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  if test -z "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+  fi
+  
+fi
+
+  aix_libpath=$lt_cv_aix_libpath__CXX
+fi
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+	    # Warning - without using the other run time loading flags,
+	    # -berok will link without error, but may produce a broken library.
+	    no_undefined_flag_CXX=' ${wl}-bernotok'
+	    allow_undefined_flag_CXX=' ${wl}-berok'
+	    if test "$with_gnu_ld" = yes; then
+	      # We only use this code for GNU lds that support --whole-archive.
+	      whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    else
+	      # Exported symbols can be pulled into shared objects from archives
+	      whole_archive_flag_spec_CXX='$convenience'
+	    fi
+	    archive_cmds_need_lc_CXX=yes
+	    # This is similar to how AIX traditionally builds its shared
+	    # libraries.
+	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+          fi
+        fi
+        ;;
+
+      beos*)
+	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	  allow_undefined_flag_CXX=unsupported
+	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+	  # support --undefined.  This deserves some investigation.  FIXME
+	  archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	else
+	  ld_shlibs_CXX=no
+	fi
+	;;
+
+      chorus*)
+        case $cc_basename in
+          *)
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	  ;;
+        esac
+        ;;
+
+      cygwin* | mingw* | pw32* | cegcc*)
+	case $GXX,$cc_basename in
+	,cl* | no,cl*)
+	  # Native MSVC
+	  # hardcode_libdir_flag_spec is actually meaningless, as there is
+	  # no search path for DLLs.
+	  hardcode_libdir_flag_spec_CXX=' '
+	  allow_undefined_flag_CXX=unsupported
+	  always_export_symbols_CXX=yes
+	  file_list_spec_CXX='@'
+	  # Tell ltmain to make .lib files, not .a files.
+	  libext=lib
+	  # Tell ltmain to make .dll files, not .so files.
+	  shrext_cmds=".dll"
+	  # FIXME: Setting linknames here is a bad hack.
+	  archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	  archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	    else
+	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	    fi~
+	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	    linknames='
+	  # The linker will not automatically build a static lib if we build a DLL.
+	  # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
+	  enable_shared_with_static_runtimes_CXX=yes
+	  # Don't use ranlib
+	  old_postinstall_cmds_CXX='chmod 644 $oldlib'
+	  postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
+	    lt_tool_outputfile="@TOOL_OUTPUT@"~
+	    case $lt_outputfile in
+	      *.exe|*.EXE) ;;
+	      *)
+		lt_outputfile="$lt_outputfile.exe"
+		lt_tool_outputfile="$lt_tool_outputfile.exe"
+		;;
+	    esac~
+	    func_to_tool_file "$lt_outputfile"~
+	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	      $RM "$lt_outputfile.manifest";
+	    fi'
+	  ;;
+	*)
+	  # g++
+	  # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+	  # as there is no search path for DLLs.
+	  hardcode_libdir_flag_spec_CXX='-L$libdir'
+	  export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
+	  allow_undefined_flag_CXX=unsupported
+	  always_export_symbols_CXX=no
+	  enable_shared_with_static_runtimes_CXX=yes
+
+	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	    # If the export-symbols file already is a .def file (1st line
+	    # is EXPORTS), use it as is; otherwise, prepend...
+	    archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	      cp $export_symbols $output_objdir/$soname.def;
+	    else
+	      echo EXPORTS > $output_objdir/$soname.def;
+	      cat $export_symbols >> $output_objdir/$soname.def;
+	    fi~
+	    $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	  else
+	    ld_shlibs_CXX=no
+	  fi
+	  ;;
+	esac
+	;;
+      darwin* | rhapsody*)
+        
+  
+  archive_cmds_need_lc_CXX=no
+  hardcode_direct_CXX=no
+  hardcode_automatic_CXX=yes
+  hardcode_shlibpath_var_CXX=unsupported
+  if test "$lt_cv_ld_force_load" = "yes"; then
+    whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+    
+  else
+    whole_archive_flag_spec_CXX=''
+  fi
+  link_all_deplibs_CXX=yes
+  allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=func_echo_all
+    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+       if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+    fi
+
+  else
+  ld_shlibs_CXX=no
+  fi
+
+	;;
+
+      dgux*)
+        case $cc_basename in
+          ec++*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          ghcx*)
+	    # Green Hills C++ Compiler
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
+
+      freebsd2.*)
+        # C++ shared libraries reported to be fairly broken before
+	# switch to ELF
+        ld_shlibs_CXX=no
+        ;;
+
+      freebsd-elf*)
+        archive_cmds_need_lc_CXX=no
+        ;;
+
+      freebsd* | dragonfly*)
+        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+        # conventions
+        ld_shlibs_CXX=yes
+        ;;
+
+      gnu*)
+        ;;
+
+      haiku*)
+        archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        link_all_deplibs_CXX=yes
+        ;;
+
+      hpux9*)
+        hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator_CXX=:
+        export_dynamic_flag_spec_CXX='${wl}-E'
+        hardcode_direct_CXX=yes
+        hardcode_minus_L_CXX=yes # Not in the search PATH,
+				             # but as the default
+				             # location of the library.
+
+        case $cc_basename in
+          CC*)
+            # FIXME: insert proper C++ library support
+            ld_shlibs_CXX=no
+            ;;
+          aCC*)
+            archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            # Commands to make compiler produce verbose output that lists
+            # what "hidden" libraries, object files and flags are used when
+            # linking a shared library.
+            #
+            # There doesn't appear to be a way to prevent this compiler from
+            # explicitly linking system object files so we need to strip them
+            # from the output so that they don't get included in the library
+            # dependencies.
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+            ;;
+          *)
+            if test "$GXX" = yes; then
+              archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            else
+              # FIXME: insert proper C++ library support
+              ld_shlibs_CXX=no
+            fi
+            ;;
+        esac
+        ;;
+
+      hpux10*|hpux11*)
+        if test $with_gnu_ld = no; then
+	  hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
+
+          case $host_cpu in
+            hppa*64*|ia64*)
+              ;;
+            *)
+	      export_dynamic_flag_spec_CXX='${wl}-E'
+              ;;
+          esac
+        fi
+        case $host_cpu in
+          hppa*64*|ia64*)
+            hardcode_direct_CXX=no
+            hardcode_shlibpath_var_CXX=no
+            ;;
+          *)
+            hardcode_direct_CXX=yes
+            hardcode_direct_absolute_CXX=yes
+            hardcode_minus_L_CXX=yes # Not in the search PATH,
+					         # but as the default
+					         # location of the library.
+            ;;
+        esac
+
+        case $cc_basename in
+          CC*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          aCC*)
+	    case $host_cpu in
+	      hppa*64*)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      ia64*)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      *)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	    esac
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test $with_gnu_ld = no; then
+	        case $host_cpu in
+	          hppa*64*)
+	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          ia64*)
+	            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          *)
+	            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	        esac
+	      fi
+	    else
+	      # FIXME: insert proper C++ library support
+	      ld_shlibs_CXX=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      interix[3-9]*)
+	hardcode_direct_CXX=no
+	hardcode_shlibpath_var_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec_CXX='${wl}-E'
+	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+	# Instead, shared libraries are loaded at an image base (0x10000000 by
+	# default) and relocated if they conflict, which is a slow very memory
+	# consuming and fragmenting process.  To avoid this, we pick a random,
+	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+	archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	;;
+      irix5* | irix6*)
+        case $cc_basename in
+          CC*)
+	    # SGI C++
+	    archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && 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
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test "$with_gnu_ld" = no; then
+	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	      else
+	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+	      fi
+	    fi
+	    link_all_deplibs_CXX=yes
+	    ;;
+        esac
+        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+        hardcode_libdir_separator_CXX=:
+        inherit_rpath_CXX=yes
+        ;;
+
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	    old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+	    ;;
+	  icpc* | ecpc* )
+	    # Intel C++
+	    with_gnu_ld=yes
+	    # version 8.0 and above of icpc choke on multiply defined symbols
+	    # if we add $predep_objects and $postdep_objects, however 7.1 and
+	    # earlier do not add the objects themselves.
+	    case `$CC -V 2>&1` in
+	      *"Version 7."*)
+	        archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	      *)  # Version 8.0 or newer
+	        tmp_idyn=
+	        case $host_cpu in
+		  ia64*) tmp_idyn=' -i_dynamic';;
+		esac
+	        archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	    esac
+	    archive_cmds_need_lc_CXX=no
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    ;;
+          pgCC* | pgcpp*)
+            # Portland Group C++ compiler
+	    case `$CC -V` in
+	    *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
+	      prelink_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+	      old_archive_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+		$RANLIB $oldlib'
+	      archive_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      archive_expsym_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    *) # Version 6 and above use weak symbols
+	      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    esac
+
+	    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+            ;;
+	  cxx*)
+	    # Compaq C++
+	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	    runpath_var=LD_RUN_PATH
+	    hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	    hardcode_libdir_separator_CXX=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`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* | mpixl* | bgxl*)
+	    # IBM XL 8.0 on PPC, with GNU ld
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    if test "x$supports_anon_versioning" = xyes; then
+	      archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
+		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+		echo "local: *; };" >> $output_objdir/$libname.ver~
+		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	    fi
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      no_undefined_flag_CXX=' -zdefs'
+	      archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	      hardcode_libdir_flag_spec_CXX='-R$libdir'
+	      whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	      compiler_needs_object_CXX=yes
+
+	      # Not sure whether something based on
+	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+	      # would be better.
+	      output_verbose_link_cmd='func_echo_all'
+
+	      # Archives containing C++ object files must be created using
+	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	      # necessary to make sure instantiated templates are included
+	      # in the archive.
+	      old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+
+      lynxos*)
+        # FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+
+      m88k*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+	;;
+
+      mvs*)
+        case $cc_basename in
+          cxx*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+	  *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+	esac
+	;;
+
+      netbsd*)
+        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	  archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+	  wlarc=
+	  hardcode_libdir_flag_spec_CXX='-R$libdir'
+	  hardcode_direct_CXX=yes
+	  hardcode_shlibpath_var_CXX=no
+	fi
+	# Workaround some broken pre-1.5 toolchains
+	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+	;;
+
+      *nto* | *qnx*)
+        ld_shlibs_CXX=yes
+	;;
+
+      openbsd2*)
+        # C++ shared libraries are fairly broken
+	ld_shlibs_CXX=no
+	;;
+
+      openbsd*)
+	if test -f /usr/libexec/ld.so; then
+	  hardcode_direct_CXX=yes
+	  hardcode_shlibpath_var_CXX=no
+	  hardcode_direct_absolute_CXX=yes
+	  archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	    archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+	    export_dynamic_flag_spec_CXX='${wl}-E'
+	    whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+	  fi
+	  output_verbose_link_cmd=func_echo_all
+	else
+	  ld_shlibs_CXX=no
+	fi
+	;;
+
+      osf3* | osf4* | osf5*)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    hardcode_libdir_separator_CXX=:
+
+	    # Archives containing C++ object files must be created using
+	    # the KAI C++ compiler.
+	    case $host in
+	      osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
+	      *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
+	    esac
+	    ;;
+          RCC*)
+	    # Rational C++ 2.4.1
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          cxx*)
+	    case $host in
+	      osf3*)
+	        allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+		;;
+	      *)
+	        allow_undefined_flag_CXX=' -expect_unresolved \*'
+	        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	        archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	          echo "-hidden">> $lib.exp~
+	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
+	          $RM $lib.exp'
+	        hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+		;;
+	    esac
+
+	    hardcode_libdir_separator_CXX=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    ;;
+	  *)
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	      case $host in
+	        osf3*)
+	          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	        *)
+	          archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	      esac
+
+	      hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	      hardcode_libdir_separator_CXX=:
+
+	      # Commands to make compiler produce verbose output that lists
+	      # what "hidden" libraries, object files and flags are used when
+	      # linking a shared library.
+	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+	    else
+	      # FIXME: insert proper C++ library support
+	      ld_shlibs_CXX=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      psos*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+
+      sunos4*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.x
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          lcc*)
+	    # Lucid
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
+
+      solaris*)
+        case $cc_basename in
+          CC* | sunCC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+            archive_cmds_need_lc_CXX=yes
+	    no_undefined_flag_CXX=' -zdefs'
+	    archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	    hardcode_libdir_flag_spec_CXX='-R$libdir'
+	    hardcode_shlibpath_var_CXX=no
+	    case $host_os in
+	      solaris2.[0-5] | solaris2.[0-5].*) ;;
+	      *)
+		# The compiler driver will combine and reorder linker options,
+		# but understands `-z linker_flag'.
+	        # Supported since Solaris 2.6 (maybe 2.5.1?)
+		whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+	        ;;
+	    esac
+	    link_all_deplibs_CXX=yes
+
+	    output_verbose_link_cmd='func_echo_all'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	    ;;
+          gcx*)
+	    # Green Hills C++ Compiler
+	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	    # The C++ compiler must be used to create the archive.
+	    old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    # GNU C++ compiler with Solaris linker
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        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
+	        # platform.
+	        archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+	      fi
+
+	      hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+	      case $host_os in
+		solaris2.[0-5] | solaris2.[0-5].*) ;;
+		*)
+		  whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+		  ;;
+	      esac
+	    fi
+	    ;;
+        esac
+        ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag_CXX='${wl}-z,text'
+      archive_cmds_need_lc_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      runpath_var='LD_RUN_PATH'
+
+      case $cc_basename in
+        CC*)
+	  archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+      esac
+      ;;
+
+      sysv5* | sco3.2v5* | sco5v6*)
+	# Note: We can NOT use -z defs as we might desire, because we do not
+	# link with -lc, and that would cause any symbols used from libc to
+	# always be unresolved, which means just about no library would
+	# ever link correctly.  If we're not using GNU ld we use -z text
+	# though, which does catch some bad symbols but isn't as heavy-handed
+	# as -z defs.
+	no_undefined_flag_CXX='${wl}-z,text'
+	allow_undefined_flag_CXX='${wl}-z,nodefs'
+	archive_cmds_need_lc_CXX=no
+	hardcode_shlibpath_var_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+	hardcode_libdir_separator_CXX=':'
+	link_all_deplibs_CXX=yes
+	export_dynamic_flag_spec_CXX='${wl}-Bexport'
+	runpath_var='LD_RUN_PATH'
+
+	case $cc_basename in
+          CC*)
+	    archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
+	      '"$old_archive_cmds_CXX"
+	    reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
+	      '"$reload_cmds_CXX"
+	    ;;
+	  *)
+	    archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	esac
+      ;;
+
+      tandem*)
+        case $cc_basename in
+          NCC*)
+	    # NonStop-UX NCC 3.20
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
+
+      vxworks*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+
+      *)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+    esac
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+    test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+    GCC_CXX="$GXX"
+    LD_CXX="$LD"
+
+    ## 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...
+    # Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+_LT_EOF
+
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+esac
+
+if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  for p in `eval "$output_verbose_link_cmd"`; do
+    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
+	 prev=$p
+	 continue
+       fi
+
+       # Expand the sysroot to ease extracting the directories later.
+       if test -z "$prev"; then
+         case $p in
+         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+         esac
+       fi
+       case $p in
+       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+       esac
+       if test "$pre_test_object_deps_done" = no; then
+	 case ${prev} in
+	 -L | -R)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$compiler_lib_search_path_CXX"; then
+	     compiler_lib_search_path_CXX="${prev}${p}"
+	   else
+	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$postdeps_CXX"; then
+	   postdeps_CXX="${prev}${p}"
+	 else
+	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+	 fi
+       fi
+       prev=
+       ;;
+
+    *.lto.$objext) ;; # Ignore GCC LTO objects
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$predep_objects_CXX"; then
+	   predep_objects_CXX="$p"
+	 else
+	   predep_objects_CXX="$predep_objects_CXX $p"
+	 fi
+       else
+	 if test -z "$postdep_objects_CXX"; then
+	   postdep_objects_CXX="$p"
+	 else
+	   postdep_objects_CXX="$postdep_objects_CXX $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix[3-9]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  predep_objects_CXX=
+  postdep_objects_CXX=
+  postdeps_CXX=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC* | sunCC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+ compiler_lib_search_dirs_CXX=
+if test -n "${compiler_lib_search_path_CXX}"; then
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    
+    
+    
+
+
+    lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    lt_prog_compiler_wl_CXX='-Wl,'
+    lt_prog_compiler_static_CXX='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_CXX='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic_CXX='-fPIC'
+        ;;
+      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'.
+            lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    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).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_CXX='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      lt_prog_compiler_pic_CXX=
+      ;;
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      lt_prog_compiler_static_CXX=
+      ;;
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_CXX=-Kconform_pic
+      fi
+      ;;
+    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
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	;;
+      *)
+	lt_prog_compiler_pic_CXX='-fPIC'
+	;;
+      esac
+      ;;
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic_CXX='-fPIC -shared'
+      ;;
+    *)
+      lt_prog_compiler_pic_CXX='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix[4-9]*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  lt_prog_compiler_static_CXX='-Bstatic'
+	else
+	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+      mingw* | cygwin* | os2* | pw32* | cegcc*)
+	# This hack is so that the source file can tell whether it is being
+	# built for inclusion in a dll (and should export symbols for example).
+	lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+	;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      lt_prog_compiler_pic_CXX='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      lt_prog_compiler_pic_CXX='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    ;;
+	  ecpc* )
+	    # old Intel C++ for x86_64 which still supported -KPIC.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  icpc* )
+	    # Intel C++, used to be incompatible with GCC.
+	    # ICC 10 doesn't accept -KPIC any more.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  pgCC* | pgcpp*)
+	    # Portland Group C++ compiler
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fpic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
+	    # IBM XL 8.0, 9.0 on PPC and BlueGene
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-qpic'
+	    lt_prog_compiler_static_CXX='-qstaticlink'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      lt_prog_compiler_pic_CXX='-KPIC'
+	      lt_prog_compiler_static_CXX='-Bstatic'
+	      lt_prog_compiler_wl_CXX='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    lt_prog_compiler_pic_CXX='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        lt_prog_compiler_pic_CXX='-fPIC -shared'
+        ;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC* | sunCC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    lt_prog_compiler_wl_CXX='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    lt_prog_compiler_pic_CXX='-pic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	lt_prog_compiler_can_build_shared_CXX=no
+	;;
+    esac
+  fi
+
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_CXX=
+    ;;
+  *)
+    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX@&t@ -DPIC"
+    ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
+lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
+if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_works_CXX=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_CXX@&t@ -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&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 "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works_CXX=yes
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+    case $lt_prog_compiler_pic_CXX in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+     esac
+else
+    lt_prog_compiler_pic_CXX=
+     lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ $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 ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works_CXX=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works_CXX=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works_CXX=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+    :
+else
+    lt_prog_compiler_static_CXX=
+fi
+
+
+
+
+    { $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 ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&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 "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+    { $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 ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&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 "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+
+
+    { $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; }
+
+  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+  case $host_os in
+  aix[4-9]*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    # Also, AIX nm treats weak defined symbols like other global defined
+    # symbols, whereas GNU nm marks them as "W".
+    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    else
+      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    export_symbols_cmds_CXX="$ltdll_cmds"
+    ;;
+  cygwin* | mingw* | cegcc*)
+    case $cc_basename in
+    cl*)
+      exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+      ;;
+    *)
+      export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+      exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+      ;;
+    esac
+    ;;
+  *)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+    ;;
+  esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+with_gnu_ld_CXX=$with_gnu_ld
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_CXX=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_CXX in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $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; }
+if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  $RM conftest*
+	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } 2>conftest.err; then
+	  soname=conftest
+	  lib=conftest
+	  libobjs=conftest.$ac_objext
+	  deplibs=
+	  wl=$lt_prog_compiler_wl_CXX
+	  pic_flag=$lt_prog_compiler_pic_CXX
+	  compiler_flags=-v
+	  linker_flags=-v
+	  verstring=
+	  output_objdir=.
+	  libname=conftest
+	  lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+	  allow_undefined_flag_CXX=
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+  (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+	  then
+	    lt_cv_archive_cmds_need_lc_CXX=no
+	  else
+	    lt_cv_archive_cmds_need_lc_CXX=yes
+	  fi
+	  allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+	else
+	  cat conftest.err 1>&5
+	fi
+	$RM conftest*
+	
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
+      archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux # 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'
+  ;;
+
+aix[4-9]*)
+  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
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<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
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  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}'
+    ;;
+  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=`func_echo_all "$lib" | $SED '\''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'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  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'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  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'\''`~
+      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'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      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.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
+    ;;
+
+  *)
+    # Assume MSVC wrapper
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
+    ;;
+  esac
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux # 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
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[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}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2.*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux # 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
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+haiku*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  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=yes
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+  postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
+  ;;
+
+interix[3-9]*)
+  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'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux # 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}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-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
+  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
+	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_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
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+    
+fi
+
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux # 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
+  ;;
+
+*nto* | *qnx*)
+  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'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux # 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
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux # 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=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 # 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 "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = 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"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $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_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" ||
+   test -n "$runpath_var_CXX" ||
+   test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct_CXX" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+     test "$hardcode_minus_L_CXX" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_CXX=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_CXX=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_CXX=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
+$as_echo "$hardcode_action_CXX" >&6; }
+
+if test "$hardcode_action_CXX" = relink ||
+   test "$inherit_rpath_CXX" = yes; then
+  # 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
+
+
+
+
+    
+
+
+  fi # test -n "$compiler"
+
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+  LDCXX=$LD
+  LD=$lt_save_LD
+  GCC=$lt_save_GCC
+  with_gnu_ld=$lt_save_with_gnu_ld
+  lt_cv_path_LDCXX=$lt_cv_path_LD
+  lt_cv_path_LD=$lt_save_path_LD
+  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+       
+       
+
+
+
+
+
+        ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+am__api_version='1.13'
+
+# 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
+  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 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
+
+  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
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$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}'
+
+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}" != 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 ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if 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
+IFS=$as_save_IFS
+
+fi
+fi
+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:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $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_STRIP+:} false; 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 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
+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:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $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
+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
+  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
+	   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
+
+  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+{ $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
+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
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+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
+
+
+{ $as_echo "$as_me:${as_lineno-$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
+
+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
+
+
+@%:@ Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules; 
+fi
+
+case $enable_silent_rules in @%:@ (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+    AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  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='ucommon'
+ VERSION='6.0.7'
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE "$PACKAGE"
+_ACEOF
+
+ 
+cat >>confdefs.h <<_ACEOF
+@%:@define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# 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)'
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar  pax cpio none'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+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
+
+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
+
+ 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
+
+
+depcc="$CXX"  am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if 
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+
+ac_config_headers="$ac_config_headers ucommon-config.h"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
+$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
+if ${ac_cv_c_restrict+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_restrict=no
+   # The order here caters to the fact that C++ does not require restrict.
+   for ac_kw in __restrict __restrict__ _Restrict restrict; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+typedef int * int_ptr;
+	int foo (int_ptr $ac_kw ip) {
+	return ip[0];
+       }
+int
+main ()
+{
+int s[1];
+	int * $ac_kw t = s;
+	t[0] = 0;
+	return foo(t)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_restrict=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     test "$ac_cv_c_restrict" != no && break
+   done
+  
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
+$as_echo "$ac_cv_c_restrict" >&6; }
+ 
+ case $ac_cv_c_restrict in
+   restrict) ;;
+   no) $as_echo "@%:@define restrict /**/" >>confdefs.h
+ ;;
+   *)  cat >>confdefs.h <<_ACEOF
+@%:@define restrict $ac_cv_c_restrict
+_ACEOF
+ ;;
+ esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
+$as_echo_n "checking for working volatile... " >&6; }
+if ${ac_cv_c_volatile+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+volatile int x;
+int * volatile y = (int *) 0;
+return !x && !y;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_volatile=yes
+else
+  ac_cv_c_volatile=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_volatile" >&5
+$as_echo "$ac_cv_c_volatile" >&6; }
+if test $ac_cv_c_volatile = no; then
+  
+$as_echo "@%:@define volatile /**/" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+    ;;
+esac
+
+
+UCOMMON_VISIBILITY="0"
+UCOMMON_FLAGS=""
+UCOMMON_MODEL="CXX"
+UCOMMON_CLINK=""
+UCOMMON_LIBC="-lc"
+UCOMMON_LIBS=""
+OPENSSL_LINK=""
+
+CHECKFLAGS="$CHECKFLAGS"
+
+case "$with_crypto" in
+ssl|openssl)
+    ssl="openssl"
+    ;;
+gnutls|gnu)
+    ssl="gnutls"
+    ;;
+none|nossl)
+    ssl="nossl"
+    ;;
+*)
+    ssl="detect"
+    ;;
+esac
+
+have_gettext="no"
+socket_lib=""
+posix4_lib=""
+rt_lib=""
+
+test -z "$localedir" && localedir='${datadir}/locale'
+
+
+
+# for very old gcc and for minix we disable full ucommon build by default
+# we also disable for mingw32 or when no "shared" library support because
+# libstdc++ is not dll and really bloats in linkage of plugins.  Any case,
+# you can always override with --enable-stdcpp...
+
+if test -z "$enable_stdcpp" ; then
+    if test "x$GCC" = "xyes" ; then
+        gccver=`$CC -dumpversion | cut -f1 -d.`
+    fi
+    if test -z "$gccver" ; then
+        gccver="3"
+    fi
+    if test "$gccver" -lt "3" ; then
+        enable_stdcpp="no"
+    fi
+    if test "x$enable_shared" = "xno" ; then
+        enable_stdcpp="no"
+    fi
+    case "$target_os" in
+    *minix*|mingw*)
+        enable_stdcpp="no"
+        ;;
+    esac
+fi
+
+@%:@ Check whether --enable-posix-timers was given.
+if test "${enable_posix_timers+set}" = set; then :
+  enableval=$enable_posix_timers; 
+fi
+
+
+if test "x$enable_posix_timers" = "xyes" ; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -DPOSIX_TIMERS"
+fi
+
+@%:@ Check whether --enable-stdcpp was given.
+if test "${enable_stdcpp+set}" = set; then :
+  enableval=$enable_stdcpp; 
+fi
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking full c++ support and linking model" >&5
+$as_echo_n "checking full c++ support and linking model... " >&6; }
+
+if test "x$enable_stdcpp" = "xno" ; then
+    UCOMMON_MODEL="CC"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    COMPAT=""
+else
+    COMPAT="commoncpp"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+
+
+@%:@ Check whether --with-sslstack was given.
+if test "${with_sslstack+set}" = set; then :
+  withval=$with_sslstack; 
+    if test x$with_sslstack != x ; then
+        ssl="${with_sslstack}" ; fi
+
+fi
+
+
+
+@%:@ Check whether --with-libc was given.
+if test "${with_libc+set}" = set; then :
+  withval=$with_libc; 
+    if test x$with_libc != x ; then
+        clib=`echo ${with_libc} | sed s/-l//`
+        UCOMMON_LIBC=-l${clib} ; fi
+
+fi
+
+
+@%:@ Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+  enableval=$enable_debug; 
+fi
+
+if test -z "$enable_debug" ; then
+    enable_debug="no"
+elif test $enable_debug = "yes" ; then
+    CXXFLAGS="${CXXFLAGS} -g -DDEBUG"
+fi
+
+
+
+threading="none"
+clib=`echo ${UCOMMON_LIBC} | sed s/-l//`
+tlib=""
+
+for ac_header in stdint.h poll.h sys/mman.h sys/shm.h sys/poll.h sys/timeb.h endian.h sys/filio.h dirent.h sys/resource.h wchar.h netinet/in.h net/if.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
+
+done
+
+for ac_header in mach/clock.h mach-o/dyld.h linux/version.h sys/inotify.h sys/event.h syslog.h sys/wait.h termios.h termio.h fcntl.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
+
+done
+
+for ac_header in sys/param.h sys/lockf.h sys/file.h dlfcn.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
+
+done
+
+
+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 :
+  
+    
+$as_echo "@%:@define HAVE_REGEX_H 1" >>confdefs.h
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regfree in -lregex" >&5
+$as_echo_n "checking for regfree in -lregex... " >&6; }
+if ${ac_cv_lib_regex_regfree+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lregex  $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 regfree ();
+int
+main ()
+{
+return regfree ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_regex_regfree=yes
+else
+  ac_cv_lib_regex_regfree=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_regex_regfree" >&5
+$as_echo "$ac_cv_lib_regex_regfree" >&6; }
+if test "x$ac_cv_lib_regex_regfree" = xyes; then :
+  
+        UCOMMON_LIBS="$UCOMMON_LIBS -lregex"
+    
+fi
+
+
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fopen in -lmsvcrt" >&5
+$as_echo_n "checking for fopen in -lmsvcrt... " >&6; }
+if ${ac_cv_lib_msvcrt_fopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmsvcrt  $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 fopen ();
+int
+main ()
+{
+return fopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_msvcrt_fopen=yes
+else
+  ac_cv_lib_msvcrt_fopen=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_msvcrt_fopen" >&5
+$as_echo "$ac_cv_lib_msvcrt_fopen" >&6; }
+if test "x$ac_cv_lib_msvcrt_fopen" = xyes; then :
+  
+    threading="msw"
+    clib="msvcrt"
+    UCOMMON_VISIBILITY="0"
+    UCOMMON_LIBS="--enable-stdcall-fixup $UCOMMON_LIBS -lmingwex -lmingw32 -lcrypt32 -ladvapi32 -luser32 -lws2_32 -lwsock32 -lkernel32"
+    UCOMMON_LIBC="-lmsvcrt -lgcc"
+    OPENSSL_LINK="-lgdi32"
+    
+$as_echo "@%:@define HAVE_INET_NTOP 1" >>confdefs.h
+
+    
+$as_echo "@%:@define HAVE_GETADDRINFO 1" >>confdefs.h
+
+
+else
+  
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __modsi3 in -lgcc" >&5
+$as_echo_n "checking for __modsi3 in -lgcc... " >&6; }
+if ${ac_cv_lib_gcc___modsi3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgcc  $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 __modsi3 ();
+int
+main ()
+{
+return __modsi3 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gcc___modsi3=yes
+else
+  ac_cv_lib_gcc___modsi3=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_gcc___modsi3" >&5
+$as_echo "$ac_cv_lib_gcc___modsi3" >&6; }
+if test "x$ac_cv_lib_gcc___modsi3" = xyes; then :
+  
+        UCOMMON_LIBC="$UCOMMON_LIBC -lgcc"
+    
+fi
+
+    as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_socketpair" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair in -l$clib" >&5
+$as_echo_n "checking for socketpair in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 socketpair ();
+int
+main ()
+{
+return socketpair ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+        
+$as_echo "@%:@define HAVE_SOCKETPAIR 1" >>confdefs.h
+
+    
+else
+  
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair in -lsocket" >&5
+$as_echo_n "checking for socketpair in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_socketpair+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $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 socketpair ();
+int
+main ()
+{
+return socketpair ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_socketpair=yes
+else
+  ac_cv_lib_socket_socketpair=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_socket_socketpair" >&5
+$as_echo "$ac_cv_lib_socket_socketpair" >&6; }
+if test "x$ac_cv_lib_socket_socketpair" = xyes; then :
+  
+$as_echo "@%:@define HAVE_SOCKETPAIR 1" >>confdefs.h
+
+fi
+
+    
+fi
+
+    as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_getaddrinfo" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -l$clib" >&5
+$as_echo_n "checking for getaddrinfo in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 getaddrinfo ();
+int
+main ()
+{
+return getaddrinfo ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+        
+$as_echo "@%:@define HAVE_GETADDRINFO 1" >>confdefs.h
+
+    
+else
+  
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lsocket" >&5
+$as_echo_n "checking for getaddrinfo in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_getaddrinfo+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $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 getaddrinfo ();
+int
+main ()
+{
+return getaddrinfo ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_getaddrinfo=yes
+else
+  ac_cv_lib_socket_getaddrinfo=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_socket_getaddrinfo" >&5
+$as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; }
+if test "x$ac_cv_lib_socket_getaddrinfo" = xyes; then :
+  
+$as_echo "@%:@define HAVE_GETADDRINFO 1" >>confdefs.h
+
+fi
+
+    
+fi
+
+    as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_gethostbyname2" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname2 in -l$clib" >&5
+$as_echo_n "checking for gethostbyname2 in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 gethostbyname2 ();
+int
+main ()
+{
+return gethostbyname2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+        
+$as_echo "@%:@define HAVE_GETHOSTBYNAME2 1" >>confdefs.h
+
+    
+else
+  
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname2 in -lsocket" >&5
+$as_echo_n "checking for gethostbyname2 in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_gethostbyname2+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $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 gethostbyname2 ();
+int
+main ()
+{
+return gethostbyname2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_gethostbyname2=yes
+else
+  ac_cv_lib_socket_gethostbyname2=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_socket_gethostbyname2" >&5
+$as_echo "$ac_cv_lib_socket_gethostbyname2" >&6; }
+if test "x$ac_cv_lib_socket_gethostbyname2" = xyes; then :
+  
+$as_echo "@%:@define HAVE_GETHOSTBYNAME2 1" >>confdefs.h
+
+fi
+
+    
+fi
+
+
+    as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_inet_ntop" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntop in -l$clib" >&5
+$as_echo_n "checking for inet_ntop in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 inet_ntop ();
+int
+main ()
+{
+return inet_ntop ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+        
+$as_echo "@%:@define HAVE_INET_NTOP 1" >>confdefs.h
+
+    
+else
+  
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntop in -lsocket" >&5
+$as_echo_n "checking for inet_ntop in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_inet_ntop+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $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 inet_ntop ();
+int
+main ()
+{
+return inet_ntop ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_inet_ntop=yes
+else
+  ac_cv_lib_socket_inet_ntop=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_socket_inet_ntop" >&5
+$as_echo "$ac_cv_lib_socket_inet_ntop" >&6; }
+if test "x$ac_cv_lib_socket_inet_ntop" = xyes; then :
+  
+            
+$as_echo "@%:@define HAVE_INET_NTOP 1" >>confdefs.h
+
+        
+else
+  
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntop in -lnsl" >&5
+$as_echo_n "checking for inet_ntop in -lnsl... " >&6; }
+if ${ac_cv_lib_nsl_inet_ntop+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $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 inet_ntop ();
+int
+main ()
+{
+return inet_ntop ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_nsl_inet_ntop=yes
+else
+  ac_cv_lib_nsl_inet_ntop=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_nsl_inet_ntop" >&5
+$as_echo "$ac_cv_lib_nsl_inet_ntop" >&6; }
+if test "x$ac_cv_lib_nsl_inet_ntop" = xyes; then :
+  
+                
+$as_echo "@%:@define HAVE_INET_NTOP 1" >>confdefs.h
+
+                socket_lib="$socket_lib -lnsl"
+            
+fi
+
+        
+fi
+
+    
+fi
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
+$as_echo_n "checking for socket in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_socket+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $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 socket ();
+int
+main ()
+{
+return socket ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_socket=yes
+else
+  ac_cv_lib_socket_socket=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_socket_socket" >&5
+$as_echo "$ac_cv_lib_socket_socket" >&6; }
+if test "x$ac_cv_lib_socket_socket" = xyes; then :
+  
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair in -lsocket" >&5
+$as_echo_n "checking for socketpair in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_socketpair+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $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 socketpair ();
+int
+main ()
+{
+return socketpair ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_socketpair=yes
+else
+  ac_cv_lib_socket_socketpair=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_socket_socketpair" >&5
+$as_echo "$ac_cv_lib_socket_socketpair" >&6; }
+if test "x$ac_cv_lib_socket_socketpair" = xyes; then :
+  
+            
+$as_echo "@%:@define HAVE_SOCKETPAIR 1" >>confdefs.h
+
+        
+fi
+
+        socket_lib="-lsocket"
+    
+fi
+
+
+fi
+
+
+@%:@ Check whether --enable-socks was given.
+if test "${enable_socks+set}" = set; then :
+  enableval=$enable_socks; 
+fi
+
+
+if test "x$enable_socks" = "xyes" ; then
+    enable_socks="no"
+    for ac_header in socks.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "socks.h" "ac_cv_header_socks_h" "$ac_includes_default"
+if test "x$ac_cv_header_socks_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SOCKS_H 1
+_ACEOF
+ 
+        enable_socks="yes"
+    
+fi
+
+done
+
+else
+    enable_socks="no"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socks proxy support" >&5
+$as_echo_n "checking for socks proxy support... " >&6; }
+
+if test "x$enable_socks" = "xyes" ; then
+    socket_lib="-lsocksd $socket_lib"
+    
+$as_echo "@%:@define HAVE_SOCKS 1" >>confdefs.h
+
+    { $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_ac_Lib=`$as_echo "ac_cv_lib_$clib''_lstat" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat in -l$clib" >&5
+$as_echo_n "checking for lstat in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 lstat ();
+int
+main ()
+{
+return lstat ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+    
+$as_echo "@%:@define HAVE_LSTAT 1" >>confdefs.h
+
+
+fi
+
+
+as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_strcoll" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcoll in -l$clib" >&5
+$as_echo_n "checking for strcoll in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 strcoll ();
+int
+main ()
+{
+return strcoll ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+    
+$as_echo "@%:@define HAVE_STRCOLL 1" >>confdefs.h
+
+
+fi
+
+
+as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_stricmp" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stricmp in -l$clib" >&5
+$as_echo_n "checking for stricmp in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 stricmp ();
+int
+main ()
+{
+return stricmp ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+    
+$as_echo "@%:@define HAVE_STRICMP 1" >>confdefs.h
+
+
+fi
+
+
+as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_stristr" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stristr in -l$clib" >&5
+$as_echo_n "checking for stristr in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 stristr ();
+int
+main ()
+{
+return stristr ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+    
+$as_echo "@%:@define HAVE_STRISTR 1" >>confdefs.h
+
+
+fi
+
+
+as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_sysconf" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf in -l$clib" >&5
+$as_echo_n "checking for sysconf in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 sysconf ();
+int
+main ()
+{
+return sysconf ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+    
+$as_echo "@%:@define HAVE_SYSCONF 1" >>confdefs.h
+
+
+fi
+
+
+as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_posix_memalign" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for posix_memalign in -l$clib" >&5
+$as_echo_n "checking for posix_memalign in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 posix_memalign ();
+int
+main ()
+{
+return posix_memalign ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+    
+$as_echo "@%:@define HAVE_POSIX_MEMALIGN 1" >>confdefs.h
+
+
+fi
+
+
+as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_dlopen" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -l$clib" >&5
+$as_echo_n "checking for dlopen in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_LIB$clib" | $as_tr_cpp` 1
+_ACEOF
+
+  LIBS="-l$clib $LIBS"
+
+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.  */
+
+/* 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 :
+  UCOMMON_LIBS="$UCOMMON_LIBS -ldl"
+else
+  
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lcompat" >&5
+$as_echo_n "checking for dlopen in -lcompat... " >&6; }
+if ${ac_cv_lib_compat_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcompat  $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_compat_dlopen=yes
+else
+  ac_cv_lib_compat_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_compat_dlopen" >&5
+$as_echo "$ac_cv_lib_compat_dlopen" >&6; }
+if test "x$ac_cv_lib_compat_dlopen" = xyes; then :
+  UCOMMON_LIBS="$UCOMMON_LIBS -lcompat"
+fi
+
+        { $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.  */
+
+/* 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 :
+  
+            
+$as_echo "@%:@define HAVE_SHL_LOAD 1" >>confdefs.h
+
+            UCOMMON_LIBS="$UCOMMON_LIBS -ldld"
+        
+fi
+
+    
+fi
+
+
+fi
+
+
+PTHREAD_FLAGS=""
+
+if test "$enable_shared" = "no" ; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -DUCOMMON_STATIC" ; fi
+
+@%:@ Check whether --enable-atomics was given.
+if test "${enable_atomics+set}" = set; then :
+  enableval=$enable_atomics; 
+    
+$as_echo "@%:@define HAVE_GCC_ATOMICS 1" >>confdefs.h
+
+
+fi
+
+
+@%:@ Check whether --enable-pth was given.
+if test "${enable_pth+set}" = set; then :
+  enableval=$enable_pth; 
+fi
+
+
+if test "$threading" = "none" ; then
+    if test "$enable_pth" != "yes" ; then
+        ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes; then :
+  
+            PTHREAD_FLAGS="-mt -pthread -pthreads"
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
+$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_create+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $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 pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_pthread_create=yes
+else
+  ac_cv_lib_pthread_pthread_create=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_pthread_pthread_create" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
+  
+                tlib="pthread"
+                UCOMMON_LIBS="$UCOMMON_LIBS -lpthread"
+            
+fi
+
+            if test -z "$tlib" ; then
+                as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_pthread_create" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -l$clib" >&5
+$as_echo_n "checking for pthread_create in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  tlib="$clib"
+fi
+
+            fi
+            if test -z "$tlib" ; then
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
+$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
+if ${ac_cv_lib_c_r_pthread_create+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $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 pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_c_r_pthread_create=yes
+else
+  ac_cv_lib_c_r_pthread_create=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_c_r_pthread_create" >&5
+$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
+if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
+  
+                    tlib="c_r"
+                    if test "$clib" = "c" ; then
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc in -lc_r" >&5
+$as_echo_n "checking for malloc in -lc_r... " >&6; }
+if ${ac_cv_lib_c_r_malloc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $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 malloc ();
+int
+main ()
+{
+return malloc ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_c_r_malloc=yes
+else
+  ac_cv_lib_c_r_malloc=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_c_r_malloc" >&5
+$as_echo "$ac_cv_lib_c_r_malloc" >&6; }
+if test "x$ac_cv_lib_c_r_malloc" = xyes; then :
+  clib="c_r"
+fi
+
+                    fi
+                
+fi
+
+            fi
+            if test ! -z "$tlib" ; then
+                as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_pthread_condattr_setclock" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_condattr_setclock in -l$tlib" >&5
+$as_echo_n "checking for pthread_condattr_setclock in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 pthread_condattr_setclock ();
+int
+main ()
+{
+return pthread_condattr_setclock ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+                    
+$as_echo "@%:@define HAVE_PTHREAD_CONDATTR_SETCLOCK 1" >>confdefs.h
+
+                
+fi
+
+                as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_pthread_setconcurrency" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setconcurrency in -l$tlib" >&5
+$as_echo_n "checking for pthread_setconcurrency in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 pthread_setconcurrency ();
+int
+main ()
+{
+return pthread_setconcurrency ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+                    
+$as_echo "@%:@define HAVE_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
+
+                
+fi
+
+
+                as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_pthread_yield" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_yield in -l$tlib" >&5
+$as_echo_n "checking for pthread_yield in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 pthread_yield ();
+int
+main ()
+{
+return pthread_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+                    
+$as_echo "@%:@define HAVE_PTHREAD_YIELD 1" >>confdefs.h
+
+                
+fi
+
+
+                as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_pthread_delay" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_delay in -l$tlib" >&5
+$as_echo_n "checking for pthread_delay in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 pthread_delay ();
+int
+main ()
+{
+return pthread_delay ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+                    
+$as_echo "@%:@define HAVE_PTHREAD_DELAY 1" >>confdefs.h
+
+                
+fi
+
+                as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_pthread_delay_np" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_delay_np in -l$tlib" >&5
+$as_echo_n "checking for pthread_delay_np in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 pthread_delay_np ();
+int
+main ()
+{
+return pthread_delay_np ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+                    
+$as_echo "@%:@define HAVE_PTHREAD_DELAY_NP 1" >>confdefs.h
+
+                
+fi
+
+                as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_pthread_setschedprio" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setschedprio in -l$tlib" >&5
+$as_echo_n "checking for pthread_setschedprio in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 pthread_setschedprio ();
+int
+main ()
+{
+return pthread_setschedprio ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+                    
+$as_echo "@%:@define HAVE_PTHREAD_SETSCHEDPRIO 1" >>confdefs.h
+
+                
+fi
+
+            fi
+        
+else
+  
+            ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
+if test "x$ac_cv_header_windows_h" = xyes; then :
+  
+else
+  
+                ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
+if test "x$ac_cv_header_pth_h" = xyes; then :
+  
+                    UCOMMON_LIBS="$UCOMMON_LIBS -lpth"
+                    UCOMMON_FLAGS="$UCOMMON_FLAGS -D__PTH__"
+                
+else
+  
+                    as_fn_error $? "\"pthread or GNU pth support required\"" "$LINENO" 5
+                
+fi
+
+
+            
+fi
+
+
+        
+fi
+
+
+    else
+        ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
+if test "x$ac_cv_header_pth_h" = xyes; then :
+  
+            UCOMMON_LIBS="$UCOMMON_LIBS -lpth"
+            UCOMMON_FLAGS="$UCOMMON_FLAGS -D__PTH__"
+        
+else
+  
+            as_fn_error $? "\"GNU pth required\"" "$LINENO" 5
+        
+fi
+
+
+    fi
+fi
+
+for func in ftok shm_open nanosleep clock_nanosleep clock_gettime strerror_r localtime_r gmtime_r posix_fadvise ftruncate pwrite setpgrp setlocale gettext execvp atexit realpath symlink readlink waitpid wait4 ; do
+    found="no"
+    as_ac_var=`$as_echo "ac_cv_func_$func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  
+        found=$func
+    
+else
+  
+        as_ac_Lib=`$as_echo "ac_cv_lib_posix4_$func" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $func in -lposix4" >&5
+$as_echo_n "checking for $func in -lposix4... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix4  $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 $func ();
+int
+main ()
+{
+return $func ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+            found=$func
+            posix4_lib="-lposix4"
+        
+else
+  
+            as_ac_Lib=`$as_echo "ac_cv_lib_rt_$func" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $func in -lrt" >&5
+$as_echo_n "checking for $func in -lrt... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $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 $func ();
+int
+main ()
+{
+return $func ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+                found=$func
+                rt_lib="-lrt"
+            
+else
+  
+                if test ! -z "$tlib" ; then
+                    as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_$func" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $func in -l$tlib" >&5
+$as_echo_n "checking for $func in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 $func ();
+int
+main ()
+{
+return $func ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  
+                        found=$func
+                    
+fi
+
+                fi
+            
+fi
+
+        
+fi
+
+    
+fi
+
+    case $found in
+    shm_open)
+        
+$as_echo "@%:@define HAVE_SHM_OPEN 1" >>confdefs.h
+
+        ;;
+    setpgrp)
+        
+$as_echo "@%:@define HAVE_SETPGRP 1" >>confdefs.h
+
+        ;;
+    realpath)
+        
+$as_echo "@%:@define HAVE_REALPATH 1" >>confdefs.h
+
+        ;;
+    ftok)
+        
+$as_echo "@%:@define HAVE_FTOK 1" >>confdefs.h
+
+        ;;
+    gmtime_r)
+        
+$as_echo "@%:@define HAVE_GMTIME_R 1" >>confdefs.h
+
+        ;;
+    localtime_r)
+        
+$as_echo "@%:@define HAVE_LOCALTIME_R 1" >>confdefs.h
+
+        ;;
+    strerror_r)
+        
+$as_echo "@%:@define HAVE_STRERROR_R 1" >>confdefs.h
+
+        ;;
+    nanosleep)
+        
+$as_echo "@%:@define HAVE_NANOSLEEP 1" >>confdefs.h
+
+        ;;
+    clock_nanosleep)
+        
+$as_echo "@%:@define HAVE_CLOCK_NANOSLEEP 1" >>confdefs.h
+
+        ;;
+    clock_gettime)
+        
+$as_echo "@%:@define HAVE_CLOCK_GETTIME 1" >>confdefs.h
+
+        ;;
+    posix_fadvise)
+        
+$as_echo "@%:@define HAVE_POSIX_FADVISE 1" >>confdefs.h
+
+        ;;
+    ftruncate)
+        
+$as_echo "@%:@define HAVE_FTRUNCATE 1" >>confdefs.h
+
+        ;;
+    pwrite)
+        
+$as_echo "@%:@define HAVE_PWRITE 1" >>confdefs.h
+
+        ;;
+    setlocale)
+        
+$as_echo "@%:@define HAVE_SETLOCALE 1" >>confdefs.h
+
+        ;;
+    gettext)
+        
+$as_echo "@%:@define HAVE_GETTEXT 1" >>confdefs.h
+
+        have_gettext="yes"
+        ;;
+    execvp)
+        
+$as_echo "@%:@define HAVE_EXECVP 1" >>confdefs.h
+
+        ;;
+    symlink)
+        
+$as_echo "@%:@define HAVE_SYMLINK 1" >>confdefs.h
+
+        ;;
+    readlink)
+        
+$as_echo "@%:@define HAVE_READLINK 1" >>confdefs.h
+
+        ;;
+    waitpid)
+        
+$as_echo "@%:@define HAVE_WAITPID 1" >>confdefs.h
+
+        ;;
+    wait4)
+        
+$as_echo "@%:@define HAVE_WAIT4 1" >>confdefs.h
+
+        ;;
+    esac
+done
+
+UCOMMON_LINKED="$socket_lib $posix4_lib $rt_lib $UCOMMON_LIBS"
+UCOMMON_LIBS="$socket_lib $posix4_lib $rt_lib $UCOMMON_LIBS $UCOMMON_LIBC"
+
+if test "$UCOMMON_MODEL" = "CC" ; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf in -lSystemstubs" >&5
+$as_echo_n "checking for printf in -lSystemstubs... " >&6; }
+if ${ac_cv_lib_Systemstubs_printf+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lSystemstubs  $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 printf ();
+int
+main ()
+{
+return printf ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_Systemstubs_printf=yes
+else
+  ac_cv_lib_Systemstubs_printf=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_Systemstubs_printf" >&5
+$as_echo "$ac_cv_lib_Systemstubs_printf" >&6; }
+if test "x$ac_cv_lib_Systemstubs_printf" = xyes; then :
+  
+        UCOMMON_CLINK="$UCOMMON_CLINK -lSystemstubs"
+        UCOMMON_LIBC="$UCOMMON_LIBC -lgcc"
+    
+fi
+
+fi
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+COMPILER_FLAGS=""
+
+if test "x$GCC" = "xyes" ; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -Wno-long-long" ; fi
+
+for flag in $CXXFLAGS ; do
+    case "$flag" in
+    -f*exceptions|-f*rtti|-f*check-new|-f*enforce-eh-specs|-finline|-f*except)
+        if test "$UCOMMON_MODEL" = "CXX" ; then
+            UCOMMON_FLAGS="$UCOMMON_FLAGS $flag" ; fi
+        ;;
+    -fvisibility=*)
+        VISIBLE_FLAGS=""
+        COMPILER_FLAGS="$COMPILER_FLAGS $flag"
+        ;;
+    *)
+        COMPILER_FLAGS="$COMPILER_FLAGS $flag"
+        ;;
+    esac
+done
+export CXXFLAGS="$COMPILER_FLAGS"
+
+if test "$UCOMMON_MODEL" = "CC" ; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS"
+
+    if test x"$GCC" = "xyes" ; then
+        ucflags="-fno-exceptions -fno-rtti -fno-enforce-eh-specs"
+        lcflags="-nodefaultlibs -nostdinc++"
+    else
+        ucflags="-library=no%Cstd -features=no%except -features=namespace -features=no%rtti"
+        lcflags=""
+    fi
+
+    for flag in $ucflags ; do
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports $flag" >&5
+$as_echo_n "checking whether ${CXX} supports $flag... " >&6; }
+        echo 'void f(){}' >conftest.cpp
+        if test -z "`${CXX} $flag -c conftest.cpp 2>&1`"; then
+            UCOMMON_FLAGS="$UCOMMON_FLAGS $flag"
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+            if test "$flag" = "-library=no%Cstd" ; then
+                UCOMMON_MODEL="CXX" ; fi
+        else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        fi
+        rm -f conftest*
+    done
+
+    for flag in $lcflags ; do
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports $flag" >&5
+$as_echo_n "checking whether ${CXX} supports $flag... " >&6; }
+        echo 'void f(){}' >conftest.cpp
+        if test -z "`${CXX} $flag -c conftest.cpp 2>&1`"; then
+            UCOMMON_CLINK="$UCOMMON_CLINK $flag"
+            { $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
+        rm -f conftest*
+    done
+else
+    ac_save_CXXFLAGS="$CXXFLAGS"
+    CXXFLAGS=""
+    
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+    
+for ac_header in stdexcept
+do :
+  ac_fn_cxx_check_header_mongrel "$LINENO" "stdexcept" "ac_cv_header_stdexcept" "$ac_includes_default"
+if test "x$ac_cv_header_stdexcept" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STDEXCEPT 1
+_ACEOF
+ 
+fi
+
+done
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for old style iostream" >&5
+$as_echo_n "checking for old style iostream... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+        #include <iostream>
+        using namespace std;
+
+        class mystr : public streambuf, public iostream
+        {
+            mystr();
+        };
+
+        mystr::mystr() : streambuf(), iostream((streambuf *)this)
+        {
+        }
+    
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        UCOMMON_FLAGS="$UCOMMON_FLAGS -DNEW_STDCPP"
+    
+else
+  
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+        UCOMMON_FLAGS="$UCOMMON_FLAGS -DOLD_STDCPP"
+    
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+    CXXFLAGS="$ac_save_CXXFLAGS"
+fi
+
+if test ! -z "$PTHREAD_FLAGS" ; then
+    for flag in $PTHREAD_FLAGS ; do
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports $flag" >&5
+$as_echo_n "checking whether ${CXX} supports $flag... " >&6; }
+        echo 'void f(){}' >conftest.cpp
+        if test -z "`${CXX} $flag -c conftest.cpp 2>&1`"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+            UCOMMON_FLAGS="$UCOMMON_FLAGS $flag"
+            break
+        else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        fi
+    done
+fi
+
+export CXXFLAGS
+
+# libstdc++ on some targets broken badly if inlines hidden.  Might be
+# deeper issue with ansi c++ library model...
+flags="-fno-check-new -finline"
+if test "$UCOMMON_MODEL" = "CC" ; then
+    if test "$enable_shared" != "no" ; then
+        flags="$flags -fvisibility-inlines-hidden"
+    fi
+fi
+
+for flag in $flags ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports $flag" >&5
+$as_echo_n "checking whether ${CXX} supports $flag... " >&6; }
+    echo 'void f(){}' >conftest.cpp
+    if test -z "`${CXX} $flag -c conftest.cpp 2>&1`"; then
+        UCOMMON_FLAGS="$UCOMMON_FLAGS $flag"
+        { $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
+    rm -f conftest*
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports visibility" >&5
+$as_echo_n "checking whether ${CXX} supports visibility... " >&6; }
+echo 'void f(){}' >conftest.cpp
+if test -z "`${CXX} -fvisibility=hidden -c conftest.cpp 2>&1`"; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -fvisibility=hidden -DUCOMMON_VISIBILITY=1"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    UCOMMON_VISIBILITY="1"
+else
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -DUCOMMON_VISIBILITY=0"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f conftest*
+
+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
+
+
+
+        includes="$includedir"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$includes")`
+                includes=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$includes"\"
+                )`
+                result=`(echo "$includes")`
+        done
+        
+
+
+        libs="$libdir"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$libs")`
+                libs=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$libs"\"
+                )`
+                result=`(echo "$libs")`
+        done
+        
+
+
+case "$libs" in
+/usr/*)
+    ;;
+*)
+    UCOMMON_LINKED="-L$libs $UCOMMON_LINKED"
+    ;;
+esac
+
+case "$includes" in
+/usr/*)
+    ;;
+*)
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -I$includes"
+    ;;
+esac
+
+case "$target_os" in
+*bsd*)
+    if test "$UCOMMON_MODEL" = "CC" ; then
+        if test "$GCC" = "yes" -a "$UCOMMON_LIBC" = "-lc" ; then
+            UCOMMON_LIBC="-Wl,-lc"
+        elif test "$GCC" = "yes" -a "$UCOMMON_LIBC" = "-lc_r" ; then
+            UCOMMON_LIBC="-Wl,-lc_r"
+        fi
+    fi
+    ;;
+osf*)
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -D_POSIX_C_SOURCE=1 -D_OSF_SOURCE=1 -D__USE_STD_IOSTREAM"
+    ;;
+cygwin*|mingw*)
+    UCOMMON_LINKED="$UCOMMON_LINKED -no-undefined"
+    UCOMMON_LIBS="$UCOMMON_LIBS -no-undefined"
+    ;;
+esac
+
+UCOMMON_CLINK="$UCOMMON_CLINK $UCOMMON_LIBC"
+
+if test -z "$UCOMMON_SSLSTACK" ; then
+    UCOMMON_SSLSTACK="$sslstack" ; fi
+
+OPENSSL_LIBS=""
+GNUTLS_LIBS=""
+
+
+
+
+
+
+
+
+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
+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:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+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
+  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
+
+  ;;
+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
+
+  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
+
+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
+
+@%:@ Check whether --with-pkg-config was given.
+if test "${with_pkg_config+set}" = set; then :
+  withval=$with_pkg_config; 
+    
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
+$as_echo_n "checking for OPENSSL... " >&6; }
+
+if test -n "$OPENSSL_CFLAGS"; then
+    pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= \$OPENSSL_REQUIRES\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "openssl >= $OPENSSL_REQUIRES") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl >= $OPENSSL_REQUIRES" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes 
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$OPENSSL_LIBS"; then
+    pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= \$OPENSSL_REQUIRES\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "openssl >= $OPENSSL_REQUIRES") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl >= $OPENSSL_REQUIRES" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes 
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl >= $OPENSSL_REQUIRES" 2>&1`
+        else 
+	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl >= $OPENSSL_REQUIRES" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$OPENSSL_PKG_ERRORS" >&5
+
+	
+        OPENSSL_LIBS=""
+        for ac_header in openssl/ssl.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_OPENSSL_SSL_H 1
+_ACEOF
+ 
+            OPENSSL_LIBS="-lssl -lcrypto -lz $OPENSSL_LINK"
+        
+fi
+
+done
+
+        for ac_header in openssl/fips.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/fips.h" "ac_cv_header_openssl_fips_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_fips_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_OPENSSL_FIPS_H 1
+_ACEOF
+ 
+fi
+
+done
+
+    
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	
+        OPENSSL_LIBS=""
+        for ac_header in openssl/ssl.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_OPENSSL_SSL_H 1
+_ACEOF
+ 
+            OPENSSL_LIBS="-lssl -lcrypto -lz $OPENSSL_LINK"
+        
+fi
+
+done
+
+        for ac_header in openssl/fips.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/fips.h" "ac_cv_header_openssl_fips_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_fips_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_OPENSSL_FIPS_H 1
+_ACEOF
+ 
+fi
+
+done
+
+    
+else
+	OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS
+	OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	
+fi
+    
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNUTLS" >&5
+$as_echo_n "checking for GNUTLS... " >&6; }
+
+if test -n "$GNUTLS_CFLAGS"; then
+    pkg_cv_GNUTLS_CFLAGS="$GNUTLS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 2.8.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gnutls >= 2.8.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.8.0" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes 
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GNUTLS_LIBS"; then
+    pkg_cv_GNUTLS_LIBS="$GNUTLS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 2.8.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gnutls >= 2.8.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.8.0" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes 
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        GNUTLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gnutls >= 2.8.0" 2>&1`
+        else 
+	        GNUTLS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gnutls >= 2.8.0" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GNUTLS_PKG_ERRORS" >&5
+
+	GNUTLS_LIBS=""
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	GNUTLS_LIBS=""
+else
+	GNUTLS_CFLAGS=$pkg_cv_GNUTLS_CFLAGS
+	GNUTLS_LIBS=$pkg_cv_GNUTLS_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	
+fi
+
+else
+  
+    for ac_header in openssl/ssl.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_OPENSSL_SSL_H 1
+_ACEOF
+ 
+        OPENSSL_LIBS="-lssl -lcrypto -lz $OPENSSL_LINK"
+    
+fi
+
+done
+
+    for ac_header in openssl/fips.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/fips.h" "ac_cv_header_openssl_fips_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_fips_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_OPENSSL_FIPS_H 1
+_ACEOF
+ 
+fi
+
+done
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_init in -lgnutls" >&5
+$as_echo_n "checking for gnutls_init in -lgnutls... " >&6; }
+if ${ac_cv_lib_gnutls_gnutls_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgnutls  $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 gnutls_init ();
+int
+main ()
+{
+return gnutls_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gnutls_gnutls_init=yes
+else
+  ac_cv_lib_gnutls_gnutls_init=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_gnutls_gnutls_init" >&5
+$as_echo "$ac_cv_lib_gnutls_gnutls_init" >&6; }
+if test "x$ac_cv_lib_gnutls_gnutls_init" = xyes; then :
+  
+        GNUTLS_LIBS="-lgnutls"
+    
+fi
+
+
+fi
+
+
+
+SECURE=""
+case "$ssl" in
+secure|any|detect)
+    if test ! -z "$GNUTLS_LIBS" ; then
+        SECURE_LIBS="$GNUTLS_LIBS"
+        SECURE="gnutls"
+    fi
+    if test -z "$SECURE" ; then
+        if test ! -z "$OPENSSL_LIBS" ; then
+            SECURE_LIBS="$OPENSSL_LIBS"
+            SECURE="openssl"
+        fi
+    fi
+    ;;
+gnutls|gnu)
+    if test ! -z "$GNUTLS_LIBS" ; then
+        SECURE_LIBS="$GNUTLS_LIBS"
+        SECURE="gnutls"
+    fi
+    ;;
+openssl|ssl)
+    if test ! -z "$OPENSSL_LIBS" ; then
+        SECURE_LIBS="$OPENSSL_LIBS"
+        SECURE="openssl"
+    fi
+    ;;
+esac
+
+if test -z "$SECURE" ; then
+    SECURE_LIBS=""
+    SECURE="nossl"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking secure library mode" >&5
+$as_echo_n "checking secure library mode... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SECURE" >&5
+$as_echo "$SECURE" >&6; }
+
+SECURE_LOCAL="../$SECURE/libusecure.la $SECURE_LIBS"
+
+LT_GENERIC="${LIBTOOL}"
+if test "$UCOMMON_MODEL" = "CC" ; then
+    LIBTOOL='$(SHELL) $(top_srcdir)/cmodel.sh'" ${LIBTOOL}" ; fi
+
+includes='${includedir}/ucommon'
+
+if test "$sysconfdir" = '${prefix}/etc' ; then
+    sysconfdir="/etc" ; fi
+
+if test "$localstatedir" = '${prefix}/var' ; then
+    localstatedir="/var" ; fi
+
+ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
+if test "x$ac_cv_header_libintl_h" = xyes; then :
+  
+    
+$as_echo "@%:@define HAVE_LIBINTL_H 1" >>confdefs.h
+
+    if test "$have_gettext" = "no" ; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
+$as_echo_n "checking for gettext in -lintl... " >&6; }
+if ${ac_cv_lib_intl_gettext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $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 gettext ();
+int
+main ()
+{
+return gettext ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_intl_gettext=yes
+else
+  ac_cv_lib_intl_gettext=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_intl_gettext" >&5
+$as_echo "$ac_cv_lib_intl_gettext" >&6; }
+if test "x$ac_cv_lib_intl_gettext" = xyes; then :
+  
+            
+$as_echo "@%:@define HAVE_GETTEXT 1" >>confdefs.h
+
+            UCOMMON_LIBS="$UCOMMON_LIBS -lintl"
+        
+fi
+
+    fi
+
+fi
+
+
+
+if test "$prefix" = "NONE" ; then
+    prefixdir="$ac_default_prefix"
+else
+    prefixdir="$prefix" ; fi
+
+
+        UCOMMON_INCLUDES="$includes"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$UCOMMON_INCLUDES")`
+                UCOMMON_INCLUDES=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$UCOMMON_INCLUDES"\"
+                )`
+                result=`(echo "$UCOMMON_INCLUDES")`
+        done
+        
+
+
+        UCOMMON_LOCALE="$localedir"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$UCOMMON_LOCALE")`
+                UCOMMON_LOCALE=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$UCOMMON_LOCALE"\"
+                )`
+                result=`(echo "$UCOMMON_LOCALE")`
+        done
+        
+
+
+        UCOMMON_CFGPATH="$sysconfdir"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$UCOMMON_CFGPATH")`
+                UCOMMON_CFGPATH=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$UCOMMON_CFGPATH"\"
+                )`
+                result=`(echo "$UCOMMON_CFGPATH")`
+        done
+        
+
+
+        UCOMMON_VARPATH="$localstatedir"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$UCOMMON_VARPATH")`
+                UCOMMON_VARPATH=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$UCOMMON_VARPATH"\"
+                )`
+                result=`(echo "$UCOMMON_VARPATH")`
+        done
+        
+
+
+        UCOMMON_PREFIX="$prefixdir"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$UCOMMON_PREFIX")`
+                UCOMMON_PREFIX=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$UCOMMON_PREFIX"\"
+                )`
+                result=`(echo "$UCOMMON_PREFIX")`
+        done
+        
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define UCOMMON_PREFIX "$UCOMMON_PREFIX"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define UCOMMON_CFGPATH "$UCOMMON_CFGPATH"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define UCOMMON_VARPATH "$UCOMMON_VARPATH"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define UCOMMON_LOCALE "$UCOMMON_LOCALE"
+_ACEOF
+
+
+# Extract the first word of "doxygen", so it can be a program name with args.
+set dummy doxygen; 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_DOXYGEN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $DOXYGEN in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DOXYGEN="$DOXYGEN" # 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_DOXYGEN="$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
+
+  test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN="doxygen"
+  ;;
+esac
+fi
+DOXYGEN=$ac_cv_path_DOXYGEN
+if test -n "$DOXYGEN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5
+$as_echo "$DOXYGEN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_config_files="$ac_config_files Makefile corelib/Makefile commoncpp/Makefile openssl/Makefile gnutls/Makefile nossl/Makefile utils/Makefile inc/Makefile inc/ucommon/Makefile inc/commoncpp/Makefile test/Makefile directive commoncpp.pc ucommon.pc ucommon.spec ucommon-config commoncpp-config"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $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=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    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;}
+      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:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIB@&t@OBJS; 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.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIB@&t@OBJS=$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 -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
+
+: "${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:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+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.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+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 :
+  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_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+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
+# 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
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in @%:@(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+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
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+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
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# 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='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD]
+@%:@ ----------------------------------------
+@%:@ Output "`basename @S|@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 @S|@? 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 @S|@as_val. Take advantage of shells that can avoid forks. The arguments
+@%:@ must be portable across @S|@(()) 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
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# 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 @%:@(((((
+-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
+
+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 -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
+
+
+@%:@ as_fn_mkdir_p
+@%:@ -------------
+@%:@ Create "@S|@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='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+
+@%:@ 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'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+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 ucommon $as_me 6.0.7, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$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]... [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
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE] 
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE] 
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+ucommon config.status 6.0.7
+configured by $0, generated by GNU Autoconf 2.69,
+  with options \\"\$ac_cs_config\\"
+
+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."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+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_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $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
+    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
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    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 \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  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'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
+@%:@@%:@ Running $as_me. @%:@@%:@
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+
+
+# 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
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$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"`'
+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"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+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_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_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"`'
+sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
+predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
+postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
+predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
+postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
+LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
+reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
+reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
+GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
+inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
+always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
+include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
+prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
+predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
+postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
+predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
+postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in AS \
+DLLTOOL \
+OBJDUMP \
+SHELL \
+ECHO \
+PATH_SEPARATOR \
+SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+sharedlib_from_linklib_cmd \
+AR \
+AR_FLAGS \
+archiver_list_spec \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+nm_file_list_spec \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_pic \
+lt_prog_compiler_wl \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+MANIFEST_TOOL \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_separator \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+install_override_mode \
+finish_eval \
+old_striplib \
+striplib \
+compiler_lib_search_dirs \
+predep_objects \
+postdep_objects \
+predeps \
+postdeps \
+compiler_lib_search_path \
+LD_CXX \
+reload_flag_CXX \
+compiler_CXX \
+lt_prog_compiler_no_builtin_flag_CXX \
+lt_prog_compiler_pic_CXX \
+lt_prog_compiler_wl_CXX \
+lt_prog_compiler_static_CXX \
+lt_cv_prog_compiler_c_o_CXX \
+export_dynamic_flag_spec_CXX \
+whole_archive_flag_spec_CXX \
+compiler_needs_object_CXX \
+with_gnu_ld_CXX \
+allow_undefined_flag_CXX \
+no_undefined_flag_CXX \
+hardcode_libdir_flag_spec_CXX \
+hardcode_libdir_separator_CXX \
+exclude_expsyms_CXX \
+include_expsyms_CXX \
+file_list_spec_CXX \
+compiler_lib_search_dirs_CXX \
+predep_objects_CXX \
+postdep_objects_CXX \
+predeps_CXX \
+postdeps_CXX \
+compiler_lib_search_path_CXX; do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+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 \
+reload_cmds_CXX \
+old_archive_cmds_CXX \
+old_archive_from_new_cmds_CXX \
+old_archive_from_expsyms_cmds_CXX \
+archive_cmds_CXX \
+archive_expsym_cmds_CXX \
+module_cmds_CXX \
+module_expsym_cmds_CXX \
+export_symbols_cmds_CXX \
+prelink_cmds_CXX \
+postlink_cmds_CXX; do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+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
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'
+
+
+
+
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "ucommon-config.h") CONFIG_HEADERS="$CONFIG_HEADERS ucommon-config.h" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "corelib/Makefile") CONFIG_FILES="$CONFIG_FILES corelib/Makefile" ;;
+    "commoncpp/Makefile") CONFIG_FILES="$CONFIG_FILES commoncpp/Makefile" ;;
+    "openssl/Makefile") CONFIG_FILES="$CONFIG_FILES openssl/Makefile" ;;
+    "gnutls/Makefile") CONFIG_FILES="$CONFIG_FILES gnutls/Makefile" ;;
+    "nossl/Makefile") CONFIG_FILES="$CONFIG_FILES nossl/Makefile" ;;
+    "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
+    "inc/Makefile") CONFIG_FILES="$CONFIG_FILES inc/Makefile" ;;
+    "inc/ucommon/Makefile") CONFIG_FILES="$CONFIG_FILES inc/ucommon/Makefile" ;;
+    "inc/commoncpp/Makefile") CONFIG_FILES="$CONFIG_FILES inc/commoncpp/Makefile" ;;
+    "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
+    "directive") CONFIG_FILES="$CONFIG_FILES directive" ;;
+    "commoncpp.pc") CONFIG_FILES="$CONFIG_FILES commoncpp.pc" ;;
+    "ucommon.pc") CONFIG_FILES="$CONFIG_FILES ucommon.pc" ;;
+    "ucommon.spec") CONFIG_FILES="$CONFIG_FILES ucommon.spec" ;;
+    "ucommon-config") CONFIG_FILES="$CONFIG_FILES ucommon-config" ;;
+    "commoncpp-config") CONFIG_FILES="$CONFIG_FILES commoncpp-config" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  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 -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || 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.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+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'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+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 < "$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 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[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# 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 >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$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 `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $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.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || 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
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/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:${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
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+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' "$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;}
+
+  rm -f "$ac_tmp/stdin"
+  case $ac_file in
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && 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 "$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 "$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"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+	 X"$_am_arg" : 'X\(//\)$' \| \
+	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+  
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "libtool":C) 
+    
+    # See if we are running on zsh, and set the options which allow our
+    # commands through without removal of \ escapes.
+    if test -n "${ZSH_VERSION+set}" ; then
+      setopt NO_GLOB_SUBST
+    fi
+
+    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
+# 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.
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010, 2011 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.
+#
+# 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.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags="CXX "
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Assembler program.
+AS=$lt_AS
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Object dumper program.
+OBJDUMP=$lt_OBJDUMP
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# 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
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method = "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
+# The archiver.
+AR=$lt_AR
+
+# Flags to create an archive.
+AR_FLAGS=$lt_AR_FLAGS
+
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+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
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
+
+# The root where to search for dependent libraries,and in which our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# 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
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+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
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+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
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# 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
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using 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
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# 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
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects
+postdep_objects=$lt_postdep_objects
+predeps=$lt_predeps
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# ### END LIBTOOL CONFIG
+
+_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
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+_LT_EOF
+    ;;
+  esac
+
+  
+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 '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
+
+  if test x"$xsi_shell" = xyes; then
+  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_basename ()$/,/^} # func_basename /c\
+func_basename ()\
+{\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
+func_dirname_and_basename ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
+func_stripname ()\
+{\
+\    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
+\    # positional parameters, so assign one to ordinary parameter first.\
+\    func_stripname_result=${3}\
+\    func_stripname_result=${func_stripname_result#"${1}"}\
+\    func_stripname_result=${func_stripname_result%"${2}"}\
+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
+func_split_long_opt ()\
+{\
+\    func_split_long_opt_name=${1%%=*}\
+\    func_split_long_opt_arg=${1#*=}\
+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
+func_split_short_opt ()\
+{\
+\    func_split_short_opt_arg=${1#??}\
+\    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
+func_lo2o ()\
+{\
+\    case ${1} in\
+\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
+\      *)    func_lo2o_result=${1} ;;\
+\    esac\
+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_xform ()$/,/^} # func_xform /c\
+func_xform ()\
+{\
+    func_xform_result=${1%.*}.lo\
+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_arith ()$/,/^} # func_arith /c\
+func_arith ()\
+{\
+    func_arith_result=$(( $* ))\
+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_len ()$/,/^} # func_len /c\
+func_len ()\
+{\
+    func_len_result=${#1}\
+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+fi
+
+if test x"$lt_shell_append" = xyes; then
+  sed -e '/^func_append ()$/,/^} # func_append /c\
+func_append ()\
+{\
+    eval "${1}+=\\${2}"\
+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
+func_append_quoted ()\
+{\
+\    func_quote_for_eval "${2}"\
+\    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
+
+
+   mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+
+
+    cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag_CXX
+reload_cmds=$lt_reload_cmds_CXX
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_CXX
+
+# A language specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_CXX
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_CXX
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to "yes" if using 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
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_CXX
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_CXX
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_CXX
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds_CXX
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_CXX
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_CXX
+postdep_objects=$lt_postdep_objects_CXX
+predeps=$lt_predeps_CXX
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# ### END LIBTOOL TAG CONFIG: CXX
+_LT_EOF
+
+ ;;
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # 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
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named 'Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running 'make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "$am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # 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'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+
+  esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
diff --git a/jni/libucommon/sources/autom4te.cache/requests b/jni/libucommon/sources/autom4te.cache/requests
new file mode 100644
index 0000000..4cfbdc0
--- /dev/null
+++ b/jni/libucommon/sources/autom4te.cache/requests
@@ -0,0 +1,310 @@
+# This file was generated.
+# It contains the lists of macros which have been traced.
+# It can be safely removed.
+
+@request = (
+             bless( [
+                      '0',
+                      1,
+                      [
+                        '/usr/share/autoconf'
+                      ],
+                      [
+                        '/usr/share/autoconf/autoconf/autoconf.m4f',
+                        '-',
+                        '/usr/share/aclocal-1.13/internal/ac-config-macro-dirs.m4',
+                        '/usr/share/aclocal/argz.m4',
+                        '/usr/share/aclocal/libtool.m4',
+                        '/usr/share/aclocal/ltdl.m4',
+                        '/usr/share/aclocal/ltoptions.m4',
+                        '/usr/share/aclocal/ltsugar.m4',
+                        '/usr/share/aclocal/ltversion.m4',
+                        '/usr/share/aclocal/lt~obsolete.m4',
+                        '/usr/share/aclocal/pkg.m4',
+                        '/usr/share/aclocal-1.13/amversion.m4',
+                        '/usr/share/aclocal-1.13/auxdir.m4',
+                        '/usr/share/aclocal-1.13/cond.m4',
+                        '/usr/share/aclocal-1.13/depend.m4',
+                        '/usr/share/aclocal-1.13/depout.m4',
+                        '/usr/share/aclocal-1.13/init.m4',
+                        '/usr/share/aclocal-1.13/install-sh.m4',
+                        '/usr/share/aclocal-1.13/lead-dot.m4',
+                        '/usr/share/aclocal-1.13/make.m4',
+                        '/usr/share/aclocal-1.13/missing.m4',
+                        '/usr/share/aclocal-1.13/obsolete.m4',
+                        '/usr/share/aclocal-1.13/options.m4',
+                        '/usr/share/aclocal-1.13/runlog.m4',
+                        '/usr/share/aclocal-1.13/sanity.m4',
+                        '/usr/share/aclocal-1.13/silent.m4',
+                        '/usr/share/aclocal-1.13/strip.m4',
+                        '/usr/share/aclocal-1.13/substnot.m4',
+                        '/usr/share/aclocal-1.13/tar.m4',
+                        'configure.ac'
+                      ],
+                      {
+                        'PKG_CHECK_VAR' => 1,
+                        '_AM_CONFIG_MACRO_DIRS' => 1,
+                        'AC_LIBTOOL_PROG_CC_C_O' => 1,
+                        'm4_include' => 1,
+                        'LT_SYS_DLOPEN_DEPLIBS' => 1,
+                        '_LT_PROG_ECHO_BACKSLASH' => 1,
+                        'LT_AC_PROG_GCJ' => 1,
+                        'LT_SUPPORTED_TAG' => 1,
+                        'AC_DEFUN' => 1,
+                        'm4_pattern_forbid' => 1,
+                        'AC_LIBTOOL_PICMODE' => 1,
+                        '_LT_AC_TRY_DLOPEN_SELF' => 1,
+                        'AC_LIBTOOL_PROG_COMPILER_PIC' => 1,
+                        'AC_DISABLE_STATIC' => 1,
+                        'LT_PROG_GO' => 1,
+                        '_LT_PREPARE_SED_QUOTE_VARS' => 1,
+                        'AC_LTDL_SHLIBEXT' => 1,
+                        'AM_ENABLE_STATIC' => 1,
+                        'AC_PROG_NM' => 1,
+                        'AC_WITH_LTDL' => 1,
+                        '_LT_LIBOBJ' => 1,
+                        'm4_pattern_allow' => 1,
+                        '_LT_AC_LANG_CXX_CONFIG' => 1,
+                        'AC_LTDL_PREOPEN' => 1,
+                        '_LT_LINKER_BOILERPLATE' => 1,
+                        'AC_LTDL_SYMBOL_USCORE' => 1,
+                        '_LT_COMPILER_OPTION' => 1,
+                        'AC_DISABLE_SHARED' => 1,
+                        'AM_DEP_TRACK' => 1,
+                        'PKG_PROG_PKG_CONFIG' => 1,
+                        'AM_CONDITIONAL' => 1,
+                        'AC_LIBLTDL_INSTALLABLE' => 1,
+                        'LTDL_INIT' => 1,
+                        '_LT_REQUIRED_DARWIN_CHECKS' => 1,
+                        'AC_LIBTOOL_CONFIG' => 1,
+                        'AC_LIBTOOL_LANG_RC_CONFIG' => 1,
+                        '_LT_CC_BASENAME' => 1,
+                        'LT_OUTPUT' => 1,
+                        '_LT_COMPILER_BOILERPLATE' => 1,
+                        'LT_LIB_DLLOAD' => 1,
+                        'AM_INIT_AUTOMAKE' => 1,
+                        'AC_LIBTOOL_LANG_C_CONFIG' => 1,
+                        'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
+                        'AC_CHECK_LIBM' => 1,
+                        'AC_LIBTOOL_SYS_LIB_STRIP' => 1,
+                        'AC_DISABLE_FAST_INSTALL' => 1,
+                        'AM_MAKE_INCLUDE' => 1,
+                        'AM_ENABLE_SHARED' => 1,
+                        '_LT_AC_LANG_RC_CONFIG' => 1,
+                        '_LT_PATH_TOOL_PREFIX' => 1,
+                        '_LT_AC_LOCK' => 1,
+                        'AC_LIBTOOL_WIN32_DLL' => 1,
+                        'AC_PROG_LD_RELOAD_FLAG' => 1,
+                        'AC_SUBST_DIR' => 1,
+                        'AC_ENABLE_STATIC' => 1,
+                        '_LT_AC_LANG_GCJ' => 1,
+                        '_LT_AC_SYS_LIBPATH_AIX' => 1,
+                        'AM_AUX_DIR_EXPAND' => 1,
+                        'LTOPTIONS_VERSION' => 1,
+                        'PKG_CHECK_MODULES' => 1,
+                        'AM_MISSING_HAS_RUN' => 1,
+                        'AM_DISABLE_SHARED' => 1,
+                        'AC_DEPLIBS_CHECK_METHOD' => 1,
+                        '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
+                        'AC_LIBTOOL_RC' => 1,
+                        'AC_DEFUN_ONCE' => 1,
+                        'LTVERSION_VERSION' => 1,
+                        'PKG_NOARCH_INSTALLDIR' => 1,
+                        '_AM_SET_OPTIONS' => 1,
+                        'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1,
+                        '_LT_AC_PROG_CXXCPP' => 1,
+                        'LTOBSOLETE_VERSION' => 1,
+                        'AM_PROG_INSTALL_SH' => 1,
+                        'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1,
+                        '_LT_AC_FILE_LTDLL_C' => 1,
+                        '_LT_AC_LANG_CXX' => 1,
+                        'AC_LIBTOOL_OBJDIR' => 1,
+                        'AM_PROG_LD' => 1,
+                        'PKG_INSTALLDIR' => 1,
+                        'AM_SET_DEPDIR' => 1,
+                        '_LT_AC_TAGVAR' => 1,
+                        '_AM_SUBST_NOTMAKE' => 1,
+                        'AM_AUTOMAKE_VERSION' => 1,
+                        'gl_FUNC_ARGZ' => 1,
+                        'AC_PROG_LD_GNU' => 1,
+                        'AM_CONFIG_HEADER' => 1,
+                        'LT_PROG_RC' => 1,
+                        'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1,
+                        '_LT_AC_LANG_GCJ_CONFIG' => 1,
+                        'AM_PROG_INSTALL_STRIP' => 1,
+                        'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1,
+                        'LT_AC_PROG_SED' => 1,
+                        'LT_FUNC_DLSYM_USCORE' => 1,
+                        'AC_PROG_LIBTOOL' => 1,
+                        'LT_LIB_M' => 1,
+                        'LT_WITH_LTDL' => 1,
+                        'AC_LIBTOOL_DLOPEN_SELF' => 1,
+                        'AC_PROG_LD' => 1,
+                        'AM_SANITY_CHECK' => 1,
+                        'AC_LIBLTDL_CONVENIENCE' => 1,
+                        'LT_PATH_LD' => 1,
+                        'AC_LIBTOOL_DLOPEN' => 1,
+                        'AC_LIBTOOL_LINKER_OPTION' => 1,
+                        'LT_SYS_SYMBOL_USCORE' => 1,
+                        'PKG_CHECK_EXISTS' => 1,
+                        'include' => 1,
+                        'LT_INIT' => 1,
+                        'AM_MISSING_PROG' => 1,
+                        '_AC_PROG_LIBTOOL' => 1,
+                        'AC_LTDL_SYSSEARCHPATH' => 1,
+                        'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1,
+                        'AC_LIBTOOL_LANG_CXX_CONFIG' => 1,
+                        'LT_LANG' => 1,
+                        'AM_PROG_LIBTOOL' => 1,
+                        'AC_LIBTOOL_CXX' => 1,
+                        '_LT_WITH_SYSROOT' => 1,
+                        '_PKG_SHORT_ERRORS_SUPPORTED' => 1,
+                        'LT_PROG_GCJ' => 1,
+                        'AC_CONFIG_MACRO_DIR' => 1,
+                        '_LT_AC_SHELL_INIT' => 1,
+                        'LTDL_INSTALLABLE' => 1,
+                        'LTSUGAR_VERSION' => 1,
+                        'LT_AC_PROG_EGREP' => 1,
+                        'AC_PATH_MAGIC' => 1,
+                        'LT_CONFIG_LTDL_DIR' => 1,
+                        'AC_LIBTOOL_LANG_F77_CONFIG' => 1,
+                        '_AM_IF_OPTION' => 1,
+                        'AC_LTDL_SYS_DLOPEN_DEPLIBS' => 1,
+                        'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
+                        'AM_DISABLE_STATIC' => 1,
+                        'LT_PATH_NM' => 1,
+                        '_LTDL_SETUP' => 1,
+                        '_AM_SET_OPTION' => 1,
+                        '_AM_DEPENDENCIES' => 1,
+                        'AC_LIBTOOL_GCJ' => 1,
+                        '_m4_warn' => 1,
+                        'gl_PREREQ_ARGZ' => 1,
+                        '_AM_PROG_TAR' => 1,
+                        'AC_LIBTOOL_SETUP' => 1,
+                        '_LT_LINKER_OPTION' => 1,
+                        'AC_LIBTOOL_COMPILER_OPTION' => 1,
+                        'AC_LIBTOOL_PROG_LD_SHLIBS' => 1,
+                        'AM_SUBST_NOTMAKE' => 1,
+                        'LTDL_CONVENIENCE' => 1,
+                        'AU_DEFUN' => 1,
+                        '_LT_PROG_LTMAIN' => 1,
+                        'AC_LTDL_SHLIBPATH' => 1,
+                        'AC_LTDL_DLSYM_USCORE' => 1,
+                        '_AM_AUTOCONF_VERSION' => 1,
+                        'AC_ENABLE_FAST_INSTALL' => 1,
+                        '_LT_AC_SYS_COMPILER' => 1,
+                        '_AM_MANGLE_OPTION' => 1,
+                        'AC_LTDL_OBJDIR' => 1,
+                        'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1,
+                        'AM_PROG_NM' => 1,
+                        'AC_ENABLE_SHARED' => 1,
+                        'LT_SYS_DLSEARCH_PATH' => 1,
+                        'AM_C_PROTOTYPES' => 1,
+                        '_LT_AC_CHECK_DLFCN' => 1,
+                        'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1,
+                        'fp_C_PROTOTYPES' => 1,
+                        'AC_LTDL_ENABLE_INSTALL' => 1,
+                        '_LT_AC_PROG_ECHO_BACKSLASH' => 1,
+                        'AM_RUN_LOG' => 1,
+                        'AC_LIBTOOL_FC' => 1,
+                        '_LT_PROG_CXX' => 1,
+                        '_LT_PROG_FC' => 1,
+                        'LT_SYS_DLOPEN_SELF' => 1,
+                        'AC_LIB_LTDL' => 1,
+                        'AC_PATH_TOOL_PREFIX' => 1,
+                        'LT_CMD_MAX_LEN' => 1,
+                        '_LT_AC_TAGCONFIG' => 1,
+                        '_LT_AC_LANG_C_CONFIG' => 1,
+                        'AC_CONFIG_MACRO_DIR_TRACE' => 1,
+                        'AC_PROG_EGREP' => 1,
+                        'AC_LIBTOOL_POSTDEP_PREDEP' => 1,
+                        'LT_SYS_MODULE_PATH' => 1,
+                        '_AC_AM_CONFIG_HEADER_HOOK' => 1,
+                        'AC_LIBTOOL_F77' => 1,
+                        'LT_AC_PROG_RC' => 1,
+                        'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1,
+                        'AC_LTDL_DLLIB' => 1,
+                        'AM_SET_LEADING_DOT' => 1,
+                        '_LT_AC_LANG_F77' => 1,
+                        '_LT_AC_LANG_F77_CONFIG' => 1,
+                        '_LT_PROG_F77' => 1,
+                        'AM_PROG_CC_STDC' => 1,
+                        'LT_SYS_MODULE_EXT' => 1,
+                        'AM_SILENT_RULES' => 1
+                      }
+                    ], 'Autom4te::Request' ),
+             bless( [
+                      '1',
+                      1,
+                      [
+                        '/usr/share/autoconf'
+                      ],
+                      [
+                        '/usr/share/autoconf/autoconf/autoconf.m4f',
+                        'aclocal.m4',
+                        'configure.ac'
+                      ],
+                      {
+                        'AM_XGETTEXT_OPTION' => 1,
+                        'AM_PROG_MOC' => 1,
+                        'AM_PROG_CC_C_O' => 1,
+                        'AC_CONFIG_LIBOBJ_DIR' => 1,
+                        '_m4_warn' => 1,
+                        'AM_SILENT_RULES' => 1,
+                        'AM_AUTOMAKE_VERSION' => 1,
+                        '_AM_SUBST_NOTMAKE' => 1,
+                        'AM_PROG_CXX_C_O' => 1,
+                        'AC_FC_FREEFORM' => 1,
+                        'AM_PATH_GUILE' => 1,
+                        'AC_DEFINE_TRACE_LITERAL' => 1,
+                        'AC_REQUIRE_AUX_FILE' => 1,
+                        'LT_CONFIG_LTDL_DIR' => 1,
+                        'AM_PROG_MKDIR_P' => 1,
+                        'AM_CONDITIONAL' => 1,
+                        '_AM_MAKEFILE_INCLUDE' => 1,
+                        'AM_MAKEFILE_INCLUDE' => 1,
+                        'AC_FC_SRCEXT' => 1,
+                        'AM_PROG_FC_C_O' => 1,
+                        'AC_CANONICAL_SYSTEM' => 1,
+                        'AC_CANONICAL_HOST' => 1,
+                        'AM_ENABLE_MULTILIB' => 1,
+                        '_AM_COND_ENDIF' => 1,
+                        'AC_INIT' => 1,
+                        '_LT_AC_TAGCONFIG' => 1,
+                        'm4_sinclude' => 1,
+                        'm4_pattern_allow' => 1,
+                        'AM_GNU_GETTEXT' => 1,
+                        'AC_CANONICAL_TARGET' => 1,
+                        'AH_OUTPUT' => 1,
+                        'LT_INIT' => 1,
+                        'include' => 1,
+                        'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
+                        '_AM_COND_IF' => 1,
+                        'AM_NLS' => 1,
+                        'AC_CONFIG_LINKS' => 1,
+                        'AM_PROG_AR' => 1,
+                        'AM_PROG_F77_C_O' => 1,
+                        'AC_CANONICAL_BUILD' => 1,
+                        'AC_LIBSOURCE' => 1,
+                        'AM_POT_TOOLS' => 1,
+                        'AC_CONFIG_HEADERS' => 1,
+                        'sinclude' => 1,
+                        'AM_MAINTAINER_MODE' => 1,
+                        'AC_FC_PP_SRCEXT' => 1,
+                        'm4_pattern_forbid' => 1,
+                        '_AM_COND_ELSE' => 1,
+                        'AC_PROG_LIBTOOL' => 1,
+                        'AC_FC_PP_DEFINE' => 1,
+                        'AC_SUBST' => 1,
+                        'AC_CONFIG_SUBDIRS' => 1,
+                        'LT_SUPPORTED_TAG' => 1,
+                        'AC_CONFIG_FILES' => 1,
+                        'm4_include' => 1,
+                        'AC_CONFIG_AUX_DIR' => 1,
+                        'AM_EXTRA_RECURSIVE_TARGETS' => 1,
+                        'AM_INIT_AUTOMAKE' => 1,
+                        'AC_SUBST_TRACE' => 1
+                      }
+                    ], 'Autom4te::Request' )
+           );
+
diff --git a/jni/libucommon/sources/autom4te.cache/traces.0 b/jni/libucommon/sources/autom4te.cache/traces.0
new file mode 100644
index 0000000..5009b80
--- /dev/null
+++ b/jni/libucommon/sources/autom4te.cache/traces.0
@@ -0,0 +1,2909 @@
+m4trace:/usr/share/aclocal/argz.m4:12: -1- AC_DEFUN([gl_FUNC_ARGZ], [gl_PREREQ_ARGZ
+
+AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT])
+
+AC_CHECK_TYPES([error_t],
+  [],
+  [AC_DEFINE([error_t], [int],
+   [Define to a type to use for `error_t' if it is not otherwise available.])
+   AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
+    does not typedef error_t.])],
+  [#if defined(HAVE_ARGZ_H)
+#  include <argz.h>
+#endif])
+
+ARGZ_H=
+AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \
+	argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])])
+
+dnl if have system argz functions, allow forced use of
+dnl libltdl-supplied implementation (and default to do so
+dnl on "known bad" systems). Could use a runtime check, but
+dnl (a) detecting malloc issues is notoriously unreliable
+dnl (b) only known system that declares argz functions,
+dnl     provides them, yet they are broken, is cygwin
+dnl     releases prior to 16-Mar-2007 (1.5.24 and earlier)
+dnl So, it's more straightforward simply to special case
+dnl this for known bad systems.
+AS_IF([test -z "$ARGZ_H"],
+    [AC_CACHE_CHECK(
+        [if argz actually works],
+        [lt_cv_sys_argz_works],
+        [[case $host_os in #(
+	 *cygwin*)
+	   lt_cv_sys_argz_works=no
+	   if test "$cross_compiling" != no; then
+	     lt_cv_sys_argz_works="guessing no"
+	   else
+	     lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
+	     save_IFS=$IFS
+	     IFS=-.
+	     set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
+	     IFS=$save_IFS
+	     lt_os_major=${2-0}
+	     lt_os_minor=${3-0}
+	     lt_os_micro=${4-0}
+	     if test "$lt_os_major" -gt 1 \
+		|| { test "$lt_os_major" -eq 1 \
+		  && { test "$lt_os_minor" -gt 5 \
+		    || { test "$lt_os_minor" -eq 5 \
+		      && test "$lt_os_micro" -gt 24; }; }; }; then
+	       lt_cv_sys_argz_works=yes
+	     fi
+	   fi
+	   ;; #(
+	 *) lt_cv_sys_argz_works=yes ;;
+	 esac]])
+     AS_IF([test "$lt_cv_sys_argz_works" = yes],
+        [AC_DEFINE([HAVE_WORKING_ARGZ], 1,
+                   [This value is set to 1 to indicate that the system argz facility works])],
+        [ARGZ_H=argz.h
+        AC_LIBOBJ([argz])])])
+
+AC_SUBST([ARGZ_H])
+])
+m4trace:/usr/share/aclocal/argz.m4:79: -1- AC_DEFUN([gl_PREREQ_ARGZ], [:])
+m4trace:/usr/share/aclocal/libtool.m4:69: -1- AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+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
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+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"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])
+m4trace:/usr/share/aclocal/libtool.m4:107: -1- AU_DEFUN([AC_PROG_LIBTOOL], [m4_if($#, 0, [LT_INIT], [LT_INIT($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:107: -1- AC_DEFUN([AC_PROG_LIBTOOL], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_LIBTOOL' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_INIT], [LT_INIT($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:108: -1- AU_DEFUN([AM_PROG_LIBTOOL], [m4_if($#, 0, [LT_INIT], [LT_INIT($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:108: -1- AC_DEFUN([AM_PROG_LIBTOOL], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_LIBTOOL' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_INIT], [LT_INIT($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:609: -1- AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+lt_cl_silent=false
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+  echo
+  AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+  -h, --help      print this help, then exit
+  -V, --version   print version number, then exit
+  -q, --quiet     do not print progress messages
+  -d, --debug     don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+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) 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
+do
+  case $[1] in
+    --version | --v* | -V )
+      echo "$lt_cl_version"; exit 0 ;;
+    --help | --h* | -h )
+      echo "$lt_cl_help"; exit 0 ;;
+    --debug | --d* | -d )
+      debug=: ;;
+    --quiet | --q* | --silent | --s* | -q )
+      lt_cl_silent=: ;;
+
+    -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+    *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+  esac
+  shift
+done
+
+if $lt_cl_silent; then
+  exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# 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.
+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)
+])
+m4trace:/usr/share/aclocal/libtool.m4:790: -1- AC_DEFUN([LT_SUPPORTED_TAG], [])
+m4trace:/usr/share/aclocal/libtool.m4:801: -1- AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl
+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)],
+  [Windows Resource],	[_LT_LANG(RC)],
+  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+    [_LT_LANG($1)],
+    [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])
+m4trace:/usr/share/aclocal/libtool.m4:893: -1- AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+m4trace:/usr/share/aclocal/libtool.m4:893: -1- AC_DEFUN([AC_LIBTOOL_CXX], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_CXX' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(C++)])
+m4trace:/usr/share/aclocal/libtool.m4:894: -1- AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+m4trace:/usr/share/aclocal/libtool.m4:894: -1- AC_DEFUN([AC_LIBTOOL_F77], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_F77' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(Fortran 77)])
+m4trace:/usr/share/aclocal/libtool.m4:895: -1- AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+m4trace:/usr/share/aclocal/libtool.m4:895: -1- AC_DEFUN([AC_LIBTOOL_FC], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_FC' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(Fortran)])
+m4trace:/usr/share/aclocal/libtool.m4:896: -1- AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+m4trace:/usr/share/aclocal/libtool.m4:896: -1- AC_DEFUN([AC_LIBTOOL_GCJ], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_GCJ' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(Java)])
+m4trace:/usr/share/aclocal/libtool.m4:897: -1- AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
+m4trace:/usr/share/aclocal/libtool.m4:897: -1- AC_DEFUN([AC_LIBTOOL_RC], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_RC' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(Windows Resource)])
+m4trace:/usr/share/aclocal/libtool.m4:1225: -1- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[  --with-sysroot[=DIR] Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted.  We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+   if test "$GCC" = yes; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   AC_MSG_RESULT([${with_sysroot}])
+   AC_MSG_ERROR([The sysroot must be an absolute path.])
+   ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and in which our libraries should be installed.])])
+m4trace:/usr/share/aclocal/libtool.m4:1508: -1- AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+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"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$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:$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 "$_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
+     fi
+   fi
+   $RM conftest*
+])
+
+if test x"[$]$2" = xyes; then
+    m4_if([$5], , :, [$5])
+else
+    m4_if([$6], , :, [$6])
+fi
+])
+m4trace:/usr/share/aclocal/libtool.m4:1550: -1- AU_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:1550: -1- AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:1559: -1- AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $3"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&AS_MESSAGE_LOG_FD
+       $ECHO "$_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
+       fi
+     else
+       $2=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+    m4_if([$4], , :, [$4])
+else
+    m4_if([$5], , :, [$5])
+fi
+])
+m4trace:/usr/share/aclocal/libtool.m4:1594: -1- AU_DEFUN([AC_LIBTOOL_LINKER_OPTION], [m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:1594: -1- AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_LINKER_OPTION' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:1601: -1- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+  i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw* | cegcc*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  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*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  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
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      # 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
+        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"`env echo "$teststring$teststring" 2>/dev/null` \
+	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on
+      # massive amounts of additional arguments before passing them to the
+      # linker.  It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+  AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+    [What is the maximum length of a command?])
+])
+m4trace:/usr/share/aclocal/libtool.m4:1739: -1- AU_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:1739: -1- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_SYS_MAX_CMD_LEN' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:1850: -1- AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32* | 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
+    AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ])
+    ;;
+
+  *)
+    AC_CHECK_FUNC([shl_load],
+	  [lt_cv_dlopen="shl_load"],
+      [AC_CHECK_LIB([dld], [shl_load],
+	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+	[AC_CHECK_FUNC([dlopen],
+	      [lt_cv_dlopen="dlopen"],
+	  [AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+	    [AC_CHECK_LIB([svld], [dlopen],
+		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+	      [AC_CHECK_LIB([dld], [dld_link],
+		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+	      ])
+	    ])
+	  ])
+	])
+      ])
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    AC_CACHE_CHECK([whether a program can dlopen itself],
+	  lt_cv_dlopen_self, [dnl
+	  _LT_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+    ])
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+	  lt_cv_dlopen_self_static, [dnl
+	  _LT_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+      ])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+	 [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+	 [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+	 [Whether dlopen of statically linked programs is supported])
+])
+m4trace:/usr/share/aclocal/libtool.m4:1967: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:1967: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN_SELF' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:2940: -1- 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_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"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  AC_MSG_RESULT($MAGIC_CMD)
+else
+  AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])
+m4trace:/usr/share/aclocal/libtool.m4:3002: -1- AU_DEFUN([AC_PATH_TOOL_PREFIX], [m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3002: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_DIAGNOSE([obsolete], [The macro `AC_PATH_TOOL_PREFIX' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3025: -1- AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl
+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],
+    [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by $CC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])
+m4trace:/usr/share/aclocal/libtool.m4:3114: -1- AU_DEFUN([AM_PROG_LD], [m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3114: -1- AC_DEFUN([AM_PROG_LD], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_LD' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3115: -1- AU_DEFUN([AC_PROG_LD], [m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3115: -1- AC_DEFUN([AC_PROG_LD], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_LD' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3409: -1- AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl
+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"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  if test -n "$DUMPBIN"; then :
+    # Let the user override the test.
+  else
+    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
+  AC_SUBST([DUMPBIN])
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_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:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&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:$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"
+  fi
+  rm -f conftest*])
+])
+m4trace:/usr/share/aclocal/libtool.m4:3499: -1- AU_DEFUN([AM_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3499: -1- AC_DEFUN([AM_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_NM' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3500: -1- AU_DEFUN([AC_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3500: -1- AC_DEFUN([AC_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_NM' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3570: -1- AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-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(m, cos, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  ;;
+esac
+AC_SUBST([LIBM])
+])
+m4trace:/usr/share/aclocal/libtool.m4:3589: -1- AU_DEFUN([AC_CHECK_LIBM], [m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3589: -1- AC_DEFUN([AC_CHECK_LIBM], [AC_DIAGNOSE([obsolete], [The macro `AC_CHECK_LIBM' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:7632: -1- 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"
+      AC_SUBST(GCJFLAGS)])])[]dnl
+])
+m4trace:/usr/share/aclocal/libtool.m4:7641: -1- AU_DEFUN([LT_AC_PROG_GCJ], [m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:7641: -1- AC_DEFUN([LT_AC_PROG_GCJ], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_GCJ' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:7648: -1- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,)
+])
+m4trace:/usr/share/aclocal/libtool.m4:7655: -1- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,)
+])
+m4trace:/usr/share/aclocal/libtool.m4:7660: -1- AU_DEFUN([LT_AC_PROG_RC], [m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:7660: -1- AC_DEFUN([LT_AC_PROG_RC], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_RC' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:7780: -1- AU_DEFUN([LT_AC_PROG_SED], [m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:7780: -1- AC_DEFUN([LT_AC_PROG_SED], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_SED' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])])
+m4trace:/usr/share/aclocal/ltdl.m4:16: -1- AC_DEFUN([LT_CONFIG_LTDL_DIR], [AC_BEFORE([$0], [LTDL_INIT])
+_$0($*)
+])
+m4trace:/usr/share/aclocal/ltdl.m4:68: -1- AC_DEFUN([LTDL_CONVENIENCE], [AC_BEFORE([$0], [LTDL_INIT])dnl
+dnl Although the argument is deprecated and no longer documented,
+dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
+dnl here make sure it is the same as any other declaration of libltdl's
+dnl location!  This also ensures lt_ltdl_dir is set when configure.ac is
+dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
+m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
+_$0()
+])
+m4trace:/usr/share/aclocal/ltdl.m4:81: -1- AU_DEFUN([AC_LIBLTDL_CONVENIENCE], [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
+_LTDL_CONVENIENCE])
+m4trace:/usr/share/aclocal/ltdl.m4:81: -1- AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBLTDL_CONVENIENCE' is obsolete.
+You should run autoupdate.])dnl
+_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
+_LTDL_CONVENIENCE])
+m4trace:/usr/share/aclocal/ltdl.m4:124: -1- AC_DEFUN([LTDL_INSTALLABLE], [AC_BEFORE([$0], [LTDL_INIT])dnl
+dnl Although the argument is deprecated and no longer documented,
+dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
+dnl here make sure it is the same as any other declaration of libltdl's
+dnl location!  This also ensures lt_ltdl_dir is set when configure.ac is
+dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
+m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
+_$0()
+])
+m4trace:/usr/share/aclocal/ltdl.m4:137: -1- AU_DEFUN([AC_LIBLTDL_INSTALLABLE], [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
+_LTDL_INSTALLABLE])
+m4trace:/usr/share/aclocal/ltdl.m4:137: -1- AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBLTDL_INSTALLABLE' is obsolete.
+You should run autoupdate.])dnl
+_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
+_LTDL_INSTALLABLE])
+m4trace:/usr/share/aclocal/ltdl.m4:213: -1- AC_DEFUN([_LT_LIBOBJ], [
+  m4_pattern_allow([^_LT_LIBOBJS$])
+  _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
+])
+m4trace:/usr/share/aclocal/ltdl.m4:226: -1- AC_DEFUN([LTDL_INIT], [dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+dnl We need to keep our own list of libobjs separate from our parent project,
+dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
+dnl we look for our own LIBOBJs.
+m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
+m4_pushdef([AC_LIBSOURCES])
+
+dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
+m4_if(_LTDL_MODE, [],
+        [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
+        m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
+                [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
+
+AC_ARG_WITH([included_ltdl],
+    [AS_HELP_STRING([--with-included-ltdl],
+                    [use the GNU ltdl sources included here])])
+
+if test "x$with_included_ltdl" != xyes; then
+  # We are not being forced to use the included libltdl sources, so
+  # decide whether there is a useful installed version we can use.
+  AC_CHECK_HEADER([ltdl.h],
+      [AC_CHECK_DECL([lt_dlinterface_register],
+	   [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
+	       [with_included_ltdl=no],
+	       [with_included_ltdl=yes])],
+	   [with_included_ltdl=yes],
+	   [AC_INCLUDES_DEFAULT
+	    #include <ltdl.h>])],
+      [with_included_ltdl=yes],
+      [AC_INCLUDES_DEFAULT]
+  )
+fi
+
+dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
+dnl was called yet, then for old times' sake, we assume libltdl is in an
+dnl eponymous directory:
+AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
+
+AC_ARG_WITH([ltdl_include],
+    [AS_HELP_STRING([--with-ltdl-include=DIR],
+                    [use the ltdl headers installed in DIR])])
+
+if test -n "$with_ltdl_include"; then
+  if test -f "$with_ltdl_include/ltdl.h"; then :
+  else
+    AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
+  fi
+else
+  with_ltdl_include=no
+fi
+
+AC_ARG_WITH([ltdl_lib],
+    [AS_HELP_STRING([--with-ltdl-lib=DIR],
+                    [use the libltdl.la installed in DIR])])
+
+if test -n "$with_ltdl_lib"; then
+  if test -f "$with_ltdl_lib/libltdl.la"; then :
+  else
+    AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
+  fi
+else
+  with_ltdl_lib=no
+fi
+
+case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
+  ,yes,no,no,)
+	m4_case(m4_default(_LTDL_TYPE, [convenience]),
+	    [convenience], [_LTDL_CONVENIENCE],
+	    [installable], [_LTDL_INSTALLABLE],
+	  [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
+	;;
+  ,no,no,no,)
+	# If the included ltdl is not to be used, then use the
+	# preinstalled libltdl we found.
+	AC_DEFINE([HAVE_LTDL], [1],
+	  [Define this if a modern libltdl is already installed])
+	LIBLTDL=-lltdl
+	LTDLDEPS=
+	LTDLINCL=
+	;;
+  ,no*,no,*)
+	AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
+	;;
+  *)	with_included_ltdl=no
+	LIBLTDL="-L$with_ltdl_lib -lltdl"
+	LTDLDEPS=
+	LTDLINCL="-I$with_ltdl_include"
+	;;
+esac
+INCLTDL="$LTDLINCL"
+
+# Report our decision...
+AC_MSG_CHECKING([where to find libltdl headers])
+AC_MSG_RESULT([$LTDLINCL])
+AC_MSG_CHECKING([where to find libltdl library])
+AC_MSG_RESULT([$LIBLTDL])
+
+_LTDL_SETUP
+
+dnl restore autoconf definition.
+m4_popdef([AC_LIBOBJ])
+m4_popdef([AC_LIBSOURCES])
+
+AC_CONFIG_COMMANDS_PRE([
+    _ltdl_libobjs=
+    _ltdl_ltlibobjs=
+    if test -n "$_LT_LIBOBJS"; then
+      # Remove the extension.
+      _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
+      for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
+        _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
+        _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
+      done
+    fi
+    AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
+    AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
+])
+
+# Only expand once:
+m4_define([LTDL_INIT])
+])
+m4trace:/usr/share/aclocal/ltdl.m4:352: -1- AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
+m4trace:/usr/share/aclocal/ltdl.m4:352: -1- AC_DEFUN([AC_LIB_LTDL], [AC_DIAGNOSE([obsolete], [The macro `AC_LIB_LTDL' is obsolete.
+You should run autoupdate.])dnl
+LTDL_INIT($@)])
+m4trace:/usr/share/aclocal/ltdl.m4:353: -1- AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
+m4trace:/usr/share/aclocal/ltdl.m4:353: -1- AC_DEFUN([AC_WITH_LTDL], [AC_DIAGNOSE([obsolete], [The macro `AC_WITH_LTDL' is obsolete.
+You should run autoupdate.])dnl
+LTDL_INIT($@)])
+m4trace:/usr/share/aclocal/ltdl.m4:354: -1- AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
+m4trace:/usr/share/aclocal/ltdl.m4:354: -1- AC_DEFUN([LT_WITH_LTDL], [AC_DIAGNOSE([obsolete], [The macro `LT_WITH_LTDL' is obsolete.
+You should run autoupdate.])dnl
+LTDL_INIT($@)])
+m4trace:/usr/share/aclocal/ltdl.m4:367: -1- AC_DEFUN([_LTDL_SETUP], [AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
+AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
+AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
+AC_REQUIRE([LT_LIB_DLLOAD])dnl
+AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
+AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
+AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
+AC_REQUIRE([gl_FUNC_ARGZ])dnl
+
+m4_require([_LT_CHECK_OBJDIR])dnl
+m4_require([_LT_HEADER_DLFCN])dnl
+m4_require([_LT_CHECK_DLPREOPEN])dnl
+m4_require([_LT_DECL_SED])dnl
+
+dnl Don't require this, or it will be expanded earlier than the code
+dnl that sets the variables it relies on:
+_LT_ENABLE_INSTALL
+
+dnl _LTDL_MODE specific code must be called at least once:
+_LTDL_MODE_DISPATCH
+
+# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
+# the user used.  This is so that ltdl.h can pick up the parent projects
+# config.h file, The first file in AC_CONFIG_HEADERS must contain the
+# definitions required by ltdl.c.
+# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
+AC_CONFIG_COMMANDS_PRE([dnl
+m4_pattern_allow([^LT_CONFIG_H$])dnl
+m4_ifset([AH_HEADER],
+    [LT_CONFIG_H=AH_HEADER],
+    [m4_ifset([AC_LIST_HEADERS],
+	    [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[      ]]*,,;s,[[ :]].*$,,'`],
+	[])])])
+AC_SUBST([LT_CONFIG_H])
+
+AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
+	[], [], [AC_INCLUDES_DEFAULT])
+
+AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
+AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
+
+m4_pattern_allow([LT_LIBEXT])dnl
+AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
+
+name=
+eval "lt_libprefix=\"$libname_spec\""
+m4_pattern_allow([LT_LIBPREFIX])dnl
+AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix])
+
+name=ltdl
+eval "LTDLOPEN=\"$libname_spec\""
+AC_SUBST([LTDLOPEN])
+])
+m4trace:/usr/share/aclocal/ltdl.m4:443: -1- AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
+  [lt_cv_sys_dlopen_deplibs],
+  [# PORTME does your system automatically load deplibs for dlopen?
+  # or its logical equivalent (e.g. shl_load for HP-UX < 11)
+  # For now, we just catch OSes we know something about -- in the
+  # future, we'll try test this programmatically.
+  lt_cv_sys_dlopen_deplibs=unknown
+  case $host_os in
+  aix3*|aix4.1.*|aix4.2.*)
+    # Unknown whether this is true for these versions of AIX, but
+    # we want this `case' here to explicitly catch those versions.
+    lt_cv_sys_dlopen_deplibs=unknown
+    ;;
+  aix[[4-9]]*)
+    lt_cv_sys_dlopen_deplibs=yes
+    ;;
+  amigaos*)
+    case $host_cpu in
+    powerpc)
+      lt_cv_sys_dlopen_deplibs=no
+      ;;
+    esac
+    ;;
+  darwin*)
+    # Assuming the user has installed a libdl from somewhere, this is true
+    # If you are looking for one http://www.opendarwin.org/projects/dlcompat
+    lt_cv_sys_dlopen_deplibs=yes
+    ;;
+  freebsd* | dragonfly*)
+    lt_cv_sys_dlopen_deplibs=yes
+    ;;
+  gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
+    # GNU and its variants, using gnu ld.so (Glibc)
+    lt_cv_sys_dlopen_deplibs=yes
+    ;;
+  hpux10*|hpux11*)
+    lt_cv_sys_dlopen_deplibs=yes
+    ;;
+  interix*)
+    lt_cv_sys_dlopen_deplibs=yes
+    ;;
+  irix[[12345]]*|irix6.[[01]]*)
+    # Catch all versions of IRIX before 6.2, and indicate that we don't
+    # know how it worked for any of those versions.
+    lt_cv_sys_dlopen_deplibs=unknown
+    ;;
+  irix*)
+    # The case above catches anything before 6.2, and it's known that
+    # at 6.2 and later dlopen does load deplibs.
+    lt_cv_sys_dlopen_deplibs=yes
+    ;;
+  netbsd*)
+    lt_cv_sys_dlopen_deplibs=yes
+    ;;
+  openbsd*)
+    lt_cv_sys_dlopen_deplibs=yes
+    ;;
+  osf[[1234]]*)
+    # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
+    # it did *not* use an RPATH in a shared library to find objects the
+    # library depends on, so we explicitly say `no'.
+    lt_cv_sys_dlopen_deplibs=no
+    ;;
+  osf5.0|osf5.0a|osf5.1)
+    # dlopen *does* load deplibs and with the right loader patch applied
+    # it even uses RPATH in a shared library to search for shared objects
+    # that the library depends on, but there's no easy way to know if that
+    # patch is installed.  Since this is the case, all we can really
+    # say is unknown -- it depends on the patch being installed.  If
+    # it is, this changes to `yes'.  Without it, it would be `no'.
+    lt_cv_sys_dlopen_deplibs=unknown
+    ;;
+  osf*)
+    # the two cases above should catch all versions of osf <= 5.1.  Read
+    # the comments above for what we know about them.
+    # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
+    # is used to find them so we can finally say `yes'.
+    lt_cv_sys_dlopen_deplibs=yes
+    ;;
+  qnx*)
+    lt_cv_sys_dlopen_deplibs=yes
+    ;;
+  solaris*)
+    lt_cv_sys_dlopen_deplibs=yes
+    ;;
+  sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+    libltdl_cv_sys_dlopen_deplibs=yes
+    ;;
+  esac
+  ])
+if test "$lt_cv_sys_dlopen_deplibs" != yes; then
+ AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
+    [Define if the OS needs help to load dependent libraries for dlopen().])
+fi
+])
+m4trace:/usr/share/aclocal/ltdl.m4:542: -1- AU_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [m4_if($#, 0, [LT_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS($@)])])
+m4trace:/usr/share/aclocal/ltdl.m4:542: -1- AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SYS_DLOPEN_DEPLIBS' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS($@)])])
+m4trace:/usr/share/aclocal/ltdl.m4:549: -1- AC_DEFUN([LT_SYS_MODULE_EXT], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
+AC_CACHE_CHECK([which extension is used for runtime loadable modules],
+  [libltdl_cv_shlibext],
+[
+module=yes
+eval libltdl_cv_shlibext=$shrext_cmds
+module=no
+eval libltdl_cv_shrext=$shrext_cmds
+  ])
+if test -n "$libltdl_cv_shlibext"; then
+  m4_pattern_allow([LT_MODULE_EXT])dnl
+  AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
+    [Define to the extension used for runtime loadable modules, say, ".so".])
+fi
+if test "$libltdl_cv_shrext" != "$libltdl_cv_shlibext"; then
+  m4_pattern_allow([LT_SHARED_EXT])dnl
+  AC_DEFINE_UNQUOTED([LT_SHARED_EXT], ["$libltdl_cv_shrext"],
+    [Define to the shared library suffix, say, ".dylib".])
+fi
+])
+m4trace:/usr/share/aclocal/ltdl.m4:572: -1- AU_DEFUN([AC_LTDL_SHLIBEXT], [m4_if($#, 0, [LT_SYS_MODULE_EXT], [LT_SYS_MODULE_EXT($@)])])
+m4trace:/usr/share/aclocal/ltdl.m4:572: -1- AC_DEFUN([AC_LTDL_SHLIBEXT], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SHLIBEXT' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_SYS_MODULE_EXT], [LT_SYS_MODULE_EXT($@)])])
+m4trace:/usr/share/aclocal/ltdl.m4:579: -1- AC_DEFUN([LT_SYS_MODULE_PATH], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
+AC_CACHE_CHECK([which variable specifies run-time module search path],
+  [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
+if test -n "$lt_cv_module_path_var"; then
+  m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
+  AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
+    [Define to the name of the environment variable that determines the run-time module search path.])
+fi
+])
+m4trace:/usr/share/aclocal/ltdl.m4:591: -1- AU_DEFUN([AC_LTDL_SHLIBPATH], [m4_if($#, 0, [LT_SYS_MODULE_PATH], [LT_SYS_MODULE_PATH($@)])])
+m4trace:/usr/share/aclocal/ltdl.m4:591: -1- AC_DEFUN([AC_LTDL_SHLIBPATH], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SHLIBPATH' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_SYS_MODULE_PATH], [LT_SYS_MODULE_PATH($@)])])
+m4trace:/usr/share/aclocal/ltdl.m4:598: -1- AC_DEFUN([LT_SYS_DLSEARCH_PATH], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
+AC_CACHE_CHECK([for the default library search path],
+  [lt_cv_sys_dlsearch_path],
+  [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
+if test -n "$lt_cv_sys_dlsearch_path"; then
+  sys_dlsearch_path=
+  for dir in $lt_cv_sys_dlsearch_path; do
+    if test -z "$sys_dlsearch_path"; then
+      sys_dlsearch_path="$dir"
+    else
+      sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
+    fi
+  done
+  m4_pattern_allow([LT_DLSEARCH_PATH])dnl
+  AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
+    [Define to the system default library search path.])
+fi
+])
+m4trace:/usr/share/aclocal/ltdl.m4:619: -1- AU_DEFUN([AC_LTDL_SYSSEARCHPATH], [m4_if($#, 0, [LT_SYS_DLSEARCH_PATH], [LT_SYS_DLSEARCH_PATH($@)])])
+m4trace:/usr/share/aclocal/ltdl.m4:619: -1- AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SYSSEARCHPATH' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_SYS_DLSEARCH_PATH], [LT_SYS_DLSEARCH_PATH($@)])])
+m4trace:/usr/share/aclocal/ltdl.m4:645: -1- AC_DEFUN([LT_LIB_DLLOAD], [m4_pattern_allow([^LT_DLLOADERS$])
+LT_DLLOADERS=
+AC_SUBST([LT_DLLOADERS])
+
+AC_LANG_PUSH([C])
+
+LIBADD_DLOPEN=
+AC_SEARCH_LIBS([dlopen], [dl],
+	[AC_DEFINE([HAVE_LIBDL], [1],
+		   [Define if you have the libdl library or equivalent.])
+	if test "$ac_cv_search_dlopen" != "none required" ; then
+	  LIBADD_DLOPEN="-ldl"
+	fi
+	libltdl_cv_lib_dl_dlopen="yes"
+	LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
+    [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
+#  include <dlfcn.h>
+#endif
+    ]], [[dlopen(0, 0);]])],
+	    [AC_DEFINE([HAVE_LIBDL], [1],
+		       [Define if you have the libdl library or equivalent.])
+	    libltdl_cv_func_dlopen="yes"
+	    LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
+	[AC_CHECK_LIB([svld], [dlopen],
+		[AC_DEFINE([HAVE_LIBDL], [1],
+			 [Define if you have the libdl library or equivalent.])
+	        LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
+		LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
+if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
+then
+  lt_save_LIBS="$LIBS"
+  LIBS="$LIBS $LIBADD_DLOPEN"
+  AC_CHECK_FUNCS([dlerror])
+  LIBS="$lt_save_LIBS"
+fi
+AC_SUBST([LIBADD_DLOPEN])
+
+LIBADD_SHL_LOAD=
+AC_CHECK_FUNC([shl_load],
+	[AC_DEFINE([HAVE_SHL_LOAD], [1],
+		   [Define if you have the shl_load function.])
+	LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
+    [AC_CHECK_LIB([dld], [shl_load],
+	    [AC_DEFINE([HAVE_SHL_LOAD], [1],
+		       [Define if you have the shl_load function.])
+	    LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
+	    LIBADD_SHL_LOAD="-ldld"])])
+AC_SUBST([LIBADD_SHL_LOAD])
+
+case $host_os in
+darwin[[1567]].*)
+# We only want this for pre-Mac OS X 10.4.
+  AC_CHECK_FUNC([_dyld_func_lookup],
+	[AC_DEFINE([HAVE_DYLD], [1],
+		   [Define if you have the _dyld_func_lookup function.])
+	LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
+  ;;
+beos*)
+  LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
+  ;;
+cygwin* | mingw* | os2* | pw32*)
+  AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
+  LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
+  ;;
+esac
+
+AC_CHECK_LIB([dld], [dld_link],
+	[AC_DEFINE([HAVE_DLD], [1],
+		   [Define if you have the GNU dld library.])
+		LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
+AC_SUBST([LIBADD_DLD_LINK])
+
+m4_pattern_allow([^LT_DLPREOPEN$])
+LT_DLPREOPEN=
+if test -n "$LT_DLLOADERS"
+then
+  for lt_loader in $LT_DLLOADERS; do
+    LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
+  done
+  AC_DEFINE([HAVE_LIBDLLOADER], [1],
+            [Define if libdlloader will be built on this platform])
+fi
+AC_SUBST([LT_DLPREOPEN])
+
+dnl This isn't used anymore, but set it for backwards compatibility
+LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
+AC_SUBST([LIBADD_DL])
+
+AC_LANG_POP
+])
+m4trace:/usr/share/aclocal/ltdl.m4:738: -1- AU_DEFUN([AC_LTDL_DLLIB], [m4_if($#, 0, [LT_LIB_DLLOAD], [LT_LIB_DLLOAD($@)])])
+m4trace:/usr/share/aclocal/ltdl.m4:738: -1- AC_DEFUN([AC_LTDL_DLLIB], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_DLLIB' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_LIB_DLLOAD], [LT_LIB_DLLOAD($@)])])
+m4trace:/usr/share/aclocal/ltdl.m4:746: -1- AC_DEFUN([LT_SYS_SYMBOL_USCORE], [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+AC_CACHE_CHECK([for _ prefix in compiled symbols],
+  [lt_cv_sys_symbol_underscore],
+  [lt_cv_sys_symbol_underscore=no
+  cat > conftest.$ac_ext <<_LT_EOF
+void nm_test_func(){}
+int main(){nm_test_func;return 0;}
+_LT_EOF
+  if AC_TRY_EVAL(ac_compile); then
+    # Now try to grab the symbols.
+    ac_nlist=conftest.nm
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
+      # See whether the symbols have a leading underscore.
+      if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
+        lt_cv_sys_symbol_underscore=yes
+      else
+        if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
+	  :
+        else
+	  echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
+        fi
+      fi
+    else
+      echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+    fi
+  else
+    echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
+    cat conftest.c >&AS_MESSAGE_LOG_FD
+  fi
+  rm -rf conftest*
+  ])
+  sys_symbol_underscore=$lt_cv_sys_symbol_underscore
+  AC_SUBST([sys_symbol_underscore])
+])
+m4trace:/usr/share/aclocal/ltdl.m4:783: -1- AU_DEFUN([AC_LTDL_SYMBOL_USCORE], [m4_if($#, 0, [LT_SYS_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE($@)])])
+m4trace:/usr/share/aclocal/ltdl.m4:783: -1- AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SYMBOL_USCORE' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_SYS_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE($@)])])
+m4trace:/usr/share/aclocal/ltdl.m4:790: -1- AC_DEFUN([LT_FUNC_DLSYM_USCORE], [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
+if test x"$lt_cv_sys_symbol_underscore" = xyes; then
+  if test x"$libltdl_cv_func_dlopen" = xyes ||
+     test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
+	AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
+	  [libltdl_cv_need_uscore],
+	  [libltdl_cv_need_uscore=unknown
+          save_LIBS="$LIBS"
+          LIBS="$LIBS $LIBADD_DLOPEN"
+	  _LT_TRY_DLOPEN_SELF(
+	    [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
+	    [],				 [libltdl_cv_need_uscore=cross])
+	  LIBS="$save_LIBS"
+	])
+  fi
+fi
+
+if test x"$libltdl_cv_need_uscore" = xyes; then
+  AC_DEFINE([NEED_USCORE], [1],
+    [Define if dlsym() requires a leading underscore in symbol names.])
+fi
+])
+m4trace:/usr/share/aclocal/ltdl.m4:815: -1- AU_DEFUN([AC_LTDL_DLSYM_USCORE], [m4_if($#, 0, [LT_FUNC_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE($@)])])
+m4trace:/usr/share/aclocal/ltdl.m4:815: -1- AC_DEFUN([AC_LTDL_DLSYM_USCORE], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_DLSYM_USCORE' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_FUNC_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE($@)])])
+m4trace:/usr/share/aclocal/ltoptions.m4:14: -1- AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+m4trace:/usr/share/aclocal/ltoptions.m4:111: -1- 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.])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:111: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN' is obsolete.
+You should run autoupdate.])dnl
+_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.])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:146: -1- AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_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.])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:146: -1- AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
+You should run autoupdate.])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_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.])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:195: -1- AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:199: -1- AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:203: -1- AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+m4trace:/usr/share/aclocal/ltoptions.m4:203: -1- AC_DEFUN([AM_ENABLE_SHARED], [AC_DIAGNOSE([obsolete], [The macro `AM_ENABLE_SHARED' is obsolete.
+You should run autoupdate.])dnl
+AC_ENABLE_SHARED($@)])
+m4trace:/usr/share/aclocal/ltoptions.m4:204: -1- AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+m4trace:/usr/share/aclocal/ltoptions.m4:204: -1- AC_DEFUN([AM_DISABLE_SHARED], [AC_DIAGNOSE([obsolete], [The macro `AM_DISABLE_SHARED' is obsolete.
+You should run autoupdate.])dnl
+AC_DISABLE_SHARED($@)])
+m4trace:/usr/share/aclocal/ltoptions.m4:249: -1- AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:253: -1- AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:257: -1- AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+m4trace:/usr/share/aclocal/ltoptions.m4:257: -1- AC_DEFUN([AM_ENABLE_STATIC], [AC_DIAGNOSE([obsolete], [The macro `AM_ENABLE_STATIC' is obsolete.
+You should run autoupdate.])dnl
+AC_ENABLE_STATIC($@)])
+m4trace:/usr/share/aclocal/ltoptions.m4:258: -1- AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+m4trace:/usr/share/aclocal/ltoptions.m4:258: -1- AC_DEFUN([AM_DISABLE_STATIC], [AC_DIAGNOSE([obsolete], [The macro `AM_DISABLE_STATIC' is obsolete.
+You should run autoupdate.])dnl
+AC_DISABLE_STATIC($@)])
+m4trace:/usr/share/aclocal/ltoptions.m4:303: -1- 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.])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:303: -1- AC_DEFUN([AC_ENABLE_FAST_INSTALL], [AC_DIAGNOSE([obsolete], [The macro `AC_ENABLE_FAST_INSTALL' is obsolete.
+You should run autoupdate.])dnl
+_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.])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:310: -1- 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.])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:310: -1- AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_DIAGNOSE([obsolete], [The macro `AC_DISABLE_FAST_INSTALL' is obsolete.
+You should run autoupdate.])dnl
+_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.])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:358: -1- 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.])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:358: -1- AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_PICMODE' is obsolete.
+You should run autoupdate.])dnl
+_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.])
+])
+m4trace:/usr/share/aclocal/ltsugar.m4:13: -1- AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+m4trace:/usr/share/aclocal/ltversion.m4:18: -1- AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2'
+macro_revision='1.3337'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:36: -1- AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:40: -1- AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:41: -1- AC_DEFUN([_LT_AC_SHELL_INIT])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:42: -1- AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:44: -1- AC_DEFUN([_LT_AC_TAGVAR])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:45: -1- AC_DEFUN([AC_LTDL_ENABLE_INSTALL])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:46: -1- AC_DEFUN([AC_LTDL_PREOPEN])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:47: -1- AC_DEFUN([_LT_AC_SYS_COMPILER])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:48: -1- AC_DEFUN([_LT_AC_LOCK])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:49: -1- AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:50: -1- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:51: -1- AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:52: -1- AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:53: -1- AC_DEFUN([AC_LIBTOOL_OBJDIR])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:54: -1- AC_DEFUN([AC_LTDL_OBJDIR])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:55: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:56: -1- AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:57: -1- AC_DEFUN([AC_PATH_MAGIC])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:58: -1- AC_DEFUN([AC_PROG_LD_GNU])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:59: -1- AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:60: -1- AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:61: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:62: -1- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:63: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:64: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:65: -1- AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:66: -1- AC_DEFUN([LT_AC_PROG_EGREP])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:71: -1- AC_DEFUN([_AC_PROG_LIBTOOL])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:72: -1- AC_DEFUN([AC_LIBTOOL_SETUP])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:73: -1- AC_DEFUN([_LT_AC_CHECK_DLFCN])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:74: -1- AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:75: -1- AC_DEFUN([_LT_AC_TAGCONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:77: -1- AC_DEFUN([_LT_AC_LANG_CXX])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:78: -1- AC_DEFUN([_LT_AC_LANG_F77])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:79: -1- AC_DEFUN([_LT_AC_LANG_GCJ])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:80: -1- AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:81: -1- AC_DEFUN([_LT_AC_LANG_C_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:82: -1- AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:83: -1- AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:84: -1- AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:85: -1- AC_DEFUN([_LT_AC_LANG_F77_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:86: -1- AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:87: -1- AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:88: -1- AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:89: -1- AC_DEFUN([_LT_AC_LANG_RC_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:90: -1- AC_DEFUN([AC_LIBTOOL_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:91: -1- AC_DEFUN([_LT_AC_FILE_LTDLL_C])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:93: -1- AC_DEFUN([_LT_AC_PROG_CXXCPP])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:96: -1- AC_DEFUN([_LT_PROG_F77])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:97: -1- AC_DEFUN([_LT_PROG_FC])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:98: -1- AC_DEFUN([_LT_PROG_CXX])
+m4trace:/usr/share/aclocal/pkg.m4:27: -1- 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
+])
+m4trace:/usr/share/aclocal/pkg.m4:60: -1- 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])
+m4trace:/usr/share/aclocal/pkg.m4:86: -1- 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
+])
+m4trace:/usr/share/aclocal/pkg.m4:106: -1- 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
+])
+m4trace:/usr/share/aclocal/pkg.m4:169: -1- 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])
+])
+m4trace:/usr/share/aclocal/pkg.m4:189: -1- 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])
+])
+m4trace:/usr/share/aclocal/pkg.m4:206: -1- 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
+])
+m4trace:/usr/share/aclocal-1.13/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.13'
+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.13.4], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+m4trace:/usr/share/aclocal-1.13/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.13.4])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+m4trace:/usr/share/aclocal-1.13/auxdir.m4:47: -1- 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`
+])
+m4trace:/usr/share/aclocal-1.13/cond.m4:12: -1- AC_DEFUN([AM_CONDITIONAL], [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='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+m4trace:/usr/share/aclocal-1.13/depend.m4:26: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+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],
+[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_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  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
+    # 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_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+m4trace:/usr/share/aclocal-1.13/depend.m4:163: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+m4trace:/usr/share/aclocal-1.13/depend.m4:171: -1- AC_DEFUN([AM_DEP_TRACK], [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
+])
+m4trace:/usr/share/aclocal-1.13/depout.m4:12: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{
+  # 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
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named 'Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running 'make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "$am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # 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'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])
+m4trace:/usr/share/aclocal-1.13/depout.m4:71: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+m4trace:/usr/share/aclocal-1.13/init.m4:23: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [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
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[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], [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
+
+# 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])
+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.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+			     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+		  [_AM_DEPENDENCIES([CC])],
+		  [m4_define([AC_PROG_CC],
+			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+		  [_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])],
+		  [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
+])
+m4trace:/usr/share/aclocal-1.13/init.m4:136: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+m4trace:/usr/share/aclocal-1.13/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != 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])])
+m4trace:/usr/share/aclocal-1.13/lead-dot.m4:10: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+m4trace:/usr/share/aclocal-1.13/make.m4:12: -1- AC_DEFUN([AM_MAKE_INCLUDE], [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.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# 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_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+m4trace:/usr/share/aclocal-1.13/missing.m4:11: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+m4trace:/usr/share/aclocal-1.13/missing.m4:20: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+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=
+  AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+m4trace:/usr/share/aclocal-1.13/obsolete.m4:11: -1- AC_DEFUN([AM_CONFIG_HEADER], [AC_DIAGNOSE([obsolete],
+['$0': this macro is obsolete.
+You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl
+AC_CONFIG_HEADERS($@)])
+m4trace:/usr/share/aclocal-1.13/obsolete.m4:17: -1- AC_DEFUN([AM_PROG_CC_STDC], [AC_PROG_CC
+am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
+AC_DIAGNOSE([obsolete],
+['$0': this macro is obsolete.
+You should simply use the 'AC][_PROG_CC' macro instead.
+Also, your code should no longer depend upon 'am_cv_prog_cc_stdc',
+but upon 'ac_cv_prog_cc_stdc'.])])
+m4trace:/usr/share/aclocal-1.13/obsolete.m4:26: -1- AC_DEFUN([AM_C_PROTOTYPES], [AC_FATAL([automatic de-ANSI-fication support has been removed])])
+m4trace:/usr/share/aclocal-1.13/obsolete.m4:28: -1- AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES])
+m4trace:/usr/share/aclocal-1.13/obsolete.m4:28: -1- AC_DEFUN([fp_C_PROTOTYPES], [AC_DIAGNOSE([obsolete], [The macro `fp_C_PROTOTYPES' is obsolete.
+You should run autoupdate.])dnl
+AM_C_PROTOTYPES])
+m4trace:/usr/share/aclocal-1.13/options.m4:11: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+m4trace:/usr/share/aclocal-1.13/options.m4:17: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+m4trace:/usr/share/aclocal-1.13/options.m4:23: -1- AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+m4trace:/usr/share/aclocal-1.13/options.m4:29: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+m4trace:/usr/share/aclocal-1.13/runlog.m4:12: -1- 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); }])
+m4trace:/usr/share/aclocal-1.13/sanity.m4:11: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane])
+# 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 (
+   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
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+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
+])
+m4trace:/usr/share/aclocal-1.13/silent.m4:12: -1- 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
+])
+m4trace:/usr/share/aclocal-1.13/strip.m4:17: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip".  However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+m4trace:/usr/share/aclocal-1.13/substnot.m4:12: -1- AC_DEFUN([_AM_SUBST_NOTMAKE])
+m4trace:/usr/share/aclocal-1.13/substnot.m4:17: -1- AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+m4trace:/usr/share/aclocal-1.13/tar.m4:23: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# 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'
+
+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
+
+    # 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
+
+  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])
+])
+m4trace:configure.ac:11: -1- m4_pattern_forbid([^_?A[CHUM]_])
+m4trace:configure.ac:11: -1- m4_pattern_forbid([_AC_])
+m4trace:configure.ac:11: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^AS_FLAGS$])
+m4trace:configure.ac:11: -1- m4_pattern_forbid([^_?m4_])
+m4trace:configure.ac:11: -1- m4_pattern_forbid([^dnl$])
+m4trace:configure.ac:11: -1- m4_pattern_forbid([^_?AS_])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^SHELL$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PATH_SEPARATOR$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_NAME$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_VERSION$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_STRING$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_URL$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^exec_prefix$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^prefix$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^program_transform_name$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^bindir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^sbindir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^libexecdir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^datarootdir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^datadir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^sysconfdir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^sharedstatedir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^localstatedir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^includedir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^oldincludedir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^docdir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^infodir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^htmldir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^dvidir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^pdfdir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^psdir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^libdir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^localedir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^mandir$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_NAME$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_VERSION$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_STRING$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_URL$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^DEFS$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^ECHO_C$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^ECHO_N$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^ECHO_T$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^build_alias$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^host_alias$])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^target_alias$])
+m4trace:configure.ac:18: -1- _m4_warn([obsolete], [The macro `AC_CANONICAL_SYSTEM' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:1857: AC_CANONICAL_SYSTEM is expanded from...
+configure.ac:18: the top level])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^build$])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^build_cpu$])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^build_vendor$])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^build_os$])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^host$])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^host_cpu$])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^host_vendor$])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^host_os$])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^target$])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^target_cpu$])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^target_vendor$])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^target_os$])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CFLAGS$])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^LDFLAGS$])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^ac_ct_CC$])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^EXEEXT$])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^OBJEXT$])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^CFLAGS$])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^LDFLAGS$])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^ac_ct_CC$])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^CXX$])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^CXXFLAGS$])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^LDFLAGS$])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^CXX$])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^ac_ct_CXX$])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^CXXCPP$])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^CXXCPP$])
+m4trace:configure.ac:22: -1- m4_pattern_allow([^CXX$])
+m4trace:configure.ac:22: -1- m4_pattern_allow([^CXXFLAGS$])
+m4trace:configure.ac:22: -1- m4_pattern_allow([^LDFLAGS$])
+m4trace:configure.ac:22: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:22: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:22: -1- m4_pattern_allow([^CXX$])
+m4trace:configure.ac:22: -1- m4_pattern_allow([^ac_ct_CXX$])
+m4trace:configure.ac:23: -1- AC_LIBTOOL_WIN32_DLL
+m4trace:configure.ac:23: -1- _m4_warn([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
+You should run autoupdate.], [/usr/share/aclocal/ltoptions.m4:146: AC_LIBTOOL_WIN32_DLL is expanded from...
+configure.ac:23: the top level])
+m4trace:configure.ac:23: -1- m4_pattern_allow([^AS$])
+m4trace:configure.ac:23: -1- m4_pattern_allow([^DLLTOOL$])
+m4trace:configure.ac:23: -1- m4_pattern_allow([^OBJDUMP$])
+m4trace:configure.ac:23: -1- _m4_warn([obsolete], [AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.], [/usr/share/aclocal/ltoptions.m4:146: AC_LIBTOOL_WIN32_DLL is expanded from...
+configure.ac:23: the top level])
+m4trace:configure.ac:24: -1- AM_PROG_LIBTOOL
+m4trace:configure.ac:24: -1- _m4_warn([obsolete], [The macro `AM_PROG_LIBTOOL' is obsolete.
+You should run autoupdate.], [/usr/share/aclocal/libtool.m4:108: AM_PROG_LIBTOOL is expanded from...
+configure.ac:24: the top level])
+m4trace:configure.ac:24: -1- LT_INIT
+m4trace:configure.ac:24: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])
+m4trace:configure.ac:24: -1- LTOPTIONS_VERSION
+m4trace:configure.ac:24: -1- LTSUGAR_VERSION
+m4trace:configure.ac:24: -1- LTVERSION_VERSION
+m4trace:configure.ac:24: -1- LTOBSOLETE_VERSION
+m4trace:configure.ac:24: -1- _LT_PROG_LTMAIN
+m4trace:configure.ac:24: -1- m4_pattern_allow([^LIBTOOL$])
+m4trace:configure.ac:24: -1- _LT_PREPARE_SED_QUOTE_VARS
+m4trace:configure.ac:24: -1- _LT_PROG_ECHO_BACKSLASH
+m4trace:configure.ac:24: -1- LT_PATH_LD
+m4trace:configure.ac:24: -1- m4_pattern_allow([^SED$])
+m4trace:configure.ac:24: -1- AC_PROG_EGREP
+m4trace:configure.ac:24: -1- m4_pattern_allow([^GREP$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^EGREP$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^FGREP$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^GREP$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^LD$])
+m4trace:configure.ac:24: -1- LT_PATH_NM
+m4trace:configure.ac:24: -1- m4_pattern_allow([^DUMPBIN$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^ac_ct_DUMPBIN$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^DUMPBIN$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^NM$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^LN_S$])
+m4trace:configure.ac:24: -1- LT_CMD_MAX_LEN
+m4trace:configure.ac:24: -1- m4_pattern_allow([^OBJDUMP$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^OBJDUMP$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^DLLTOOL$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^DLLTOOL$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^AR$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^ac_ct_AR$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^STRIP$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^RANLIB$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^AWK$])
+m4trace:configure.ac:24: -1- _LT_WITH_SYSROOT
+m4trace:configure.ac:24: -1- m4_pattern_allow([LT_OBJDIR])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^LT_OBJDIR$])
+m4trace:configure.ac:24: -1- _LT_CC_BASENAME([$compiler])
+m4trace:configure.ac:24: -1- _LT_PATH_TOOL_PREFIX([${ac_tool_prefix}file], [/usr/bin$PATH_SEPARATOR$PATH])
+m4trace:configure.ac:24: -1- _LT_PATH_TOOL_PREFIX([file], [/usr/bin$PATH_SEPARATOR$PATH])
+m4trace:configure.ac:24: -1- LT_SUPPORTED_TAG([CC])
+m4trace:configure.ac:24: -1- _LT_COMPILER_BOILERPLATE
+m4trace:configure.ac:24: -1- _LT_LINKER_BOILERPLATE
+m4trace:configure.ac:24: -1- _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], [lt_cv_prog_compiler_rtti_exceptions], [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, )="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, ) -fno-rtti -fno-exceptions"])
+m4trace:configure.ac:24: -1- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, ) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, )], [$_LT_TAGVAR(lt_prog_compiler_pic, )@&t@m4_if([],[],[ -DPIC],[m4_if([],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, ) in
+     "" | " "*) ;;
+     *) _LT_TAGVAR(lt_prog_compiler_pic, )=" $_LT_TAGVAR(lt_prog_compiler_pic, )" ;;
+     esac], [_LT_TAGVAR(lt_prog_compiler_pic, )=
+     _LT_TAGVAR(lt_prog_compiler_can_build_shared, )=no])
+m4trace:configure.ac:24: -1- _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works], [$lt_tmp_static_flag], [], [_LT_TAGVAR(lt_prog_compiler_static, )=])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^MANIFEST_TOOL$])
+m4trace:configure.ac:24: -1- _LT_REQUIRED_DARWIN_CHECKS
+m4trace:configure.ac:24: -1- m4_pattern_allow([^DSYMUTIL$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^NMEDIT$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^LIPO$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^OTOOL$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^OTOOL64$])
+m4trace:configure.ac:24: -1- _LT_LINKER_OPTION([if $CC understands -b], [lt_cv_prog_compiler__b], [-b], [_LT_TAGVAR(archive_cmds, )='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, )='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])
+m4trace:configure.ac:24: -1- LT_SYS_DLOPEN_SELF
+m4trace:configure.ac:24: -1- m4_pattern_allow([^STDC_HEADERS$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^HAVE_DLFCN_H$])
+m4trace:configure.ac:24: -1- LT_LANG([CXX])
+m4trace:configure.ac:24: -1- LT_SUPPORTED_TAG([CXX])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^CXXCPP$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^CXXCPP$])
+m4trace:configure.ac:24: -1- _LT_COMPILER_BOILERPLATE
+m4trace:configure.ac:24: -1- _LT_LINKER_BOILERPLATE
+m4trace:configure.ac:24: -1- _LT_CC_BASENAME([$compiler])
+m4trace:configure.ac:24: -1- LT_PATH_LD
+m4trace:configure.ac:24: -1- m4_pattern_allow([^LD$])
+m4trace:configure.ac:24: -1- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, CXX) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, CXX)], [$_LT_TAGVAR(lt_prog_compiler_pic, CXX)@&t@m4_if([CXX],[],[ -DPIC],[m4_if([CXX],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, CXX) in
+     "" | " "*) ;;
+     *) _LT_TAGVAR(lt_prog_compiler_pic, CXX)=" $_LT_TAGVAR(lt_prog_compiler_pic, CXX)" ;;
+     esac], [_LT_TAGVAR(lt_prog_compiler_pic, CXX)=
+     _LT_TAGVAR(lt_prog_compiler_can_build_shared, CXX)=no])
+m4trace:configure.ac:24: -1- _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works_CXX], [$lt_tmp_static_flag], [], [_LT_TAGVAR(lt_prog_compiler_static, CXX)=])
+m4trace:configure.ac:25: -1- AM_INIT_AUTOMAKE([dist-shar dist-zip])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
+m4trace:configure.ac:25: -1- AM_SET_CURRENT_AUTOMAKE_VERSION
+m4trace:configure.ac:25: -1- AM_AUTOMAKE_VERSION([1.13.4])
+m4trace:configure.ac:25: -1- _AM_AUTOCONF_VERSION([2.69])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^INSTALL_DATA$])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__isrc$])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([am__isrc])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^CYGPATH_W$])
+m4trace:configure.ac:25: -1- _AM_SET_OPTIONS([dist-shar dist-zip])
+m4trace:configure.ac:25: -1- _AM_SET_OPTION([dist-shar])
+m4trace:configure.ac:25: -2- _AM_MANGLE_OPTION([dist-shar])
+m4trace:configure.ac:25: -1- _AM_SET_OPTION([dist-zip])
+m4trace:configure.ac:25: -2- _AM_MANGLE_OPTION([dist-zip])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^PACKAGE$])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^VERSION$])
+m4trace:configure.ac:25: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])
+m4trace:configure.ac:25: -2- _AM_MANGLE_OPTION([no-define])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^PACKAGE$])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^VERSION$])
+m4trace:configure.ac:25: -1- AM_SANITY_CHECK
+m4trace:configure.ac:25: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+m4trace:configure.ac:25: -1- AM_MISSING_HAS_RUN
+m4trace:configure.ac:25: -1- AM_AUX_DIR_EXPAND
+m4trace:configure.ac:25: -1- m4_pattern_allow([^ACLOCAL$])
+m4trace:configure.ac:25: -1- AM_MISSING_PROG([AUTOCONF], [autoconf])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AUTOCONF$])
+m4trace:configure.ac:25: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AUTOMAKE$])
+m4trace:configure.ac:25: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AUTOHEADER$])
+m4trace:configure.ac:25: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^MAKEINFO$])
+m4trace:configure.ac:25: -1- AM_PROG_INSTALL_SH
+m4trace:configure.ac:25: -1- m4_pattern_allow([^install_sh$])
+m4trace:configure.ac:25: -1- AM_PROG_INSTALL_STRIP
+m4trace:configure.ac:25: -1- m4_pattern_allow([^STRIP$])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^MKDIR_P$])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^mkdir_p$])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^SET_MAKE$])
+m4trace:configure.ac:25: -1- AM_SET_LEADING_DOT
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__leading_dot$])
+m4trace:configure.ac:25: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+			     [_AM_PROG_TAR([v7])])])
+m4trace:configure.ac:25: -2- _AM_MANGLE_OPTION([tar-ustar])
+m4trace:configure.ac:25: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])
+m4trace:configure.ac:25: -2- _AM_MANGLE_OPTION([tar-pax])
+m4trace:configure.ac:25: -1- _AM_PROG_TAR([v7])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AMTAR$])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__tar$])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__untar$])
+m4trace:configure.ac:25: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC],
+		  [_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])],
+		  [m4_define([AC_PROG_CXX],
+			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+		  [_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
+])
+m4trace:configure.ac:25: -2- _AM_MANGLE_OPTION([no-dependencies])
+m4trace:configure.ac:25: -1- _AM_DEPENDENCIES([CC])
+m4trace:configure.ac:25: -1- AM_SET_DEPDIR
+m4trace:configure.ac:25: -1- m4_pattern_allow([^DEPDIR$])
+m4trace:configure.ac:25: -1- AM_OUTPUT_DEPENDENCY_COMMANDS
+m4trace:configure.ac:25: -1- AM_MAKE_INCLUDE
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__include$])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__quote$])
+m4trace:configure.ac:25: -1- AM_DEP_TRACK
+m4trace:configure.ac:25: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AMDEP_TRUE$])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AMDEP_FALSE$])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AMDEPBACKSLASH$])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__nodep$])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([am__nodep])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^CCDEPMODE$])
+m4trace:configure.ac:25: -1- AM_CONDITIONAL([am__fastdepCC], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__fastdepCC_TRUE$])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__fastdepCC_FALSE$])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE])
+m4trace:configure.ac:25: -1- _AM_DEPENDENCIES([CXX])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^CXXDEPMODE$])
+m4trace:configure.ac:25: -1- AM_CONDITIONAL([am__fastdepCXX], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE])
+m4trace:configure.ac:25: -1- AM_SILENT_RULES
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AM_V$])
+m4trace:configure.ac:25: -1- AM_SUBST_NOTMAKE([AM_V])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([AM_V])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AM_DEFAULT_V$])
+m4trace:configure.ac:25: -1- AM_SUBST_NOTMAKE([AM_DEFAULT_V])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AM_BACKSLASH$])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH])
+m4trace:configure.ac:26: -1- AM_CONFIG_HEADER([ucommon-config.h])
+m4trace:configure.ac:26: -1- _m4_warn([obsolete], ['AM_CONFIG_HEADER': this macro is obsolete.
+You should use the 'AC_CONFIG_HEADERS' macro instead.], [/usr/share/aclocal-1.13/obsolete.m4:11: AM_CONFIG_HEADER is expanded from...
+configure.ac:26: the top level])
+m4trace:configure.ac:28: -1- m4_pattern_allow([^restrict$])
+m4trace:configure.ac:28: -1- m4_pattern_allow([^restrict$])
+m4trace:configure.ac:29: -1- m4_pattern_allow([^volatile$])
+m4trace:configure.ac:64: -1- AC_DEFUN([AC_SUBST_DIR], [
+        ifelse($2,,,$1="[$]$2")
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "[$]$1")`
+                $1=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""[$]$1"\"
+                )`
+                result=`(echo "[$]$1")`
+        done
+        AC_SUBST($1)
+])
+m4trace:configure.ac:106: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+configure.ac:106: the top level])
+m4trace:configure.ac:114: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+configure.ac:114: the top level])
+m4trace:configure.ac:129: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+configure.ac:129: the top level])
+m4trace:configure.ac:135: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+configure.ac:135: the top level])
+m4trace:configure.ac:142: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+configure.ac:142: the top level])
+m4trace:configure.ac:161: -1- m4_pattern_allow([^HAVE_REGEX_H$])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_INET_NTOP$])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_GETADDRINFO$])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_SOCKETPAIR$])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_SOCKETPAIR$])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_GETADDRINFO$])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_GETADDRINFO$])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_GETHOSTBYNAME2$])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_GETHOSTBYNAME2$])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_INET_NTOP$])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_INET_NTOP$])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_INET_NTOP$])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_SOCKETPAIR$])
+m4trace:configure.ac:219: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+configure.ac:219: the top level])
+m4trace:configure.ac:224: -1- m4_pattern_allow([^HAVE_SOCKS_H$])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^HAVE_SOCKS$])
+m4trace:configure.ac:241: -1- m4_pattern_allow([^HAVE_LSTAT$])
+m4trace:configure.ac:245: -1- m4_pattern_allow([^HAVE_STRCOLL$])
+m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_STRICMP$])
+m4trace:configure.ac:253: -1- m4_pattern_allow([^HAVE_STRISTR$])
+m4trace:configure.ac:257: -1- m4_pattern_allow([^HAVE_SYSCONF$])
+m4trace:configure.ac:261: -1- m4_pattern_allow([^HAVE_POSIX_MEMALIGN$])
+m4trace:configure.ac:265: -1- m4_pattern_allow([^HAVE_SHL_LOAD$])
+m4trace:configure.ac:280: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+../../lib/autoconf/general.m4:1462: AC_ARG_ENABLE is expanded from...
+configure.ac:280: the top level])
+m4trace:configure.ac:280: -1- m4_pattern_allow([^HAVE_GCC_ATOMICS$])
+m4trace:configure.ac:285: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+../../lib/autoconf/general.m4:1462: AC_ARG_ENABLE is expanded from...
+configure.ac:285: the top level])
+m4trace:configure.ac:291: -1- m4_pattern_allow([^HAVE_PTHREAD_CONDATTR_SETCLOCK$])
+m4trace:configure.ac:291: -1- m4_pattern_allow([^HAVE_PTHREAD_SETCONCURRENCY$])
+m4trace:configure.ac:291: -1- m4_pattern_allow([^HAVE_PTHREAD_YIELD$])
+m4trace:configure.ac:291: -1- m4_pattern_allow([^HAVE_PTHREAD_DELAY$])
+m4trace:configure.ac:291: -1- m4_pattern_allow([^HAVE_PTHREAD_DELAY_NP$])
+m4trace:configure.ac:291: -1- m4_pattern_allow([^HAVE_PTHREAD_SETSCHEDPRIO$])
+m4trace:configure.ac:377: -1- m4_pattern_allow([^HAVE_SHM_OPEN$])
+m4trace:configure.ac:380: -1- m4_pattern_allow([^HAVE_SETPGRP$])
+m4trace:configure.ac:383: -1- m4_pattern_allow([^HAVE_REALPATH$])
+m4trace:configure.ac:386: -1- m4_pattern_allow([^HAVE_FTOK$])
+m4trace:configure.ac:389: -1- m4_pattern_allow([^HAVE_GMTIME_R$])
+m4trace:configure.ac:392: -1- m4_pattern_allow([^HAVE_LOCALTIME_R$])
+m4trace:configure.ac:395: -1- m4_pattern_allow([^HAVE_STRERROR_R$])
+m4trace:configure.ac:398: -1- m4_pattern_allow([^HAVE_NANOSLEEP$])
+m4trace:configure.ac:401: -1- m4_pattern_allow([^HAVE_CLOCK_NANOSLEEP$])
+m4trace:configure.ac:404: -1- m4_pattern_allow([^HAVE_CLOCK_GETTIME$])
+m4trace:configure.ac:407: -1- m4_pattern_allow([^HAVE_POSIX_FADVISE$])
+m4trace:configure.ac:410: -1- m4_pattern_allow([^HAVE_FTRUNCATE$])
+m4trace:configure.ac:413: -1- m4_pattern_allow([^HAVE_PWRITE$])
+m4trace:configure.ac:416: -1- m4_pattern_allow([^HAVE_SETLOCALE$])
+m4trace:configure.ac:419: -1- m4_pattern_allow([^HAVE_GETTEXT$])
+m4trace:configure.ac:423: -1- m4_pattern_allow([^HAVE_EXECVP$])
+m4trace:configure.ac:426: -1- m4_pattern_allow([^HAVE_SYMLINK$])
+m4trace:configure.ac:429: -1- m4_pattern_allow([^HAVE_READLINK$])
+m4trace:configure.ac:432: -1- m4_pattern_allow([^HAVE_WAITPID$])
+m4trace:configure.ac:435: -1- m4_pattern_allow([^HAVE_WAIT4$])
+m4trace:configure.ac:450: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/lang.m4:125: AC_LANG_SAVE is expanded from...
+configure.ac:450: the top level])
+m4trace:configure.ac:451: -1- _m4_warn([obsolete], [The macro `AC_LANG_CPLUSPLUS' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/c.m4:252: AC_LANG_CPLUSPLUS is expanded from...
+configure.ac:451: the top level])
+m4trace:configure.ac:513: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/lang.m4:125: AC_LANG_SAVE is expanded from...
+configure.ac:513: the top level])
+m4trace:configure.ac:514: -1- _m4_warn([obsolete], [The macro `AC_LANG_CPLUSPLUS' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/c.m4:252: AC_LANG_CPLUSPLUS is expanded from...
+configure.ac:514: the top level])
+m4trace:configure.ac:515: -1- m4_pattern_allow([^HAVE_STDEXCEPT$])
+m4trace:configure.ac:517: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from...
+configure.ac:517: the top level])
+m4trace:configure.ac:536: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/lang.m4:134: AC_LANG_RESTORE is expanded from...
+configure.ac:536: the top level])
+m4trace:configure.ac:589: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/lang.m4:134: AC_LANG_RESTORE is expanded from...
+configure.ac:589: the top level])
+m4trace:configure.ac:591: -1- AC_SUBST_DIR([includes], [includedir])
+m4trace:configure.ac:591: -1- m4_pattern_allow([^includes$])
+m4trace:configure.ac:592: -1- AC_SUBST_DIR([libs], [libdir])
+m4trace:configure.ac:592: -1- m4_pattern_allow([^libs$])
+m4trace:configure.ac:638: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+configure.ac:638: the top level])
+m4trace:configure.ac:637: -1- PKG_CHECK_MODULES([OPENSSL], [openssl >= $OPENSSL_REQUIRES], [], [
+        OPENSSL_LIBS=""
+        AC_CHECK_HEADERS(openssl/ssl.h, [
+            OPENSSL_LIBS="-lssl -lcrypto -lz $OPENSSL_LINK"
+        ])
+        AC_CHECK_HEADERS(openssl/fips.h)
+    ])
+m4trace:configure.ac:637: -1- PKG_PROG_PKG_CONFIG
+m4trace:configure.ac:637: -1- m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^PKG_CONFIG$])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^PKG_CONFIG_PATH$])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^PKG_CONFIG_LIBDIR$])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^PKG_CONFIG$])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^OPENSSL_CFLAGS$])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^OPENSSL_LIBS$])
+m4trace:configure.ac:637: -1- PKG_CHECK_EXISTS([openssl >= $OPENSSL_REQUIRES], [pkg_cv_[]OPENSSL_CFLAGS=`$PKG_CONFIG --[]cflags "openssl >= $OPENSSL_REQUIRES" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes])
+m4trace:configure.ac:637: -1- PKG_CHECK_EXISTS([openssl >= $OPENSSL_REQUIRES], [pkg_cv_[]OPENSSL_LIBS=`$PKG_CONFIG --[]libs "openssl >= $OPENSSL_REQUIRES" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes])
+m4trace:configure.ac:637: -1- _PKG_SHORT_ERRORS_SUPPORTED
+m4trace:configure.ac:637: -1- m4_pattern_allow([^HAVE_OPENSSL_SSL_H$])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^HAVE_OPENSSL_FIPS_H$])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^HAVE_OPENSSL_SSL_H$])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^HAVE_OPENSSL_FIPS_H$])
+m4trace:configure.ac:637: -1- PKG_CHECK_MODULES([GNUTLS], [gnutls >= 2.8.0], [], [GNUTLS_LIBS=""])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^GNUTLS_CFLAGS$])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^GNUTLS_LIBS$])
+m4trace:configure.ac:637: -1- PKG_CHECK_EXISTS([gnutls >= 2.8.0], [pkg_cv_[]GNUTLS_CFLAGS=`$PKG_CONFIG --[]cflags "gnutls >= 2.8.0" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes])
+m4trace:configure.ac:637: -1- PKG_CHECK_EXISTS([gnutls >= 2.8.0], [pkg_cv_[]GNUTLS_LIBS=`$PKG_CONFIG --[]libs "gnutls >= 2.8.0" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes])
+m4trace:configure.ac:637: -1- _PKG_SHORT_ERRORS_SUPPORTED
+m4trace:configure.ac:637: -1- m4_pattern_allow([^HAVE_OPENSSL_SSL_H$])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^HAVE_OPENSSL_FIPS_H$])
+m4trace:configure.ac:708: -1- m4_pattern_allow([^HAVE_LIBINTL_H$])
+m4trace:configure.ac:708: -1- m4_pattern_allow([^HAVE_GETTEXT$])
+m4trace:configure.ac:723: -1- AC_SUBST_DIR([UCOMMON_INCLUDES], [includes])
+m4trace:configure.ac:723: -1- m4_pattern_allow([^UCOMMON_INCLUDES$])
+m4trace:configure.ac:724: -1- AC_SUBST_DIR([UCOMMON_LOCALE], [localedir])
+m4trace:configure.ac:724: -1- m4_pattern_allow([^UCOMMON_LOCALE$])
+m4trace:configure.ac:725: -1- AC_SUBST_DIR([UCOMMON_CFGPATH], [sysconfdir])
+m4trace:configure.ac:725: -1- m4_pattern_allow([^UCOMMON_CFGPATH$])
+m4trace:configure.ac:726: -1- AC_SUBST_DIR([UCOMMON_VARPATH], [localstatedir])
+m4trace:configure.ac:726: -1- m4_pattern_allow([^UCOMMON_VARPATH$])
+m4trace:configure.ac:727: -1- AC_SUBST_DIR([UCOMMON_PREFIX], [prefixdir])
+m4trace:configure.ac:727: -1- m4_pattern_allow([^UCOMMON_PREFIX$])
+m4trace:configure.ac:728: -1- m4_pattern_allow([^UCOMMON_PREFIX$])
+m4trace:configure.ac:729: -1- m4_pattern_allow([^UCOMMON_CFGPATH$])
+m4trace:configure.ac:730: -1- m4_pattern_allow([^UCOMMON_VARPATH$])
+m4trace:configure.ac:731: -1- m4_pattern_allow([^UCOMMON_LOCALE$])
+m4trace:configure.ac:733: -1- m4_pattern_allow([^DOXYGEN$])
+m4trace:configure.ac:734: -1- m4_pattern_allow([^DOXYGEN$])
+m4trace:configure.ac:735: -1- m4_pattern_allow([^CHECKFLAGS$])
+m4trace:configure.ac:736: -1- m4_pattern_allow([^CXXFLAGS$])
+m4trace:configure.ac:737: -1- m4_pattern_allow([^UCOMMON_VISIBILITY$])
+m4trace:configure.ac:738: -1- m4_pattern_allow([^UCOMMON_INCLUDES$])
+m4trace:configure.ac:739: -1- m4_pattern_allow([^UCOMMON_LOCALE$])
+m4trace:configure.ac:740: -1- m4_pattern_allow([^UCOMMON_LINKED$])
+m4trace:configure.ac:741: -1- m4_pattern_allow([^UCOMMON_MODEL$])
+m4trace:configure.ac:742: -1- m4_pattern_allow([^UCOMMON_FLAGS$])
+m4trace:configure.ac:743: -1- m4_pattern_allow([^UCOMMON_CLINK$])
+m4trace:configure.ac:744: -1- m4_pattern_allow([^UCOMMON_LIBC$])
+m4trace:configure.ac:745: -1- m4_pattern_allow([^UCOMMON_LIBS$])
+m4trace:configure.ac:746: -1- m4_pattern_allow([^SECURE_LOCAL$])
+m4trace:configure.ac:747: -1- m4_pattern_allow([^SECURE_LIBS$])
+m4trace:configure.ac:748: -1- m4_pattern_allow([^SECURE$])
+m4trace:configure.ac:749: -1- m4_pattern_allow([^COMPAT$])
+m4trace:configure.ac:750: -1- m4_pattern_allow([^OPENSSL_LIBS$])
+m4trace:configure.ac:751: -1- m4_pattern_allow([^GNUTLS_LIBS$])
+m4trace:configure.ac:752: -1- m4_pattern_allow([^LT_VERSION$])
+m4trace:configure.ac:753: -1- m4_pattern_allow([^LT_GENERIC$])
+m4trace:configure.ac:754: -1- m4_pattern_allow([^localedir$])
+m4trace:configure.ac:756: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
+You should run autoupdate.], [])
+m4trace:configure.ac:756: -1- m4_pattern_allow([^LIB@&t@OBJS$])
+m4trace:configure.ac:756: -1- m4_pattern_allow([^LTLIBOBJS$])
+m4trace:configure.ac:756: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])
+m4trace:configure.ac:756: -1- m4_pattern_allow([^am__EXEEXT_TRUE$])
+m4trace:configure.ac:756: -1- m4_pattern_allow([^am__EXEEXT_FALSE$])
+m4trace:configure.ac:756: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE])
+m4trace:configure.ac:756: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE])
+m4trace:configure.ac:756: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"])
+m4trace:configure.ac:756: -1- _LT_PROG_LTMAIN
+m4trace:configure.ac:756: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS
diff --git a/jni/libucommon/sources/autom4te.cache/traces.1 b/jni/libucommon/sources/autom4te.cache/traces.1
new file mode 100644
index 0000000..05c1809
--- /dev/null
+++ b/jni/libucommon/sources/autom4te.cache/traces.1
@@ -0,0 +1,1155 @@
+m4trace:configure.ac:11: -1- AC_INIT([ucommon], [6.0.7])
+m4trace:configure.ac:11: -1- m4_pattern_forbid([^_?A[CHUM]_])
+m4trace:configure.ac:11: -1- m4_pattern_forbid([_AC_])
+m4trace:configure.ac:11: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^AS_FLAGS$])
+m4trace:configure.ac:11: -1- m4_pattern_forbid([^_?m4_])
+m4trace:configure.ac:11: -1- m4_pattern_forbid([^dnl$])
+m4trace:configure.ac:11: -1- m4_pattern_forbid([^_?AS_])
+m4trace:configure.ac:11: -1- AC_SUBST([SHELL])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([SHELL])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^SHELL$])
+m4trace:configure.ac:11: -1- AC_SUBST([PATH_SEPARATOR])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([PATH_SEPARATOR])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PATH_SEPARATOR$])
+m4trace:configure.ac:11: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME],      ['AC_PACKAGE_NAME'])])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([PACKAGE_NAME])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_NAME$])
+m4trace:configure.ac:11: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME],   ['AC_PACKAGE_TARNAME'])])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([PACKAGE_TARNAME])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
+m4trace:configure.ac:11: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION],   ['AC_PACKAGE_VERSION'])])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([PACKAGE_VERSION])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_VERSION$])
+m4trace:configure.ac:11: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING],    ['AC_PACKAGE_STRING'])])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([PACKAGE_STRING])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_STRING$])
+m4trace:configure.ac:11: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
+m4trace:configure.ac:11: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL],       ['AC_PACKAGE_URL'])])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([PACKAGE_URL])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_URL$])
+m4trace:configure.ac:11: -1- AC_SUBST([exec_prefix], [NONE])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([exec_prefix])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^exec_prefix$])
+m4trace:configure.ac:11: -1- AC_SUBST([prefix], [NONE])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([prefix])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^prefix$])
+m4trace:configure.ac:11: -1- AC_SUBST([program_transform_name], [s,x,x,])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([program_transform_name])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^program_transform_name$])
+m4trace:configure.ac:11: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([bindir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^bindir$])
+m4trace:configure.ac:11: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([sbindir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^sbindir$])
+m4trace:configure.ac:11: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([libexecdir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^libexecdir$])
+m4trace:configure.ac:11: -1- AC_SUBST([datarootdir], ['${prefix}/share'])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([datarootdir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^datarootdir$])
+m4trace:configure.ac:11: -1- AC_SUBST([datadir], ['${datarootdir}'])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([datadir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^datadir$])
+m4trace:configure.ac:11: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([sysconfdir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^sysconfdir$])
+m4trace:configure.ac:11: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([sharedstatedir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^sharedstatedir$])
+m4trace:configure.ac:11: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([localstatedir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^localstatedir$])
+m4trace:configure.ac:11: -1- AC_SUBST([includedir], ['${prefix}/include'])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([includedir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^includedir$])
+m4trace:configure.ac:11: -1- AC_SUBST([oldincludedir], ['/usr/include'])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([oldincludedir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^oldincludedir$])
+m4trace:configure.ac:11: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
+				     ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
+				     ['${datarootdir}/doc/${PACKAGE}'])])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([docdir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^docdir$])
+m4trace:configure.ac:11: -1- AC_SUBST([infodir], ['${datarootdir}/info'])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([infodir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^infodir$])
+m4trace:configure.ac:11: -1- AC_SUBST([htmldir], ['${docdir}'])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([htmldir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^htmldir$])
+m4trace:configure.ac:11: -1- AC_SUBST([dvidir], ['${docdir}'])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([dvidir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^dvidir$])
+m4trace:configure.ac:11: -1- AC_SUBST([pdfdir], ['${docdir}'])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([pdfdir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^pdfdir$])
+m4trace:configure.ac:11: -1- AC_SUBST([psdir], ['${docdir}'])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([psdir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^psdir$])
+m4trace:configure.ac:11: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([libdir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^libdir$])
+m4trace:configure.ac:11: -1- AC_SUBST([localedir], ['${datarootdir}/locale'])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([localedir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^localedir$])
+m4trace:configure.ac:11: -1- AC_SUBST([mandir], ['${datarootdir}/man'])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([mandir])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^mandir$])
+m4trace:configure.ac:11: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_NAME$])
+m4trace:configure.ac:11: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
+@%:@undef PACKAGE_NAME])
+m4trace:configure.ac:11: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
+m4trace:configure.ac:11: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
+@%:@undef PACKAGE_TARNAME])
+m4trace:configure.ac:11: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_VERSION$])
+m4trace:configure.ac:11: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
+@%:@undef PACKAGE_VERSION])
+m4trace:configure.ac:11: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_STRING$])
+m4trace:configure.ac:11: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
+@%:@undef PACKAGE_STRING])
+m4trace:configure.ac:11: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
+m4trace:configure.ac:11: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
+@%:@undef PACKAGE_BUGREPORT])
+m4trace:configure.ac:11: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^PACKAGE_URL$])
+m4trace:configure.ac:11: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */
+@%:@undef PACKAGE_URL])
+m4trace:configure.ac:11: -1- AC_SUBST([DEFS])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([DEFS])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^DEFS$])
+m4trace:configure.ac:11: -1- AC_SUBST([ECHO_C])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([ECHO_C])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^ECHO_C$])
+m4trace:configure.ac:11: -1- AC_SUBST([ECHO_N])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([ECHO_N])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^ECHO_N$])
+m4trace:configure.ac:11: -1- AC_SUBST([ECHO_T])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([ECHO_T])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^ECHO_T$])
+m4trace:configure.ac:11: -1- AC_SUBST([LIBS])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([LIBS])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:11: -1- AC_SUBST([build_alias])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([build_alias])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^build_alias$])
+m4trace:configure.ac:11: -1- AC_SUBST([host_alias])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([host_alias])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^host_alias$])
+m4trace:configure.ac:11: -1- AC_SUBST([target_alias])
+m4trace:configure.ac:11: -1- AC_SUBST_TRACE([target_alias])
+m4trace:configure.ac:11: -1- m4_pattern_allow([^target_alias$])
+m4trace:configure.ac:17: -1- AC_CONFIG_AUX_DIR([autoconf])
+m4trace:configure.ac:18: -1- AC_CANONICAL_SYSTEM
+m4trace:configure.ac:18: -1- _m4_warn([obsolete], [The macro `AC_CANONICAL_SYSTEM' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:1857: AC_CANONICAL_SYSTEM is expanded from...
+configure.ac:18: the top level])
+m4trace:configure.ac:18: -1- AC_CANONICAL_TARGET
+m4trace:configure.ac:18: -1- AC_CANONICAL_HOST
+m4trace:configure.ac:18: -1- AC_CANONICAL_BUILD
+m4trace:configure.ac:18: -1- AC_REQUIRE_AUX_FILE([config.sub])
+m4trace:configure.ac:18: -1- AC_REQUIRE_AUX_FILE([config.guess])
+m4trace:configure.ac:18: -1- AC_SUBST([build], [$ac_cv_build])
+m4trace:configure.ac:18: -1- AC_SUBST_TRACE([build])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^build$])
+m4trace:configure.ac:18: -1- AC_SUBST([build_cpu], [$[1]])
+m4trace:configure.ac:18: -1- AC_SUBST_TRACE([build_cpu])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^build_cpu$])
+m4trace:configure.ac:18: -1- AC_SUBST([build_vendor], [$[2]])
+m4trace:configure.ac:18: -1- AC_SUBST_TRACE([build_vendor])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^build_vendor$])
+m4trace:configure.ac:18: -1- AC_SUBST([build_os])
+m4trace:configure.ac:18: -1- AC_SUBST_TRACE([build_os])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^build_os$])
+m4trace:configure.ac:18: -1- AC_SUBST([host], [$ac_cv_host])
+m4trace:configure.ac:18: -1- AC_SUBST_TRACE([host])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^host$])
+m4trace:configure.ac:18: -1- AC_SUBST([host_cpu], [$[1]])
+m4trace:configure.ac:18: -1- AC_SUBST_TRACE([host_cpu])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^host_cpu$])
+m4trace:configure.ac:18: -1- AC_SUBST([host_vendor], [$[2]])
+m4trace:configure.ac:18: -1- AC_SUBST_TRACE([host_vendor])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^host_vendor$])
+m4trace:configure.ac:18: -1- AC_SUBST([host_os])
+m4trace:configure.ac:18: -1- AC_SUBST_TRACE([host_os])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^host_os$])
+m4trace:configure.ac:18: -1- AC_SUBST([target], [$ac_cv_target])
+m4trace:configure.ac:18: -1- AC_SUBST_TRACE([target])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^target$])
+m4trace:configure.ac:18: -1- AC_SUBST([target_cpu], [$[1]])
+m4trace:configure.ac:18: -1- AC_SUBST_TRACE([target_cpu])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^target_cpu$])
+m4trace:configure.ac:18: -1- AC_SUBST([target_vendor], [$[2]])
+m4trace:configure.ac:18: -1- AC_SUBST_TRACE([target_vendor])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^target_vendor$])
+m4trace:configure.ac:18: -1- AC_SUBST([target_os])
+m4trace:configure.ac:18: -1- AC_SUBST_TRACE([target_os])
+m4trace:configure.ac:18: -1- m4_pattern_allow([^target_os$])
+m4trace:configure.ac:19: -1- AC_SUBST([CC])
+m4trace:configure.ac:19: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:19: -1- AC_SUBST([CFLAGS])
+m4trace:configure.ac:19: -1- AC_SUBST_TRACE([CFLAGS])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CFLAGS$])
+m4trace:configure.ac:19: -1- AC_SUBST([LDFLAGS])
+m4trace:configure.ac:19: -1- AC_SUBST_TRACE([LDFLAGS])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^LDFLAGS$])
+m4trace:configure.ac:19: -1- AC_SUBST([LIBS])
+m4trace:configure.ac:19: -1- AC_SUBST_TRACE([LIBS])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:19: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.ac:19: -1- AC_SUBST_TRACE([CPPFLAGS])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:19: -1- AC_SUBST([CC])
+m4trace:configure.ac:19: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:19: -1- AC_SUBST([CC])
+m4trace:configure.ac:19: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:19: -1- AC_SUBST([CC])
+m4trace:configure.ac:19: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:19: -1- AC_SUBST([CC])
+m4trace:configure.ac:19: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:19: -1- AC_SUBST([ac_ct_CC])
+m4trace:configure.ac:19: -1- AC_SUBST_TRACE([ac_ct_CC])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^ac_ct_CC$])
+m4trace:configure.ac:19: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
+m4trace:configure.ac:19: -1- AC_SUBST_TRACE([EXEEXT])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^EXEEXT$])
+m4trace:configure.ac:19: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
+m4trace:configure.ac:19: -1- AC_SUBST_TRACE([OBJEXT])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^OBJEXT$])
+m4trace:configure.ac:19: -1- AC_SUBST([CPP])
+m4trace:configure.ac:19: -1- AC_SUBST_TRACE([CPP])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.ac:19: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.ac:19: -1- AC_SUBST_TRACE([CPPFLAGS])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:19: -1- AC_SUBST([CPP])
+m4trace:configure.ac:19: -1- AC_SUBST_TRACE([CPP])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.ac:20: -1- AC_SUBST([CC])
+m4trace:configure.ac:20: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:20: -1- AC_SUBST([CFLAGS])
+m4trace:configure.ac:20: -1- AC_SUBST_TRACE([CFLAGS])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^CFLAGS$])
+m4trace:configure.ac:20: -1- AC_SUBST([LDFLAGS])
+m4trace:configure.ac:20: -1- AC_SUBST_TRACE([LDFLAGS])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^LDFLAGS$])
+m4trace:configure.ac:20: -1- AC_SUBST([LIBS])
+m4trace:configure.ac:20: -1- AC_SUBST_TRACE([LIBS])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:20: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.ac:20: -1- AC_SUBST_TRACE([CPPFLAGS])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:20: -1- AC_SUBST([CC])
+m4trace:configure.ac:20: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:20: -1- AC_SUBST([CC])
+m4trace:configure.ac:20: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:20: -1- AC_SUBST([CC])
+m4trace:configure.ac:20: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:20: -1- AC_SUBST([CC])
+m4trace:configure.ac:20: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:20: -1- AC_SUBST([ac_ct_CC])
+m4trace:configure.ac:20: -1- AC_SUBST_TRACE([ac_ct_CC])
+m4trace:configure.ac:20: -1- m4_pattern_allow([^ac_ct_CC$])
+m4trace:configure.ac:21: -1- AC_SUBST([CXX])
+m4trace:configure.ac:21: -1- AC_SUBST_TRACE([CXX])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^CXX$])
+m4trace:configure.ac:21: -1- AC_SUBST([CXXFLAGS])
+m4trace:configure.ac:21: -1- AC_SUBST_TRACE([CXXFLAGS])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^CXXFLAGS$])
+m4trace:configure.ac:21: -1- AC_SUBST([LDFLAGS])
+m4trace:configure.ac:21: -1- AC_SUBST_TRACE([LDFLAGS])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^LDFLAGS$])
+m4trace:configure.ac:21: -1- AC_SUBST([LIBS])
+m4trace:configure.ac:21: -1- AC_SUBST_TRACE([LIBS])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:21: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.ac:21: -1- AC_SUBST_TRACE([CPPFLAGS])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:21: -1- AC_SUBST([CXX])
+m4trace:configure.ac:21: -1- AC_SUBST_TRACE([CXX])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^CXX$])
+m4trace:configure.ac:21: -1- AC_SUBST([ac_ct_CXX])
+m4trace:configure.ac:21: -1- AC_SUBST_TRACE([ac_ct_CXX])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^ac_ct_CXX$])
+m4trace:configure.ac:21: -1- AC_SUBST([CXXCPP])
+m4trace:configure.ac:21: -1- AC_SUBST_TRACE([CXXCPP])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^CXXCPP$])
+m4trace:configure.ac:21: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.ac:21: -1- AC_SUBST_TRACE([CPPFLAGS])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:21: -1- AC_SUBST([CXXCPP])
+m4trace:configure.ac:21: -1- AC_SUBST_TRACE([CXXCPP])
+m4trace:configure.ac:21: -1- m4_pattern_allow([^CXXCPP$])
+m4trace:configure.ac:22: -1- AC_SUBST([CXX])
+m4trace:configure.ac:22: -1- AC_SUBST_TRACE([CXX])
+m4trace:configure.ac:22: -1- m4_pattern_allow([^CXX$])
+m4trace:configure.ac:22: -1- AC_SUBST([CXXFLAGS])
+m4trace:configure.ac:22: -1- AC_SUBST_TRACE([CXXFLAGS])
+m4trace:configure.ac:22: -1- m4_pattern_allow([^CXXFLAGS$])
+m4trace:configure.ac:22: -1- AC_SUBST([LDFLAGS])
+m4trace:configure.ac:22: -1- AC_SUBST_TRACE([LDFLAGS])
+m4trace:configure.ac:22: -1- m4_pattern_allow([^LDFLAGS$])
+m4trace:configure.ac:22: -1- AC_SUBST([LIBS])
+m4trace:configure.ac:22: -1- AC_SUBST_TRACE([LIBS])
+m4trace:configure.ac:22: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:22: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.ac:22: -1- AC_SUBST_TRACE([CPPFLAGS])
+m4trace:configure.ac:22: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:22: -1- AC_SUBST([CXX])
+m4trace:configure.ac:22: -1- AC_SUBST_TRACE([CXX])
+m4trace:configure.ac:22: -1- m4_pattern_allow([^CXX$])
+m4trace:configure.ac:22: -1- AC_SUBST([ac_ct_CXX])
+m4trace:configure.ac:22: -1- AC_SUBST_TRACE([ac_ct_CXX])
+m4trace:configure.ac:22: -1- m4_pattern_allow([^ac_ct_CXX$])
+m4trace:configure.ac:23: -1- _m4_warn([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
+You should run autoupdate.], [aclocal.m4:8136: AC_LIBTOOL_WIN32_DLL is expanded from...
+configure.ac:23: the top level])
+m4trace:configure.ac:23: -1- AC_SUBST([AS])
+m4trace:configure.ac:23: -1- AC_SUBST_TRACE([AS])
+m4trace:configure.ac:23: -1- m4_pattern_allow([^AS$])
+m4trace:configure.ac:23: -1- AC_SUBST([DLLTOOL])
+m4trace:configure.ac:23: -1- AC_SUBST_TRACE([DLLTOOL])
+m4trace:configure.ac:23: -1- m4_pattern_allow([^DLLTOOL$])
+m4trace:configure.ac:23: -1- AC_SUBST([OBJDUMP])
+m4trace:configure.ac:23: -1- AC_SUBST_TRACE([OBJDUMP])
+m4trace:configure.ac:23: -1- m4_pattern_allow([^OBJDUMP$])
+m4trace:configure.ac:23: -1- _m4_warn([obsolete], [AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.], [aclocal.m4:8136: AC_LIBTOOL_WIN32_DLL is expanded from...
+configure.ac:23: the top level])
+m4trace:configure.ac:24: -1- _m4_warn([obsolete], [The macro `AM_PROG_LIBTOOL' is obsolete.
+You should run autoupdate.], [aclocal.m4:130: AM_PROG_LIBTOOL is expanded from...
+configure.ac:24: the top level])
+m4trace:configure.ac:24: -1- LT_INIT
+m4trace:configure.ac:24: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])
+m4trace:configure.ac:24: -1- AC_REQUIRE_AUX_FILE([ltmain.sh])
+m4trace:configure.ac:24: -1- AC_SUBST([LIBTOOL])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([LIBTOOL])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^LIBTOOL$])
+m4trace:configure.ac:24: -1- AC_SUBST([SED])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([SED])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^SED$])
+m4trace:configure.ac:24: -1- AC_SUBST([GREP])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([GREP])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^GREP$])
+m4trace:configure.ac:24: -1- AC_SUBST([EGREP])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([EGREP])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^EGREP$])
+m4trace:configure.ac:24: -1- AC_SUBST([FGREP])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([FGREP])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^FGREP$])
+m4trace:configure.ac:24: -1- AC_SUBST([GREP])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([GREP])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^GREP$])
+m4trace:configure.ac:24: -1- AC_SUBST([LD])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([LD])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^LD$])
+m4trace:configure.ac:24: -1- AC_SUBST([DUMPBIN])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([DUMPBIN])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^DUMPBIN$])
+m4trace:configure.ac:24: -1- AC_SUBST([ac_ct_DUMPBIN])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([ac_ct_DUMPBIN])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^ac_ct_DUMPBIN$])
+m4trace:configure.ac:24: -1- AC_SUBST([DUMPBIN])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([DUMPBIN])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^DUMPBIN$])
+m4trace:configure.ac:24: -1- AC_SUBST([NM])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([NM])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^NM$])
+m4trace:configure.ac:24: -1- AC_SUBST([LN_S], [$as_ln_s])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([LN_S])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^LN_S$])
+m4trace:configure.ac:24: -1- AC_SUBST([OBJDUMP])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([OBJDUMP])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^OBJDUMP$])
+m4trace:configure.ac:24: -1- AC_SUBST([OBJDUMP])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([OBJDUMP])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^OBJDUMP$])
+m4trace:configure.ac:24: -1- AC_SUBST([DLLTOOL])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([DLLTOOL])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^DLLTOOL$])
+m4trace:configure.ac:24: -1- AC_SUBST([DLLTOOL])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([DLLTOOL])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^DLLTOOL$])
+m4trace:configure.ac:24: -1- AC_SUBST([AR])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([AR])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^AR$])
+m4trace:configure.ac:24: -1- AC_SUBST([ac_ct_AR])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([ac_ct_AR])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^ac_ct_AR$])
+m4trace:configure.ac:24: -1- AC_SUBST([STRIP])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([STRIP])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^STRIP$])
+m4trace:configure.ac:24: -1- AC_SUBST([RANLIB])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([RANLIB])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^RANLIB$])
+m4trace:configure.ac:24: -1- AC_SUBST([AWK])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([AWK])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^AWK$])
+m4trace:configure.ac:24: -1- m4_pattern_allow([LT_OBJDIR])
+m4trace:configure.ac:24: -1- AC_DEFINE_TRACE_LITERAL([LT_OBJDIR])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^LT_OBJDIR$])
+m4trace:configure.ac:24: -1- AH_OUTPUT([LT_OBJDIR], [/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+@%:@undef LT_OBJDIR])
+m4trace:configure.ac:24: -1- LT_SUPPORTED_TAG([CC])
+m4trace:configure.ac:24: -1- AC_SUBST([MANIFEST_TOOL])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([MANIFEST_TOOL])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^MANIFEST_TOOL$])
+m4trace:configure.ac:24: -1- AC_SUBST([DSYMUTIL])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([DSYMUTIL])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^DSYMUTIL$])
+m4trace:configure.ac:24: -1- AC_SUBST([NMEDIT])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([NMEDIT])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^NMEDIT$])
+m4trace:configure.ac:24: -1- AC_SUBST([LIPO])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([LIPO])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^LIPO$])
+m4trace:configure.ac:24: -1- AC_SUBST([OTOOL])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([OTOOL])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^OTOOL$])
+m4trace:configure.ac:24: -1- AC_SUBST([OTOOL64])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([OTOOL64])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^OTOOL64$])
+m4trace:configure.ac:24: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the <dlfcn.h> header file. */
+@%:@undef HAVE_DLFCN_H])
+m4trace:configure.ac:24: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^STDC_HEADERS$])
+m4trace:configure.ac:24: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
+@%:@undef STDC_HEADERS])
+m4trace:configure.ac:24: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
+@%:@undef HAVE_SYS_TYPES_H])
+m4trace:configure.ac:24: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
+@%:@undef HAVE_SYS_STAT_H])
+m4trace:configure.ac:24: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
+@%:@undef HAVE_STDLIB_H])
+m4trace:configure.ac:24: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
+@%:@undef HAVE_STRING_H])
+m4trace:configure.ac:24: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
+@%:@undef HAVE_MEMORY_H])
+m4trace:configure.ac:24: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
+@%:@undef HAVE_STRINGS_H])
+m4trace:configure.ac:24: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
+@%:@undef HAVE_INTTYPES_H])
+m4trace:configure.ac:24: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
+@%:@undef HAVE_STDINT_H])
+m4trace:configure.ac:24: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
+@%:@undef HAVE_UNISTD_H])
+m4trace:configure.ac:24: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DLFCN_H])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^HAVE_DLFCN_H$])
+m4trace:configure.ac:24: -1- LT_SUPPORTED_TAG([CXX])
+m4trace:configure.ac:24: -1- AC_SUBST([CXXCPP])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([CXXCPP])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^CXXCPP$])
+m4trace:configure.ac:24: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([CPPFLAGS])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:24: -1- AC_SUBST([CXXCPP])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([CXXCPP])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^CXXCPP$])
+m4trace:configure.ac:24: -1- AC_SUBST([LD])
+m4trace:configure.ac:24: -1- AC_SUBST_TRACE([LD])
+m4trace:configure.ac:24: -1- m4_pattern_allow([^LD$])
+m4trace:configure.ac:25: -1- AM_INIT_AUTOMAKE([dist-shar dist-zip])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
+m4trace:configure.ac:25: -1- AM_AUTOMAKE_VERSION([1.13.4])
+m4trace:configure.ac:25: -1- AC_REQUIRE_AUX_FILE([install-sh])
+m4trace:configure.ac:25: -1- AC_SUBST([INSTALL_PROGRAM])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([INSTALL_PROGRAM])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
+m4trace:configure.ac:25: -1- AC_SUBST([INSTALL_SCRIPT])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([INSTALL_SCRIPT])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
+m4trace:configure.ac:25: -1- AC_SUBST([INSTALL_DATA])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([INSTALL_DATA])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^INSTALL_DATA$])
+m4trace:configure.ac:25: -1- AC_SUBST([am__isrc], [' -I$(srcdir)'])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([am__isrc])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__isrc$])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([am__isrc])
+m4trace:configure.ac:25: -1- AC_SUBST([CYGPATH_W])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([CYGPATH_W])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^CYGPATH_W$])
+m4trace:configure.ac:25: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([PACKAGE])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^PACKAGE$])
+m4trace:configure.ac:25: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([VERSION])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^VERSION$])
+m4trace:configure.ac:25: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^PACKAGE$])
+m4trace:configure.ac:25: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
+@%:@undef PACKAGE])
+m4trace:configure.ac:25: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^VERSION$])
+m4trace:configure.ac:25: -1- AH_OUTPUT([VERSION], [/* Version number of package */
+@%:@undef VERSION])
+m4trace:configure.ac:25: -1- AC_REQUIRE_AUX_FILE([missing])
+m4trace:configure.ac:25: -1- AC_SUBST([ACLOCAL])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([ACLOCAL])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^ACLOCAL$])
+m4trace:configure.ac:25: -1- AC_SUBST([AUTOCONF])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([AUTOCONF])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AUTOCONF$])
+m4trace:configure.ac:25: -1- AC_SUBST([AUTOMAKE])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([AUTOMAKE])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AUTOMAKE$])
+m4trace:configure.ac:25: -1- AC_SUBST([AUTOHEADER])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([AUTOHEADER])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AUTOHEADER$])
+m4trace:configure.ac:25: -1- AC_SUBST([MAKEINFO])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([MAKEINFO])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^MAKEINFO$])
+m4trace:configure.ac:25: -1- AC_SUBST([install_sh])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([install_sh])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^install_sh$])
+m4trace:configure.ac:25: -1- AC_SUBST([STRIP])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([STRIP])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^STRIP$])
+m4trace:configure.ac:25: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$])
+m4trace:configure.ac:25: -1- AC_REQUIRE_AUX_FILE([install-sh])
+m4trace:configure.ac:25: -1- AC_SUBST([MKDIR_P])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([MKDIR_P])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^MKDIR_P$])
+m4trace:configure.ac:25: -1- AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([mkdir_p])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^mkdir_p$])
+m4trace:configure.ac:25: -1- AC_SUBST([SET_MAKE])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([SET_MAKE])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^SET_MAKE$])
+m4trace:configure.ac:25: -1- AC_SUBST([am__leading_dot])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([am__leading_dot])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__leading_dot$])
+m4trace:configure.ac:25: -1- AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([AMTAR])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AMTAR$])
+m4trace:configure.ac:25: -1- AC_SUBST([am__tar])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([am__tar])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__tar$])
+m4trace:configure.ac:25: -1- AC_SUBST([am__untar])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([am__untar])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__untar$])
+m4trace:configure.ac:25: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([DEPDIR])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^DEPDIR$])
+m4trace:configure.ac:25: -1- AC_SUBST([am__include])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([am__include])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__include$])
+m4trace:configure.ac:25: -1- AC_SUBST([am__quote])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([am__quote])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__quote$])
+m4trace:configure.ac:25: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+m4trace:configure.ac:25: -1- AC_SUBST([AMDEP_TRUE])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([AMDEP_TRUE])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AMDEP_TRUE$])
+m4trace:configure.ac:25: -1- AC_SUBST([AMDEP_FALSE])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([AMDEP_FALSE])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AMDEP_FALSE$])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE])
+m4trace:configure.ac:25: -1- AC_SUBST([AMDEPBACKSLASH])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([AMDEPBACKSLASH])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AMDEPBACKSLASH$])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])
+m4trace:configure.ac:25: -1- AC_SUBST([am__nodep])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([am__nodep])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__nodep$])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([am__nodep])
+m4trace:configure.ac:25: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([CCDEPMODE])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^CCDEPMODE$])
+m4trace:configure.ac:25: -1- AM_CONDITIONAL([am__fastdepCC], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3])
+m4trace:configure.ac:25: -1- AC_SUBST([am__fastdepCC_TRUE])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__fastdepCC_TRUE$])
+m4trace:configure.ac:25: -1- AC_SUBST([am__fastdepCC_FALSE])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__fastdepCC_FALSE$])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE])
+m4trace:configure.ac:25: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([CXXDEPMODE])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^CXXDEPMODE$])
+m4trace:configure.ac:25: -1- AM_CONDITIONAL([am__fastdepCXX], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3])
+m4trace:configure.ac:25: -1- AC_SUBST([am__fastdepCXX_TRUE])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([am__fastdepCXX_TRUE])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$])
+m4trace:configure.ac:25: -1- AC_SUBST([am__fastdepCXX_FALSE])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([am__fastdepCXX_FALSE])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE])
+m4trace:configure.ac:25: -1- AM_SILENT_RULES
+m4trace:configure.ac:25: -1- AC_SUBST([AM_V])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([AM_V])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AM_V$])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([AM_V])
+m4trace:configure.ac:25: -1- AC_SUBST([AM_DEFAULT_V])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([AM_DEFAULT_V])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AM_DEFAULT_V$])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V])
+m4trace:configure.ac:25: -1- AC_SUBST([AM_DEFAULT_VERBOSITY])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([AM_DEFAULT_VERBOSITY])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$])
+m4trace:configure.ac:25: -1- AC_SUBST([AM_BACKSLASH])
+m4trace:configure.ac:25: -1- AC_SUBST_TRACE([AM_BACKSLASH])
+m4trace:configure.ac:25: -1- m4_pattern_allow([^AM_BACKSLASH$])
+m4trace:configure.ac:25: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH])
+m4trace:configure.ac:26: -1- _m4_warn([obsolete], ['AM_CONFIG_HEADER': this macro is obsolete.
+You should use the 'AC_CONFIG_HEADERS' macro instead.], [aclocal.m4:9510: AM_CONFIG_HEADER is expanded from...
+configure.ac:26: the top level])
+m4trace:configure.ac:26: -1- AC_CONFIG_HEADERS([ucommon-config.h])
+m4trace:configure.ac:28: -1- AH_OUTPUT([restrict], [/* Define to the equivalent of the C99 \'restrict\' keyword, or to
+   nothing if this is not supported.  Do not define if restrict is
+   supported directly.  */
+#undef restrict
+/* Work around a bug in Sun C++: it does not support _Restrict or
+   __restrict__, even though the corresponding Sun C compiler ends up with
+   "#define restrict _Restrict" or "#define restrict __restrict__" in the
+   previous line.  Perhaps some future version of Sun C++ will work with
+   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+# define __restrict__
+#endif])
+m4trace:configure.ac:28: -1- AC_DEFINE_TRACE_LITERAL([restrict])
+m4trace:configure.ac:28: -1- m4_pattern_allow([^restrict$])
+m4trace:configure.ac:28: -1- AC_DEFINE_TRACE_LITERAL([restrict])
+m4trace:configure.ac:28: -1- m4_pattern_allow([^restrict$])
+m4trace:configure.ac:29: -1- AC_DEFINE_TRACE_LITERAL([volatile])
+m4trace:configure.ac:29: -1- m4_pattern_allow([^volatile$])
+m4trace:configure.ac:29: -1- AH_OUTPUT([volatile], [/* Define to empty if the keyword `volatile\' does not work. Warning: valid
+   code using `volatile\' can become incorrect without. Disable with care. */
+@%:@undef volatile])
+m4trace:configure.ac:30: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler
+   calls it, or to nothing if \'inline\' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif])
+m4trace:configure.ac:106: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+configure.ac:106: the top level])
+m4trace:configure.ac:114: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+configure.ac:114: the top level])
+m4trace:configure.ac:129: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+configure.ac:129: the top level])
+m4trace:configure.ac:135: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+configure.ac:135: the top level])
+m4trace:configure.ac:142: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+configure.ac:142: the top level])
+m4trace:configure.ac:149: -1- AH_OUTPUT([zzzz1], [
+#include <ucommon/platform.h>
+])
+m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
+@%:@undef HAVE_STDINT_H])
+m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_POLL_H], [/* Define to 1 if you have the <poll.h> header file. */
+@%:@undef HAVE_POLL_H])
+m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_SYS_MMAN_H], [/* Define to 1 if you have the <sys/mman.h> header file. */
+@%:@undef HAVE_SYS_MMAN_H])
+m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_SYS_SHM_H], [/* Define to 1 if you have the <sys/shm.h> header file. */
+@%:@undef HAVE_SYS_SHM_H])
+m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_SYS_POLL_H], [/* Define to 1 if you have the <sys/poll.h> header file. */
+@%:@undef HAVE_SYS_POLL_H])
+m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_SYS_TIMEB_H], [/* Define to 1 if you have the <sys/timeb.h> header file. */
+@%:@undef HAVE_SYS_TIMEB_H])
+m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_ENDIAN_H], [/* Define to 1 if you have the <endian.h> header file. */
+@%:@undef HAVE_ENDIAN_H])
+m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_SYS_FILIO_H], [/* Define to 1 if you have the <sys/filio.h> header file. */
+@%:@undef HAVE_SYS_FILIO_H])
+m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_DIRENT_H], [/* Define to 1 if you have the <dirent.h> header file. */
+@%:@undef HAVE_DIRENT_H])
+m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_SYS_RESOURCE_H], [/* Define to 1 if you have the <sys/resource.h> header file. */
+@%:@undef HAVE_SYS_RESOURCE_H])
+m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_WCHAR_H], [/* Define to 1 if you have the <wchar.h> header file. */
+@%:@undef HAVE_WCHAR_H])
+m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the <netinet/in.h> header file. */
+@%:@undef HAVE_NETINET_IN_H])
+m4trace:configure.ac:157: -1- AH_OUTPUT([HAVE_NET_IF_H], [/* Define to 1 if you have the <net/if.h> header file. */
+@%:@undef HAVE_NET_IF_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MACH_CLOCK_H], [/* Define to 1 if you have the <mach/clock.h> header file. */
+@%:@undef HAVE_MACH_CLOCK_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MACH_O_DYLD_H], [/* Define to 1 if you have the <mach-o/dyld.h> header file. */
+@%:@undef HAVE_MACH_O_DYLD_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_LINUX_VERSION_H], [/* Define to 1 if you have the <linux/version.h> header file. */
+@%:@undef HAVE_LINUX_VERSION_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_INOTIFY_H], [/* Define to 1 if you have the <sys/inotify.h> header file. */
+@%:@undef HAVE_SYS_INOTIFY_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_EVENT_H], [/* Define to 1 if you have the <sys/event.h> header file. */
+@%:@undef HAVE_SYS_EVENT_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYSLOG_H], [/* Define to 1 if you have the <syslog.h> header file. */
+@%:@undef HAVE_SYSLOG_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_WAIT_H], [/* Define to 1 if you have the <sys/wait.h> header file. */
+@%:@undef HAVE_SYS_WAIT_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_TERMIOS_H], [/* Define to 1 if you have the <termios.h> header file. */
+@%:@undef HAVE_TERMIOS_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_TERMIO_H], [/* Define to 1 if you have the <termio.h> header file. */
+@%:@undef HAVE_TERMIO_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the <fcntl.h> header file. */
+@%:@undef HAVE_FCNTL_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
+@%:@undef HAVE_UNISTD_H])
+m4trace:configure.ac:159: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the <sys/param.h> header file. */
+@%:@undef HAVE_SYS_PARAM_H])
+m4trace:configure.ac:159: -1- AH_OUTPUT([HAVE_SYS_LOCKF_H], [/* Define to 1 if you have the <sys/lockf.h> header file. */
+@%:@undef HAVE_SYS_LOCKF_H])
+m4trace:configure.ac:159: -1- AH_OUTPUT([HAVE_SYS_FILE_H], [/* Define to 1 if you have the <sys/file.h> header file. */
+@%:@undef HAVE_SYS_FILE_H])
+m4trace:configure.ac:159: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the <dlfcn.h> header file. */
+@%:@undef HAVE_DLFCN_H])
+m4trace:configure.ac:161: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REGEX_H])
+m4trace:configure.ac:161: -1- m4_pattern_allow([^HAVE_REGEX_H$])
+m4trace:configure.ac:161: -1- AH_OUTPUT([HAVE_REGEX_H], [/* have regex header */
+@%:@undef HAVE_REGEX_H])
+m4trace:configure.ac:168: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INET_NTOP])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_INET_NTOP$])
+m4trace:configure.ac:168: -1- AH_OUTPUT([HAVE_INET_NTOP], [/* have inet_ntop */
+@%:@undef HAVE_INET_NTOP])
+m4trace:configure.ac:168: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_GETADDRINFO$])
+m4trace:configure.ac:168: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* have getaddrinfo */
+@%:@undef HAVE_GETADDRINFO])
+m4trace:configure.ac:168: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKETPAIR])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_SOCKETPAIR$])
+m4trace:configure.ac:168: -1- AH_OUTPUT([HAVE_SOCKETPAIR], [/* have socketpair */
+@%:@undef HAVE_SOCKETPAIR])
+m4trace:configure.ac:168: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKETPAIR])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_SOCKETPAIR$])
+m4trace:configure.ac:168: -1- AH_OUTPUT([HAVE_SOCKETPAIR], [/* have socketpair */
+@%:@undef HAVE_SOCKETPAIR])
+m4trace:configure.ac:168: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_GETADDRINFO$])
+m4trace:configure.ac:168: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* have getaddrinfo */
+@%:@undef HAVE_GETADDRINFO])
+m4trace:configure.ac:168: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_GETADDRINFO$])
+m4trace:configure.ac:168: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* have getaddrinfo */
+@%:@undef HAVE_GETADDRINFO])
+m4trace:configure.ac:168: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETHOSTBYNAME2])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_GETHOSTBYNAME2$])
+m4trace:configure.ac:168: -1- AH_OUTPUT([HAVE_GETHOSTBYNAME2], [/* have gethostbyname2 */
+@%:@undef HAVE_GETHOSTBYNAME2])
+m4trace:configure.ac:168: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETHOSTBYNAME2])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_GETHOSTBYNAME2$])
+m4trace:configure.ac:168: -1- AH_OUTPUT([HAVE_GETHOSTBYNAME2], [/* have gethostbyname2 */
+@%:@undef HAVE_GETHOSTBYNAME2])
+m4trace:configure.ac:168: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INET_NTOP])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_INET_NTOP$])
+m4trace:configure.ac:168: -1- AH_OUTPUT([HAVE_INET_NTOP], [/* have inet ntop */
+@%:@undef HAVE_INET_NTOP])
+m4trace:configure.ac:168: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INET_NTOP])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_INET_NTOP$])
+m4trace:configure.ac:168: -1- AH_OUTPUT([HAVE_INET_NTOP], [/* have inet ntop */
+@%:@undef HAVE_INET_NTOP])
+m4trace:configure.ac:168: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INET_NTOP])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_INET_NTOP$])
+m4trace:configure.ac:168: -1- AH_OUTPUT([HAVE_INET_NTOP], [/* have inet_ntop */
+@%:@undef HAVE_INET_NTOP])
+m4trace:configure.ac:168: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKETPAIR])
+m4trace:configure.ac:168: -1- m4_pattern_allow([^HAVE_SOCKETPAIR$])
+m4trace:configure.ac:168: -1- AH_OUTPUT([HAVE_SOCKETPAIR], [/* have socketpair in libsocket */
+@%:@undef HAVE_SOCKETPAIR])
+m4trace:configure.ac:219: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+configure.ac:219: the top level])
+m4trace:configure.ac:224: -1- AH_OUTPUT([HAVE_SOCKS_H], [/* Define to 1 if you have the <socks.h> header file. */
+@%:@undef HAVE_SOCKS_H])
+m4trace:configure.ac:224: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKS_H])
+m4trace:configure.ac:224: -1- m4_pattern_allow([^HAVE_SOCKS_H$])
+m4trace:configure.ac:235: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKS])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^HAVE_SOCKS$])
+m4trace:configure.ac:235: -1- AH_OUTPUT([HAVE_SOCKS], [/* "Socks proxy support" */
+@%:@undef HAVE_SOCKS])
+m4trace:configure.ac:241: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LSTAT])
+m4trace:configure.ac:241: -1- m4_pattern_allow([^HAVE_LSTAT$])
+m4trace:configure.ac:241: -1- AH_OUTPUT([HAVE_LSTAT], [/* have lstat */
+@%:@undef HAVE_LSTAT])
+m4trace:configure.ac:245: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRCOLL])
+m4trace:configure.ac:245: -1- m4_pattern_allow([^HAVE_STRCOLL$])
+m4trace:configure.ac:245: -1- AH_OUTPUT([HAVE_STRCOLL], [/* string collation */
+@%:@undef HAVE_STRCOLL])
+m4trace:configure.ac:249: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRICMP])
+m4trace:configure.ac:249: -1- m4_pattern_allow([^HAVE_STRICMP$])
+m4trace:configure.ac:249: -1- AH_OUTPUT([HAVE_STRICMP], [/* string icmp */
+@%:@undef HAVE_STRICMP])
+m4trace:configure.ac:253: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRISTR])
+m4trace:configure.ac:253: -1- m4_pattern_allow([^HAVE_STRISTR$])
+m4trace:configure.ac:253: -1- AH_OUTPUT([HAVE_STRISTR], [/* string istr */
+@%:@undef HAVE_STRISTR])
+m4trace:configure.ac:257: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYSCONF])
+m4trace:configure.ac:257: -1- m4_pattern_allow([^HAVE_SYSCONF$])
+m4trace:configure.ac:257: -1- AH_OUTPUT([HAVE_SYSCONF], [/* system config */
+@%:@undef HAVE_SYSCONF])
+m4trace:configure.ac:261: -1- AC_DEFINE_TRACE_LITERAL([HAVE_POSIX_MEMALIGN])
+m4trace:configure.ac:261: -1- m4_pattern_allow([^HAVE_POSIX_MEMALIGN$])
+m4trace:configure.ac:261: -1- AH_OUTPUT([HAVE_POSIX_MEMALIGN], [/* posix memory alignment */
+@%:@undef HAVE_POSIX_MEMALIGN])
+m4trace:configure.ac:265: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SHL_LOAD])
+m4trace:configure.ac:265: -1- m4_pattern_allow([^HAVE_SHL_LOAD$])
+m4trace:configure.ac:265: -1- AH_OUTPUT([HAVE_SHL_LOAD], [/* alternate dyn loader */
+@%:@undef HAVE_SHL_LOAD])
+m4trace:configure.ac:280: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+../../lib/autoconf/general.m4:1462: AC_ARG_ENABLE is expanded from...
+configure.ac:280: the top level])
+m4trace:configure.ac:280: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GCC_ATOMICS])
+m4trace:configure.ac:280: -1- m4_pattern_allow([^HAVE_GCC_ATOMICS$])
+m4trace:configure.ac:280: -1- AH_OUTPUT([HAVE_GCC_ATOMICS], [/* "cannot test in autoconf safely" */
+@%:@undef HAVE_GCC_ATOMICS])
+m4trace:configure.ac:285: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+../../lib/autoconf/general.m4:1462: AC_ARG_ENABLE is expanded from...
+configure.ac:285: the top level])
+m4trace:configure.ac:291: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PTHREAD_CONDATTR_SETCLOCK])
+m4trace:configure.ac:291: -1- m4_pattern_allow([^HAVE_PTHREAD_CONDATTR_SETCLOCK$])
+m4trace:configure.ac:291: -1- AH_OUTPUT([HAVE_PTHREAD_CONDATTR_SETCLOCK], [/* "pthread clocking" */
+@%:@undef HAVE_PTHREAD_CONDATTR_SETCLOCK])
+m4trace:configure.ac:291: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PTHREAD_SETCONCURRENCY])
+m4trace:configure.ac:291: -1- m4_pattern_allow([^HAVE_PTHREAD_SETCONCURRENCY$])
+m4trace:configure.ac:291: -1- AH_OUTPUT([HAVE_PTHREAD_SETCONCURRENCY], [/* "pthread concurrency" */
+@%:@undef HAVE_PTHREAD_SETCONCURRENCY])
+m4trace:configure.ac:291: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PTHREAD_YIELD])
+m4trace:configure.ac:291: -1- m4_pattern_allow([^HAVE_PTHREAD_YIELD$])
+m4trace:configure.ac:291: -1- AH_OUTPUT([HAVE_PTHREAD_YIELD], [/* "pthread yield" */
+@%:@undef HAVE_PTHREAD_YIELD])
+m4trace:configure.ac:291: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PTHREAD_DELAY])
+m4trace:configure.ac:291: -1- m4_pattern_allow([^HAVE_PTHREAD_DELAY$])
+m4trace:configure.ac:291: -1- AH_OUTPUT([HAVE_PTHREAD_DELAY], [/* "pthread delay" */
+@%:@undef HAVE_PTHREAD_DELAY])
+m4trace:configure.ac:291: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PTHREAD_DELAY_NP])
+m4trace:configure.ac:291: -1- m4_pattern_allow([^HAVE_PTHREAD_DELAY_NP$])
+m4trace:configure.ac:291: -1- AH_OUTPUT([HAVE_PTHREAD_DELAY_NP], [/* "pthread delay np" */
+@%:@undef HAVE_PTHREAD_DELAY_NP])
+m4trace:configure.ac:291: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PTHREAD_SETSCHEDPRIO])
+m4trace:configure.ac:291: -1- m4_pattern_allow([^HAVE_PTHREAD_SETSCHEDPRIO$])
+m4trace:configure.ac:291: -1- AH_OUTPUT([HAVE_PTHREAD_SETSCHEDPRIO], [/* "pthread scheduling" */
+@%:@undef HAVE_PTHREAD_SETSCHEDPRIO])
+m4trace:configure.ac:377: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SHM_OPEN])
+m4trace:configure.ac:377: -1- m4_pattern_allow([^HAVE_SHM_OPEN$])
+m4trace:configure.ac:377: -1- AH_OUTPUT([HAVE_SHM_OPEN], [/* shared memory open */
+@%:@undef HAVE_SHM_OPEN])
+m4trace:configure.ac:380: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SETPGRP])
+m4trace:configure.ac:380: -1- m4_pattern_allow([^HAVE_SETPGRP$])
+m4trace:configure.ac:380: -1- AH_OUTPUT([HAVE_SETPGRP], [/* process group control */
+@%:@undef HAVE_SETPGRP])
+m4trace:configure.ac:383: -1- AC_DEFINE_TRACE_LITERAL([HAVE_REALPATH])
+m4trace:configure.ac:383: -1- m4_pattern_allow([^HAVE_REALPATH$])
+m4trace:configure.ac:383: -1- AH_OUTPUT([HAVE_REALPATH], [/* realpath support */
+@%:@undef HAVE_REALPATH])
+m4trace:configure.ac:386: -1- AC_DEFINE_TRACE_LITERAL([HAVE_FTOK])
+m4trace:configure.ac:386: -1- m4_pattern_allow([^HAVE_FTOK$])
+m4trace:configure.ac:386: -1- AH_OUTPUT([HAVE_FTOK], [/* has ftok */
+@%:@undef HAVE_FTOK])
+m4trace:configure.ac:389: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GMTIME_R])
+m4trace:configure.ac:389: -1- m4_pattern_allow([^HAVE_GMTIME_R$])
+m4trace:configure.ac:389: -1- AH_OUTPUT([HAVE_GMTIME_R], [/* has localtime_r */
+@%:@undef HAVE_GMTIME_R])
+m4trace:configure.ac:392: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LOCALTIME_R])
+m4trace:configure.ac:392: -1- m4_pattern_allow([^HAVE_LOCALTIME_R$])
+m4trace:configure.ac:392: -1- AH_OUTPUT([HAVE_LOCALTIME_R], [/* has localtime_r */
+@%:@undef HAVE_LOCALTIME_R])
+m4trace:configure.ac:395: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRERROR_R])
+m4trace:configure.ac:395: -1- m4_pattern_allow([^HAVE_STRERROR_R$])
+m4trace:configure.ac:395: -1- AH_OUTPUT([HAVE_STRERROR_R], [/* has strerror_r */
+@%:@undef HAVE_STRERROR_R])
+m4trace:configure.ac:398: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NANOSLEEP])
+m4trace:configure.ac:398: -1- m4_pattern_allow([^HAVE_NANOSLEEP$])
+m4trace:configure.ac:398: -1- AH_OUTPUT([HAVE_NANOSLEEP], [/* has nanosleep */
+@%:@undef HAVE_NANOSLEEP])
+m4trace:configure.ac:401: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CLOCK_NANOSLEEP])
+m4trace:configure.ac:401: -1- m4_pattern_allow([^HAVE_CLOCK_NANOSLEEP$])
+m4trace:configure.ac:401: -1- AH_OUTPUT([HAVE_CLOCK_NANOSLEEP], [/* has clocked nanosleep */
+@%:@undef HAVE_CLOCK_NANOSLEEP])
+m4trace:configure.ac:404: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CLOCK_GETTIME])
+m4trace:configure.ac:404: -1- m4_pattern_allow([^HAVE_CLOCK_GETTIME$])
+m4trace:configure.ac:404: -1- AH_OUTPUT([HAVE_CLOCK_GETTIME], [/* has posix clock functions */
+@%:@undef HAVE_CLOCK_GETTIME])
+m4trace:configure.ac:407: -1- AC_DEFINE_TRACE_LITERAL([HAVE_POSIX_FADVISE])
+m4trace:configure.ac:407: -1- m4_pattern_allow([^HAVE_POSIX_FADVISE$])
+m4trace:configure.ac:407: -1- AH_OUTPUT([HAVE_POSIX_FADVISE], [/* can specify access options */
+@%:@undef HAVE_POSIX_FADVISE])
+m4trace:configure.ac:410: -1- AC_DEFINE_TRACE_LITERAL([HAVE_FTRUNCATE])
+m4trace:configure.ac:410: -1- m4_pattern_allow([^HAVE_FTRUNCATE$])
+m4trace:configure.ac:410: -1- AH_OUTPUT([HAVE_FTRUNCATE], [/* can truncate files */
+@%:@undef HAVE_FTRUNCATE])
+m4trace:configure.ac:413: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PWRITE])
+m4trace:configure.ac:413: -1- m4_pattern_allow([^HAVE_PWRITE$])
+m4trace:configure.ac:413: -1- AH_OUTPUT([HAVE_PWRITE], [/* can do atomic write with offset */
+@%:@undef HAVE_PWRITE])
+m4trace:configure.ac:416: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SETLOCALE])
+m4trace:configure.ac:416: -1- m4_pattern_allow([^HAVE_SETLOCALE$])
+m4trace:configure.ac:416: -1- AH_OUTPUT([HAVE_SETLOCALE], [/* can set localization */
+@%:@undef HAVE_SETLOCALE])
+m4trace:configure.ac:419: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETTEXT])
+m4trace:configure.ac:419: -1- m4_pattern_allow([^HAVE_GETTEXT$])
+m4trace:configure.ac:419: -1- AH_OUTPUT([HAVE_GETTEXT], [/* has gettext in libc */
+@%:@undef HAVE_GETTEXT])
+m4trace:configure.ac:423: -1- AC_DEFINE_TRACE_LITERAL([HAVE_EXECVP])
+m4trace:configure.ac:423: -1- m4_pattern_allow([^HAVE_EXECVP$])
+m4trace:configure.ac:423: -1- AH_OUTPUT([HAVE_EXECVP], [/* has execvp in libc */
+@%:@undef HAVE_EXECVP])
+m4trace:configure.ac:426: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYMLINK])
+m4trace:configure.ac:426: -1- m4_pattern_allow([^HAVE_SYMLINK$])
+m4trace:configure.ac:426: -1- AH_OUTPUT([HAVE_SYMLINK], [/* has symlink in libc */
+@%:@undef HAVE_SYMLINK])
+m4trace:configure.ac:429: -1- AC_DEFINE_TRACE_LITERAL([HAVE_READLINK])
+m4trace:configure.ac:429: -1- m4_pattern_allow([^HAVE_READLINK$])
+m4trace:configure.ac:429: -1- AH_OUTPUT([HAVE_READLINK], [/* has readlink in libc */
+@%:@undef HAVE_READLINK])
+m4trace:configure.ac:432: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WAITPID])
+m4trace:configure.ac:432: -1- m4_pattern_allow([^HAVE_WAITPID$])
+m4trace:configure.ac:432: -1- AH_OUTPUT([HAVE_WAITPID], [/* has waitpid in libc */
+@%:@undef HAVE_WAITPID])
+m4trace:configure.ac:435: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WAIT4])
+m4trace:configure.ac:435: -1- m4_pattern_allow([^HAVE_WAIT4$])
+m4trace:configure.ac:435: -1- AH_OUTPUT([HAVE_WAIT4], [/* has wait4 in libc */
+@%:@undef HAVE_WAIT4])
+m4trace:configure.ac:450: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/lang.m4:125: AC_LANG_SAVE is expanded from...
+configure.ac:450: the top level])
+m4trace:configure.ac:451: -1- _m4_warn([obsolete], [The macro `AC_LANG_CPLUSPLUS' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/c.m4:252: AC_LANG_CPLUSPLUS is expanded from...
+configure.ac:451: the top level])
+m4trace:configure.ac:513: -1- _m4_warn([obsolete], [The macro `AC_LANG_SAVE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/lang.m4:125: AC_LANG_SAVE is expanded from...
+configure.ac:513: the top level])
+m4trace:configure.ac:514: -1- _m4_warn([obsolete], [The macro `AC_LANG_CPLUSPLUS' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/c.m4:252: AC_LANG_CPLUSPLUS is expanded from...
+configure.ac:514: the top level])
+m4trace:configure.ac:515: -1- AH_OUTPUT([HAVE_STDEXCEPT], [/* Define to 1 if you have the <stdexcept> header file. */
+@%:@undef HAVE_STDEXCEPT])
+m4trace:configure.ac:515: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDEXCEPT])
+m4trace:configure.ac:515: -1- m4_pattern_allow([^HAVE_STDEXCEPT$])
+m4trace:configure.ac:517: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from...
+configure.ac:517: the top level])
+m4trace:configure.ac:536: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/lang.m4:134: AC_LANG_RESTORE is expanded from...
+configure.ac:536: the top level])
+m4trace:configure.ac:589: -1- _m4_warn([obsolete], [The macro `AC_LANG_RESTORE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/lang.m4:134: AC_LANG_RESTORE is expanded from...
+configure.ac:589: the top level])
+m4trace:configure.ac:591: -1- AC_SUBST([includes])
+m4trace:configure.ac:591: -1- AC_SUBST_TRACE([includes])
+m4trace:configure.ac:591: -1- m4_pattern_allow([^includes$])
+m4trace:configure.ac:592: -1- AC_SUBST([libs])
+m4trace:configure.ac:592: -1- AC_SUBST_TRACE([libs])
+m4trace:configure.ac:592: -1- m4_pattern_allow([^libs$])
+m4trace:configure.ac:638: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+configure.ac:638: the top level])
+m4trace:configure.ac:637: -1- m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+m4trace:configure.ac:637: -1- AC_SUBST([PKG_CONFIG])
+m4trace:configure.ac:637: -1- AC_SUBST_TRACE([PKG_CONFIG])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^PKG_CONFIG$])
+m4trace:configure.ac:637: -1- AC_SUBST([PKG_CONFIG_PATH])
+m4trace:configure.ac:637: -1- AC_SUBST_TRACE([PKG_CONFIG_PATH])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^PKG_CONFIG_PATH$])
+m4trace:configure.ac:637: -1- AC_SUBST([PKG_CONFIG_LIBDIR])
+m4trace:configure.ac:637: -1- AC_SUBST_TRACE([PKG_CONFIG_LIBDIR])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^PKG_CONFIG_LIBDIR$])
+m4trace:configure.ac:637: -1- AC_SUBST([PKG_CONFIG])
+m4trace:configure.ac:637: -1- AC_SUBST_TRACE([PKG_CONFIG])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^PKG_CONFIG$])
+m4trace:configure.ac:637: -1- AC_SUBST([OPENSSL_CFLAGS])
+m4trace:configure.ac:637: -1- AC_SUBST_TRACE([OPENSSL_CFLAGS])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^OPENSSL_CFLAGS$])
+m4trace:configure.ac:637: -1- AC_SUBST([OPENSSL_LIBS])
+m4trace:configure.ac:637: -1- AC_SUBST_TRACE([OPENSSL_LIBS])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^OPENSSL_LIBS$])
+m4trace:configure.ac:637: -1- AH_OUTPUT([HAVE_OPENSSL_SSL_H], [/* Define to 1 if you have the <openssl/ssl.h> header file. */
+@%:@undef HAVE_OPENSSL_SSL_H])
+m4trace:configure.ac:637: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OPENSSL_SSL_H])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^HAVE_OPENSSL_SSL_H$])
+m4trace:configure.ac:637: -1- AH_OUTPUT([HAVE_OPENSSL_FIPS_H], [/* Define to 1 if you have the <openssl/fips.h> header file. */
+@%:@undef HAVE_OPENSSL_FIPS_H])
+m4trace:configure.ac:637: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OPENSSL_FIPS_H])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^HAVE_OPENSSL_FIPS_H$])
+m4trace:configure.ac:637: -1- AH_OUTPUT([HAVE_OPENSSL_SSL_H], [/* Define to 1 if you have the <openssl/ssl.h> header file. */
+@%:@undef HAVE_OPENSSL_SSL_H])
+m4trace:configure.ac:637: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OPENSSL_SSL_H])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^HAVE_OPENSSL_SSL_H$])
+m4trace:configure.ac:637: -1- AH_OUTPUT([HAVE_OPENSSL_FIPS_H], [/* Define to 1 if you have the <openssl/fips.h> header file. */
+@%:@undef HAVE_OPENSSL_FIPS_H])
+m4trace:configure.ac:637: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OPENSSL_FIPS_H])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^HAVE_OPENSSL_FIPS_H$])
+m4trace:configure.ac:637: -1- AC_SUBST([GNUTLS_CFLAGS])
+m4trace:configure.ac:637: -1- AC_SUBST_TRACE([GNUTLS_CFLAGS])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^GNUTLS_CFLAGS$])
+m4trace:configure.ac:637: -1- AC_SUBST([GNUTLS_LIBS])
+m4trace:configure.ac:637: -1- AC_SUBST_TRACE([GNUTLS_LIBS])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^GNUTLS_LIBS$])
+m4trace:configure.ac:637: -1- AH_OUTPUT([HAVE_OPENSSL_SSL_H], [/* Define to 1 if you have the <openssl/ssl.h> header file. */
+@%:@undef HAVE_OPENSSL_SSL_H])
+m4trace:configure.ac:637: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OPENSSL_SSL_H])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^HAVE_OPENSSL_SSL_H$])
+m4trace:configure.ac:637: -1- AH_OUTPUT([HAVE_OPENSSL_FIPS_H], [/* Define to 1 if you have the <openssl/fips.h> header file. */
+@%:@undef HAVE_OPENSSL_FIPS_H])
+m4trace:configure.ac:637: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OPENSSL_FIPS_H])
+m4trace:configure.ac:637: -1- m4_pattern_allow([^HAVE_OPENSSL_FIPS_H$])
+m4trace:configure.ac:708: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBINTL_H])
+m4trace:configure.ac:708: -1- m4_pattern_allow([^HAVE_LIBINTL_H$])
+m4trace:configure.ac:708: -1- AH_OUTPUT([HAVE_LIBINTL_H], [/* international headers */
+@%:@undef HAVE_LIBINTL_H])
+m4trace:configure.ac:708: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETTEXT])
+m4trace:configure.ac:708: -1- m4_pattern_allow([^HAVE_GETTEXT$])
+m4trace:configure.ac:708: -1- AH_OUTPUT([HAVE_GETTEXT], [/* has gettext in glibc */
+@%:@undef HAVE_GETTEXT])
+m4trace:configure.ac:723: -1- AC_SUBST([UCOMMON_INCLUDES])
+m4trace:configure.ac:723: -1- AC_SUBST_TRACE([UCOMMON_INCLUDES])
+m4trace:configure.ac:723: -1- m4_pattern_allow([^UCOMMON_INCLUDES$])
+m4trace:configure.ac:724: -1- AC_SUBST([UCOMMON_LOCALE])
+m4trace:configure.ac:724: -1- AC_SUBST_TRACE([UCOMMON_LOCALE])
+m4trace:configure.ac:724: -1- m4_pattern_allow([^UCOMMON_LOCALE$])
+m4trace:configure.ac:725: -1- AC_SUBST([UCOMMON_CFGPATH])
+m4trace:configure.ac:725: -1- AC_SUBST_TRACE([UCOMMON_CFGPATH])
+m4trace:configure.ac:725: -1- m4_pattern_allow([^UCOMMON_CFGPATH$])
+m4trace:configure.ac:726: -1- AC_SUBST([UCOMMON_VARPATH])
+m4trace:configure.ac:726: -1- AC_SUBST_TRACE([UCOMMON_VARPATH])
+m4trace:configure.ac:726: -1- m4_pattern_allow([^UCOMMON_VARPATH$])
+m4trace:configure.ac:727: -1- AC_SUBST([UCOMMON_PREFIX])
+m4trace:configure.ac:727: -1- AC_SUBST_TRACE([UCOMMON_PREFIX])
+m4trace:configure.ac:727: -1- m4_pattern_allow([^UCOMMON_PREFIX$])
+m4trace:configure.ac:728: -1- AC_DEFINE_TRACE_LITERAL([UCOMMON_PREFIX])
+m4trace:configure.ac:728: -1- m4_pattern_allow([^UCOMMON_PREFIX$])
+m4trace:configure.ac:728: -1- AH_OUTPUT([UCOMMON_PREFIX], [/* config path */
+@%:@undef UCOMMON_PREFIX])
+m4trace:configure.ac:729: -1- AC_DEFINE_TRACE_LITERAL([UCOMMON_CFGPATH])
+m4trace:configure.ac:729: -1- m4_pattern_allow([^UCOMMON_CFGPATH$])
+m4trace:configure.ac:729: -1- AH_OUTPUT([UCOMMON_CFGPATH], [/* config path */
+@%:@undef UCOMMON_CFGPATH])
+m4trace:configure.ac:730: -1- AC_DEFINE_TRACE_LITERAL([UCOMMON_VARPATH])
+m4trace:configure.ac:730: -1- m4_pattern_allow([^UCOMMON_VARPATH$])
+m4trace:configure.ac:730: -1- AH_OUTPUT([UCOMMON_VARPATH], [/* config path */
+@%:@undef UCOMMON_VARPATH])
+m4trace:configure.ac:731: -1- AC_DEFINE_TRACE_LITERAL([UCOMMON_LOCALE])
+m4trace:configure.ac:731: -1- m4_pattern_allow([^UCOMMON_LOCALE$])
+m4trace:configure.ac:731: -1- AH_OUTPUT([UCOMMON_LOCALE], [/* locale path */
+@%:@undef UCOMMON_LOCALE])
+m4trace:configure.ac:733: -1- AC_SUBST([DOXYGEN])
+m4trace:configure.ac:733: -1- AC_SUBST_TRACE([DOXYGEN])
+m4trace:configure.ac:733: -1- m4_pattern_allow([^DOXYGEN$])
+m4trace:configure.ac:734: -1- AC_SUBST([DOXYGEN])
+m4trace:configure.ac:734: -1- AC_SUBST_TRACE([DOXYGEN])
+m4trace:configure.ac:734: -1- m4_pattern_allow([^DOXYGEN$])
+m4trace:configure.ac:735: -1- AC_SUBST([CHECKFLAGS])
+m4trace:configure.ac:735: -1- AC_SUBST_TRACE([CHECKFLAGS])
+m4trace:configure.ac:735: -1- m4_pattern_allow([^CHECKFLAGS$])
+m4trace:configure.ac:736: -1- AC_SUBST([CXXFLAGS])
+m4trace:configure.ac:736: -1- AC_SUBST_TRACE([CXXFLAGS])
+m4trace:configure.ac:736: -1- m4_pattern_allow([^CXXFLAGS$])
+m4trace:configure.ac:737: -1- AC_SUBST([UCOMMON_VISIBILITY])
+m4trace:configure.ac:737: -1- AC_SUBST_TRACE([UCOMMON_VISIBILITY])
+m4trace:configure.ac:737: -1- m4_pattern_allow([^UCOMMON_VISIBILITY$])
+m4trace:configure.ac:738: -1- AC_SUBST([UCOMMON_INCLUDES])
+m4trace:configure.ac:738: -1- AC_SUBST_TRACE([UCOMMON_INCLUDES])
+m4trace:configure.ac:738: -1- m4_pattern_allow([^UCOMMON_INCLUDES$])
+m4trace:configure.ac:739: -1- AC_SUBST([UCOMMON_LOCALE])
+m4trace:configure.ac:739: -1- AC_SUBST_TRACE([UCOMMON_LOCALE])
+m4trace:configure.ac:739: -1- m4_pattern_allow([^UCOMMON_LOCALE$])
+m4trace:configure.ac:740: -1- AC_SUBST([UCOMMON_LINKED])
+m4trace:configure.ac:740: -1- AC_SUBST_TRACE([UCOMMON_LINKED])
+m4trace:configure.ac:740: -1- m4_pattern_allow([^UCOMMON_LINKED$])
+m4trace:configure.ac:741: -1- AC_SUBST([UCOMMON_MODEL])
+m4trace:configure.ac:741: -1- AC_SUBST_TRACE([UCOMMON_MODEL])
+m4trace:configure.ac:741: -1- m4_pattern_allow([^UCOMMON_MODEL$])
+m4trace:configure.ac:742: -1- AC_SUBST([UCOMMON_FLAGS])
+m4trace:configure.ac:742: -1- AC_SUBST_TRACE([UCOMMON_FLAGS])
+m4trace:configure.ac:742: -1- m4_pattern_allow([^UCOMMON_FLAGS$])
+m4trace:configure.ac:743: -1- AC_SUBST([UCOMMON_CLINK])
+m4trace:configure.ac:743: -1- AC_SUBST_TRACE([UCOMMON_CLINK])
+m4trace:configure.ac:743: -1- m4_pattern_allow([^UCOMMON_CLINK$])
+m4trace:configure.ac:744: -1- AC_SUBST([UCOMMON_LIBC])
+m4trace:configure.ac:744: -1- AC_SUBST_TRACE([UCOMMON_LIBC])
+m4trace:configure.ac:744: -1- m4_pattern_allow([^UCOMMON_LIBC$])
+m4trace:configure.ac:745: -1- AC_SUBST([UCOMMON_LIBS])
+m4trace:configure.ac:745: -1- AC_SUBST_TRACE([UCOMMON_LIBS])
+m4trace:configure.ac:745: -1- m4_pattern_allow([^UCOMMON_LIBS$])
+m4trace:configure.ac:746: -1- AC_SUBST([SECURE_LOCAL])
+m4trace:configure.ac:746: -1- AC_SUBST_TRACE([SECURE_LOCAL])
+m4trace:configure.ac:746: -1- m4_pattern_allow([^SECURE_LOCAL$])
+m4trace:configure.ac:747: -1- AC_SUBST([SECURE_LIBS])
+m4trace:configure.ac:747: -1- AC_SUBST_TRACE([SECURE_LIBS])
+m4trace:configure.ac:747: -1- m4_pattern_allow([^SECURE_LIBS$])
+m4trace:configure.ac:748: -1- AC_SUBST([SECURE])
+m4trace:configure.ac:748: -1- AC_SUBST_TRACE([SECURE])
+m4trace:configure.ac:748: -1- m4_pattern_allow([^SECURE$])
+m4trace:configure.ac:749: -1- AC_SUBST([COMPAT])
+m4trace:configure.ac:749: -1- AC_SUBST_TRACE([COMPAT])
+m4trace:configure.ac:749: -1- m4_pattern_allow([^COMPAT$])
+m4trace:configure.ac:750: -1- AC_SUBST([OPENSSL_LIBS])
+m4trace:configure.ac:750: -1- AC_SUBST_TRACE([OPENSSL_LIBS])
+m4trace:configure.ac:750: -1- m4_pattern_allow([^OPENSSL_LIBS$])
+m4trace:configure.ac:751: -1- AC_SUBST([GNUTLS_LIBS])
+m4trace:configure.ac:751: -1- AC_SUBST_TRACE([GNUTLS_LIBS])
+m4trace:configure.ac:751: -1- m4_pattern_allow([^GNUTLS_LIBS$])
+m4trace:configure.ac:752: -1- AC_SUBST([LT_VERSION])
+m4trace:configure.ac:752: -1- AC_SUBST_TRACE([LT_VERSION])
+m4trace:configure.ac:752: -1- m4_pattern_allow([^LT_VERSION$])
+m4trace:configure.ac:753: -1- AC_SUBST([LT_GENERIC])
+m4trace:configure.ac:753: -1- AC_SUBST_TRACE([LT_GENERIC])
+m4trace:configure.ac:753: -1- m4_pattern_allow([^LT_GENERIC$])
+m4trace:configure.ac:754: -1- AC_SUBST([localedir])
+m4trace:configure.ac:754: -1- AC_SUBST_TRACE([localedir])
+m4trace:configure.ac:754: -1- m4_pattern_allow([^localedir$])
+m4trace:configure.ac:756: -1- AC_CONFIG_FILES([Makefile corelib/Makefile commoncpp/Makefile
+openssl/Makefile gnutls/Makefile nossl/Makefile utils/Makefile
+inc/Makefile inc/ucommon/Makefile inc/commoncpp/Makefile test/Makefile
+directive commoncpp.pc ucommon.pc ucommon.spec ucommon-config commoncpp-config])
+m4trace:configure.ac:756: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments.
+You should run autoupdate.], [])
+m4trace:configure.ac:756: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
+m4trace:configure.ac:756: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
+m4trace:configure.ac:756: -1- m4_pattern_allow([^LIB@&t@OBJS$])
+m4trace:configure.ac:756: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
+m4trace:configure.ac:756: -1- AC_SUBST_TRACE([LTLIBOBJS])
+m4trace:configure.ac:756: -1- m4_pattern_allow([^LTLIBOBJS$])
+m4trace:configure.ac:756: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])
+m4trace:configure.ac:756: -1- AC_SUBST([am__EXEEXT_TRUE])
+m4trace:configure.ac:756: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE])
+m4trace:configure.ac:756: -1- m4_pattern_allow([^am__EXEEXT_TRUE$])
+m4trace:configure.ac:756: -1- AC_SUBST([am__EXEEXT_FALSE])
+m4trace:configure.ac:756: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE])
+m4trace:configure.ac:756: -1- m4_pattern_allow([^am__EXEEXT_FALSE$])
+m4trace:configure.ac:756: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE])
+m4trace:configure.ac:756: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE])
+m4trace:configure.ac:756: -1- AC_SUBST_TRACE([top_builddir])
+m4trace:configure.ac:756: -1- AC_SUBST_TRACE([top_build_prefix])
+m4trace:configure.ac:756: -1- AC_SUBST_TRACE([srcdir])
+m4trace:configure.ac:756: -1- AC_SUBST_TRACE([abs_srcdir])
+m4trace:configure.ac:756: -1- AC_SUBST_TRACE([top_srcdir])
+m4trace:configure.ac:756: -1- AC_SUBST_TRACE([abs_top_srcdir])
+m4trace:configure.ac:756: -1- AC_SUBST_TRACE([builddir])
+m4trace:configure.ac:756: -1- AC_SUBST_TRACE([abs_builddir])
+m4trace:configure.ac:756: -1- AC_SUBST_TRACE([abs_top_builddir])
+m4trace:configure.ac:756: -1- AC_SUBST_TRACE([INSTALL])
+m4trace:configure.ac:756: -1- AC_SUBST_TRACE([MKDIR_P])
+m4trace:configure.ac:756: -1- AC_REQUIRE_AUX_FILE([ltmain.sh])
diff --git a/jni/libucommon/sources/cmodel.sh b/jni/libucommon/sources/cmodel.sh
new file mode 100755
index 0000000..292523c
--- /dev/null
+++ b/jni/libucommon/sources/cmodel.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+# Copyright (C) 2006-2009 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+args=""
+tag="no"
+shell=$1
+shift
+cmd=$1
+shift
+for arg in $* ; do
+	case "$arg" in
+	--tag=*)
+		tag="no"
+		;;
+	--tag)
+		tag="yes"
+		;;
+	*)
+		if test "$tag" = "no" ; then
+			args="$args $arg"
+		fi
+		tag="no"
+		;;
+	esac
+done
+
+# Replace for old libtool??
+
+version=`${cmd} --version 2>/dev/null | sed -e 's/([^)]*//g;s/^[^0-9]*//;s/[- ].*//g;q'` 
+if test -z "$version" ; then
+	version="1.5.x" ; fi
+case "$version" in
+1.3.*|1.4.*)
+	tag=""
+	;;
+*)
+	tag="--tag=CC"
+	;;
+esac
+exec $shell $cmd $tag $args
+
+
+
diff --git a/jni/libucommon/sources/commoncpp-config b/jni/libucommon/sources/commoncpp-config
new file mode 100644
index 0000000..4482c96
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp-config
@@ -0,0 +1,113 @@
+#!/bin/sh
+# Copyright (C) 2006-2007 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+prefix=/usr/local
+exec_prefix=${prefix}
+includedir=${prefix}/include
+
+if [ "`ldd /bin/sh | grep lib64`" = "" ]
+then
+    libdir=${exec_prefix}/lib
+else
+    libdir=${exec_prefix}/lib64
+fi
+
+usage()
+{
+    cat <<EOF
+Usage: commoncpp-config [OPTION]
+
+Known values for OPTION are:
+
+  --prefix=DIR      change ucommon prefix [default $prefix]
+  --exec-prefix=DIR change ucommon exec prefix [default $exec_prefix]
+  --libs        print library linking information
+  --cflags      print pre-processor and compiler flags
+  --includes    print framework include directory
+  --plugins     print framework plugin directory
+  --help        display this help and exit
+  --version     output version information
+EOF
+
+    exit $1
+}
+
+if test $# -eq 0; then
+    usage 1
+fi
+
+cflags=false
+libs=false
+
+while test $# -gt 0; do
+    case "$1" in
+    -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+    *) optarg= ;;
+    esac
+
+    case "$1" in
+    --prefix=*)
+        prefix=$optarg
+        includedir=$prefix/include
+        libdir=$prefix/lib
+        ;;
+
+    --prefix)
+        echo $prefix
+        ;;
+
+    --exec-prefix=*)
+        exec_prefix=$optarg
+        libdir=$exec_prefix/lib
+        ;;
+
+    --exec-prefix)
+        echo $exec_prefix
+        ;;
+
+    --version)
+        echo 6.0.7
+        exit 0
+        ;;
+
+    --help)
+        usage 0
+        ;;
+
+    --cflags)
+        echo  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+        ;;
+
+    --libtool-libs)
+        if [ -r ${libdir}/libcommoncpp.la ]
+        then
+            echo ${libdir}/libcommoncpp.la
+        fi
+        ;;
+
+    --libs)
+        echo -lcommoncpp -lucommon   -lrt  -ldl -lpthread -lc
+        ;;
+
+    --includes)
+        echo /usr/local/include/ucommon
+        ;;
+
+    *)
+        usage
+        exit 1
+        ;;
+
+    esac
+    shift
+done
+
+exit 0
diff --git a/jni/libucommon/sources/commoncpp-config.1 b/jni/libucommon/sources/commoncpp-config.1
new file mode 100644
index 0000000..c50f824
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp-config.1
@@ -0,0 +1,105 @@
+.\" ucommon-config - script to get information about common c++ library
+.\" Copyright (c) 2009 David Sugar <dyfet@gnutelephony.org>
+.\"
+.\" This manual page 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, write to the Free Software
+.\" Foundation, Inc.,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.\"
+.\" This manual page is written especially for Debian GNU/Linux.
+.\"
+.TH commoncpp-config "1" "July 2009" "GNU Common C++ Configuration" "GNU Telephony"
+.SH NAME
+commoncpp-config \- script to get information about common c++ library
+.SH SYNOPSIS
+.B commoncpp-config
+.BI [--prefix[= DIR ]]
+.BI [--exec-prefix[= DIR ]]
+.B [--version]
+.B [--cflags]
+.B [--libs]
+.B [--includes]
+.SH DESCRIPTION
+.B commoncpp-config
+is a tool that is used to configure to determine the compiler and
+linker flags that should be used to compile and link programs that use the
+.BR common c++
+library.
+.IR Note :
+.B commoncpp-config
+is provided for compatibility with legacy software only.  Current
+projects should use
+.B pkg-config
+instead!
+.SH OPTIONS
+.TP
+.B --version
+Print the currently installed version of
+.B common c++
+on the standard output.
+.TP
+.B --includes
+Print the include directory for
+.BR common c++
+headers
+.TP
+.B --libs
+Print the linker flags that are necessary to link a program with
+.BR common c++
+.TP
+.B --cflags
+Print the compiler flags that are necessary to compile a program with
+.BR common c++
+.TP
+.BI  --prefix= PREFIX
+If specified, use
+.I PREFIX
+instead of the installation prefix that
+.B common c++
+was built with when computing the output for the
+.B --cflags
+and
+.B --libs
+options. This option is also used for the exec prefix if
+.B --exec-prefix
+was not specified. This option must be specified before any
+.B --libs
+or
+.B --cflags
+options.
+.TP
+.BI --exec-prefix= PREFIX
+If specified, use
+.I PREFIX
+instead of the installation exec prefix that
+.B common c++
+was built with when computing the output for the
+.B --cflags
+and
+.B --libs
+options. This option must be specified before any
+.B --libs
+or
+.B --cflags
+options.
+.SH "SEE ALSO"
+.IR pkg-config (1).
+.SH AUTHOR
+.B commoncpp-config
+was written by David Sugar <dyfet@gnutelephony.org>.
+.SH COPYRIGHT
+Copyright \(co 2009 David Sugar, Tycho Softworks.
+.br
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
diff --git a/jni/libucommon/sources/commoncpp-config.cmake b/jni/libucommon/sources/commoncpp-config.cmake
new file mode 100755
index 0000000..18aea99
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp-config.cmake
@@ -0,0 +1,107 @@
+#!/bin/sh
+# Copyright (C) 2006-2007 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+prefix=${CMAKE_INSTALL_PREFIX}
+exec_prefix=${CMAKE_INSTALL_PREFIX}/bin
+includedir=${CMAKE_INSTALL_PREFIX}/include
+libdir=${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
+
+usage()
+{
+    cat <<EOF
+Usage: commoncpp-config [OPTION]
+
+Known values for OPTION are:
+
+  --prefix=DIR      change ucommon prefix [default $prefix]
+  --exec-prefix=DIR change ucommon exec prefix [default $exec_prefix]
+  --libs        print library linking information
+  --cflags      print pre-processor and compiler flags
+  --includes    print framework include directory
+  --plugins     print framework plugin directory
+  --help        display this help and exit
+  --version     output version information
+EOF
+
+    exit $1
+}
+
+if test $# -eq 0; then
+    usage 1
+fi
+
+cflags=false
+libs=false
+
+while test $# -gt 0; do
+    case "$1" in
+    -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+    *) optarg= ;;
+    esac
+
+    case "$1" in
+    --prefix=*)
+        prefix=$optarg
+        includedir=$prefix/include
+        libdir=$prefix/lib
+        ;;
+
+    --prefix)
+        echo $prefix
+        ;;
+
+    --exec-prefix=*)
+        exec_prefix=$optarg
+        libdir=$exec_prefix/lib
+        ;;
+
+    --exec-prefix)
+        echo $exec_prefix
+        ;;
+
+    --version)
+        echo ${PACKAGE_FILE_VERSION}
+        exit 0
+        ;;
+
+    --help)
+        usage 0
+        ;;
+
+    --cflags)
+        echo ${PACKAGE_FLAGS}
+        ;;
+
+    --libtool-libs)
+        if [ -r ${libdir}/libcommoncpp.la ]
+        then
+            echo ${libdir}/libcommoncpp.la
+        fi
+        ;;
+
+    --libs)
+        echo -lcommoncpp -lucommon ${PACKAGE_LIBS}
+        ;;
+
+    --includes)
+        echo ${CMAKE_INSTALL_PREFIX}/include
+        ;;
+
+    *)
+        usage
+        exit 1
+        ;;
+
+    esac
+    shift
+done
+
+exit 0
diff --git a/jni/libucommon/sources/commoncpp-config.in b/jni/libucommon/sources/commoncpp-config.in
new file mode 100755
index 0000000..82337ec
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp-config.in
@@ -0,0 +1,113 @@
+#!/bin/sh
+# Copyright (C) 2006-2007 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+includedir=@includedir@
+
+if [ "`ldd /bin/sh | grep lib64`" = "" ]
+then
+    libdir=${exec_prefix}/lib
+else
+    libdir=${exec_prefix}/lib64
+fi
+
+usage()
+{
+    cat <<EOF
+Usage: commoncpp-config [OPTION]
+
+Known values for OPTION are:
+
+  --prefix=DIR      change ucommon prefix [default $prefix]
+  --exec-prefix=DIR change ucommon exec prefix [default $exec_prefix]
+  --libs        print library linking information
+  --cflags      print pre-processor and compiler flags
+  --includes    print framework include directory
+  --plugins     print framework plugin directory
+  --help        display this help and exit
+  --version     output version information
+EOF
+
+    exit $1
+}
+
+if test $# -eq 0; then
+    usage 1
+fi
+
+cflags=false
+libs=false
+
+while test $# -gt 0; do
+    case "$1" in
+    -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+    *) optarg= ;;
+    esac
+
+    case "$1" in
+    --prefix=*)
+        prefix=$optarg
+        includedir=$prefix/include
+        libdir=$prefix/lib
+        ;;
+
+    --prefix)
+        echo $prefix
+        ;;
+
+    --exec-prefix=*)
+        exec_prefix=$optarg
+        libdir=$exec_prefix/lib
+        ;;
+
+    --exec-prefix)
+        echo $exec_prefix
+        ;;
+
+    --version)
+        echo @VERSION@
+        exit 0
+        ;;
+
+    --help)
+        usage 0
+        ;;
+
+    --cflags)
+        echo @UCOMMON_FLAGS@
+        ;;
+
+    --libtool-libs)
+        if [ -r ${libdir}/libcommoncpp.la ]
+        then
+            echo ${libdir}/libcommoncpp.la
+        fi
+        ;;
+
+    --libs)
+        echo -lcommoncpp -lucommon @UCOMMON_LIBS@
+        ;;
+
+    --includes)
+        echo @UCOMMON_INCLUDES@
+        ;;
+
+    *)
+        usage
+        exit 1
+        ;;
+
+    esac
+    shift
+done
+
+exit 0
diff --git a/jni/libucommon/sources/commoncpp.pc b/jni/libucommon/sources/commoncpp.pc
new file mode 100644
index 0000000..891b1ac
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp.pc
@@ -0,0 +1,7 @@
+includes=/usr/local/include/ucommon
+
+Name: ucommon
+Description: GNU Common C++ class framework
+Version: 6.0.7
+Libs:  -lcommoncpp -lucommon   -lrt  -ldl -lpthread
+Cflags:  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
diff --git a/jni/libucommon/sources/commoncpp.pc.cmake b/jni/libucommon/sources/commoncpp.pc.cmake
new file mode 100644
index 0000000..7e89c8f
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp.pc.cmake
@@ -0,0 +1,9 @@
+prefix=${CMAKE_INSTALL_PREFIX}
+libdir=${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
+includedir=${CMAKE_INSTALL_PREFIX}/include
+
+Name: ucommon
+Description: GNU Common C++ class framework
+Version: ${PACKAGE_FILE_VERSION}
+Libs:  -lcommoncpp -lucommon ${PACKAGE_LIBS}
+Cflags: ${PACKAGE_FLAGS}
diff --git a/jni/libucommon/sources/commoncpp.pc.in b/jni/libucommon/sources/commoncpp.pc.in
new file mode 100644
index 0000000..efb8679
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp.pc.in
@@ -0,0 +1,7 @@
+includes=@UCOMMON_INCLUDES@
+
+Name: ucommon
+Description: GNU Common C++ class framework
+Version: @VERSION@
+Libs:  -lcommoncpp -lucommon @UCOMMON_LINKED@
+Cflags: @UCOMMON_FLAGS@
diff --git a/jni/libucommon/sources/commoncpp/.deps/address.Plo b/jni/libucommon/sources/commoncpp/.deps/address.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/address.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/.deps/applog.Plo b/jni/libucommon/sources/commoncpp/.deps/applog.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/applog.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/.deps/dccp.Plo b/jni/libucommon/sources/commoncpp/.deps/dccp.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/dccp.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/.deps/dso.Plo b/jni/libucommon/sources/commoncpp/.deps/dso.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/dso.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/.deps/exception.Plo b/jni/libucommon/sources/commoncpp/.deps/exception.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/exception.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/.deps/file.Plo b/jni/libucommon/sources/commoncpp/.deps/file.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/file.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/.deps/linked.Plo b/jni/libucommon/sources/commoncpp/.deps/linked.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/linked.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/.deps/map.Plo b/jni/libucommon/sources/commoncpp/.deps/map.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/map.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/.deps/mime.Plo b/jni/libucommon/sources/commoncpp/.deps/mime.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/mime.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/.deps/pointer.Plo b/jni/libucommon/sources/commoncpp/.deps/pointer.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/pointer.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/.deps/process.Plo b/jni/libucommon/sources/commoncpp/.deps/process.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/process.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/.deps/serial.Plo b/jni/libucommon/sources/commoncpp/.deps/serial.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/serial.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/.deps/slog.Plo b/jni/libucommon/sources/commoncpp/.deps/slog.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/slog.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/.deps/socket.Plo b/jni/libucommon/sources/commoncpp/.deps/socket.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/socket.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/.deps/strchar.Plo b/jni/libucommon/sources/commoncpp/.deps/strchar.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/strchar.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/.deps/tcp.Plo b/jni/libucommon/sources/commoncpp/.deps/tcp.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/tcp.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/.deps/thread.Plo b/jni/libucommon/sources/commoncpp/.deps/thread.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/thread.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/.deps/tokenizer.Plo b/jni/libucommon/sources/commoncpp/.deps/tokenizer.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/tokenizer.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/.deps/udp.Plo b/jni/libucommon/sources/commoncpp/.deps/udp.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/.deps/udp.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/commoncpp/Makefile b/jni/libucommon/sources/commoncpp/Makefile
new file mode 100644
index 0000000..4a84ae5
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/Makefile
@@ -0,0 +1,706 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# commoncpp/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2013 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.
+
+
+
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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)/ucommon
+pkgincludedir = $(includedir)/ucommon
+pkglibdir = $(libdir)/ucommon
+pkglibexecdir = $(libexecdir)/ucommon
+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 = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+target_triplet = x86_64-unknown-linux-gnu
+subdir = commoncpp
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/autoconf/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+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)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libcommoncpp_la_LIBADD =
+am_libcommoncpp_la_OBJECTS = strchar.lo slog.lo exception.lo thread.lo \
+	address.lo socket.lo tcp.lo udp.lo dccp.lo applog.lo mime.lo \
+	process.lo serial.lo tokenizer.lo file.lo dso.lo linked.lo \
+	pointer.lo map.lo
+libcommoncpp_la_OBJECTS = $(am_libcommoncpp_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libcommoncpp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(libcommoncpp_la_LDFLAGS) \
+	$(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = -I. -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+SOURCES = $(libcommoncpp_la_SOURCES)
+DIST_SOURCES = $(libcommoncpp_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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing aclocal-1.13
+AMTAR = $${TAR-tar}
+AM_DEFAULT_VERBOSITY = 1
+AR = ar
+AS = as
+AUTOCONF = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoconf
+AUTOHEADER = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoheader
+AUTOMAKE = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing automake-1.13
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CHECKFLAGS = 
+COMPAT = commoncpp
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS =  -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DLLTOOL = dlltool
+DOXYGEN = /usr/bin/doxygen
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /usr/bin/grep -E
+EXEEXT = 
+FGREP = /usr/bin/grep -F
+GNUTLS_CFLAGS = 
+GNUTLS_LIBS = -lgnutls
+GREP = /usr/bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+LT_GENERIC = $(SHELL) $(top_builddir)/libtool
+LT_VERSION = 6:3:0
+MAKEINFO = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing makeinfo
+MANIFEST_TOOL = :
+MKDIR_P = /usr/bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_CFLAGS = 
+OPENSSL_LIBS = -lssl -lcrypto -lz 
+OTOOL = 
+OTOOL64 = 
+PACKAGE = ucommon
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = ucommon
+PACKAGE_STRING = ucommon 6.0.7
+PACKAGE_TARNAME = ucommon
+PACKAGE_URL = 
+PACKAGE_VERSION = 6.0.7
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PKG_CONFIG_LIBDIR = 
+PKG_CONFIG_PATH = 
+RANLIB = ranlib
+SECURE = gnutls
+SECURE_LIBS = -lgnutls
+SECURE_LOCAL = ../gnutls/libusecure.la -lgnutls
+SED = /usr/bin/sed
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = strip
+UCOMMON_CFGPATH = /etc
+UCOMMON_CLINK =  -lc
+UCOMMON_FLAGS =  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+UCOMMON_INCLUDES = /usr/local/include/ucommon
+UCOMMON_LIBC = -lc
+UCOMMON_LIBS =   -lrt  -ldl -lpthread -lc
+UCOMMON_LINKED =   -lrt  -ldl -lpthread
+UCOMMON_LOCALE = /usr/local/share/locale
+UCOMMON_MODEL = CXX
+UCOMMON_PREFIX = /usr/local
+UCOMMON_VARPATH = /var
+UCOMMON_VISIBILITY = 1
+VERSION = 6.0.7
+abs_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources/commoncpp
+abs_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources/commoncpp
+abs_top_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+abs_top_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+includes = ${includedir}/ucommon
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+libs = /usr/local/lib
+localedir = ${datarootdir}/locale
+localstatedir = /var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = /etc
+target = x86_64-unknown-linux-gnu
+target_alias = 
+target_cpu = x86_64
+target_os = linux-gnu
+target_vendor = unknown
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = ..
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = -version-info $(LT_VERSION)
+AM_CXXFLAGS = -I$(top_srcdir)/inc $(UCOMMON_FLAGS)
+lib_LTLIBRARIES = libcommoncpp.la
+libcommoncpp_la_LDFLAGS = ../corelib/libucommon.la   -lrt  -ldl -lpthread -lc $(RELEASE)
+libcommoncpp_la_SOURCES = strchar.cpp slog.cpp exception.cpp thread.cpp \
+	address.cpp socket.cpp tcp.cpp udp.cpp dccp.cpp applog.cpp mime.cpp \
+	process.cpp serial.cpp tokenizer.cpp file.cpp dso.cpp linked.cpp \
+	pointer.cpp map.cpp
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(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) --gnu commoncpp/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu commoncpp/Makefile
+.PRECIOUS: 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):
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	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)'; 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)'; \
+	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}; \
+	}
+
+libcommoncpp.la: $(libcommoncpp_la_OBJECTS) $(libcommoncpp_la_DEPENDENCIES) $(EXTRA_libcommoncpp_la_DEPENDENCIES) 
+	$(AM_V_CXXLD)$(libcommoncpp_la_LINK) -rpath $(libdir) $(libcommoncpp_la_OBJECTS) $(libcommoncpp_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/address.Plo
+include ./$(DEPDIR)/applog.Plo
+include ./$(DEPDIR)/dccp.Plo
+include ./$(DEPDIR)/dso.Plo
+include ./$(DEPDIR)/exception.Plo
+include ./$(DEPDIR)/file.Plo
+include ./$(DEPDIR)/linked.Plo
+include ./$(DEPDIR)/map.Plo
+include ./$(DEPDIR)/mime.Plo
+include ./$(DEPDIR)/pointer.Plo
+include ./$(DEPDIR)/process.Plo
+include ./$(DEPDIR)/serial.Plo
+include ./$(DEPDIR)/slog.Plo
+include ./$(DEPDIR)/socket.Plo
+include ./$(DEPDIR)/strchar.Plo
+include ./$(DEPDIR)/tcp.Plo
+include ./$(DEPDIR)/thread.Plo
+include ./$(DEPDIR)/tokenizer.Plo
+include ./$(DEPDIR)/udp.Plo
+
+.cpp.o:
+	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	$(AM_V_CXX)source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	$(AM_V_CXX)source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+#	$(AM_V_CXX)source='$<' object='$@' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+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`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(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
+
+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
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)"; 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:
+
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+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
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool 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-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 tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+
+
+# 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/jni/libucommon/sources/commoncpp/Makefile.am b/jni/libucommon/sources/commoncpp/Makefile.am
new file mode 100644
index 0000000..bb40afe
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/Makefile.am
@@ -0,0 +1,23 @@
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = -version-info $(LT_VERSION)
+AM_CXXFLAGS = -I$(top_srcdir)/inc $(UCOMMON_FLAGS)
+LIBTOOL = @LT_GENERIC@
+
+lib_LTLIBRARIES = libcommoncpp.la
+
+libcommoncpp_la_LDFLAGS = ../corelib/libucommon.la @UCOMMON_LIBS@ $(RELEASE)
+libcommoncpp_la_SOURCES = strchar.cpp slog.cpp exception.cpp thread.cpp \
+	address.cpp socket.cpp tcp.cpp udp.cpp dccp.cpp applog.cpp mime.cpp \
+	process.cpp serial.cpp tokenizer.cpp file.cpp dso.cpp linked.cpp \
+	pointer.cpp map.cpp
+
diff --git a/jni/libucommon/sources/commoncpp/Makefile.in b/jni/libucommon/sources/commoncpp/Makefile.in
new file mode 100644
index 0000000..b4f7aaf
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/Makefile.in
@@ -0,0 +1,706 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 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@
+
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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@
+target_triplet = @target@
+subdir = commoncpp
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/autoconf/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+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)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libcommoncpp_la_LIBADD =
+am_libcommoncpp_la_OBJECTS = strchar.lo slog.lo exception.lo thread.lo \
+	address.lo socket.lo tcp.lo udp.lo dccp.lo applog.lo mime.lo \
+	process.lo serial.lo tokenizer.lo file.lo dso.lo linked.lo \
+	pointer.lo map.lo
+libcommoncpp_la_OBJECTS = $(am_libcommoncpp_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libcommoncpp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(libcommoncpp_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)/autoconf/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+SOURCES = $(libcommoncpp_la_SOURCES)
+DIST_SOURCES = $(libcommoncpp_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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECKFLAGS = @CHECKFLAGS@
+COMPAT = @COMPAT@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LT_GENERIC@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_GENERIC = @LT_GENERIC@
+LT_VERSION = @LT_VERSION@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+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@
+RANLIB = @RANLIB@
+SECURE = @SECURE@
+SECURE_LIBS = @SECURE_LIBS@
+SECURE_LOCAL = @SECURE_LOCAL@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UCOMMON_CFGPATH = @UCOMMON_CFGPATH@
+UCOMMON_CLINK = @UCOMMON_CLINK@
+UCOMMON_FLAGS = @UCOMMON_FLAGS@
+UCOMMON_INCLUDES = @UCOMMON_INCLUDES@
+UCOMMON_LIBC = @UCOMMON_LIBC@
+UCOMMON_LIBS = @UCOMMON_LIBS@
+UCOMMON_LINKED = @UCOMMON_LINKED@
+UCOMMON_LOCALE = @UCOMMON_LOCALE@
+UCOMMON_MODEL = @UCOMMON_MODEL@
+UCOMMON_PREFIX = @UCOMMON_PREFIX@
+UCOMMON_VARPATH = @UCOMMON_VARPATH@
+UCOMMON_VISIBILITY = @UCOMMON_VISIBILITY@
+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_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+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@
+includes = @includes@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libs = @libs@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = -version-info $(LT_VERSION)
+AM_CXXFLAGS = -I$(top_srcdir)/inc $(UCOMMON_FLAGS)
+lib_LTLIBRARIES = libcommoncpp.la
+libcommoncpp_la_LDFLAGS = ../corelib/libucommon.la @UCOMMON_LIBS@ $(RELEASE)
+libcommoncpp_la_SOURCES = strchar.cpp slog.cpp exception.cpp thread.cpp \
+	address.cpp socket.cpp tcp.cpp udp.cpp dccp.cpp applog.cpp mime.cpp \
+	process.cpp serial.cpp tokenizer.cpp file.cpp dso.cpp linked.cpp \
+	pointer.cpp map.cpp
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(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) --gnu commoncpp/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu commoncpp/Makefile
+.PRECIOUS: 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):
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	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)'; 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)'; \
+	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}; \
+	}
+
+libcommoncpp.la: $(libcommoncpp_la_OBJECTS) $(libcommoncpp_la_DEPENDENCIES) $(EXTRA_libcommoncpp_la_DEPENDENCIES) 
+	$(AM_V_CXXLD)$(libcommoncpp_la_LINK) -rpath $(libdir) $(libcommoncpp_la_OBJECTS) $(libcommoncpp_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/address.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/applog.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dccp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dso.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exception.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linked.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/map.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mime.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pointer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serial.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slog.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strchar.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thread.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tokenizer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udp.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+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`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(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
+
+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
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)"; 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:
+
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+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
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool 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-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 tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+
+
+# 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/jni/libucommon/sources/commoncpp/address.cpp b/jni/libucommon/sources/commoncpp/address.cpp
new file mode 100644
index 0000000..ec452cd
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/address.cpp
@@ -0,0 +1,1211 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#include <ucommon-config.h>
+#ifdef  HAVE_ENDIAN_H
+#include <endian.h>
+#endif
+#include <commoncpp/config.h>
+#include <commoncpp/export.h>
+#include <commoncpp/thread.h>
+#include <commoncpp/address.h>
+#include <cstdlib>
+
+#ifndef _MSWINDOWS_
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#endif
+
+#if defined(_MSWINDOWS_) && !defined(__BIG_ENDIAN)
+#define __LITTLE_ENDIAN 1234
+#define __BIG_ENDIAN    4321
+#define __PDP_ENDIAN    3412
+#define __BYTE_ORDER    __LITTLE_ENDIAN
+#endif
+
+using namespace COMMONCPP_NAMESPACE;
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+enum {
+    MCAST_VALID_MASK = 0xF0000000,
+    MCAST_VALID_VALUE = 0xE0000000
+};
+#else
+enum {
+    MCAST_VALID_MASK = 0x000000F0,
+    MCAST_VALID_VALUE = 0x000000E0
+};
+#endif
+
+#ifndef _MSWINDOWS_
+Mutex IPV4Address::mutex;
+#endif
+
+IPV4Host IPV4Host::_host_;
+
+const IPV4MulticastValidator IPV4Multicast::validator;
+
+void IPV4MulticastValidator::operator()(const in_addr address) const
+{
+#ifdef  CCXX_EXCEPTIONS
+    // "0.0.0.0" is always accepted, as it is an "empty" address.
+    if ( (address.s_addr != INADDR_ANY) &&
+         (address.s_addr & MCAST_VALID_MASK) != MCAST_VALID_VALUE ) {
+        throw "Multicast address not in the valid range: from 224.0.0.1 through 239.255.255.255";
+    }
+#endif
+}
+
+IPV4Address::IPV4Address(const IPV4Validator *_validator) : 
+validator(_validator), ipaddr(NULL), addr_count(0), hostname(NULL) 
+{
+    *this = (long unsigned int)INADDR_ANY;
+}
+
+IPV4Address::IPV4Address(const char *address, const IPV4Validator *_validator) :
+validator(_validator), ipaddr(NULL), addr_count(0), hostname(NULL) 
+{
+    if(address == 0 || !strcmp(address, "*"))
+        setAddress(NULL);
+    else
+        setAddress(address);
+}
+
+IPV4Address::IPV4Address(struct in_addr addr, const IPV4Validator *_validator) :
+validator(_validator), ipaddr(NULL), hostname(NULL) 
+{
+    if ( this->validator ) {
+        (*validator)(addr);
+    }
+    addr_count = 1;
+    ipaddr = new struct in_addr[1];
+    ipaddr[0] = addr;
+}
+
+IPV4Address::IPV4Address(const IPV4Address &rhs) :
+validator(rhs.validator), addr_count(rhs.addr_count), hostname(NULL)
+{
+    ipaddr = new struct in_addr[addr_count];
+    memcpy(ipaddr, rhs.ipaddr, sizeof(struct in_addr) * addr_count);
+}
+
+IPV4Address::~IPV4Address()
+{
+    if(ipaddr) {
+        delete[] ipaddr;
+        ipaddr = NULL;
+    }
+    if(hostname) {
+        delString(hostname);
+        hostname = NULL;
+    }
+}
+
+struct in_addr IPV4Address::getAddress(void) const
+{
+    return ipaddr[0];
+}
+
+struct in_addr IPV4Address::getAddress(size_t i) const
+{
+    return (i < addr_count ? ipaddr[i] : ipaddr[0]);
+}
+
+bool IPV4Address::isInetAddress(void) const
+{
+    struct in_addr addr;
+    memset(&addr, 0, sizeof(addr));
+    if(memcmp(&addr, &ipaddr[0], sizeof(addr)))
+        return true;
+    return false;
+}
+
+IPV4Address &IPV4Address::operator=(const char *str)
+{
+    if(str == 0 || !strcmp(str, "*"))
+        str = "0.0.0.0";
+
+    setAddress(str);
+
+    return *this;
+}
+
+IPV4Address &IPV4Address::operator=(struct in_addr addr)
+{
+    if(ipaddr)
+        delete[] ipaddr;
+    if ( validator )
+        (*validator)(addr);
+    addr_count = 1;
+    ipaddr = new struct in_addr[1];
+    ipaddr[0] = addr;
+    if(hostname)
+        delString(hostname);
+    hostname = NULL;
+    return *this;
+}
+
+IPV4Address &IPV4Address::operator=(unsigned long addr)
+{
+    union {
+        uint32_t addr;
+        struct in_addr in4;
+    } aptr;
+
+    aptr.addr = addr;
+
+    if ( validator )
+        (*validator)(aptr.in4);
+
+    if(ipaddr)
+        delete[] ipaddr;
+
+    addr_count = 1;
+    ipaddr = new struct in_addr[1];
+    memcpy(ipaddr, &aptr.in4, sizeof(struct in_addr));
+    if(hostname)
+        delString(hostname);
+    hostname = NULL;
+    return *this;
+}
+
+IPV4Address &IPV4Address::operator=(const IPV4Address &rhs)
+{
+    if(this == &rhs) return *this;
+
+    addr_count = rhs.addr_count;
+    if(ipaddr)
+        delete[] ipaddr;
+    ipaddr = new struct in_addr[addr_count];
+    memcpy(ipaddr, rhs.ipaddr, sizeof(struct in_addr) * addr_count);
+    validator = rhs.validator;
+    if(hostname)
+        delString(hostname);
+    hostname = NULL;
+
+    return *this;
+}
+
+bool IPV4Address::operator==(const IPV4Address &a) const
+{
+    const IPV4Address *smaller, *larger;
+    size_t s, l;
+
+    if(addr_count > a.addr_count) {
+        smaller = &a;
+        larger  = this;
+    }
+    else {
+        smaller = this;
+        larger  = &a;
+    }
+
+    // Loop through all addr's in the smaller and make sure
+    // that they are all in the larger
+    for(s = 0; s < smaller->addr_count; s++) {
+        // bool found = false;
+        for(l = 0; l < larger->addr_count &&
+            memcmp((char *)&smaller->ipaddr[s], (char *)&larger->ipaddr[l], sizeof(struct in_addr)); l++); 
+        if(l == larger->addr_count) return false;
+    }
+    return true;
+}
+
+bool IPV4Address::operator!=(const IPV4Address &a) const
+{
+    // Impliment in terms of operator==
+    return (*this == a ? false : true);
+}
+
+IPV4Host &IPV4Host::operator&=(const IPV4Mask &ma)
+{
+    for(size_t i = 0; i < addr_count; i++) {
+        struct in_addr mask = ma.getAddress();
+        unsigned char *a = (unsigned char *)&ipaddr[i];
+        unsigned char *m = (unsigned char *)&mask;
+
+        for(size_t j = 0; j < sizeof(struct in_addr); ++j)
+            *(a++) &= *(m++);
+    }
+    if(hostname)
+        delString(hostname);
+    hostname = NULL;
+
+    return *this;
+}
+
+IPV4Host::IPV4Host(struct in_addr addr) :
+IPV4Address(addr) {}
+
+IPV4Host::IPV4Host(const char *host) :
+IPV4Address(host)
+{
+    char namebuf[256];
+
+    if(!host) {
+        if(this == &_host_) {
+            gethostname(namebuf, 256);
+            setAddress(namebuf);
+        }
+        else
+            *this = _host_;
+    }
+}
+
+bool IPV4Address::setIPAddress(const char *host)
+{
+    if(!host)
+        return false;
+
+#if defined(_MSWINDOWS_)
+    struct sockaddr_in addr;
+    addr.sin_addr.s_addr = inet_addr(host);
+    if ( validator )
+        (*validator)(addr.sin_addr);
+    if(addr.sin_addr.s_addr == INADDR_NONE)
+        return false;
+    *this = addr.sin_addr.s_addr;
+#else
+    struct in_addr l_addr;
+
+    int ok = inet_aton(host, &l_addr);
+    if ( validator )
+        (*validator)(l_addr);
+    if ( !ok )
+        return false;
+    *this = l_addr;
+#endif
+    return true;
+}
+
+void IPV4Address::setAddress(const char *host)
+{
+    if(hostname)
+        delString(hostname);
+    hostname = NULL;
+
+    if(!host)  // The way this is currently used, this can never happen
+    {
+        *this = (long unsigned int)htonl(INADDR_ANY);
+        return;
+    }
+
+#ifdef _MSWINDOWS_
+    if(!stricmp(host, "localhost")) {
+        *this = (long unsigned int)inet_addr("127.0.0.1");
+        return;
+    }
+#endif
+
+    if(!setIPAddress(host)) {
+        struct hostent *hp;
+        struct in_addr **bptr;
+#if defined(__GLIBC__)
+        char   hbuf[8192];
+        struct hostent hb;
+        int    rtn;
+
+        if(gethostbyname_r(host, &hb, hbuf, sizeof(hbuf), &hp, &rtn))
+            hp = NULL;
+#elif defined(sun)
+        char   hbuf[8192];
+        struct hostent hb;
+        int    rtn;
+
+        hp = gethostbyname_r(host, &hb, hbuf, sizeof(hbuf), &rtn);
+#elif (defined(__osf__) || defined(_MSWINDOWS_))
+        hp = gethostbyname(host);
+#else
+        mutex.enterMutex();
+        hp = gethostbyname(host);
+        mutex.leaveMutex();
+#endif
+        if(!hp) {
+            if(ipaddr)
+                delete[] ipaddr;
+            ipaddr = new struct in_addr[1];
+            memset(ipaddr, 0, sizeof(struct in_addr));
+            return;
+        }
+
+        // Count the number of IP addresses returned
+        addr_count = 0;
+        for(bptr = (struct in_addr **)hp->h_addr_list; *bptr != NULL; bptr++) {
+            addr_count++;
+        }
+
+        // Allocate enough memory
+        if(ipaddr)
+            delete[] ipaddr;    // Cause this was allocated in base
+        ipaddr = new struct in_addr[addr_count];
+
+        // Now go through the list again assigning to
+        // the member ipaddr;
+        bptr = (struct in_addr **)hp->h_addr_list;
+        for(unsigned int i = 0; i < addr_count; i++) {
+            if ( validator )
+                (*validator)(*bptr[i]);
+            ipaddr[i] = *bptr[i];
+        }
+    }
+}
+
+IPV4Broadcast::IPV4Broadcast(const char *net) :
+IPV4Address(net)
+{
+}
+
+IPV4Mask::IPV4Mask(const char *mask)
+{
+    unsigned long x = 0xffffffff;
+    int l = 32 - atoi(mask);
+
+    if(setIPAddress(mask))
+        return;
+
+    if(l < 1 || l > 32) {
+#ifdef  CCXX_EXCEPTIONS
+        if(Thread::getException() == Thread::throwObject)
+            throw((IPV4Address *)this);
+#endif
+        return;
+    }
+
+    *this = htonl(x << l);
+}
+
+const char *IPV4Address::getHostname(void) const
+{
+    struct hostent *hp = NULL;
+    struct in_addr addr0;
+
+    memset(&addr0, 0, sizeof(addr0));
+    if(!memcmp(&addr0, &ipaddr[0], sizeof(addr0)))
+        return NULL;
+
+#ifdef _MSWINDOWS_
+    memset(&addr0, 0xff, sizeof(addr0));
+    if(!memcmp(&addr0, &ipaddr[0], sizeof(addr0)))
+        return "255.255.255.255";
+    long a = inet_addr("127.0.0.1");
+    if(!memcmp(&a, &ipaddr[0], sizeof(a)))
+        return "localhost";
+#endif
+
+#if defined(__GLIBC__)
+    char   hbuf[8192];
+    struct hostent hb;
+    int    rtn;
+    if(gethostbyaddr_r((char *)&ipaddr[0], sizeof(addr0), AF_INET, &hb, hbuf, sizeof(hbuf), &hp, &rtn))
+        hp = NULL;
+#elif defined(sun)
+    char   hbuf[8192];
+    struct hostent hb;
+    int    rtn;
+    hp = gethostbyaddr_r((char *)&ipaddr[0], (int)sizeof(addr0), (int)AF_INET, &hb, hbuf, (int)sizeof(hbuf), &rtn);
+#elif defined(__osf__) || defined(_MSWINDOWS_)
+    hp = gethostbyaddr((char *)&ipaddr[0], sizeof(addr0), AF_INET);
+#else
+    mutex.enterMutex();
+    hp = gethostbyaddr((char *)&ipaddr[0], sizeof(addr0), AF_INET);
+    mutex.leaveMutex();
+#endif
+    if(hp) {
+        if(hostname)
+            delString(hostname);
+        hostname = newString(hp->h_name);
+        return hostname;
+    } else {
+        return inet_ntoa(ipaddr[0]);
+    }
+}
+
+IPV4Host operator&(const IPV4Host &addr, const IPV4Mask &mask)
+{
+    IPV4Host temp = addr;
+    temp &= mask;
+    return temp;
+}
+
+IPV4Multicast::IPV4Multicast() :
+    IPV4Address(&validator)
+{}
+
+IPV4Multicast::IPV4Multicast(const struct in_addr address) :
+    IPV4Address(address, &validator)
+{}
+
+IPV4Multicast::IPV4Multicast(const char *address) :
+    IPV4Address(address, &validator)
+{}
+
+#ifdef  CCXX_IPV6
+
+#ifndef _MSWINDOWS_
+Mutex IPV6Address::mutex;
+#endif
+
+const IPV6MulticastValidator IPV6Multicast::validator;
+
+void IPV6MulticastValidator::operator()(const in6_addr address) const
+{
+#ifdef  CCXX_EXCEPTIONS
+    // "0000:" is always accepted, as it is an "empty" address.
+    if ( (address.s6_addr[0] != 0 || address.s6_addr[1] != 0) &&
+         (address.s6_addr[0] != 0xff || address.s6_addr[1] < 0x1f)) {
+        throw "Multicast address not in the valid prefix ff00-ff1f:";
+    }
+#endif
+}
+
+IPV6Address::IPV6Address(const IPV6Validator *_validator) : 
+validator(_validator), hostname(NULL) 
+{
+    addr_count = 1;
+    ipaddr = new struct in6_addr[1];
+    memcpy(ipaddr, &in6addr_any, sizeof(struct in6_addr));
+}
+
+IPV6Address::IPV6Address(const char *address, const IPV6Validator *_validator) :
+validator(_validator), ipaddr(NULL), addr_count(0), hostname(NULL) 
+{
+    if(address == 0 || !strcmp(address, "*"))
+        setAddress(NULL);
+    else
+        setAddress(address);
+}
+
+IPV6Address::IPV6Address(struct in6_addr addr, const IPV6Validator *_validator) :
+validator(_validator), ipaddr(NULL), hostname(NULL) 
+{
+    if ( this->validator ) {
+        (*validator)(addr);
+    }
+    addr_count = 1;
+    ipaddr = new struct in6_addr[1];
+    memcpy(&ipaddr, &addr, sizeof(struct in6_addr));
+}
+
+IPV6Address::IPV6Address(const IPV6Address &rhs) :
+    validator(rhs.validator), addr_count(rhs.addr_count), hostname(NULL) {
+    ipaddr = new struct in6_addr[addr_count];
+    memcpy(ipaddr, rhs.ipaddr, sizeof(struct in6_addr) * addr_count);
+}
+
+IPV6Address::~IPV6Address()
+{
+    if(ipaddr) {
+        delete[] ipaddr;
+        ipaddr = NULL;
+    }
+    if(hostname) {
+        delString(hostname);
+        hostname = NULL;
+    }
+}
+
+struct in6_addr IPV6Address::getAddress(void) const
+{
+    return ipaddr[0];
+}
+
+struct in6_addr IPV6Address::getAddress(size_t i) const
+{
+    return (i < addr_count ? ipaddr[i] : ipaddr[0]);
+}
+
+bool IPV6Address::isInetAddress(void) const
+{
+    struct in6_addr addr;
+    memset(&addr, 0, sizeof(addr));
+    if(!ipaddr)
+        return false;
+    if(memcmp(&addr, &ipaddr[0], sizeof(addr)))
+        return true;
+    return false;
+}
+
+IPV6Address &IPV6Address::operator=(const char *str)
+{
+    if(str == 0 || !strcmp(str, "*"))
+        str = "::";
+
+    setAddress(str);
+
+    return *this;
+}
+
+IPV6Address &IPV6Address::operator=(struct in6_addr addr)
+{
+    if(ipaddr)
+        delete[] ipaddr;
+    if ( validator )
+        (*validator)(addr);
+    addr_count = 1;
+    ipaddr = new struct in6_addr[1];
+    ipaddr[0] = addr;
+    if(hostname)
+        delString(hostname);
+    hostname = NULL;
+    return *this;
+}
+
+IPV6Address &IPV6Address::operator=(const IPV6Address &rhs)
+{
+    if(this == &rhs) return *this;
+
+    addr_count = rhs.addr_count;
+    if(ipaddr)
+        delete[] ipaddr;
+    ipaddr = new struct in6_addr[addr_count];
+    memcpy(ipaddr, rhs.ipaddr, sizeof(struct in6_addr) * addr_count);
+    validator = rhs.validator;
+    if(hostname)
+        delString(hostname);
+    hostname = NULL;
+
+    return *this;
+}
+
+bool IPV6Address::operator==(const IPV6Address &a) const
+{
+    const IPV6Address *smaller, *larger;
+    size_t s, l;
+
+    if(addr_count > a.addr_count) {
+        smaller = &a;
+        larger  = this;
+    }
+    else {
+        smaller = this;
+        larger  = &a;
+    }
+
+    // Loop through all addr's in the smaller and make sure
+    // that they are all in the larger
+    for(s = 0; s < smaller->addr_count; s++) {
+        // bool found = false;
+        for(l = 0; l < larger->addr_count &&
+            memcmp((char *)&smaller->ipaddr[s], (char *)&larger->ipaddr[l], sizeof(struct in6_addr)); l++);
+        if(l == larger->addr_count) return false;
+    }
+    return true;
+}
+
+bool IPV6Address::operator!=(const IPV6Address &a) const
+{
+    // Impliment in terms of operator==
+    return (*this == a ? false : true);
+}
+
+IPV6Host &IPV6Host::operator&=(const IPV6Mask &ma)
+{
+    for(size_t i = 0; i < addr_count; i++) {
+        struct in6_addr mask = ma.getAddress();
+        unsigned char *a = (unsigned char *)&ipaddr[i];
+        unsigned char *m = (unsigned char *)&mask;
+
+        for(size_t j = 0; j < sizeof(struct in6_addr); ++j)
+            *(a++) &= *(m++);
+    }
+    if(hostname)
+        delString(hostname);
+    hostname = NULL;
+
+    return *this;
+}
+
+IPV6Host::IPV6Host(struct in6_addr addr) :
+IPV6Address(addr) {}
+
+IPV6Host::IPV6Host(const char *host) :
+IPV6Address(host)
+{
+    char namebuf[256];
+
+    if(!host) {
+        gethostname(namebuf, 256);
+        setAddress(namebuf);
+    }
+}
+
+bool IPV6Address::setIPAddress(const char *host)
+{
+    if(!host)
+        return false;
+
+    struct in6_addr l_addr;
+
+#ifdef  _MSWINDOWS_
+    struct sockaddr saddr;
+    int slen = sizeof(saddr);
+    struct sockaddr_in6 *paddr = (struct sockaddr_in6 *)&saddr;
+    int ok = WSAStringToAddress((LPSTR)host, AF_INET6, NULL, &saddr, &slen);
+    l_addr = paddr->sin6_addr;
+#else
+    int ok = inet_pton(AF_INET6, host, &l_addr);
+#endif
+    if ( validator )
+        (*validator)(l_addr);
+    if ( !ok )
+        return false;
+    *this = l_addr;
+    return true;
+}
+
+#if defined(HAVE_GETADDRINFO) && !defined(HAVE_GETHOSTBYNAME2)
+
+void IPV6Address::setAddress(const char *host)
+{
+    if(hostname)
+        delString(hostname);
+    hostname = NULL;
+
+    if(!host)  // The way this is currently used, this can never happen
+        host = "::";
+
+#ifdef  _MSWINDOWS_
+    if(!stricmp(host, "localhost"))
+        host = "::1";
+#endif
+
+    if(!setIPAddress(host)) {
+        struct addrinfo hint, *list = NULL, *first;
+        memset(&hint, 0, sizeof(hint));
+        hint.ai_family = AF_INET6;
+        struct in6_addr *addr;
+        struct sockaddr_in6 *ip6addr;
+
+        if(getaddrinfo(host, NULL, &hint, &list) || !list) {
+            if(ipaddr)
+                delete[] ipaddr;
+            ipaddr = new struct in6_addr[1];
+            memset((void *)&ipaddr[0], 0, sizeof(struct in6_addr));
+            return;
+        }
+
+        // Count the number of IP addresses returned
+        addr_count = 0;
+        first = list;
+        while(list) {
+            ++addr_count;
+            list = list->ai_next;
+        }
+
+        // Allocate enough memory
+        if(ipaddr)
+            delete[] ipaddr;    // Cause this was allocated in base
+        ipaddr = new struct in6_addr[addr_count];
+
+        // Now go through the list again assigning to
+        // the member ipaddr;
+        list = first;
+        int i = 0;
+        while(list) {
+            ip6addr = (struct sockaddr_in6 *)list->ai_addr;
+            addr = &ip6addr->sin6_addr;
+            if(validator)
+                (*validator)(*addr);
+            ipaddr[i++] = *addr;
+            list = list->ai_next;
+        }
+        freeaddrinfo(first);
+    }
+}
+
+#else
+
+void IPV6Address::setAddress(const char *host)
+{
+    if(hostname)
+        delString(hostname);
+    hostname = NULL;
+
+    if(!host)  // The way this is currently used, this can never happen
+        host = "::";
+
+#ifdef  _MSWINDOWS_
+    if(!stricmp(host, "localhost"))
+        host = "::1";
+#endif
+
+    if(!setIPAddress(host)) {
+        struct hostent *hp;
+        struct in6_addr **bptr;
+#if defined(__GLIBC__)
+        char   hbuf[8192];
+        struct hostent hb;
+        int    rtn;
+
+        if(gethostbyname2_r(host, AF_INET6, &hb, hbuf, sizeof(hbuf), &hp, &rtn))
+            hp = NULL;
+#elif defined(sun)
+        char   hbuf[8192];
+        struct hostent hb;
+        int    rtn;
+
+        hp = gethostbyname2_r(host, AF_INET6, &hb, hbuf, sizeof(hbuf), &rtn);
+#elif (defined(__osf__) || defined(_OSF_SOURCE) || defined(__hpux))
+        hp = gethostbyname(host);
+#elif defined(_MSWINDOWS_) && (!defined(_MSC_VER) || _MSC_VER < 1300)
+        hp = gethostbyname(host);
+#elif defined(_MSWINDOWS_)
+        hp = gethostbyname2(host, AF_INET6);
+#else
+        mutex.enterMutex();
+        hp = gethostbyname2(host, AF_INET6);
+        mutex.leaveMutex();
+#endif
+        if(!hp) {
+            if(ipaddr)
+                delete[] ipaddr;
+            ipaddr = new struct in6_addr[1];
+            memset((void *)&ipaddr[0], 0, sizeof(struct in6_addr));
+            return;
+        }
+
+        // Count the number of IP addresses returned
+        addr_count = 0;
+        for(bptr = (struct in6_addr **)hp->h_addr_list; *bptr != NULL; bptr++) {
+            addr_count++;
+        }
+
+        // Allocate enough memory
+        if(ipaddr)
+            delete[] ipaddr;    // Cause this was allocated in base
+        ipaddr = new struct in6_addr[addr_count];
+
+        // Now go through the list again assigning to
+        // the member ipaddr;
+        bptr = (struct in6_addr **)hp->h_addr_list;
+        for(unsigned int i = 0; i < addr_count; i++) {
+            if ( validator )
+                (*validator)(*bptr[i]);
+            ipaddr[i] = *bptr[i];
+        }
+    }
+}
+
+#endif
+
+IPV6Broadcast::IPV6Broadcast(const char *net) :
+IPV6Address(net)
+{
+}
+
+IPV6Mask::IPV6Mask(const char *mask) :
+IPV6Address(mask)
+{
+}
+
+const char *IPV6Address::getHostname(void) const
+{
+    struct hostent *hp = NULL;
+    struct in6_addr addr0;
+    static char strbuf[64];
+
+    memset(&addr0, 0, sizeof(addr0));
+    if(!memcmp(&addr0, &ipaddr[0], sizeof(addr0)))
+        return NULL;
+
+    if(!memcmp(&in6addr_loopback, &ipaddr[0], sizeof(addr0)))
+        return "localhost";
+
+#if defined(__GLIBC__)
+    char   hbuf[8192];
+    struct hostent hb;
+    int    rtn;
+    if(gethostbyaddr_r((char *)&ipaddr[0], sizeof(addr0), AF_INET6, &hb, hbuf, sizeof(hbuf), &hp, &rtn))
+        hp = NULL;
+#elif defined(sun)
+    char   hbuf[8192];
+    struct hostent hb;
+    int    rtn;
+    hp = gethostbyaddr_r((char *)&ipaddr[0], sizeof(addr0), AF_INET6, &hb, hbuf, (int)sizeof(hbuf), &rtn);
+#elif defined(__osf__) || defined(_MSWINDOWS_)
+    hp = gethostbyaddr((char *)&ipaddr[0], sizeof(addr0), AF_INET6);
+#else
+    mutex.enterMutex();
+    hp = gethostbyaddr((char *)&ipaddr[0], sizeof(addr0), AF_INET6);
+    mutex.leaveMutex();
+#endif
+    if(hp) {
+        if(hostname)
+            delString(hostname);
+        hostname = newString(hp->h_name);
+        return hostname;
+    } else {
+#ifdef  _MSWINDOWS_
+        struct sockaddr saddr;
+        struct sockaddr_in6 *paddr = (struct sockaddr_in6 *)&saddr;
+        DWORD slen = sizeof(strbuf);
+        memset(&saddr, 0, sizeof(saddr));
+        paddr->sin6_family = AF_INET6;
+        paddr->sin6_addr = ipaddr[0];
+        WSAAddressToString(&saddr, sizeof(saddr), NULL, strbuf, &slen);
+        return strbuf;
+#else
+        return inet_ntop(AF_INET6, &ipaddr[0], strbuf, sizeof(strbuf));
+#endif
+    }
+}
+
+IPV6Host operator&(const IPV6Host &addr, const IPV6Mask &mask)
+{
+    IPV6Host temp = addr;
+    temp &= mask;
+    return temp;
+}
+
+IPV6Multicast::IPV6Multicast() :
+IPV6Address(&validator)
+{}
+
+IPV6Multicast::IPV6Multicast(const char *address) :
+IPV6Address(address,&validator)
+{}
+
+#endif
+
+NAMESPACE_COMMONCPP
+using namespace std;
+
+ostream& operator<<(ostream &os, const IPV4Address &ia)
+{
+    os << inet_ntoa(getaddress(ia));
+    return os;
+}
+
+END_NAMESPACE
+
+typedef unsigned char   bit_t;
+
+static void bitmask(bit_t *bits, bit_t *mask, unsigned len)
+{
+    while(len--)
+        *(bits++) &= *(mask++);
+}
+
+static void bitimask(bit_t *bits, bit_t *mask, unsigned len)
+{
+    while(len--)
+        *(bits++) |= ~(*(mask++));
+}
+
+static void bitset(bit_t *bits, unsigned blen)
+{
+    bit_t mask;
+
+    while(blen) {
+        mask = (bit_t)(1 << 7);
+        while(mask && blen) {
+            *bits |= mask;
+            mask >>= 1;
+            --blen;
+        }
+        ++bits;
+    }
+}
+
+static unsigned bitcount(bit_t *bits, unsigned len)
+{
+    unsigned count = 0;
+    bit_t mask, test;
+
+    while(len--) {
+        mask = (bit_t)(1<<7);
+        test = *bits++;
+        while(mask) {
+            if(!(mask & test))
+                return count;
+            ++count;
+            mask >>= 1;
+        }
+    }
+    return count;
+}
+
+IPV4Cidr::IPV4Cidr()
+{
+    memset(&network, 0, sizeof(network));
+    memset(&netmask, 0, sizeof(netmask));
+}
+
+IPV4Cidr::IPV4Cidr(const char *cp)
+{
+    set(cp);
+}
+
+IPV4Cidr::IPV4Cidr(IPV4Cidr &cidr)
+{
+    memcpy(&network, &cidr.network, sizeof(network));
+    memcpy(&netmask, &cidr.netmask, sizeof(netmask));
+}
+
+bool IPV4Cidr::isMember(const struct in_addr &addr) const
+{
+    struct in_addr host = addr;
+
+    bitmask((bit_t *)&host, (bit_t *)&netmask, sizeof(host));
+    if(!memcmp(&host, &network, sizeof(host)))
+        return true;
+
+    return false;
+}
+
+bool IPV4Cidr::isMember(const struct sockaddr *saddr) const
+{
+    struct sockaddr_in *addr = (struct sockaddr_in *)saddr;
+    struct in_addr host;
+
+    if(saddr->sa_family != AF_INET)
+        return false;
+
+    memcpy(&host, &addr->sin_addr.s_addr, sizeof(host));
+    bitmask((bit_t *)&host, (bit_t *)&netmask, sizeof(host));
+    if(!memcmp(&host, &network, sizeof(host)))
+        return true;
+
+    return false;
+}
+
+struct in_addr IPV4Cidr::getBroadcast(void) const
+{
+    struct in_addr bcast;
+    memcpy(&bcast, &network, sizeof(network));
+    bitimask((bit_t *)&bcast, (bit_t *)&netmask, sizeof(bcast));
+    return bcast;
+}
+
+unsigned IPV4Cidr::getMask(const char *cp) const
+{
+    unsigned dcount = 0;
+    const char *gp = cp;
+    const char *mp = strchr(cp, '/');
+    unsigned char dots[4];
+#ifdef  _MSWINDOWS_
+    DWORD mask;
+#else
+    uint32_t mask;
+#endif
+
+    if(mp) {
+        if(!strchr(++mp, '.'))
+            return atoi(mp);
+
+        mask = inet_addr(mp);
+        return bitcount((bit_t *)&mask, sizeof(mask));
+    }
+
+    memset(dots, 0, sizeof(dots));
+    dots[0] = atoi(cp);
+    while(*gp && dcount < 3) {
+        if(*(gp++) == '.')
+            dots[++dcount] = atoi(gp);
+    }
+
+    if(dots[3])
+        return 32;
+
+    if(dots[2])
+        return 24;
+
+    if(dots[1])
+        return 16;
+
+    return 8;
+}
+
+void IPV4Cidr::set(const char *cp)
+{
+    char cbuf[INET_IPV4_ADDRESS_SIZE];
+    char *ep;
+    unsigned dots = 0;
+#ifdef  _MSWINDOWS_
+    DWORD addr;
+#endif
+
+    memset(&netmask, 0, sizeof(netmask));
+    bitset((bit_t *)&netmask, getMask(cp));
+    setString(cbuf, sizeof(cbuf), cp);
+
+    ep = (char *)strchr(cp, '/');
+
+    if(ep)
+        *ep = 0;
+
+    cp = cbuf;
+    while(NULL != (cp = strchr(cp, '.'))) {
+        ++dots;
+        ++cp;
+    }
+
+    while(dots++ < 3)
+        addString(cbuf, sizeof(cbuf), ".0");
+
+#ifdef  _MSWINDOWS_
+    addr = inet_addr(cbuf);
+    memcpy(&network, &addr, sizeof(network));
+#else
+    inet_aton(cbuf, &network);
+#endif
+    bitmask((bit_t *)&network, (bit_t *)&netmask, sizeof(network));
+}
+
+
+
+
+#ifdef  CCXX_IPV6
+
+IPV6Cidr::IPV6Cidr()
+{
+    memset(&network, 0, sizeof(network));
+    memset(&netmask, 0, sizeof(netmask));
+}
+
+IPV6Cidr::IPV6Cidr(const char *cp)
+{
+    set(cp);
+}
+
+IPV6Cidr::IPV6Cidr(IPV6Cidr &cidr)
+{
+    memcpy(&network, &cidr.network, sizeof(network));
+    memcpy(&netmask, &cidr.netmask, sizeof(netmask));
+}
+
+bool IPV6Cidr::isMember(const struct in6_addr &addr) const
+{
+    struct in6_addr host = addr;
+
+    bitmask((bit_t *)&host, (bit_t *)&netmask, sizeof(host));
+    if(!memcmp(&host, &network, sizeof(host)))
+        return true;
+
+    return false;
+}
+
+bool IPV6Cidr::isMember(const struct sockaddr *saddr) const
+{
+    struct sockaddr_in6 *addr = (struct sockaddr_in6 *)saddr;
+    struct in6_addr host;
+
+    if(saddr->sa_family != AF_INET6)
+        return false;
+
+    memcpy(&host, &addr->sin6_addr, sizeof(host));
+    bitmask((bit_t *)&host, (bit_t *)&netmask, sizeof(host));
+    if(!memcmp(&host, &network, sizeof(host)))
+        return true;
+
+    return false;
+}
+
+struct in6_addr IPV6Cidr::getBroadcast(void) const
+{
+    struct in6_addr bcast;
+    memcpy(&bcast, &network, sizeof(network));
+    bitimask((bit_t *)&bcast, (bit_t *)&netmask, sizeof(bcast));
+    return bcast;
+}
+
+unsigned IPV6Cidr::getMask(const char *cp) const
+{
+    unsigned count = 0, rcount = 0;
+    const char *sp = strchr(cp, '/');
+    int flag = 0;
+
+    if(sp)
+        return atoi(++sp);
+
+    if(!strncmp(cp, "ff00:", 5))
+        return 8;
+
+    if(!strncmp(cp, "fe80:", 5))
+        return 10;
+
+    if(!strncmp(cp, "2002:", 5))
+        return 16;
+
+    sp = strrchr(cp, ':');
+    while(*(++sp) == '0')
+        ++sp;
+    if(*sp)
+        return 128;
+
+    while(*cp && count < 128) {
+        if(*(cp++) == ':') {
+            count+= 16;
+            while(*cp == '0')
+                ++cp;
+            if(*cp == ':') {
+                if(!flag)
+                    rcount = count;
+                flag = 1;
+            }
+            else
+                flag = 0;
+        }
+    }
+    return rcount;
+}
+
+void IPV6Cidr::set(const char *cp)
+{
+    char cbuf[INET_IPV6_ADDRESS_SIZE];
+    char *ep;
+
+    memset(&netmask, 0, sizeof(netmask));
+    bitset((bit_t *)&netmask, getMask(cp));
+    setString(cbuf, sizeof(cbuf), cp);
+    ep = (char *)strchr(cp, '/');
+    if(ep)
+        *ep = 0;
+
+#ifdef  _MSWINDOWS_
+    int slen = sizeof(network);
+    WSAStringToAddressA(cbuf, AF_INET6, NULL, (struct sockaddr*)&network, &slen);
+#else
+    inet_pton(AF_INET6, cbuf, &network);
+#endif
+    bitmask((bit_t *)&network, (bit_t *)&netmask, sizeof(network));
+}
+
+#endif
+
diff --git a/jni/libucommon/sources/commoncpp/applog.cpp b/jni/libucommon/sources/commoncpp/applog.cpp
new file mode 100644
index 0000000..ac14a71
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/applog.cpp
@@ -0,0 +1,1230 @@
+// Copyright (C) 2005-2009 Angelo Naselli, Penta Engineering s.r.l.
+//
+// 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.
+//
+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#ifdef  NEW_STDCPP
+
+#include <ucommon-config.h>
+#include <commoncpp/config.h>
+#include <commoncpp/thread.h>
+#include <commoncpp/slog.h>
+#ifndef _MSWINDOWS_
+#include <sys/types.h>
+#include <sys/stat.h>
+#endif
+#include <string>
+#include <iomanip>
+#include <iostream>
+#include <fstream>
+#include <cstdio>
+#include <cstdlib>
+#include <stdarg.h>
+#include <errno.h>
+
+// TODO sc: test if has to move up now that it is into commoncpp
+// NOTE: the order of inclusion is important do not move following include line
+// redefinition of __EXPORT needed if we're compiling our dll
+#include <commoncpp/export.h>
+// local includes
+#include <commoncpp/applog.h>
+
+using namespace std;
+using namespace COMMONCPP_NAMESPACE;
+
+class logStruct
+{
+  public:
+    string       _ident;
+    int          _priority;
+    Slog::Level  _level;
+    bool         _enable;
+    bool         _clogEnable;
+    bool         _slogEnable;
+    size_t       _msgpos;
+
+    enum logEnum
+    {
+      BUFF_SIZE = 512,
+      LAST_CHAR = BUFF_SIZE - 1
+    };
+    char         _msgbuf[BUFF_SIZE];
+
+    logStruct() :  _ident("") ,  _priority(Slog::levelDebug),
+        _level(Slog::levelDebug), _enable(false),
+        _clogEnable(false), _slogEnable(false), _msgpos(0)
+    {
+      memset(_msgbuf, 0, BUFF_SIZE);
+    };
+
+    ~logStruct() {};
+};
+
+struct levelNamePair
+{
+  const char *name;
+  Slog::Level level;
+};
+
+#ifdef _MSWINDOWS_
+template class std::map<string, Slog::Level >;
+#endif
+
+class LevelName : public std::map<string, Slog::Level>
+{
+  public:
+
+    LevelName(const levelNamePair initval[], int num)
+    {
+      for (int i = 0; i < num; i++)
+        insert(make_pair(initval[i].name, initval[i].level));
+    };
+};
+
+class logger : public ost::ThreadQueue
+{
+  private:
+    string       _nomeFile;
+    std::fstream _logfs;
+    bool         _usePipe;
+    bool         _closedByApplog;
+
+  protected:
+    // to dequeue log messages and write them to file if not log_directly
+    virtual void  runQueue(void *data);
+    virtual void  startQueue(void);
+    virtual void  stopQueue(void);
+    virtual void  onTimer(void);
+    virtual void  final(void);
+            void _openFile();
+  
+  public:
+    logger(const char* logFileName = NULL, bool usePipe = false);
+    virtual ~logger();
+
+    // To change log file name
+    void logFileName(const char* FileName, bool usePipe = false);
+
+    void openFile();
+    void closeFile();
+
+};
+
+
+// mapping thread ID <-> logStruct (buffer)
+typedef std::map <cctid_t, logStruct> LogPrivateData;
+// map ident <-> levels
+typedef std::map <string, Slog::Level> IdentLevel;
+
+
+NAMESPACE_COMMONCPP
+class AppLogPrivate
+{
+  public:
+    // subscription and unsubsciption must be protected as well
+    ost::Mutex _subMutex;
+    // mapping thread ID <-> logStruct (buffer)
+    LogPrivateData _logs;
+    // map ident <-> levels
+    IdentLevel     _identLevel;
+    // log directly into file
+    bool           _logDirectly;
+    bool           _logPipe;
+    // log spooler
+    logger         *_pLogger;
+
+    string        _nomeFile;
+    Mutex         _lock;
+    std::fstream  _logfs;
+
+    static const levelNamePair _values[];
+    static LevelName           _assoc;
+
+    AppLogPrivate() : _pLogger(NULL) {}
+
+    ~AppLogPrivate()
+    {
+      if (_pLogger)
+        delete _pLogger;
+    }
+};
+END_NAMESPACE
+
+const levelNamePair AppLogPrivate::_values[] =
+{
+  { "emerg", Slog::levelEmergency },
+  { "alert", Slog::levelAlert },
+  { "critical", Slog::levelCritical },
+  { "error", Slog::levelError },
+  { "warn", Slog::levelWarning },
+  { "notice", Slog::levelNotice },
+  { "info", Slog::levelInfo },
+  { "debug", Slog::levelDebug }
+};
+
+AppLog alog;
+
+LevelName AppLogPrivate::_assoc(_values, sizeof AppLogPrivate::_values / sizeof *AppLogPrivate::_values);
+std::map<string, Slog::Level> *AppLog::assoc = &AppLogPrivate::_assoc;
+
+#if defined(CCXX_EXCEPTIONS)
+
+HEXdump::HEXdump(const unsigned char *buffer, int len, int max_len) : _str()
+{
+  std::stringstream sstr;
+
+
+  if (buffer == NULL || len <= 0)
+    return ;
+
+  long buf_len = (max_len > 0 && len > max_len) ? max_len : len;
+  long int addr = 0;
+  int cnt2 = 0;
+  int n;
+  int i;
+
+  sstr.str("");
+  // get exception from ifstream failures
+  sstr.exceptions(ifstream::failbit | ifstream::badbit);
+  try
+  {
+    sstr << std::endl;
+    sstr << "dump " << len << " byte." << std::endl;
+
+    for (n = 0; n < buf_len; n++)
+    {
+      if (cnt2 == 0)
+      {
+        //  Print address.
+        sstr << std::setw(7) << std::setfill('0') <<  int (addr) << " - ";
+        addr = addr + 16;
+      }
+      cnt2 = (cnt2 + 1) % 18;
+      if (cnt2 <= 16)
+      {
+        // print hex value
+        sstr << std::hex << std::setw(2) << std::setfill('0') <<  int (buffer[n]) << " ";
+      }
+      else
+      {
+        sstr << "  ";
+        sstr << std::setfill(' ');
+        for (i = n - cnt2 + 1; i < n; i++)
+        {
+          // print ascii value
+          if (buffer[i] < 32 || 126 < buffer[i])
+          {
+            sstr << '.';
+          }
+          else
+          {
+            sstr << buffer[i];
+          }
+        }
+        sstr << std::endl;
+        sstr << std::dec;
+        cnt2 = 0;
+        n--;
+      }
+    }
+
+    sstr << std::setfill(' ');
+
+    for (i = cnt2 + 1; i <= 16 ; i++)
+    {
+      sstr << std::setw(2) << "--" << " ";
+    }
+    sstr << "  ";
+
+    for (i = n - cnt2; cnt2 <= 16 && i < n; i++)
+    {
+      if (buffer[i] < 32 || 126 < buffer[i])
+      {
+        sstr << '.';
+      }
+      else
+      {
+        sstr << buffer[i];
+      }
+    }
+    sstr << std::dec;
+    if (max_len > 0 && len > max_len)
+      sstr << std::endl << "dump troncato a " << max_len << " byte." << std::endl;
+  }
+  catch (...)
+  {
+    sstr.str("HEXdump failed!");
+  }
+
+  _str = sstr.str();
+}
+
+#endif
+
+// class logger
+logger::logger(const char* logFileName, bool usePipe)  : ThreadQueue(NULL, 0, 0), _usePipe(usePipe), _closedByApplog(false)
+{
+  _nomeFile = "";
+
+  if (logFileName)
+    _nomeFile = logFileName;
+ 
+  openFile();
+}
+
+logger::~logger()
+{
+  Semaphore::post();
+  Thread::terminate();
+
+  _logfs.flush();
+  _logfs.close();
+}
+
+// New log file name
+void logger::logFileName(const char* FileName, bool usePipe)
+{
+  if (!FileName)
+    return;
+
+  _usePipe = usePipe;
+  _nomeFile = FileName;
+  if (_logfs.is_open())
+    _logfs.close();
+
+  openFile();
+}
+
+/// open also logger if applog->open() is invoked
+void logger::openFile()
+{
+  _closedByApplog=false;
+}
+
+///internal logger openFile needed to use pipe and avoid stream buffering in the case
+/// the consumer is not connected to pipe
+void logger::_openFile()
+{
+  if (!_closedByApplog && !_logfs.is_open())
+  {
+    if (!_nomeFile.empty())
+    {
+      _logfs.clear();
+      if (!_usePipe)
+      {
+        _logfs.open(_nomeFile.c_str(), std::ofstream::out | std::ofstream::app | std::ofstream::ate);
+      }
+#ifndef _MSWINDOWS_
+      else
+      {
+        // create pipe
+        int err = mkfifo(_nomeFile.c_str(), S_IREAD | S_IWRITE);
+        if (err == 0 || errno == EEXIST)
+        {
+          // and open it
+          _logfs.open(_nomeFile.c_str(), std::fstream::in | std::fstream::out);
+        }
+        else
+          THROW(AppLogException("Can't create pipe"));
+      }
+#endif
+      if (_logfs.fail())
+        THROW(AppLogException("Can't open log file name"));
+    }
+  }
+}
+
+/// close also logger if applog->close() is invoked
+void logger::closeFile()
+{
+   _closedByApplog = true;
+}
+    
+
+// writes into filename enqueued messages
+void logger::runQueue(void * data)
+{
+  char *str = (char *) data;
+
+  // if for some internal reasons file has been closed
+  // reopen it
+  try
+  {
+    _openFile();
+  }
+  catch (AppLogException e)
+  {
+    std::cerr << e.what() << std::endl;
+    slog.emerg("%s\n", e.what());
+    std::cerr.flush();
+  }
+  
+  if (_logfs.is_open())
+  {
+    _logfs << str;
+    _logfs.flush();
+  }
+  
+  //if we use a pipe to avoid increasing of stream buffer
+  // without a consumer, we open, use and close it
+  if ((_usePipe || _closedByApplog) && _logfs.is_open())
+  {
+    _logfs.flush();
+    _logfs.close();
+  }
+}
+
+void logger::startQueue()
+{
+}
+
+void logger::stopQueue()
+{
+}
+
+void logger::onTimer()
+{
+}
+
+void logger::final()
+{
+  if (started)
+  {
+    data_t *pFirst = first;
+    while (pFirst)
+    {
+      runQueue(pFirst->data);
+      pFirst = pFirst->next;
+    }
+  }
+}
+
+#ifndef _MSWINDOWS_
+AppLog::AppLog(const char* logFileName, bool logDirectly, bool usePipe) :
+    streambuf(), ostream((streambuf*) this)
+#else
+AppLog::AppLog(const char* logFileName, bool logDirectly) :
+    streambuf(), ostream((streambuf*) this)
+#endif
+{
+  d= NULL; // pedantic fussy about initing members before base classes...
+  d = new AppLogPrivate();
+  if (!d)
+    THROW(AppLogException("Memory allocation problem"));
+
+  d->_nomeFile = "";
+  d->_logDirectly = logDirectly;
+#ifndef _MSWINDOWS_
+  d->_logPipe = usePipe;
+#else
+  d->_logPipe = false;
+#endif
+  // level string to level value
+  //   assoc["emerg"]    = levelEmergency;
+  //   assoc["alert"]    = levelAlert;
+  //   assoc["critical"] = levelCritical;
+  //   assoc["error"]    = levelError;
+  //   assoc["warn"]     = levelWarning;
+  //   assoc["notice"]   = levelNotice;
+  //   assoc["info"]     = levelInfo;
+  //   assoc["debug"]    = levelDebug;
+
+  if (logFileName)
+    d->_nomeFile = logFileName;
+
+  if (!d->_logDirectly && logFileName)
+    d->_pLogger = new logger(logFileName, d->_logPipe);
+  else
+    d->_pLogger = NULL;
+
+  // writes to file directly
+  if (!d->_nomeFile.empty() && d->_logDirectly)
+  {
+    if (!d->_logPipe)
+    {
+      d->_logfs.open(d->_nomeFile.c_str(), std::fstream::in | std::fstream::out);
+
+      if (!d->_logfs.is_open())
+      {
+        d->_logfs.open(d->_nomeFile.c_str(), std::fstream::out | std::fstream::app);
+      }
+      else
+        d->_logfs.seekg(0, std::fstream::end);
+    }
+// on Windows pipe are not used as they are not supported on WinNT
+#ifndef _MSWINDOWS_
+    else
+    {
+      // create pipe
+      int err = mkfifo(d->_nomeFile.c_str(), S_IREAD | S_IWRITE);
+      if (err == 0 || errno == EEXIST)
+      {
+        // and open it
+        d->_logfs.open(d->_nomeFile.c_str(), std::fstream::in | std::fstream::out);
+      }
+      else
+        THROW(AppLogException("Can't create pipe"));
+    }
+#endif
+    if (d->_logfs.fail())
+      THROW(AppLogException("Can't open log file name"));
+  }
+
+  //from Error level on write to syslog also
+  slog.level(Slog::levelError);
+  slog.clogEnable(false);
+}
+
+AppLog::~AppLog()
+{
+  // if _logDirectly
+  close();
+  if (d) delete d;
+}
+
+void AppLog::subscribe()
+{
+  ost::MutexLock mtx(d->_subMutex);
+
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt == d->_logs.end())
+    {
+      // subscribes new thread
+      d->_logs[tid];
+    }
+  }
+}
+
+void AppLog::unsubscribe()
+{
+  ost::MutexLock mtx(d->_subMutex);
+
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt != d->_logs.end())
+    {
+      // unsubscribes thread
+      d->_logs.erase(logIt);
+    }
+  }
+}
+
+#ifndef _MSWINDOWS_
+void AppLog::logFileName(const char* FileName, bool logDirectly, bool usePipe)
+#else
+void AppLog::logFileName(const char* FileName, bool logDirectly)
+#endif
+{
+  if (!FileName)
+  {
+    slog.error("Null file name!");
+    return;
+  }
+
+  d->_lock.enterMutex();
+  d->_nomeFile = FileName;
+  close();
+  d->_logDirectly = logDirectly;
+#ifndef _MSWINDOWS_
+  d->_logPipe = usePipe;
+#else
+  d->_logPipe = false;
+#endif
+  if (!d->_logDirectly)
+  {
+    if (d->_pLogger)
+      d->_pLogger->logFileName(FileName, d->_logPipe);
+    else
+      d->_pLogger = new logger(FileName, d->_logPipe);
+
+    d->_lock.leaveMutex();
+    return;
+  }
+
+  // log directly
+  if (!d->_nomeFile.empty())
+  {
+    if (!d->_logPipe)
+    {
+      d->_logfs.open(d->_nomeFile.c_str(), std::fstream::out | std::fstream::app);
+    }
+#ifndef _MSWINDOWS_
+    else
+    {
+      // create pipe
+      int err = mkfifo(d->_nomeFile.c_str(), S_IREAD | S_IWRITE);
+      if (err == 0 || errno == EEXIST)
+      {
+        // and open it
+        d->_logfs.open(d->_nomeFile.c_str(), std::fstream::in | std::fstream::out);
+      }
+      else
+        THROW(AppLogException("Can't create pipe"));
+    }
+#endif
+    if (d->_logfs.fail())
+      THROW(AppLogException("Can't open log file name"));
+  }
+  d->_lock.leaveMutex();
+}
+
+// writes to log
+void AppLog::writeLog(bool endOfLine)
+{
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt == d->_logs.end())
+      return;
+
+    if ((d->_logDirectly && !d->_logfs.is_open() && !logIt->second._clogEnable) ||
+        (!d->_logDirectly && !d->_pLogger && !logIt->second._clogEnable))
+
+    {
+      logIt->second._msgpos = 0;
+      logIt->second._msgbuf[0] = '\0';
+      return;
+    }
+
+    if (logIt->second._enable)
+    {
+      time_t now;
+      struct tm *dt;
+      time(&now);
+      struct timeval detail_time;
+      gettimeofday(&detail_time, NULL);
+      dt = localtime(&now);
+      char buf[50];
+
+      const char *p = "unknown";
+      switch (logIt->second._priority)
+      {
+        case Slog::levelEmergency:
+          p = "emerg";
+          break;
+        case Slog::levelInfo:
+          p = "info";
+          break;
+        case Slog::levelError:
+          p = "error";
+          break;
+        case Slog::levelAlert:
+          p = "alert";
+          break;
+        case Slog::levelDebug:
+          p = "debug";
+          break;
+        case Slog::levelNotice:
+          p = "notice";
+          break;
+        case Slog::levelWarning:
+          p = "warn";
+          break;
+        case Slog::levelCritical:
+          p = "crit";
+          break;
+      }
+
+      snprintf(buf, sizeof(buf) - 1, "%04d-%02d-%02d %02d:%02d:%02d.%03d ",
+               dt->tm_year + 1900, dt->tm_mon + 1, dt->tm_mday,
+               dt->tm_hour, dt->tm_min, dt->tm_sec, (int)(detail_time.tv_usec / 1000));
+
+      buf[sizeof(buf)-1] = 0;    // per sicurezza
+
+      if (d->_logDirectly)
+      {
+        d->_lock.enterMutex();
+        if (d->_logfs.is_open())
+        {
+          d->_logfs << buf;
+          if (!logIt->second._ident.empty())
+            d->_logfs << logIt->second._ident.c_str() << ": ";
+          d->_logfs << "[" << p << "] ";
+
+          d->_logfs << logIt->second._msgbuf;
+
+          if (endOfLine)
+            d->_logfs << endl;
+
+          d->_logfs.flush();
+        }
+      }
+      else if (d->_pLogger)
+      {
+        // ThreadQueue
+        std::stringstream sstr;
+        sstr.str("");    // reset contents
+        sstr << buf;
+
+        if (!logIt->second._ident.empty())
+          sstr << logIt->second._ident.c_str() << ": ";
+        sstr << "[" << p << "] ";
+
+        sstr << logIt->second._msgbuf;
+        if (endOfLine)
+          sstr << endl;
+        sstr.flush();
+
+        if (sstr.fail())
+          cerr << "stringstream failed!!!! " << endl;
+
+        // enqueues log message
+        d->_pLogger->post((void *) sstr.str().c_str(), sstr.str().length() + 1);
+
+        d->_lock.enterMutex();
+      }
+
+      // slog it if error level is right
+      if (logIt->second._slogEnable && logIt->second._priority <= Slog::levelError)
+      {
+        slog((Slog::Level) logIt->second._priority) << logIt->second._msgbuf;
+        if (endOfLine) slog << endl;
+      }
+      if (logIt->second._clogEnable
+#ifndef _MSWINDOWS_
+          && (getppid() > 1)
+#endif
+         )
+      {
+        clog << logIt->second._msgbuf;
+        if (endOfLine)
+          clog << endl;
+      }
+
+      d->_lock.leaveMutex();
+    }
+
+    logIt->second._msgpos = 0;
+    logIt->second._msgbuf[0] = '\0';
+  }
+}
+
+void AppLog::close(void)
+{
+  if (d->_logDirectly)
+  {
+    d->_lock.enterMutex();
+    if (d->_logfs.is_open())
+    {
+      d->_logfs.flush();
+      d->_logfs.close();
+    }
+    d->_lock.leaveMutex();
+  }
+  else
+  {
+    if (d->_pLogger)
+      d->_pLogger->closeFile();
+  }
+}
+
+void AppLog::open(const char *ident)
+{
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt == d->_logs.end())
+      return;
+
+    if (d->_nomeFile.empty())
+    {
+      std::cerr << "Empty file name" << std::endl;
+      slog.emerg("Empty file nane!\n");
+    }
+    if (d->_logDirectly)
+    {
+      d->_lock.enterMutex();
+      if (!d->_logfs.is_open())
+      {
+        d->_logfs.open(d->_nomeFile.c_str(), std::fstream::out | std::fstream::app);
+      }
+      if (!d->_logfs.is_open())
+      {
+        std::cerr << "Can't open file name!" << std::endl;
+        slog.emerg("Can't open file name!\n");
+      }
+      d->_lock.leaveMutex();
+    }
+    else
+    {
+      if (d->_pLogger)
+      	d->_pLogger->openFile();
+    }
+    if (ident != NULL)
+      logIt->second._ident = ident;
+
+  }
+}
+
+void AppLog::identLevel(const char *ident, Slog::Level level)
+{
+  if (!ident)
+    return;
+
+  string id = ident;
+
+  IdentLevel::iterator idLevIt = d->_identLevel.find(id);
+  if (idLevIt == d->_identLevel.end())
+  {
+    d->_identLevel[id] = level;
+  }
+  else
+    idLevIt->second = level;
+
+}
+
+void AppLog::level(Slog::Level enable)
+{
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt == d->_logs.end())
+      return;
+    logIt->second._level = enable;
+  }
+}
+
+void AppLog::clogEnable(bool f)
+{
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt == d->_logs.end())
+      return;
+    logIt->second._clogEnable = f;
+  }
+}
+
+void AppLog::slogEnable(bool en)
+{
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt == d->_logs.end())
+      return;
+
+    logIt->second._slogEnable = en;
+  }
+}
+
+int AppLog::sync()
+{
+  int retVal = (pbase() != pptr());
+
+  if (fail())
+  {
+    slog(Slog::levelNotice) << "fail() is true, calling clear()" << endl;
+    clear();
+  }
+
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt != d->_logs.end())
+    {
+      retVal = (logIt->second._msgpos > 0);
+      if (retVal)
+      {
+        slog(Slog::levelNotice) << "sync called and msgpos > 0" << endl;
+      }
+    }
+  }
+
+  overflow(EOF);
+
+  return retVal;
+
+}
+
+int AppLog::overflow(int c)
+{
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt == d->_logs.end())
+      return c;
+    if (!logIt->second._enable)
+      return c;
+
+    if (c == '\n' || !c || c == EOF)
+    {
+      if (!logIt->second._msgpos)
+      {
+        if (c == '\n') writeLog(true);
+        return c;
+      }
+      if (logIt->second._msgpos < (int)(sizeof(logIt->second._msgbuf) - 1))
+        logIt->second._msgbuf[logIt->second._msgpos] = 0;
+      else
+        logIt->second._msgbuf[logIt->second._msgpos-1] = 0;
+
+      writeLog(c == '\n');
+      //reset buffer
+      logIt->second._msgpos = 0;
+
+      return c;
+    }
+
+    if (logIt->second._msgpos < (int)(sizeof(logIt->second._msgbuf) - 1))
+      logIt->second._msgbuf[logIt->second._msgpos++] = c;
+
+  }
+
+  return c;
+}
+
+void AppLog::error(const char *format, ...)
+{
+  va_list args;
+
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt == d->_logs.end())
+      return;
+
+    error();
+    if (!logIt->second._enable)
+      return;
+    overflow(EOF);
+
+    va_start(args, format);
+    logIt->second._msgbuf[logStruct::BUFF_SIZE-1] = '\0';
+    logIt->second._msgpos = vsnprintf(logIt->second._msgbuf, logStruct::BUFF_SIZE, format, args);
+    if (logIt->second._msgpos > logStruct::BUFF_SIZE - 1) logIt->second._msgpos = logStruct::BUFF_SIZE - 1;
+    overflow(EOF);
+    if (logIt->second._slogEnable)
+      slog.error(logIt->second._msgbuf);
+    va_end(args);
+  }
+}
+
+void AppLog::warn(const char *format, ...)
+{
+  va_list args;
+
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt == d->_logs.end())
+      return;
+
+    warn();
+    if (!logIt->second._enable)
+      return;
+    overflow(EOF);
+
+    va_start(args, format);
+    logIt->second._msgbuf[logStruct::BUFF_SIZE-1] = '\0';
+    logIt->second._msgpos = vsnprintf(logIt->second._msgbuf, logStruct::BUFF_SIZE, format, args);
+    if (logIt->second._msgpos > logStruct::BUFF_SIZE - 1) logIt->second._msgpos = logStruct::BUFF_SIZE - 1;
+    overflow(EOF);
+    if (logIt->second._slogEnable)
+      slog.warn(logIt->second._msgbuf);
+    va_end(args);
+  }
+}
+
+void AppLog::debug(const char *format, ...)
+{
+  va_list args;
+
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt == d->_logs.end())
+      return;
+
+    debug();
+    if (!logIt->second._enable)
+      return;
+    overflow(EOF);
+
+    va_start(args, format);
+    logIt->second._msgbuf[logStruct::BUFF_SIZE-1] = '\0';
+    logIt->second._msgpos = vsnprintf(logIt->second._msgbuf, logStruct::BUFF_SIZE, format, args);
+    if (logIt->second._msgpos > logStruct::BUFF_SIZE - 1) logIt->second._msgpos = logStruct::BUFF_SIZE - 1;
+    overflow(EOF);
+    va_end(args);
+  }
+}
+
+void AppLog::emerg(const char *format, ...)
+{
+  va_list args;
+
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt == d->_logs.end())
+      return;
+
+    emerg();
+    if (!logIt->second._enable)
+      return;
+    overflow(EOF);
+
+    va_start(args, format);
+    logIt->second._msgbuf[logStruct::BUFF_SIZE-1] = '\0';
+    logIt->second._msgpos = vsnprintf(logIt->second._msgbuf, logStruct::BUFF_SIZE, format, args);
+    if (logIt->second._msgpos > logStruct::BUFF_SIZE - 1) logIt->second._msgpos = logStruct::BUFF_SIZE - 1;
+    overflow(EOF);
+    if (logIt->second._slogEnable)
+      slog.emerg(logIt->second._msgbuf);
+    va_end(args);
+  }
+}
+
+void AppLog::alert(const char *format, ...)
+{
+  va_list args;
+
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt == d->_logs.end())
+      return;
+
+    alert();
+    if (!logIt->second._enable)
+      return;
+    overflow(EOF);
+
+    va_start(args, format);
+    logIt->second._msgbuf[logStruct::BUFF_SIZE-1] = '\0';
+    logIt->second._msgpos = vsnprintf(logIt->second._msgbuf, logStruct::BUFF_SIZE, format, args);
+    if (logIt->second._msgpos > logStruct::BUFF_SIZE - 1) logIt->second._msgpos = logStruct::BUFF_SIZE - 1;
+    overflow(EOF);
+    if (logIt->second._slogEnable)
+      slog.alert(logIt->second._msgbuf);
+    va_end(args);
+  }
+}
+
+void AppLog::critical(const char *format, ...)
+{
+  va_list args;
+
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt == d->_logs.end())
+      return;
+
+    critical();
+    if (!logIt->second._enable)
+      return;
+    overflow(EOF);
+
+    va_start(args, format);
+    logIt->second._msgbuf[logStruct::BUFF_SIZE-1] = '\0';
+    logIt->second._msgpos = vsnprintf(logIt->second._msgbuf, logStruct::BUFF_SIZE, format, args);
+    if (logIt->second._msgpos > logStruct::BUFF_SIZE - 1) logIt->second._msgpos = logStruct::BUFF_SIZE - 1;
+    overflow(EOF);
+    if (logIt->second._slogEnable)
+      slog.critical(logIt->second._msgbuf);
+    va_end(args);
+  }
+}
+
+void AppLog::notice(const char *format, ...)
+{
+  va_list args;
+
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt == d->_logs.end())
+      return;
+
+    notice();
+    if (!logIt->second._enable)
+      return;
+    overflow(EOF);
+
+    va_start(args, format);
+    logIt->second._msgbuf[logStruct::BUFF_SIZE-1] = '\0';
+    logIt->second._msgpos = vsnprintf(logIt->second._msgbuf, logStruct::BUFF_SIZE, format, args);
+    if (logIt->second._msgpos > logStruct::BUFF_SIZE - 1) logIt->second._msgpos = logStruct::BUFF_SIZE - 1;
+    overflow(EOF);
+    if (logIt->second._slogEnable)
+      slog.notice(logIt->second._msgbuf);
+    va_end(args);
+  }
+}
+
+void AppLog::info(const char *format, ...)
+{
+  va_list args;
+
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt == d->_logs.end())
+      return;
+
+    info();
+    if (!logIt->second._enable)
+      return;
+    overflow(EOF);
+
+    va_start(args, format);
+    logIt->second._msgbuf[logStruct::BUFF_SIZE-1] = '\0';
+    logIt->second._msgpos = vsnprintf(logIt->second._msgbuf, logStruct::BUFF_SIZE, format, args);
+    if (logIt->second._msgpos > logStruct::BUFF_SIZE - 1) logIt->second._msgpos = logStruct::BUFF_SIZE - 1;
+    overflow(EOF);
+    va_end(args);
+  }
+}
+
+AppLog &AppLog::operator()(Slog::Level lev)
+{
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt == d->_logs.end())
+      return *this;
+
+    // needed? overflow(EOF);
+
+    // enables log
+    Slog::Level th_lev = logIt->second._level;
+    logIt->second._enable = (th_lev >= lev);
+    // is there a log level per module?
+    if (!logIt->second._ident.empty())
+    {
+      std::string st = logIt->second._ident;
+      IdentLevel::iterator idLevIt = d->_identLevel.find(st);
+      if (idLevIt != d->_identLevel.end())
+      {
+        th_lev = idLevIt->second;
+        logIt->second._enable = (th_lev >= lev);
+      }
+    }
+
+    logIt->second._priority = lev;
+  }
+
+  return *this;
+}
+
+AppLog &AppLog::operator()(const char *ident, Slog::Level lev)
+{
+  Thread *pThr = getThread();
+  if (pThr)
+  {
+    cctid_t tid =  pThr->getId();
+
+    LogPrivateData::iterator logIt = d->_logs.find(tid);
+    if (logIt == d->_logs.end())
+      return this->operator()(lev);
+
+    logIt->second._enable =  true;
+    open(ident);
+  }
+
+  return this->operator()(lev);
+}
+
+
+AppLog& AppLog::operator<< (AppLog& (*pfManipulator)(AppLog&))
+{
+  return (*pfManipulator)(*this);
+}
+
+AppLog& AppLog::operator<< (ostream& (*pfManipulator)(ostream&))
+{
+  (*pfManipulator)(*(dynamic_cast<ostream*>(this)));
+
+  return  *this ;
+}
+
+#endif
+
diff --git a/jni/libucommon/sources/commoncpp/dccp.cpp b/jni/libucommon/sources/commoncpp/dccp.cpp
new file mode 100644
index 0000000..368485e
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/dccp.cpp
@@ -0,0 +1,705 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#include <ucommon-config.h>
+#include <commoncpp/config.h>
+#include <commoncpp/export.h>
+#include <commoncpp/string.h>
+#include <commoncpp/socket.h>
+#include <commoncpp/dccp.h>
+#include <errno.h>
+
+#ifdef _MSWINDOWS_
+#include <io.h>
+#define _IOLEN64    (unsigned)
+#define _IORET64    (int)
+typedef int socklen_t;
+
+#define socket_errno    WSAGetLastError()
+#else
+#include <sys/ioctl.h>
+#include <netinet/tcp.h>
+#ifdef HAVE_NET_IP6_H
+#include <netinet/ip6.h>
+#endif
+#define socket_errno errno
+# ifndef  O_NONBLOCK
+#  define O_NONBLOCK    O_NDELAY
+# endif
+# ifdef IPPROTO_IP
+#  ifndef  SOL_IP
+#   define SOL_IP   IPPROTO_IP
+#  endif // !SOL_IP
+# endif  // IPPROTO_IP
+#endif   // !WIN32
+
+#ifndef INADDR_LOOPBACK
+#define INADDR_LOOPBACK (unsigned long)0x7f000001
+#endif
+
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#ifdef HAVE_SYS_FILIO_H
+#include <sys/filio.h>
+#endif
+
+#if defined(__hpux)
+#define _XOPEN_SOURCE_EXTENDED
+#endif
+
+#ifdef  HAVE_NET_IF_H
+#include <net/if.h>
+#endif
+
+#ifndef _IOLEN64
+#define _IOLEN64
+#endif
+
+#ifndef _IORET64
+#define _IORET64
+#endif
+
+using namespace COMMONCPP_NAMESPACE;
+
+DCCPSocket::DCCPSocket(Family fam) :
+Socket(fam, SOCK_DCCP, IPPROTO_DCCP)
+{
+    family = fam;
+}
+
+DCCPSocket::DCCPSocket(DCCPSocket& server, timeout_t timeout) :
+Socket(accept(server.so, NULL, NULL))
+{
+    family = server.family;
+    Socket::state = CONNECTED;
+    socklen_t alen = sizeof(peer);
+
+    getpeername(so, (struct sockaddr *)&peer, &alen);
+
+    switch(family) {
+#ifdef  CCXX_IPV6
+    case IPV6:
+        if(!server.onAccept(IPV6Host(peer.ipv6.sin6_addr), peer.ipv6.sin6_port))
+            endSocket();
+        break;
+#endif
+    case IPV4:
+        if(!server.onAccept(IPV4Host(peer.ipv4.sin_addr), peer.ipv4.sin_port))
+            endSocket();
+        break;
+    }
+}
+
+#ifdef  HAVE_GETADDRINFO
+DCCPSocket::DCCPSocket(const char *name, Family fam, unsigned backlog) :
+Socket(fam, SOCK_DCCP, IPPROTO_DCCP)
+{
+    char namebuf[128], *cp;
+    struct addrinfo hint, *list = NULL, *first;
+    snprintf(namebuf, sizeof(namebuf), "%s", name);
+    cp = strrchr(namebuf, '/');
+    if(!cp)
+        cp = strrchr(namebuf, ':');
+
+    if(!cp) {
+        cp = namebuf;
+        name = NULL;
+    }
+    else {
+        name = namebuf;
+        *(cp++) = 0;
+        if(!strcmp(name, "*"))
+            name = NULL;
+    }
+
+    family = fam;
+    memset(&hint, 0, sizeof(hint));
+    hint.ai_family = family;
+    hint.ai_socktype = SOCK_DCCP;
+    hint.ai_protocol = IPPROTO_DCCP;
+    hint.ai_flags = AI_PASSIVE;
+
+    if(getaddrinfo(name, cp, &hint, &list) || !list) {
+        endSocket();
+        error(errBindingFailed, (char *)"Could not find service", errno);
+        return;
+    }
+
+#if defined(SO_REUSEADDR)
+    int opt = 1;
+    setsockopt(so, SOL_SOCKET, SO_REUSEADDR, (char *)&opt,
+            (socklen_t)sizeof(opt));
+#endif
+
+    first = list;
+    while(list) {
+        if(!bind(so, list->ai_addr, (socklen_t)list->ai_addrlen)) {
+            state = BOUND;
+            break;
+        }
+        list = list->ai_next;
+    }
+    freeaddrinfo(first);
+    if(state != BOUND) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not bind socket",socket_errno);
+        return;
+    }
+
+    if(listen(so, backlog)) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not listen on socket",socket_errno);
+        return;
+    }
+}
+#else
+DCCPSocket::DCCPSocket(const char *name, Family fam, unsigned backlog) :
+Socket(fam, SOCK_DCCP, IPPROTO_DCCP)
+{
+    char namebuf[128], *cp;
+    struct sockaddr_in addr;
+#ifdef  CCXX_IPV6
+    struct sockaddr_in6 addr6;
+#endif
+    struct sockaddr *ap = NULL;
+    socklen_t alen = 0;
+
+    struct servent *svc;
+
+    family = fam;
+    memset(&addr, 0, sizeof(addr));
+    snprintf(namebuf, sizeof(namebuf), "%s", name);
+    cp = strrchr(namebuf, '/');
+    if(!cp)
+        cp = strrchr(namebuf, ':');
+
+    if(!cp) {
+        cp = namebuf;
+        name = "*";
+    }
+    else {
+        name = namebuf;
+        *(cp++) = 0;
+    }
+
+    addr.sin_family = family;
+    if(isdigit(*cp))
+        addr.sin_port = htons(atoi(cp));
+    else {
+        mutex.enter();
+        svc = getservbyname(cp, "dccp");
+        if(svc)
+            addr.sin_port = svc->s_port;
+        mutex.leave();
+        if(!svc) {
+            endSocket();
+            error(errBindingFailed, "Could not find service", errno);
+            return;
+
+        }
+    }
+
+#if defined(SO_REUSEADDR)
+    int opt = 1;
+    setsockopt(so, SOL_SOCKET, SO_REUSEADDR, (char *)&opt,
+            (socklen_t)sizeof(opt));
+#endif
+
+    switch(family) {
+#ifdef  CCXX_IPV6
+    case IPV6: {
+        IPV6Address ia6(name);
+        addr6.sin6_port = addr.sin_port;
+        addr6.sin6_family = family;
+        addr6.sin6_addr = getaddress(ia6);
+        ap = (struct sockaddr *)&addr6;
+        alen = sizeof(addr6);
+        break;
+    }
+#endif
+    case IPV4:
+        IPV4Address ia(name);
+        addr.sin_addr = getaddress(ia);
+        ap = (struct sockaddr *)&addr;
+        alen = sizeof(addr);
+        break;
+    }
+
+    if(!ap || bind(so, (struct sockaddr *)ap, alen)) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not bind socket",socket_errno);
+        return;
+    }
+
+    if(listen(so, backlog)) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not listen on socket",
+                socket_errno);
+        return;
+    }
+    state = BOUND;
+}
+#endif
+
+DCCPSocket::DCCPSocket(const IPV4Address &ia, tpport_t port, unsigned backlog) :
+Socket(AF_INET, SOCK_DCCP, IPPROTO_DCCP)
+{
+    struct sockaddr_in addr;
+
+    memset(&addr, 0, sizeof(addr));
+    addr.sin_family = AF_INET;
+    addr.sin_addr = getaddress(ia);
+    addr.sin_port = htons(port);
+    family = IPV4;
+
+    memset(&peer, 0, sizeof(peer));
+    peer.ipv4 = addr;
+
+#if defined(SO_REUSEADDR)
+    int opt = 1;
+    setsockopt(so, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, (socklen_t)sizeof(opt));
+#endif
+    if(bind(so, (struct sockaddr *)&addr, sizeof(addr))) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not bind socket",socket_errno);
+        return;
+    }
+
+    if(listen(so, backlog)) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not listen on socket",socket_errno);
+        return;
+    }
+    state = BOUND;
+}
+
+#ifdef CCXX_IPV6
+DCCPSocket::DCCPSocket(const IPV6Address &ia, tpport_t port, unsigned backlog) :
+Socket(AF_INET6, SOCK_DCCP, IPPROTO_DCCP)
+{
+    struct sockaddr_in6 addr;
+
+    memset(&addr, 0, sizeof(addr));
+    addr.sin6_family = AF_INET6;
+    addr.sin6_addr = getaddress(ia);
+    addr.sin6_port = htons(port);
+
+    family = IPV6;
+    memset(&peer, 0, sizeof(peer));
+    peer.ipv6 = addr;
+
+#if defined(SO_REUSEADDR)
+    int opt = 1;
+    setsockopt(so, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, (socklen_t)sizeof(opt));
+#endif
+    if(bind(so, (struct sockaddr *)&addr, sizeof(addr))) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not bind socket",socket_errno);
+        return;
+    }
+
+    if(listen(so, backlog)) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not listen on socket",socket_errno);
+        return;
+    }
+    state = BOUND;
+}
+
+bool DCCPSocket::onAccept(const IPV6Host &ia, tpport_t port)
+{
+    return true;
+}
+
+#endif
+
+bool DCCPSocket::onAccept(const IPV4Host &ia, tpport_t port)
+{
+    return true;
+}
+
+IPV4Host DCCPSocket::getIPV4Sender(tpport_t *port) const
+{
+    if(port)
+        *port = ntohs(peer.ipv4.sin_port);
+    return IPV4Host(peer.ipv4.sin_addr);
+}
+
+#ifdef  CCXX_IPV6
+IPV6Host DCCPSocket::getIPV6Sender(tpport_t *port) const
+{
+    return IPV6Host(peer.ipv6.sin6_addr);
+}
+#endif
+
+DCCPSocket::~DCCPSocket()
+{
+    endSocket();
+}
+
+void DCCPSocket::disconnect(void)
+{
+    if(Socket::state != CONNECTED)
+        return;
+
+    endSocket();
+    so = socket(family, SOCK_DCCP, IPPROTO_DCCP);
+    if(so != INVALID_SOCKET)
+        Socket::state = AVAILABLE;
+}
+
+#ifdef  HAVE_GETADDRINFO
+void DCCPSocket::connect(const char *target)
+{
+    char namebuf[128];
+    char *cp;
+    struct addrinfo hint, *list = NULL, *next, *first;
+    bool connected = false;
+
+    snprintf(namebuf, sizeof(namebuf), "%s", target);
+    cp = strrchr(namebuf, '/');
+    if(!cp)
+        cp = strrchr(namebuf, ':');
+
+    if(!cp) {
+        connectError();
+        return;
+    }
+
+    *(cp++) = 0;
+
+    memset(&hint, 0, sizeof(hint));
+    hint.ai_family = family;
+    hint.ai_socktype = SOCK_DCCP;
+    hint.ai_protocol = IPPROTO_DCCP;
+
+    if(getaddrinfo(namebuf, cp, &hint, &list) || !list) {
+        connectError();
+        return;
+    }
+
+    first = list;
+
+    while(list) {
+        if(!::connect(so, list->ai_addr, (socklen_t)list->ai_addrlen)) {
+            connected = true;
+            break;
+        }
+        next = list->ai_next;
+        list = next;
+    }
+
+    freeaddrinfo(first);
+
+    if(!connected) {
+        connectError();
+        return;
+    }
+
+    Socket::state = CONNECTED;
+}
+#else
+void DCCPSocket::connect(const char *target)
+{
+    char namebuf[128];
+    char *cp;
+    struct servent *svc;
+    tpport_t port;
+
+    snprintf(namebuf, sizeof(namebuf), "%s", target);
+    cp = strrchr(namebuf, '/');
+    if(!cp)
+        cp = strrchr(namebuf, ':');
+
+    if(!cp) {
+        connectError();
+        return;
+    }
+
+    *(cp++) = 0;
+
+    if(isdigit(*cp))
+        port = atoi(cp);
+    else {
+        mutex.enter();
+        svc = getservbyname(cp, "dccp");
+        if(svc)
+            port = ntohs(svc->s_port);
+        mutex.leave();
+        if(!svc) {
+            connectError();
+            return;
+        }
+    }
+
+    switch(family) {
+    case IPV4:
+        connect(IPV4Host(namebuf), port);
+        break;
+#ifdef  CCXX_IPV6
+    case IPV6:
+        connect(IPV6Host(namebuf), port);
+        break;
+#endif
+    default:
+        connectError();
+    }
+}
+#endif
+
+void DCCPSocket::connect(const IPV4Host &host, tpport_t port, timeout_t timeout)
+{
+    size_t i;
+    fd_set fds;
+    struct timeval to;
+    bool connected = false;
+    int rtn;
+    int sockopt;
+    socklen_t len = sizeof(sockopt);
+
+    for(i = 0 ; i < host.getAddressCount(); i++) {
+        struct sockaddr_in addr;
+        memset(&addr, 0, sizeof(addr));
+        addr.sin_family = AF_INET;
+        addr.sin_addr = host.getAddress(i);
+        addr.sin_port = htons(port);
+
+        if(timeout)
+            setCompletion(false);
+
+        // Win32 will crash if you try to connect to INADDR_ANY.
+        if ( INADDR_ANY == addr.sin_addr.s_addr )
+            addr.sin_addr.s_addr = INADDR_LOOPBACK;
+        rtn = ::connect(so, (struct sockaddr *)&addr, (socklen_t)sizeof(addr));
+        if(!rtn) {
+            connected = true;
+            break;
+        }
+
+#ifndef _MSWINDOWS_
+        if(errno == EINPROGRESS)
+#else
+            if(WSAGetLastError() == WSAEINPROGRESS)
+#endif
+            {
+                FD_ZERO(&fds);
+                FD_SET(so, &fds);
+                to.tv_sec = timeout / 1000;
+                to.tv_usec = timeout % 1000 * 1000;
+
+                // timeout check for connect completion
+
+                if(::select((int)so + 1, NULL, &fds, NULL, &to) < 1)
+                    continue;
+
+                getsockopt(so, SOL_SOCKET, SO_ERROR, (char *)&sockopt, &len);
+                if(!sockopt) {
+                    connected = true;
+                    break;
+                }
+                endSocket();
+                so = socket(AF_INET, SOCK_DCCP, IPPROTO_DCCP);
+                if(so == INVALID_SOCKET)
+                    break;
+            }
+    }
+
+    setCompletion(true);
+    if(!connected) {
+        rtn = errno;
+        errno = rtn;
+        connectError();
+        return;
+    }
+
+    Socket::state = CONNECTED;
+}
+
+#ifdef  CCXX_IPV6
+void DCCPSocket::connect(const IPV6Host &host, tpport_t port, timeout_t timeout)
+{
+    size_t i;
+    fd_set fds;
+    struct timeval to;
+    bool connected = false;
+    int rtn;
+    int sockopt;
+    socklen_t len = sizeof(sockopt);
+
+    for(i = 0 ; i < host.getAddressCount(); i++) {
+        struct sockaddr_in6 addr;
+        memset(&addr, 0, sizeof(addr));
+        addr.sin6_family = AF_INET6;
+        addr.sin6_addr = host.getAddress(i);
+        addr.sin6_port = htons(port);
+
+        if(timeout)
+            setCompletion(false);
+
+        // Win32 will crash if you try to connect to INADDR_ANY.
+        if ( !memcmp(&addr.sin6_addr, &in6addr_any, sizeof(in6addr_any)))
+            memcpy(&addr.sin6_addr, &in6addr_loopback, sizeof(in6addr_loopback));
+        rtn = ::connect(so, (struct sockaddr *)&addr, (socklen_t)sizeof(addr));
+        if(!rtn) {
+            connected = true;
+            break;
+        }
+
+#ifndef _MSWINDOWS_
+        if(errno == EINPROGRESS)
+#else
+            if(WSAGetLastError() == WSAEINPROGRESS)
+#endif
+            {
+                FD_ZERO(&fds);
+                FD_SET(so, &fds);
+                to.tv_sec = timeout / 1000;
+                to.tv_usec = timeout % 1000 * 1000;
+
+                // timeout check for connect completion
+
+                if(::select((int)so + 1, NULL, &fds, NULL, &to) < 1)
+                    continue;
+
+                getsockopt(so, SOL_SOCKET, SO_ERROR, (char *)&sockopt, &len);
+                if(!sockopt) {
+                    connected = true;
+                    break;
+                }
+                endSocket();
+                so = socket(AF_INET6, SOCK_DCCP, IPPROTO_DCCP);
+                if(so == INVALID_SOCKET)
+                    break;
+            }
+    }
+
+    setCompletion(true);
+    if(!connected) {
+        rtn = errno;
+        errno = rtn;
+        connectError();
+        return;
+    }
+
+    Socket::state = CONNECTED;
+}
+#endif
+
+bool DCCPSocket::setCCID(uint8_t ccid)
+{
+    uint8_t ccids[16];           /* for getting the available CCIDs, should be large enough */
+    socklen_t len = sizeof(ccids);
+    int ret;
+    bool ccid_supported = false;
+
+    /*
+     * Determine which CCIDs are available on the host
+     */
+    ret = getsockopt(so, SOL_DCCP, DCCP_SOCKOPT_AVAILABLE_CCIDS, (char *)&ccids, &len);
+    if (ret < 0) {
+        error(errInput,(char *)"Can not determine available CCIDs",socket_errno);
+        return false;
+    }
+
+    for (unsigned i = 0; i < sizeof(ccids); i++) {
+        if (ccid == ccids[i]) {
+            ccid_supported = true;
+            break;
+        }
+    }
+
+    if (!ccid_supported) {
+        error(errInput,(char *)"CCID specified is not supported",socket_errno);
+        return false;
+    }
+
+    if (setsockopt(so, SOL_DCCP, DCCP_SOCKOPT_CCID, (char *)&ccid, sizeof (ccid)) < 0) {
+        error(errInput,(char *)"Can not set CCID",socket_errno);
+        return false;
+    }
+
+    return true;
+}
+
+int DCCPSocket::getTxCCID()
+{
+    int ccid, ret;
+    socklen_t ccidlen;
+
+    ccidlen = sizeof(ccid);
+    ret = getsockopt(so, SOL_DCCP, DCCP_SOCKOPT_TX_CCID, (char *)&ccid, &ccidlen);
+    if (ret < 0) {
+    error(errInput,(char *)"Can not determine get current TX CCID value",socket_errno);
+        return -1;
+    }
+    return ccid;
+}
+
+int DCCPSocket::getRxCCID()
+{
+    int ccid, ret;
+    socklen_t ccidlen;
+
+    ccidlen = sizeof(ccid);
+    ret = getsockopt(so, SOL_DCCP, DCCP_SOCKOPT_RX_CCID, (char *)&ccid, &ccidlen);
+    if (ret < 0) {
+    error(errInput,(char *)"Can not determine get current DX CCID value",socket_errno);
+        return -1;
+    }
+    return ccid;
+}
+
+size_t  DCCPSocket::available()
+{
+    size_t readsize;
+#ifndef _MSWINDOWS_
+     if (ioctl (so, FIONREAD, &readsize) < 0) {
+         error(errInput,(char *)"Error on retrieve the FIONREAD option.",socket_errno);
+     }
+#else
+    if (ioctlsocket(so, FIONREAD, (u_long *)&readsize)){
+        error(errInput,(char *)"Error on retrieve the FIONREAD option.",socket_errno);
+    }
+#endif
+    return readsize;
+}
+
+
+
diff --git a/jni/libucommon/sources/commoncpp/dso.cpp b/jni/libucommon/sources/commoncpp/dso.cpp
new file mode 100644
index 0000000..6ec7c01
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/dso.cpp
@@ -0,0 +1,333 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#include <ucommon-config.h>
+#include <commoncpp/config.h>
+#include <commoncpp/export.h>
+#include <commoncpp/string.h>
+#include <commoncpp/exception.h>
+#include <commoncpp/slog.h>
+#include <commoncpp/file.h>
+#include <commoncpp/process.h>
+
+using namespace COMMONCPP_NAMESPACE;
+
+DSO *DSO::first = NULL;
+DSO *DSO::last = NULL;
+Mutex   DSO::mutex;
+
+#if defined(HAVE_DLFCN_H)
+
+extern "C" {
+#include <dlfcn.h>
+}
+
+#ifndef RTLD_GLOBAL
+#define RTLD_GLOBAL 0
+#endif
+
+#endif // HAVE_DLFN_H
+
+#ifdef HAVE_SHL_LOAD
+#include <dl.h>
+#endif
+
+#ifdef HAVE_MACH_O_DYLD_H
+#include <mach-o/dyld.h>
+#define oModule ((oModule)(image))
+#endif
+
+#ifdef  _MSWINDOWS_
+#define hImage ((HMODULE)(image))
+#endif
+
+void DSO::dynunload(void)
+{
+    while(DSO::last)
+        delete DSO::last;
+}
+
+DSO::~DSO()
+{
+#if defined(HAVE_MACH_DYLD)
+    NSSymbol sym;
+    void (*fini)(void);
+#endif
+    MutexLock lock(mutex);
+#if defined(_MSWINDOWS_)
+    if(image)
+        FreeLibrary(hImage);
+#elif defined(HAVE_MACH_DYLD)
+    if(image == NULL)
+        return;
+
+    sym = NSLookupSymbolInModule(oModule, "__fini");
+    if(sym != NULL) {
+        fini = (void (*)(void))NSAddressOfSymbol(sym);
+        fini();
+    }
+
+    NSUnLinkModule(oModule, NSUNLINKMODULE_OPTION_NONE);
+#elif defined(HAVE_SHL_LOAD)
+    if(image)
+        shl_unload(image);
+#elif defined(HAVE_DLFCN_H)
+    if(image)
+        dlclose(image);
+#endif
+
+    if(first == this && last == this)
+        first = last = NULL;
+
+    if(!next && !prev)
+        return;
+
+    if(prev)
+        prev->next = next;
+
+    if(next)
+        next->prev = prev;
+
+    if(first == this)
+        first = next;
+    if(last == this)
+        last = prev;
+}
+
+void DSO::loader(const char *filename, bool flag)
+{
+#if defined(HAVE_MACH_DYLD)
+    NSObjectFileImage oImage;
+    NSSymbol sym = NULL;
+    void (*init)(void);
+#endif
+
+    id = strrchr(filename, '/');
+    if(id)
+        ++id;
+    else
+        id = filename;
+
+    next = prev = NULL;
+
+#if defined(_MSWINDOWS_)
+    image = LoadLibrary(filename);
+    err = "none";
+#elif defined(HAVE_MACH_DYLD)
+    err = "none";
+    image = NULL;
+
+    fprintf(stderr, "**** HERE %s\n", filename);
+
+    switch(NSCreateObjectFileImageFromFile(filename, &oImage)) {
+    case NSObjectFileImageSuccess:
+        break;
+    default:
+        err = "unknown error";
+        return;
+    }
+    if(flag)
+        image = NSLinkModule(oImage, filename, NSLINKMODULE_OPTION_BINDNOW | NSLINKMODULE_OPTION_RETURN_ON_ERROR);
+    else
+        image = NSLinkModule(oImage, filename, NSLINKMODULE_OPTION_RETURN_ON_ERROR);
+    NSDestroyObjectFileImage(oImage);
+    if(oModule != NULL)
+        sym = NSLookupSymbolInModule(oModule, "__init");
+    if(sym) {
+        init = (void (*)(void))NSAddressOfSymbol(sym);
+        init();
+    }
+
+#elif defined(HAVE_SHL_LOAD)
+    err = "none";
+    if(flag)
+        image = shl_load(filename, BIND_IMMEDIATE, 0L);
+    else
+        image = shl_load(filename, BIND_DEFERRED, 0L);
+#elif defined(HAVE_DLFCN_H)
+    if(flag)
+        image = dlopen(filename, RTLD_NOW | RTLD_GLOBAL);
+    else
+        image = dlopen(filename, RTLD_LAZY | RTLD_GLOBAL);
+
+#endif
+
+#if defined(_MSWINDOWS_)
+    if(!image) {
+        err = "load failed";
+#elif defined(HAVE_MACH_DYLD)
+    if(image == NULL) {
+        err = "load failed";
+#elif defined(HAVE_SHL_LOAD)
+    if(!image) {
+        err = "load failed";
+#elif defined(HAVE_DLFCN_H)
+    if(!image) {
+        err = dlerror();
+#else
+    if(1) {
+        err = "load unsupported";
+#endif
+
+// since generally failure to map or load a plugin is fatel in most
+// cases, we should generally log the error to syslog as well as notify
+// the upper level system of the failure through exception.
+
+        slog.error() << "dso: " << id << ": " << err << std::endl;
+
+#ifdef  CCXX_EXCEPTIONS
+        if(Thread::getException() == Thread::throwObject)
+            throw(this);
+#ifdef  COMMON_STD_EXCEPTION
+        else if(Thread::getException() == Thread::throwException)
+            throw(DSOException(String(id) + err));
+#endif
+#endif
+        return;
+    }
+
+    if(!last) {
+        last = first = this;
+        return;
+    }
+
+    mutex.enterMutex();
+    last->next = this;
+    prev = last;
+    last = this;
+    mutex.leaveMutex();
+}
+
+DSO *DSO::getObject(const char *id)
+{
+    const char *chk = strrchr(id, '/');
+    DSO *dso;
+
+    if(chk)
+        ++chk;
+    else
+        chk = id;
+
+    mutex.enterMutex();
+    dso = first;
+    while(dso) {
+        if(!stricmp(dso->id, chk))
+            break;
+        dso = dso->next;
+    }
+    mutex.leaveMutex();
+    return dso;
+}
+
+bool DSO::isValid(void)
+{
+#if defined(_MSWINDOWS_)
+    if(!image)
+#elif   defined(HAVE_MACH_DYLD)
+    if(image == NULL)
+#else
+    if(!image)
+#endif
+        return false;
+
+    return true;
+}
+
+DSO::addr_t DSO::operator[](const char *sym)
+{
+#if   defined(HAVE_SHL_LOAD)
+    int value;
+    shl_t handle = (shl_t)image;
+
+    if(shl_findsym(&handle, sym, 0, &value) == 0)
+        return (DSO::addr_t)value;
+    else
+        return NULL;
+#elif defined(HAVE_MACH_DYLD)
+    NSSymbol oSymbol = NSLookupSymbolInModule(oModule, sym);
+    if(oSymbol)
+        return (DSO::addr_t)NSAddressOfSymbol(oSymbol);
+    else
+        return (DSO::addr_t)NULL;
+#elif defined(_MSWINDOWS_)
+    DSO::addr_t addr = (DSO::addr_t)GetProcAddress(hImage, sym);
+    if(!addr)
+        err = "symbol missing";
+
+    return addr;
+#elif defined(HAVE_DLFCN_H)
+    return (DSO::addr_t)dlsym(image, (char *)sym);
+#else
+    return (DSO::addr_t)NULL;
+#endif
+}
+
+#ifdef  HAVE_MACH_DYLD
+static void MyLinkError(NSLinkEditErrors c, int errorNumber, const char *filename, const char *errstr)
+{
+    slog.error() << "dyld: " << filename << ": " << errstr << std::endl;
+}
+
+static void MyUndefined(const char *symname)
+{
+    slog.error() << "dyld: undefined: " << symname << std::endl;
+}
+
+static NSModule MyMultiple(NSSymbol s, NSModule oMod, NSModule nMod)
+{
+    slog.error() << "dyld: multiply defined symbols" << std::endl;
+}
+
+void DSO::setDebug(void)
+{
+    static NSLinkEditErrorHandlers handlers = {
+        &MyUndefined,
+        &MyMultiple,
+        &MyLinkError};
+
+    NSInstallLinkEditErrorHandlers(&handlers);
+}
+
+#else
+
+void DSO::setDebug(void)
+{
+}
+
+#endif
+
diff --git a/jni/libucommon/sources/commoncpp/exception.cpp b/jni/libucommon/sources/commoncpp/exception.cpp
new file mode 100644
index 0000000..2d39db6
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/exception.cpp
@@ -0,0 +1,115 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#include <ucommon-config.h>
+
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE   600
+#endif
+
+#include <commoncpp/config.h>
+#include <commoncpp/export.h>
+#include <commoncpp/string.h>
+#include <commoncpp/thread.h>
+#include <commoncpp/exception.h>
+
+#if defined(CCXX_EXCEPTIONS)
+
+using namespace COMMONCPP_NAMESPACE;
+
+Exception::Exception(const String& what_arg) throw():
+_what(what_arg)
+{}
+
+Exception::~Exception() throw()
+{}
+
+const char *Exception::what() const throw()
+{
+    return _what.c_str();
+}
+
+const char *Exception::getString() const
+{
+    return _what.c_str();
+}
+
+IOException::IOException(const String &what_arg, long systemError) throw() :
+    Exception(what_arg), _systemError(systemError),
+    _systemErrorString(NULL) {
+}
+
+IOException::~IOException() throw()
+{
+    delete [] _systemErrorString;
+}
+
+long IOException::getSystemError() const throw()
+{
+    return _systemError;
+}
+
+const char* IOException::getSystemErrorString() const throw()
+{
+    const uint32_t errStrSize = 2048;
+    if ( !_systemErrorString )
+        _systemErrorString = new char[errStrSize];
+#ifndef _MSWINDOWS_
+#ifdef  HAVE_STRERROR_R
+#if ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !defined(_GNU_SOURCE) || !defined(APPLE))
+    assert(strerror_r(_systemError, _systemErrorString, errStrSize) == 0);
+#else
+    _systemErrorString = strerror_r(_systemError, _systemErrorString, errStrSize);
+#endif
+#else
+    static Mutex mlock;
+
+    mlock.enter();
+    String::set(_systemErrorString, errStrSize, strerror(_systemError));
+    mlock.leave();
+#endif
+    return _systemErrorString;
+#else
+    FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM, NULL, _systemError,
+        MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT),
+        _systemErrorString, errStrSize, NULL);
+    return _systemErrorString;
+#endif
+}
+
+#endif
diff --git a/jni/libucommon/sources/commoncpp/file.cpp b/jni/libucommon/sources/commoncpp/file.cpp
new file mode 100644
index 0000000..72659d6
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/file.cpp
@@ -0,0 +1,1639 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#ifndef _MSC_VER
+#include <sys/stat.h>
+#endif
+
+// needed for GNU/LINUX glibc otherwise pread/pwrite wont work
+
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 600
+#endif
+
+/*
+ * on old glibc's, this has to be
+ * defined explicitly
+ */
+#ifndef _XOPEN_SOURCE_EXTENDED
+#define _XOPEN_SOURCE_EXTENDED
+#endif
+
+#include <ucommon-config.h>
+#include "commoncpp/missing.h"
+
+// broken BSD; XOPEN should not imply _POSIX_C_SOURCE,
+//  _POSIX_C_SOURCE should not stop __BSD_VISIBLE
+
+#define u_int unsigned int
+#define u_short unsigned short
+#define u_long unsigned long
+#define u_char unsigned char
+
+#include <fcntl.h>
+
+#ifdef  HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
+#ifdef  HAVE_SYS_FILE_H
+#include <sys/file.h>
+#endif
+
+#ifdef  HAVE_SYS_LOCKF_H
+#include <sys/lockf.h>
+#endif
+
+#include <commoncpp/config.h>
+#include <commoncpp/export.h>
+#include <commoncpp/exception.h>
+#include <commoncpp/thread.h>
+#include <commoncpp/process.h>
+#include <commoncpp/file.h>
+
+#ifdef  __BORLANDC__
+#include <stdio.h>
+#include <stdlib.h>
+#else
+#include <cstdio>
+#include <cstdlib>
+#endif
+
+#include <sys/stat.h>
+#include <cerrno>
+
+#ifndef _MSWINDOWS_
+
+#ifdef  COMMON_AIX_FIXES
+#undef  LOCK_EX
+#undef  LOCK_SH
+#endif
+
+#ifdef  MACOSX
+#define MISSING_LOCKF
+#endif
+
+#ifndef F_LOCK
+#define MISSING_LOCKF
+
+enum {
+    F_ULOCK = 1,
+    F_LOCK,
+    F_TLOCK,
+    F_TEST
+};
+
+#endif
+
+#endif // ndef WIN32
+
+#if defined(_OSF_SOURCE) && defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE > 1
+#undef  LOCK_EX
+#undef  LOCK_SH
+#endif
+
+#if 0
+/*
+ * not used anymore ? (hen)
+ */
+static const char *clearfile(const char *pathname)
+{
+    remove(pathname);
+    return pathname;
+}
+
+static const char *clearfifo(const char *pathname, int mode)
+{
+    remove(pathname);
+    mkfifo(pathname, mode);
+    return pathname;
+}
+#endif
+
+NAMESPACE_COMMONCPP
+
+RandomFile::RandomFile(const char *name) : Mutex()
+{
+#ifdef _MSWINDOWS_
+    fd = INVALID_HANDLE_VALUE;
+    // immediate is not defined on Win32
+#else
+    fd = -1;
+    flags.immediate = false;
+#endif
+    flags.thrown = flags.initial = flags.temp = false;
+    flags.count = 0;
+    pathname = NULL;
+}
+
+RandomFile::RandomFile(const RandomFile &rf) : Mutex()
+{
+    // first, `dup'-licate the file descriptor/handle
+#ifdef _MSWINDOWS_
+    HANDLE pidHandle = GetCurrentProcess();
+    HANDLE dupHandle;
+
+    if(rf.fd != INVALID_HANDLE_VALUE) {
+        if(!DuplicateHandle(pidHandle, rf.fd, pidHandle, &dupHandle, 0, FALSE, DUPLICATE_SAME_ACCESS))
+            fd = INVALID_HANDLE_VALUE;
+        else
+            fd = dupHandle;
+    }
+    else
+        fd = INVALID_HANDLE_VALUE;
+
+#else
+    if(rf.fd > -1)
+        fd = dup(rf.fd);
+    else
+        fd = -1;
+
+#endif
+
+    flags = rf.flags;
+    flags.count = 0;
+
+    if(rf.pathname)
+        pathname = newString(rf.pathname);
+    else
+        pathname = NULL;
+}
+
+RandomFile::~RandomFile()
+{
+    final();
+}
+
+File::Error RandomFile::restart(void)
+{
+    return errOpenFailed;
+}
+
+File::Attr RandomFile::initialize(void)
+{
+    return attrPublic;
+}
+
+void RandomFile::final(void)
+{
+#ifdef _MSWINDOWS_
+    if(fd != INVALID_HANDLE_VALUE) {
+        CloseHandle(fd);
+        if(flags.temp && pathname)
+            DeleteFile(pathname);
+    }
+
+#else
+    if(fd > -1) {
+        close(fd);
+        if(flags.temp && pathname)
+            remove(pathname);
+    }
+#endif
+
+    if(pathname) {
+        delString(pathname);
+        pathname = NULL;
+    }
+
+#ifdef _MSWINDOWS_
+    fd = INVALID_HANDLE_VALUE;
+#else
+    fd = -1;
+#endif
+    flags.count = 0;
+    flags.initial = false;
+}
+
+RandomFile::Error RandomFile::error(Error id, char *str)
+{
+    errstr = str;
+    errid = id;
+    if(!flags.thrown) {
+        flags.thrown = true;
+#ifdef  CCXX_EXCEPTIONS
+        if(Thread::getException() == Thread::throwObject)
+            throw(this);
+#ifdef  COMMON_STD_EXCEPTION
+        else if(Thread::getException() == Thread::throwException) {
+            if(!str)
+                str = (char *)"";
+            throw FileException(str);
+        }
+#endif
+#endif
+    }
+    return id;
+}
+
+bool RandomFile::initial(void)
+{
+    bool init;
+
+#ifdef _MSWINDOWS_
+    if(fd == INVALID_HANDLE_VALUE)
+#else
+    if(fd < 0)
+#endif
+        return false;
+
+    enterMutex();
+    init = flags.initial;
+    flags.initial = false;
+
+    if(!init) {
+        leaveMutex();
+        return false;
+    }
+
+#ifdef _MSWINDOWS_
+    Attr access = initialize();
+    if(access == attrInvalid) {
+        CloseHandle(fd);
+        if(pathname)
+            DeleteFile(pathname);
+        fd = INVALID_HANDLE_VALUE;
+        leaveMutex();
+        error(errInitFailed);
+        return false;
+    }
+
+#else
+    int mode = (int)initialize();
+    if(!mode) {
+        close(fd);
+        fd = -1;
+        if(pathname)
+            remove(pathname);
+        leaveMutex();
+        error(errInitFailed);
+        return false;
+    }
+    fchmod(fd, mode);
+#endif
+
+    leaveMutex();
+    return init;
+}
+
+#ifndef _MSWINDOWS_
+RandomFile::Error RandomFile::setCompletion(Complete mode)
+{
+    long flag = fcntl(fd, F_GETFL);
+
+    if(fd < 0)
+        return errNotOpened;
+
+    flags.immediate = false;
+#ifdef O_SYNC
+    flag &= ~(O_SYNC | O_NONBLOCK);
+#else
+    flag &= ~O_NONBLOCK;
+#endif
+    switch(mode) {
+    case completionImmediate:
+#ifdef O_SYNC
+        flag |= O_SYNC;
+#endif
+        flags.immediate = true;
+        break;
+
+    case completionDelayed:
+        flag |= O_NONBLOCK;
+
+    //completionDeferred: ? (hen)
+    case completionDeferred:
+        break;
+    }
+    fcntl(fd, F_SETFL, flag);
+    return errSuccess;
+}
+#endif
+
+off_t RandomFile::getCapacity(void)
+{
+    off_t eof, pos = 0;
+#ifdef _MSWINDOWS_
+    if(!fd)
+#else
+    if(fd < 0)
+#endif
+        return 0;
+
+    enterMutex();
+#ifdef _MSWINDOWS_
+    pos = SetFilePointer(fd, 0l, NULL, FILE_CURRENT);
+    eof = SetFilePointer(fd, 0l, NULL, FILE_END);
+    SetFilePointer(fd, pos, NULL, FILE_BEGIN);
+#else
+    lseek(fd, pos, SEEK_SET);
+    pos = lseek(fd, 0l, SEEK_CUR);
+    eof = lseek(fd, 0l, SEEK_END);
+#endif
+    leaveMutex();
+    return eof;
+}
+
+bool RandomFile::operator!(void)
+{
+#ifdef _MSWINDOWS_
+    return fd == INVALID_HANDLE_VALUE;
+#else
+    if(fd < 0)
+        return true;
+
+    return false;
+#endif
+}
+
+SharedFile::SharedFile(const char *path) :
+RandomFile(path)
+{
+    fcb.address = NULL;
+    fcb.len = 0;
+    fcb.pos = 0;
+    open(path);
+}
+
+SharedFile::SharedFile(const SharedFile &sh) :
+RandomFile(sh)
+{
+}
+
+SharedFile::~SharedFile()
+{
+    final();
+}
+
+SharedFile::Error SharedFile::open(const char *path)
+{
+#ifdef _MSWINDOWS_
+    if(fd != INVALID_HANDLE_VALUE)
+#else
+    if(fd > -1)
+#endif
+        final();
+
+    if(path != pathname) {
+        if(pathname)
+            delString(pathname);
+        pathname = newString(path);
+    }
+
+    flags.initial = false;
+
+#ifdef _MSWINDOWS_
+    fd = CreateFile(pathname, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS, NULL);
+    if(fd == INVALID_HANDLE_VALUE) {
+        flags.initial = true;
+        fd = CreateFile(pathname, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS, NULL);
+    }
+    if(fd == INVALID_HANDLE_VALUE)
+        return errOpenFailed;
+
+    return errSuccess;
+
+#else
+    fd = ::open(pathname, O_RDWR);
+    if(fd < 0) {
+        flags.initial = true;
+        fd = ::open(pathname, O_CREAT | O_RDWR | O_TRUNC,
+                (int)attrPrivate);
+    }
+    if(fd < 0)
+        return error(errOpenFailed);
+
+#ifdef  LOCK_SH
+    if(::flock(fd, LOCK_SH | LOCK_NB)) {
+        close(fd);
+        fd = -1;
+        return error(errOpenInUse);
+    }
+#endif
+    return errSuccess;
+#endif // WIN32
+}
+
+SharedFile::Error SharedFile::fetch(caddr_t address, ccxx_size_t len, off_t pos)
+{
+#ifdef _MSWINDOWS_
+    if(fd == INVALID_HANDLE_VALUE)
+#else
+    if(fd < 0)
+#endif
+        return errNotOpened;
+
+    enterMutex();
+    if(address)
+        fcb.address = address;
+
+    if(len)
+        fcb.len = len;
+
+    if(pos != -1)
+        fcb.pos = pos;
+
+#ifdef _MSWINDOWS_
+    OVERLAPPED over;
+    SetFilePointer(fd, fcb.pos, NULL, FILE_BEGIN);
+    over.hEvent = 0;
+    over.Offset = fcb.pos;
+    over.OffsetHigh = 0;
+    LockFileEx(fd, LOCKFILE_EXCLUSIVE_LOCK, 0, fcb.len, 0, &over);
+    DWORD count;
+    if(!ReadFile(fd, fcb.address, fcb.len, &count, NULL)) {
+        leaveMutex();
+        return errReadFailure;
+    }
+    leaveMutex();
+    if(count < fcb.len)
+        return errReadIncomplete;
+
+    return errSuccess;
+
+#else
+    lseek(fd, fcb.pos, SEEK_SET);
+    if(lockf(fd, F_LOCK, fcb.len)) {
+        leaveMutex();
+        return errLockFailure;
+    }
+
+    int io = ::read(fd, fcb.address, fcb.len);
+    leaveMutex();
+
+    if((size_t) io == fcb.len)
+        return errSuccess;
+
+    if(io > -1)
+        return errReadIncomplete;
+
+    switch(errno) {
+    case EINTR:
+        return errReadInterrupted;
+    default:
+        return errReadFailure;
+    }
+#endif
+}
+
+#ifndef _MSWINDOWS_
+SharedFile::Error SharedFile::clear(ccxx_size_t len, off_t pos)
+{
+    if(fd < 0)
+        return errNotOpened;
+
+    enterMutex();
+    if(len)
+        fcb.len = len;
+
+    if(pos != -1)
+        fcb.pos = pos;
+
+    lseek(fd, fcb.pos, SEEK_SET);
+    if(lockf(fd, F_ULOCK, fcb.len)) {
+        leaveMutex();
+        return errLockFailure;
+    }
+    leaveMutex();
+    return errSuccess;
+}
+#endif // ndef WIN32
+
+SharedFile::Error SharedFile::update(caddr_t address, ccxx_size_t len, off_t pos)
+{
+#ifdef _MSWINDOWS_
+    if(fd == INVALID_HANDLE_VALUE)
+#else
+    if(fd < 0)
+#endif
+        return errNotOpened;
+
+    enterMutex();
+    if(address)
+        fcb.address = address;
+
+    if(len)
+        fcb.len = len;
+
+    if(pos != -1)
+        fcb.pos = pos;
+
+#ifdef _MSWINDOWS_
+    OVERLAPPED over;
+    SetFilePointer(fd, fcb.pos, NULL, FILE_BEGIN);
+    over.hEvent = 0;
+    over.Offset = pos;
+    over.OffsetHigh = 0;
+    DWORD count;
+    if(!WriteFile(fd, fcb.address, fcb.len, &count, NULL)) {
+        SetFilePointer(fd, fcb.pos, NULL, FILE_CURRENT);
+        UnlockFileEx(fd, 0, len, 0, &over);
+        leaveMutex();
+        return errWriteFailure;
+    }
+    SetFilePointer(fd, fcb.pos, NULL, FILE_CURRENT);
+    UnlockFileEx(fd, 0, len, 0, &over);
+    leaveMutex();
+    if(count < fcb.len)
+        return errWriteIncomplete;
+
+    return errSuccess;
+
+#else
+    lseek(fd, fcb.pos, SEEK_SET);
+    int io = ::write(fd, fcb.address, fcb.len);
+    if(lockf(fd, F_ULOCK, fcb.len)) {
+        leaveMutex();
+        return errLockFailure;
+    }
+    leaveMutex();
+
+    if((size_t) io == fcb.len)
+        return errSuccess;
+
+    if(io > -1)
+        return errWriteIncomplete;
+
+    switch(errno) {
+    case EINTR:
+        return errWriteInterrupted;
+    default:
+        return errWriteFailure;
+    }
+#endif // WIN32
+}
+
+SharedFile::Error SharedFile::append(caddr_t address, ccxx_size_t len)
+{
+#ifdef _MSWINDOWS_
+    if(fd == INVALID_HANDLE_VALUE)
+#else
+    if(fd < 0)
+#endif
+        return errNotOpened;
+
+    enterMutex();
+    if(address)
+        fcb.address = address;
+
+    if(len)
+        fcb.len = len;
+
+#ifdef _MSWINDOWS_
+    fcb.pos = SetFilePointer(fd, 0l, NULL, FILE_END);
+    OVERLAPPED over;
+    over.hEvent = 0;
+    over.Offset = fcb.pos;
+    over.OffsetHigh = 0;
+    LONG eof = fcb.pos;
+    LockFileEx(fd, LOCKFILE_EXCLUSIVE_LOCK, 0, 0x7fffffff, 0, &over);
+    fcb.pos = SetFilePointer(fd, 0l, NULL, FILE_END);
+    DWORD count;
+    if(!WriteFile(fd, fcb.address, fcb.len, &count, NULL)) {
+        SetFilePointer(fd, eof, NULL, FILE_CURRENT);
+        UnlockFileEx(fd, 0, 0x7fffffff, 0, &over);
+        leaveMutex();
+        return errWriteFailure;
+    }
+    SetFilePointer(fd, eof, NULL, FILE_CURRENT);
+    UnlockFileEx(fd, 0, 0x7fffffff, 0, &over);
+    leaveMutex();
+    if(count < fcb.len)
+        return errWriteIncomplete;
+
+    return errSuccess;
+
+#else
+    fcb.pos = lseek(fd, 0l, SEEK_END);
+    if(lockf(fd, F_LOCK, -1)) {
+        leaveMutex();
+        return errLockFailure;
+    }
+    fcb.pos = lseek(fd, 0l, SEEK_END);
+    int io = ::write(fd, fcb.address, fcb.len);
+    lseek(fd, fcb.pos, SEEK_SET);
+    if(lockf(fd, F_ULOCK, -1)) {
+        leaveMutex();
+        return errLockFailure;
+    }
+    leaveMutex();
+
+    if((size_t) io == fcb.len)
+        return errSuccess;
+
+    if(io > -1)
+        return errWriteIncomplete;
+
+    switch(errno) {
+    case EINTR:
+        return errWriteInterrupted;
+    default:
+        return errWriteFailure;
+    }
+#endif // WIN32
+}
+
+off_t SharedFile::getPosition(void)
+{
+    return fcb.pos;
+}
+
+bool SharedFile::operator++(void)
+{
+    off_t eof;
+
+    enterMutex();
+    fcb.pos += fcb.len;
+#ifdef _MSWINDOWS_
+    eof = SetFilePointer(fd, 0l, NULL, FILE_END);
+#else
+    eof = lseek(fd, 0l, SEEK_END);
+#endif
+
+    if(fcb.pos >= eof) {
+        fcb.pos = eof;
+        leaveMutex();
+        return true;
+    }
+    leaveMutex();
+    return false;
+}
+
+bool SharedFile::operator--(void)
+{
+    enterMutex();
+    fcb.pos -= fcb.len;
+    if(fcb.pos <= 0) {
+        fcb.pos = 0;
+        leaveMutex();
+        return true;
+    }
+    leaveMutex();
+    return false;
+}
+
+size_t MappedFile::pageAligned(size_t size)
+{
+    size_t pages = size / Process::getPageSize();
+
+    if(size % Process::getPageSize())
+        ++pages;
+
+    return pages * Process::getPageSize();
+}
+
+#ifdef _MSWINDOWS_
+
+static void makemapname(const char *source, char *target)
+{
+    unsigned count = 60;
+    while(*source && count--) {
+        if(*source == '/' || *source == '\\')
+            *(target++) = '_';
+        else
+            *(target++) = toupper(*source);
+        ++source;
+    }
+    *target = 0;
+}
+
+MappedFile::MappedFile(const char *fname, Access mode, size_t size) :
+RandomFile(fname)
+{
+    DWORD share = 0, page = 0;
+    map = INVALID_HANDLE_VALUE;
+    fcb.address = NULL;
+
+    switch(mode) {
+        case accessReadOnly:
+        share = FILE_SHARE_READ;
+        page = PAGE_READONLY;
+        prot = FILE_MAP_READ;
+        break;
+    case accessWriteOnly:
+        share = FILE_SHARE_WRITE;
+        page = PAGE_WRITECOPY;
+        prot = FILE_MAP_COPY;
+        break;
+    case accessReadWrite:
+        share = FILE_SHARE_READ|FILE_SHARE_WRITE;
+        page = PAGE_READWRITE;
+        prot = FILE_MAP_WRITE;
+    }
+    if(share || page)
+        fd = CreateFile(pathname, mode, share, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS, NULL);
+    else
+        fd = INVALID_HANDLE_VALUE;
+
+    if(fd == INVALID_HANDLE_VALUE) {
+        error(errOpenFailed);
+        return;
+    }
+    SetFilePointer(fd, (LONG)size, 0, FILE_BEGIN);
+    SetEndOfFile(fd);
+    makemapname(fname, mapname);
+    map = CreateFileMapping(fd, NULL, page, 0, 0, mapname);
+    if(!map)
+        error(errMapFailed);
+    fcb.address = (caddr_t)MapViewOfFile(map, prot, 0, 0, size);
+    fcb.len = (ccxx_size_t)size;
+    fcb.pos = 0;
+    if(!fcb.address)
+        error(errMapFailed);
+}
+
+MappedFile::MappedFile(const char *fname, Access mode) :
+RandomFile(fname)
+{
+    DWORD share = 0, page = 0;
+    map = INVALID_HANDLE_VALUE;
+    fcb.address = NULL;
+
+    switch(mode) {
+    case accessReadOnly:
+        share = FILE_SHARE_READ;
+        page = PAGE_READONLY;
+        prot = FILE_MAP_READ;
+        break;
+    case accessWriteOnly:
+        share = FILE_SHARE_WRITE;
+        page = PAGE_WRITECOPY;
+        prot = FILE_MAP_COPY;
+        break;
+    case accessReadWrite:
+        share = FILE_SHARE_READ|FILE_SHARE_WRITE;
+        page = PAGE_READWRITE;
+        prot = FILE_MAP_WRITE;
+    }
+    if(share || page)
+        fd = CreateFile(pathname, mode, share, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS, NULL);
+    else
+        fd = INVALID_HANDLE_VALUE;
+
+    if(fd == INVALID_HANDLE_VALUE) {
+        error(errOpenFailed);
+        return;
+    }
+    makemapname(fname, mapname);
+    map = CreateFileMapping(fd, NULL, page, 0, 0, mapname);
+    if(!map)
+        error(errMapFailed);
+}
+
+MappedFile::MappedFile(const char *fname, pos_t pos, size_t len, Access mode) :
+RandomFile(fname)
+{
+    DWORD share = 0, page = 0;
+    map = INVALID_HANDLE_VALUE;
+    fcb.address = NULL;
+
+    switch(mode) {
+    case accessReadOnly:
+        share = FILE_SHARE_READ;
+        page = PAGE_READONLY;
+        prot = FILE_MAP_READ;
+        break;
+    case accessWriteOnly:
+        share = FILE_SHARE_WRITE;
+        page = PAGE_WRITECOPY;
+        prot = FILE_MAP_COPY;
+        break;
+    case accessReadWrite:
+        share = FILE_SHARE_READ|FILE_SHARE_WRITE;
+        page = PAGE_READWRITE;
+        prot = FILE_MAP_WRITE;
+    }
+    if(share || page)
+        fd = CreateFile(pathname, mode, share, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_RANDOM_ACCESS, NULL);
+    else
+        fd = INVALID_HANDLE_VALUE;
+
+    if(fd == INVALID_HANDLE_VALUE) {
+        error(errOpenFailed);
+        return;
+    }
+    makemapname(fname, mapname);
+    map = CreateFileMapping(fd, NULL, page, 0, 0, mapname);
+    if(!map) {
+        error(errMapFailed);
+        return;
+    }
+    fcb.address = (caddr_t)MapViewOfFile(map, prot, 0, pos, len);
+    fcb.len = (ccxx_size_t)len;
+    fcb.pos = pos;
+    if(!fcb.address)
+        error(errMapFailed);
+}
+
+MappedFile::~MappedFile()
+{
+    if(fcb.address) {
+        unlock();
+        UnmapViewOfFile(fcb.address);
+    }
+
+    if(map != INVALID_HANDLE_VALUE)
+        CloseHandle(map);
+
+    final();
+}
+
+void MappedFile::sync(void)
+{
+}
+
+void MappedFile::sync(caddr_t address, size_t len)
+{
+}
+
+void MappedFile::release(caddr_t address, size_t len)
+{
+    if(fcb.address) {
+        unlock();
+        UnmapViewOfFile(fcb.address);
+    }
+    fcb.address = NULL;
+}
+
+caddr_t MappedFile::fetch(off_t pos, size_t len)
+{
+    if(fcb.address) {
+        unlock();
+        UnmapViewOfFile(fcb.address);
+    }
+
+    fcb.address = (caddr_t)MapViewOfFile(map, prot, 0, pos, len);
+    fcb.len = (ccxx_size_t)len;
+    fcb.pos = pos;
+    if(!fcb.address)
+        error(errMapFailed);
+
+    return fcb.address;
+}
+
+void MappedFile::update(size_t offset, size_t len)
+{
+}
+
+void MappedFile::update(caddr_t address, size_t len)
+{
+}
+
+bool MappedFile::lock(void)
+{
+    unlock();
+    if(VirtualLock(fcb.address, fcb.len))
+        fcb.locked = true;
+    return fcb.locked;
+}
+
+void MappedFile::unlock(void)
+{
+    if(!fcb.address)
+        fcb.locked = false;
+
+    if(!fcb.locked)
+        return;
+
+    VirtualUnlock(fcb.address, fcb.len);
+    fcb.locked = false;
+}
+
+#else
+#ifdef  HAVE_MLOCK
+MappedFile::MappedFile(const char *fname, Access mode) :
+RandomFile(fname)
+{
+    fd = open(fname, (int)mode);
+    if(fd < 0 && mode != accessReadOnly)
+        fd = ::open(pathname, O_CREAT | O_RDWR | O_TRUNC,
+                (int)attrPrivate);
+
+    if(fd < 0) {
+        error(errOpenFailed);
+        return;
+    }
+
+    switch(mode) {
+    case O_RDONLY:
+        prot = PROT_READ;
+        break;
+    case O_WRONLY:
+        prot = PROT_WRITE;
+        break;
+    default:
+        prot = PROT_READ | PROT_WRITE;
+    }
+}
+
+MappedFile::MappedFile(const char *fname, Access mode, size_t size) :
+RandomFile(fname)
+{
+    fd = open(fname, (int)mode | O_CREAT, 0660);
+
+    if(fd < 0) {
+        error(errOpenFailed);
+        return;
+    }
+
+    switch(mode) {
+    case O_RDONLY:
+        prot = PROT_READ;
+        break;
+    case O_WRONLY:
+        prot = PROT_WRITE;
+        break;
+    default:
+        prot = PROT_READ | PROT_WRITE;
+    }
+
+    enterMutex();
+    lseek(fd, size, SEEK_SET);
+    fcb.address = (caddr_t)mmap(NULL, size, prot, MAP_SHARED, fd, 0);
+    fcb.len = size;
+    fcb.pos = 0;
+    leaveMutex();
+    if((caddr_t)(fcb.address) == (caddr_t)(MAP_FAILED)) {
+        close(fd);
+        fd = -1;
+        error(errMapFailed);
+    }
+}
+
+MappedFile::MappedFile(const char *fname, pos_t pos, size_t len, Access mode) :
+RandomFile(fname)
+{
+    fd = open(fname, (int)mode);
+    if(fd < 0) {
+        error(errOpenFailed);
+        return;
+    }
+
+    switch(mode) {
+    case O_RDONLY:
+        prot = PROT_READ;
+        break;
+    case O_WRONLY:
+        prot = PROT_WRITE;
+        break;
+    default:
+        prot = PROT_READ | PROT_WRITE;
+    }
+
+    enterMutex();
+    lseek(fd, pos + len, SEEK_SET);
+    fcb.address = (caddr_t)mmap(NULL, len, prot, MAP_SHARED, fd, pos);
+    fcb.len = len;
+    fcb.pos = pos;
+    leaveMutex();
+    if((caddr_t)(fcb.address) == (caddr_t)(MAP_FAILED)) {
+        close(fd);
+        fd = -1;
+        error(errMapFailed);
+    }
+}
+
+MappedFile::~MappedFile()
+{
+    unlock();
+    final();
+}
+
+void MappedFile::sync(void)
+{
+    msync(fcb.address, fcb.len, MS_SYNC);
+}
+
+void MappedFile::release(caddr_t address, size_t len)
+{
+    enterMutex();
+    if(address)
+        fcb.address = address;
+
+    if(len)
+        fcb.len = len;
+
+    if(fcb.locked)
+        unlock();
+
+    munmap(fcb.address, fcb.len);
+    leaveMutex();
+}
+
+caddr_t MappedFile::fetch(off_t pos, size_t len)
+{
+    enterMutex();
+    unlock();
+    fcb.len = len;
+    fcb.pos = pos;
+    lseek(fd, fcb.pos + len, SEEK_SET);
+    fcb.address = (caddr_t)mmap(NULL, len, prot, MAP_SHARED, fd, pos);
+    leaveMutex();
+    return fcb.address;
+}
+
+bool MappedFile::lock(void)
+{
+    unlock();
+    if(!mlock(fcb.address, fcb.len))
+        fcb.locked = true;
+    return fcb.locked;
+}
+
+void MappedFile::unlock(void)
+{
+    if(!fcb.address)
+        fcb.locked = false;
+
+    if(!fcb.locked)
+        return;
+
+    munlock(fcb.address, fcb.len);
+    fcb.locked = false;
+}
+
+void MappedFile::update(size_t offset, size_t len)
+{
+    int mode = MS_ASYNC;
+    caddr_t address;
+
+    if(flags.immediate)
+        mode = MS_SYNC;
+
+    enterMutex();
+    address = fcb.address;
+    address += offset;
+    if(!len)
+        len = fcb.len;
+    leaveMutex();
+    msync(address, len, mode);
+}
+
+void MappedFile::update(caddr_t address, size_t len)
+{
+    int mode = MS_ASYNC;
+    if(flags.immediate)
+        mode = MS_SYNC;
+
+    msync(address, len, mode);
+}
+#endif
+#endif // ndef WIN32
+
+#ifdef  _MSWINDOWS_
+#ifndef SECS_BETWEEN_EPOCHS
+#define SECS_BETWEEN_EPOCHS 11644473600LL
+#endif
+
+#ifndef SECS_TO_100NS
+#define SECS_TO_100NS   10000000LL
+#endif
+#endif
+
+time_t lastAccessed(const char *path)
+{
+#ifdef  _MSWINDOWS_
+    __int64 ts;
+    WIN32_FILE_ATTRIBUTE_DATA ino;
+
+    if(!GetFileAttributesEx(path, GetFileExInfoStandard, &ino))
+        return 0;
+
+    ts = ((__int64)ino.ftLastAccessTime.dwHighDateTime << 32) +
+        ino.ftLastAccessTime.dwLowDateTime;
+
+    ts -= (SECS_BETWEEN_EPOCHS * SECS_TO_100NS);
+    ts /= SECS_TO_100NS;
+
+    return(time_t)ts;
+#else
+    struct stat ino;
+
+    if(stat(path, &ino))
+        return 0;
+
+    return ino.st_atime;
+#endif
+}
+
+time_t lastModified(const char *path)
+{
+#ifdef  _MSWINDOWS_
+    __int64 ts;
+    WIN32_FILE_ATTRIBUTE_DATA ino;
+
+    if(!GetFileAttributesEx(path, GetFileExInfoStandard, &ino))
+        return 0;
+
+    ts = ((__int64)ino.ftLastWriteTime.dwHighDateTime << 32) +
+        ino.ftLastWriteTime.dwLowDateTime;
+
+    ts -= (SECS_BETWEEN_EPOCHS * SECS_TO_100NS);
+    ts /= SECS_TO_100NS;
+
+    return(time_t)ts;
+#else
+    struct stat ino;
+
+    if(stat(path, &ino))
+        return 0;
+
+    return ino.st_mtime;
+#endif
+}
+
+bool isDir(const char *path)
+{
+#ifdef _MSWINDOWS_
+    DWORD attr = GetFileAttributes(path);
+    if(attr == (DWORD)~0l)
+        return false;
+
+    if(attr & FILE_ATTRIBUTE_DIRECTORY)
+        return true;
+
+    return false;
+
+#else
+    struct stat ino;
+
+    if(stat(path, &ino))
+        return false;
+
+    if(S_ISDIR(ino.st_mode))
+        return true;
+
+    return false;
+#endif // WIN32
+}
+
+bool isFile(const char *path)
+{
+#ifdef _MSWINDOWS_
+    DWORD attr = GetFileAttributes(path);
+    if(attr == (DWORD)~0l)
+        return false;
+
+    if(attr & FILE_ATTRIBUTE_DIRECTORY)
+        return false;
+
+    return true;
+
+#else
+    struct stat ino;
+
+    if(stat(path, &ino))
+        return false;
+
+    if(S_ISREG(ino.st_mode))
+        return true;
+
+    return false;
+#endif // WIN32
+}
+
+#ifndef _MSWINDOWS_
+// the Win32 version is given in line in the header
+bool isDevice(const char *path)
+{
+    struct stat ino;
+
+    if(stat(path, &ino))
+        return false;
+
+    if(S_ISCHR(ino.st_mode))
+        return true;
+
+    return false;
+}
+#endif
+
+bool canAccess(const char *path)
+{
+#ifdef _MSWINDOWS_
+    DWORD attr = GetFileAttributes(path);
+    if(attr == (DWORD)~0l)
+        return false;
+
+    if(attr & FILE_ATTRIBUTE_SYSTEM)
+        return false;
+
+    if(attr & FILE_ATTRIBUTE_HIDDEN)
+        return false;
+
+    return true;
+
+#else
+    if(!access(path, R_OK))
+        return true;
+
+    return false;
+
+#endif
+}
+
+bool canModify(const char *path)
+{
+#ifdef _MSWINDOWS_
+    DWORD attr = GetFileAttributes(path);
+
+    if(!canAccess(path))
+        return false;
+
+    if(attr & FILE_ATTRIBUTE_READONLY)
+        return false;
+
+    if(attr & (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_NORMAL))
+        return true;
+
+    return false;
+
+#else
+    if(!access(path, W_OK | R_OK))
+        return true;
+
+    return false;
+#endif
+}
+
+#ifdef  _MSWINDOWS_
+
+const char *File::getExtension(const char *path)
+{
+    const char *cp = strrchr(path, '\\');
+    if(!cp)
+        cp = strrchr(path, '/');
+    if(!cp)
+        cp = strrchr(path, ':');
+
+
+    if(cp)
+        ++cp;
+    else
+        cp = path;
+
+    if(*cp == '.')
+        return "";
+
+    cp = strrchr(cp, '.');
+
+    if(!cp)
+        cp = "";
+
+    return cp;
+}
+
+const char *File::getFilename(const char *path)
+{
+    const char *cp = strrchr(path, '\\');
+    if(cp)
+        return ++cp;
+
+    cp = strrchr(path, '/');
+    if(cp)
+        return ++cp;
+
+    cp = strrchr(path, ':');
+    if(cp)
+        ++cp;
+
+    return path;
+}
+
+char *File::getFilename(const char *path, char *buffer, size_t size)
+{
+    const char *cp = strrchr(path, '\\');
+    if(!cp)
+        cp = strrchr(path, '/');
+    if(!cp)
+        cp = strrchr(path, ':');
+
+    if(cp)
+        snprintf(buffer, size, "%s", ++cp);
+    else
+        snprintf(buffer, size, "%s", path);
+
+    return buffer;
+}
+
+char *File::getDirname(const char *path, char *buffer, size_t size)
+{
+    size_t len;
+    const char *cp = strrchr(path, '\\');
+
+    snprintf(buffer, size, "%s", path);
+
+    if(!cp)
+        cp = strrchr(path, '/');
+    if(!cp)
+        cp = strrchr(path, ':');
+
+    if(!cp)
+        return buffer;
+
+    if(cp)
+        len = cp - path;
+
+    if(len >= size)
+        len = size - 1;
+    buffer[len] = 0;
+    return buffer;
+}
+
+#else
+
+const char *File::getExtension(const char *path)
+{
+    const char *cp = strrchr(path, '/');
+    if(cp)
+        ++cp;
+    else
+        cp = path;
+
+    if(*cp == '.')
+        return "";
+
+    cp = strrchr(cp, '.');
+    if(cp)
+        return cp;
+    return "";
+}
+
+char *File::getDirname(const char *path, char *buffer, size_t size)
+{
+    unsigned len;
+    const char *cp = strrchr(path, '/');
+
+    snprintf(buffer, size, "%s", path);
+
+    if(!cp)
+        return buffer;
+
+    if(cp)
+        len = cp - path;
+
+    if(len >= size)
+        len = size - 1;
+    buffer[len] = 0;
+    return buffer;
+}
+
+const char *File::getFilename(const char *path)
+{
+    const char *cp = strrchr(path, '/');
+
+    if(cp)
+        return ++cp;
+
+    return path;
+}
+
+char *File::getFilename(const char *path, char *buffer, size_t size)
+{
+    const char *cp = strrchr(path, '/');
+
+    if(cp)
+        snprintf(buffer, size, "%s", ++cp);
+    else
+        snprintf(buffer, size, "%s", path);
+
+    return buffer;
+}
+
+#endif
+
+#ifdef  HAVE_REALPATH
+
+char *File::getRealpath(const char *path, char *buffer, size_t size)
+{
+    char temp[PATH_MAX];
+    setString(buffer, size, ".");
+    if(!realpath(path, temp))
+        return NULL;
+    if(strlen(temp) >= size)
+        return NULL;
+    setString(buffer, size, temp);
+    return buffer;
+}
+
+#else
+
+#ifdef  _MSWINDOWS_
+static char *getFile(char *path)
+{
+    char *cp = strchr(path, '\\');
+    if(!cp)
+        cp = strchr(path, '/');
+    if(!cp)
+        cp = strchr(path, ':');
+    return cp;
+}
+#else
+static char *getFile(char *path)
+{
+    return strchr(path, '/');
+}
+#endif
+
+char *File::getRealpath(const char *path, char *buffer, size_t size)
+{
+    if(size > PATH_MAX)
+        size = PATH_MAX;
+
+#ifdef  HAVE_LSTAT
+    unsigned symlinks = 0;
+#endif
+#if !defined(DYNAMCIC_LOCAL_ARRAYS)
+    char left[PATH_MAX];
+#else
+    char left[size];
+#endif
+    size_t left_len, buffer_len;
+
+#ifdef  _MSWINDOWS_
+    if(path[1] == ':')
+#else
+    if(path[0] == '/')
+#endif
+    {
+        buffer[0] = '/';
+        buffer[1] = 0;
+        if(!path[1])
+            return buffer;
+
+        buffer_len = 1;
+        snprintf(left, size, "%s", path + 1);
+        left_len = strlen(left);
+    }
+    else {
+        if(!Dir::getPrefix(buffer, size)) {
+            snprintf(buffer, size, "%s", ".");
+            return NULL;
+        }
+        buffer_len = strlen(buffer);
+        snprintf(left, size, "%s", path);
+        left_len = strlen(left);
+    }
+
+    if(left_len >= size || buffer_len >= size)
+        return NULL;
+
+    while(left_len > 0) {
+#ifdef  HAVE_LSTAT
+        struct stat ino;
+#endif
+#if !defined(DYNAMIC_LOCAL_ARRAYS)
+        char next_token[PATH_MAX];
+#else
+        char next_token[size];
+#endif
+        char *p;
+        const char *s = (p = getFile(left)) ? p : left + left_len;
+
+        memmove(next_token, left, s - left);
+        left_len -= s - left;
+        if(p != NULL)
+            memmove(left, s + 1, left_len + 1);
+
+        next_token[s - left] = 0;
+        if(buffer[buffer_len - 1] != '/') {
+            if(buffer_len +1 >= size)
+                return NULL;
+
+            buffer[buffer_len++] = '/';
+            buffer[buffer_len] = 0;
+        }
+        if(!next_token[0])
+            continue;
+        else if(!strcmp(next_token, "."))
+            continue;
+        else if(!strcmp(next_token, "..")) {
+            if(buffer_len > 1) {
+                char *q;
+                buffer[buffer_len - 1] = 0;
+#ifdef  _MSWINDOWS_
+                q = strrchr(buffer, '\\');
+                if(!q)
+                    q = strrchr(buffer, '/');
+                if(!q)
+                    q = strchr(buffer, ':');
+#else
+                q = strrchr(buffer, '/');
+#endif
+                *q = 0;
+                buffer_len = q - buffer;
+            }
+            continue;
+        }
+        snprintf(next_token, size, "%s", buffer);
+        buffer_len = strlen(buffer);
+        if(buffer_len >= size)
+            return NULL;
+
+#ifndef HAVE_LSTAT
+        if(!isFile(buffer) && !isDir(buffer))
+            return buffer;
+
+        continue;
+#else
+        if(lstat(buffer, &ino) < 0) {
+            if(errno == ENOENT && !p)
+                return buffer;
+
+            return NULL;
+        }
+
+        if((ino.st_mode & S_IFLNK) == S_IFLNK) {
+                    char symlink[size];
+            int slen;
+
+            if (symlinks++ > MAXSYMLINKS)
+                return NULL;
+
+            slen = readlink(buffer, symlink, size);
+
+            if (slen < 0)
+                return NULL;
+            symlink[slen] = 0;
+
+            if (symlink[0] == '/') {
+                buffer[1] = 0;
+                buffer_len = 1;
+                } else if (buffer_len > 1) {
+                char *q;
+
+                buffer[buffer_len - 1] = 0;
+                q = strrchr(buffer, '/');
+                *q = 0;
+                buffer_len = q - buffer;
+                }
+            if (symlink[slen - 1] != '/' && p) {
+                if (slen >= size)
+                    return NULL;
+
+                symlink[slen] = '/';
+                symlink[slen + 1] = 0;
+                }
+            if(p) {
+                snprintf(symlink, size, "%s", left);
+                left_len = strlen(symlink);
+            }
+            if(left_len >= size)
+                return NULL;
+            snprintf(left, size, "%s", symlink);
+            left_len = strlen(left);
+        }
+#endif
+
+    }
+
+#ifdef  _MSWINDOWS_
+    if(buffer_len > 1 && buffer[buffer_len - 1] == '\\')
+        buffer[buffer_len - 1] = 0;
+    else if(buffer_len > 1 && buffer[buffer_len - 1] == '/')
+        buffer[buffer_len - 1] = 0;
+#else
+    if(buffer_len > 1 && buffer[buffer_len - 1] == '/')
+        buffer[buffer_len - 1] = 0;
+#endif
+    return buffer;
+}
+
+#endif
+
+END_NAMESPACE
diff --git a/jni/libucommon/sources/commoncpp/linked.cpp b/jni/libucommon/sources/commoncpp/linked.cpp
new file mode 100644
index 0000000..19e56bb
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/linked.cpp
@@ -0,0 +1,202 @@
+// Copyright (C) 2004-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#include <ucommon-config.h>
+#include <commoncpp/config.h>
+#include <commoncpp/export.h>
+#include <commoncpp/thread.h>
+#include <commoncpp/object.h>
+
+using namespace COMMONCPP_NAMESPACE;
+
+LinkedSingle::~LinkedSingle() {}
+
+LinkedSingle *LinkedSingle::getFirst(void)
+{
+    return this;
+}
+
+LinkedSingle *LinkedSingle::getLast(void)
+{
+    LinkedSingle *obj = this;
+
+    while(obj->nextObject)
+        obj = obj->nextObject;
+
+    return obj;
+}
+
+void LinkedSingle::insert(LinkedSingle& obj)
+{
+    obj.nextObject = nextObject;
+    nextObject = &obj;
+}
+
+LinkedSingle &LinkedSingle::operator+=(LinkedSingle &obj)
+{
+    insert(obj);
+    return *this;
+}
+
+LinkedDouble::~LinkedDouble()
+{
+    detach();
+}
+
+void LinkedDouble::enterLock() {}
+
+void LinkedDouble::leaveLock() {}
+
+LinkedDouble *LinkedDouble::firstObject()
+{
+    LinkedDouble *node = this;
+
+    while(node->prevObject)
+        node = node->prevObject;
+
+    return node;
+}
+
+LinkedDouble *LinkedDouble::lastObject()
+{
+    LinkedDouble *node = this;
+
+    while(node->nextObject)
+        node = node->nextObject;
+
+    return node;
+}
+
+LinkedDouble *LinkedDouble::getFirst(void)
+{
+    LinkedDouble *node;
+
+    enterLock();
+    node = firstObject();
+    leaveLock();
+
+    return node;
+}
+
+LinkedDouble *LinkedDouble::getLast(void)
+{
+    LinkedDouble *node;
+
+    enterLock();
+    node = lastObject();
+    leaveLock();
+
+    return node;
+}
+
+LinkedDouble *LinkedDouble::getInsert(void)
+{
+    return getLast();
+}
+
+void LinkedDouble::insert(LinkedDouble& obj, InsertMode position)
+{
+    LinkedDouble *node;
+
+    enterLock();
+    obj.detach();
+
+    switch ( position ) {
+    case modeAtFirst:
+        node = firstObject();
+        obj.nextObject = node;
+        node->prevObject = &obj;
+        break;
+
+    case modeBefore:
+        obj.nextObject = this;
+        obj.prevObject = this->prevObject;
+        this->prevObject = &obj;
+        if (obj.prevObject)
+            obj.prevObject->nextObject = &obj;
+        break;
+
+    case modeAfter:
+        obj.nextObject = this->nextObject;
+        obj.prevObject = this;
+        this->nextObject = &obj;
+        if (obj.nextObject)
+            obj.nextObject->prevObject = &obj;
+        break;
+
+    case modeAtLast:
+    default:
+        node = lastObject();
+        obj.nextObject = node->nextObject;
+        obj.prevObject = node;
+        node->nextObject = &obj;
+        if(obj.nextObject)
+            obj.nextObject->prevObject = &obj;
+        break;
+    }
+    leaveLock();
+}
+
+void LinkedDouble::detach(void)
+{
+    enterLock();
+
+    if(prevObject)
+        prevObject->nextObject = nextObject;
+
+    if(nextObject)
+        nextObject->prevObject = prevObject;
+
+    prevObject = NULL;
+    nextObject = NULL;
+
+    leaveLock();
+}
+
+LinkedDouble &LinkedDouble::operator+=(LinkedDouble &obj)
+{
+    insert(obj);
+    return *this;
+}
+
+LinkedDouble &LinkedDouble::operator--()
+{
+    detach();
+    return *this;
+}
+
diff --git a/jni/libucommon/sources/commoncpp/map.cpp b/jni/libucommon/sources/commoncpp/map.cpp
new file mode 100644
index 0000000..a843fec
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/map.cpp
@@ -0,0 +1,240 @@
+// Copyright (C) 2004-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#include <ucommon-config.h>
+#include <commoncpp/config.h>
+#include <commoncpp/export.h>
+#include <commoncpp/thread.h>
+#include <commoncpp/object.h>
+
+using namespace COMMONCPP_NAMESPACE;
+
+MapIndex& MapIndex::operator=(MapObject *theObject)
+{
+    thisObject = theObject;
+    return *this;
+}
+
+MapIndex& MapIndex::operator++()
+{
+    if ( thisObject == NULL )
+        return *this;
+
+    if (thisObject->nextObject != NULL) {
+        thisObject = thisObject->nextObject;
+    }
+    else if (thisObject->table != NULL) {
+        MapObject* obj = NULL;
+        unsigned i = thisObject->table->getIndex(thisObject->idObject) + 1;
+
+
+        thisObject->table->enterMutex();
+        for ( ; obj == NULL && i < thisObject->table->range; i++)
+                obj = thisObject->table->map[i];
+        thisObject->table->leaveMutex();
+
+        thisObject = obj;
+    }
+
+    return *this;
+}
+
+MapTable::MapTable(unsigned size) :
+Mutex()
+{
+    map = new MapObject *[size + 1];
+    memset(map, 0, sizeof(MapObject *) * (size + 1));
+    range = size;
+    count = 0;
+}
+
+MapTable::~MapTable()
+{
+    cleanup();
+}
+
+void MapTable::cleanup(void)
+{
+    enterMutex();
+    if(map)
+        delete[] map;
+    map = NULL;
+    leaveMutex();
+}
+
+unsigned MapTable::getIndex(const char *id)
+{
+    unsigned key = 0;
+
+    while(*id)
+        key = (key << 1) ^ (*(id++) & 0x1f);
+
+    return key % range;
+}
+
+void *MapTable::getObject(const char *id)
+{
+    if(!map)
+        return NULL;
+
+    enterMutex();
+    MapObject *obj = map[getIndex(id)];
+
+    while(obj) {
+        if(!stricmp(obj->idObject, id))
+            break;
+        obj = obj->nextObject;
+    }
+    leaveMutex();
+    return (void *)obj;
+}
+
+void *MapTable::getFirst()
+{
+    MapObject *obj;
+
+    if(!map)
+        return NULL;
+
+    enterMutex();
+    obj = *map;
+    for (register unsigned i = 0; obj == NULL && i < range; i++)
+        obj = map[i];
+    leaveMutex();
+    return obj;
+}
+
+void *MapTable::getLast()
+{
+    MapObject *obj = NULL;
+
+    if(!map)
+        return NULL;
+
+    enterMutex();
+    for (register int i = range - 1; obj == NULL && i >= 0; i--)
+        obj = map[i];
+
+    if ( obj != NULL )
+        while ( obj->nextObject != NULL )
+            obj = obj->nextObject;
+    leaveMutex();
+    return obj;
+}
+
+void *MapTable::getFree(void)
+{
+    enterMutex();
+    MapObject *obj = map[range];
+    if(obj)
+        map[range] = obj->nextObject;
+    leaveMutex();
+    return obj;
+}
+
+void MapTable::addFree(MapObject *obj)
+{
+    obj->detach();
+    enterMutex();
+    obj->nextObject = map[range];
+    map[range] = obj;
+    leaveMutex();
+}
+
+void MapTable::addObject(MapObject &obj)
+{
+    unsigned idx = getIndex(obj.idObject);
+
+    if(obj.table == this || !map)
+        return;
+
+    obj.detach();
+    enterMutex();
+    obj.nextObject = map[idx];
+    map[idx] = &obj;
+    obj.table = this;
+    count++;
+    leaveMutex();
+}
+
+MapTable &MapTable::operator+=(MapObject &obj)
+{
+    addObject(obj);
+    return *this;
+}
+
+MapTable &MapTable::operator-=(MapObject &obj)
+{
+    if(obj.table == this)
+        obj.detach();
+    return *this;
+}
+
+MapObject::MapObject(const char *id)
+{
+    table = NULL;
+    idObject = id;
+}
+
+void MapObject::detach(void)
+{
+    MapObject *node, *prev = NULL;
+    unsigned idx;
+
+    if(!table)
+        return;
+
+    idx = table->getIndex(idObject);
+    table->enterMutex();
+    node = table->map[idx];
+
+    while(node) {
+        if(node == this)
+            break;
+        prev = node;
+        node = prev->nextObject;
+    }
+
+    if(node && !prev)
+        table->map[idx] = nextObject;
+    else if(node)
+        prev->nextObject = nextObject;
+    table->count--;
+    table->leaveMutex();
+    table = NULL;
+}
diff --git a/jni/libucommon/sources/commoncpp/mime.cpp b/jni/libucommon/sources/commoncpp/mime.cpp
new file mode 100644
index 0000000..c16ba19
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/mime.cpp
@@ -0,0 +1,145 @@
+// Copyright (C) 2001-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#include <ucommon-config.h>
+#include <commoncpp/config.h>
+#include <commoncpp/export.h>
+#include <commoncpp/thread.h>
+#include <commoncpp/socket.h>
+#include <commoncpp/exception.h>
+#include <commoncpp/mime.h>
+
+NAMESPACE_COMMONCPP
+using namespace std;
+
+MIMEMultipart::MIMEMultipart(const char *mt)
+{
+    const char *cp = strchr(mt, '/');
+    if(cp)
+        mt = ++cp;
+
+    first = last = NULL;
+    header[1] = NULL;
+    header[0] = mtype;
+    setString(boundry, sizeof(boundry), "xyzzy");
+    snprintf(mtype, sizeof(mtype), "Content-Type: multipart/%s, boundry=%s", mt, boundry);
+}
+
+MIMEMultipart::~MIMEMultipart()
+{}
+
+void MIMEMultipart::head(std::ostream *out)
+{
+    char **list = header;
+
+    while(**list)
+        *out << *(list++) << "\r\n";
+
+    out->flush();
+}
+
+void MIMEMultipart::body(std::ostream *out)
+{
+    MIMEItemPart *item = first;
+
+    while(item) {
+        *out << "--" << boundry << "\r\n";
+        item->head(out);
+        *out << "\r\n";
+        item->body(out);
+        item = item->next;
+    }
+    *out << "--" << boundry << "--\r\n";
+    out->flush();
+}
+
+MIMEItemPart::MIMEItemPart(MIMEMultipart *m, const char *ct)
+{
+    if(m->last) {
+        m->last->next = this;
+        m->last = this;
+    }
+    else
+        m->first = m->last = this;
+    next = NULL;
+    ctype = ct;
+}
+
+MIMEItemPart::~MIMEItemPart()
+{}
+
+MIMEMultipartForm::MIMEMultipartForm() :
+MIMEMultipart("form-data")
+{}
+
+MIMEMultipartForm::~MIMEMultipartForm()
+{}
+
+void MIMEItemPart::head(std::ostream *out)
+{
+    *out << "Content-Type: " << ctype << "\r" << endl;
+}
+
+MIMEFormData::MIMEFormData(MIMEMultipartForm *m, const char *n, const char *v) :
+MIMEItemPart(m, "")
+{
+    name = n;
+    content = v;
+}
+
+MIMEFormData::~MIMEFormData()
+{}
+
+void MIMEFormData::head(std::ostream *out)
+{
+    *out << "Content-Disposition: form-data; name=\"" << name << "\"\r\n";
+}
+
+void MIMEFormData::body(std::ostream *out)
+{
+    *out << content << "\r\n";
+}
+
+END_NAMESPACE
+
+/** EMACS **
+ * Local variables:
+ * mode: c++
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/jni/libucommon/sources/commoncpp/pointer.cpp b/jni/libucommon/sources/commoncpp/pointer.cpp
new file mode 100644
index 0000000..993c957
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/pointer.cpp
@@ -0,0 +1,104 @@
+// Copyright (C) 2004-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#include <ucommon-config.h>
+#include <commoncpp/config.h>
+#include <commoncpp/export.h>
+#include <commoncpp/thread.h>
+#include <commoncpp/object.h>
+
+using namespace COMMONCPP_NAMESPACE;
+
+RefObject::~RefObject() {}
+
+void RefPointer::enterLock(void) {}
+
+void RefPointer::leaveLock(void) {}
+
+void RefPointer::detach(void)
+{
+    if(ref) {
+        enterLock();
+        --(ref->refCount);
+        if(!ref->refCount)
+            delete ref;
+        leaveLock();
+        ref = NULL;
+    }
+}
+
+RefPointer::RefPointer(RefObject *obj)
+{
+    enterLock();
+    ++obj->refCount;
+    leaveLock();
+    ref = obj;
+}
+
+RefPointer::RefPointer(const RefPointer &ptr)
+{
+    detach();
+    ref = ptr.ref;
+    if(ref) {
+        enterLock();
+        ++ref->refCount;
+        leaveLock();
+    }
+}
+
+RefPointer::~RefPointer()
+{
+    detach();
+}
+
+void *RefPointer::getObject() const
+{
+    if(ref)
+        return ref->getObject();
+
+    return NULL;
+}
+
+bool RefPointer::operator!() const
+{
+    if(ref && ref->refCount == 1)
+        return true;
+
+    return false;
+}
+
diff --git a/jni/libucommon/sources/commoncpp/process.cpp b/jni/libucommon/sources/commoncpp/process.cpp
new file mode 100644
index 0000000..7b2db07
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/process.cpp
@@ -0,0 +1,870 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#include <ucommon-config.h>
+#include <commoncpp/config.h>
+#include <commoncpp/export.h>
+#include <commoncpp/thread.h>
+#include <commoncpp/process.h>
+
+#include <cstdlib>
+#include <cstdio>
+#include <cerrno>
+#include <csignal>
+
+#ifdef  HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+
+#ifdef  MACOSX
+#undef  _POSIX_PRIORITY_SCHEDULING
+#endif
+
+#ifndef _MSWINDOWS_
+#ifdef  HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+#ifdef  HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+
+#include <pwd.h>
+#include <grp.h>
+
+#ifdef  SIGTSTP
+#include <sys/file.h>
+#include <sys/ioctl.h>
+#endif
+
+#ifndef _PATH_TTY
+#define _PATH_TTY "/dev/tty"
+#endif
+#endif
+
+#ifdef  _MSWINDOWS_
+#include <process.h>
+#include <stdio.h>
+#endif
+
+using namespace COMMONCPP_NAMESPACE;
+
+bool Process::rtflag = false;
+
+#ifdef  _MSWINDOWS_
+
+static SYSTEM_INFO sysinfo;
+static LPSYSTEM_INFO lpSysInfo = NULL;
+
+static void init_sysinfo(void)
+{
+    if(!lpSysInfo) {
+        lpSysInfo = &sysinfo;
+        memset(&sysinfo, 0, sizeof(sysinfo));
+        GetSystemInfo(lpSysInfo);
+    }
+}
+
+const char *Process::getUser(void)
+{
+    static char userid[65];
+    DWORD length = sizeof(userid);
+
+    if(GetUserName(userid, &length))
+        return userid;
+
+    return NULL;
+}
+
+size_t Process::getPageSize(void)
+{
+    init_sysinfo();
+    return (size_t) lpSysInfo->dwPageSize;
+}
+
+int Process::spawn(const char *exename, const char **args, bool wait)
+{
+    int mode = P_NOWAIT;
+
+    if(wait)
+            mode = P_WAIT;
+
+    return (int)::spawnvp(mode, (char *)exename, (char **)args);
+}
+
+int Process::join(int pid)
+{
+    int status, result;
+
+    if(pid == -1)
+        return pid;
+
+    result = (int)cwait(&status, pid, WAIT_CHILD);
+    if(status & 0x0)
+        return -1;
+    return result;
+}
+
+bool Process::cancel(int pid, int sig)
+{
+    HANDLE hPid = OpenProcess(PROCESS_TERMINATE, FALSE, pid);
+    bool rtn = true;
+
+    if(!hPid)
+        return false;
+
+    switch(sig) {
+    case SIGABRT:
+    case SIGTERM:
+        if(!TerminateProcess(hPid, -1))
+            rtn = false;
+    case 0:
+        break;
+    default:
+        rtn = false;
+    }
+    CloseHandle(hPid);
+    return rtn;
+}
+
+void Process::setPriority(int pri)
+{
+    DWORD pc = NORMAL_PRIORITY_CLASS;
+    DWORD pid = GetCurrentProcessId();
+    HANDLE hProcess = OpenProcess(PROCESS_DUP_HANDLE, TRUE, pid);
+
+#ifdef  BELOW_NORMAL_PRIORITY_CLASS
+    if(pri == -1)
+        pc = BELOW_NORMAL_PRIORITY_CLASS;
+    else if(pri == 1)
+        pc = ABOVE_NORMAL_PRIORITY_CLASS;
+    else
+#endif
+    if(pri == 2)
+        pc = HIGH_PRIORITY_CLASS;
+    else if(pri > 2)
+        pc = REALTIME_PRIORITY_CLASS;
+    else if(pri < -1)
+        pc = IDLE_PRIORITY_CLASS;
+
+    SetPriorityClass(hProcess, pc);
+    CloseHandle(hProcess);
+}
+
+void Process::setScheduler(const char *cp)
+{
+    if(!stricmp(cp, "fifo"))
+        setPriority(3);
+    else if(!stricmp(cp, "rr"))
+        setPriority(2);
+    else if(!stricmp(cp, "idle"))
+        setPriority(-2);
+    else
+        setPriority(0);
+}
+
+void Process::setRealtime(int pri)
+{
+    setPriority(3);
+}
+
+bool Process::isScheduler(void)
+{
+    return false;
+}
+
+#else
+
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(status) ((unsigned)(status) >> 8)
+#endif
+
+#ifndef WIFEXITED
+#define WIFEXITED(status) (((status) & 255) == 0)
+#endif
+
+#ifndef WTERMSIG
+#define WTERMSIG(status) (((unsigned)(status)) & 0x7F)
+#endif
+
+#ifndef WIFSIGNALLED
+#define WIFSIGNALLED(status) (((status) & 255) != 0)
+#endif
+
+#ifndef WCOREDUMP
+#define WCOREDUMP(status) (((status) & 0x80) != 0)
+#endif
+
+static char *_pUser = NULL;
+static char *_pHome = NULL;
+
+static void lookup(void)
+{
+    struct passwd *pw = NULL;
+#ifdef  HAVE_GETPWUID_R
+    struct passwd pwd;
+    char buffer[1024];
+
+    ::getpwuid_r(geteuid(), &pwd, buffer, 1024, &pw);
+#else
+    pw = ::getpwuid(geteuid());
+#endif
+
+    if(_pHome)
+        delString(_pHome);
+    if(_pUser)
+        delString(_pUser);
+
+    _pUser = _pHome = NULL;
+
+    if(pw != NULL && pw->pw_dir != NULL)
+        _pHome = newString(pw->pw_dir);
+
+    if(pw != NULL && pw->pw_name != NULL)
+        _pUser = newString(pw->pw_name);
+
+    endpwent();
+}
+
+const char *Process::getUser(void)
+{
+    if(!_pUser)
+        lookup();
+
+    return (const char *)_pUser;
+}
+
+const char *Process::getConfigDir(void)
+{
+#ifdef  ETC_CONFDIR
+    return ETC_CONFDIR;
+#else
+    return "/etc";
+#endif
+}
+
+const char *Process::getHomeDir(void)
+{
+    if(!_pHome)
+        lookup();
+
+    return (const char *)_pHome;
+}
+
+#ifdef  HAVE_GETPAGESIZE
+size_t Process::getPageSize(void)
+{
+    return (size_t)getpagesize();
+}
+
+#else
+
+size_t Process::getPageSize(void)
+{
+    return 1024;
+}
+#endif
+
+bool Process::setUser(const char *id, bool grp)
+{
+    struct passwd *pw = NULL;
+#ifdef  HAVE_GETPWNAM_R
+    struct passwd pwd;
+    char buffer[1024];
+
+    ::getpwnam_r(id, &pwd, buffer, 1024, &pw);
+#else
+    pw = ::getpwnam(id);
+#endif
+    if(!pw)
+        return false;
+
+    if(grp)
+        if(setgid(pw->pw_gid))
+            return false;
+
+    if(setuid(pw->pw_uid))
+        return false;
+
+    lookup();
+    return true;
+}
+
+bool Process::setGroup(const char *id)
+{
+    struct group *group = NULL;
+#ifdef  HAVE_GETGRNAM_R
+    struct group grp;
+    char buffer[2048];
+
+    ::getgrnam_r(id, &grp, buffer, 1024, &group);
+#else
+    group = ::getgrnam(id);
+#endif
+    if(!group) {
+        //endgrent();
+        return false;
+    }
+
+#ifdef  HAVE_SETEGID
+    setegid(group->gr_gid);
+#endif
+    if(setgid(group->gr_gid)) {
+        //endgrent();
+        return false;
+    }
+
+    //endgrent();
+    return true;
+}
+
+bool Process::cancel(int pid, int sig)
+{
+    if(!sig)
+        sig = SIGTERM;
+
+    if(pid < 1)
+        return false;
+
+    if(::kill(pid, sig))
+        return false;
+
+    return true;
+}
+
+int Process::join(int pid)
+{
+    int status;
+
+    if(pid < 1)
+        return -1;
+
+#ifdef  HAVE_WAITPID
+    waitpid(pid, &status, 0);
+#else
+#ifdef  HAVE_WAIT4
+    wait4(pid, &status, 0, NULL);
+#else
+    int result;
+    while((result = ::wait(&status)) != pid && result != -1)
+        ;
+#endif
+#endif
+
+    if(WIFEXITED(status))
+        return WEXITSTATUS(status);
+    else if(WIFSIGNALLED(status))
+        return -WTERMSIG(status);
+    else
+        return -1;
+}
+
+int Process::spawn(const char *exename, const char **args, bool wait)
+{
+    int pid;
+
+    pid = vfork();
+    if(pid == -1)
+        return -1;
+
+    if(!pid) {
+        execvp((char *)exename, (char **)args);
+        _exit(-1);
+    }
+
+    if(!wait)
+        return pid;
+
+    return join(pid);
+}
+
+Process::Trap Process::setInterruptSignal(int signo, Trap func)
+{
+    struct  sigaction   sig_act, old_act;
+
+    memset(&sig_act, 0, sizeof(sig_act));
+    sig_act.sa_handler = func;
+    sigemptyset(&sig_act.sa_mask);
+    if(signo != SIGALRM)
+        sigaddset(&sig_act.sa_mask, SIGALRM);
+
+    sig_act.sa_flags = 0;
+#ifdef  SA_INTERRUPT
+    sig_act.sa_flags |= SA_INTERRUPT;
+#endif
+    if(sigaction(signo, &sig_act, &old_act) < 0)
+        return SIG_ERR;
+
+    return old_act.sa_handler;
+}
+
+Process::Trap Process::setPosixSignal(int signo, Trap func)
+{
+    struct  sigaction   sig_act, old_act;
+
+    memset(&sig_act, 0, sizeof(sig_act));
+    sig_act.sa_handler = func;
+    sigemptyset(&sig_act.sa_mask);
+    sig_act.sa_flags = 0;
+    if(signo == SIGALRM) {
+#ifdef  SA_INTERRUPT
+        sig_act.sa_flags |= SA_INTERRUPT;
+#endif
+    }
+    else {
+        sigaddset(&sig_act.sa_mask, SIGALRM);
+#ifdef  SA_RESTART
+        sig_act.sa_flags |= SA_RESTART;
+#endif
+    }
+    if(sigaction(signo, &sig_act, &old_act) < 0)
+        return SIG_ERR;
+    return old_act.sa_handler;
+}
+
+void    Process::detach(void)
+{
+    attach("/dev/null");
+}
+
+void    Process::attach(const char *dev)
+{
+    int pid;
+
+    if(getppid() == 1)
+        return;
+
+    ::close(0);
+    ::close(1);
+    ::close(2);
+
+#ifdef  SIGTTOU
+    setPosixSignal(SIGTTOU, SIG_IGN);
+#endif
+
+#ifdef  SIGTTIN
+    setPosixSignal(SIGTTIN, SIG_IGN);
+#endif
+
+#ifdef  SIGTSTP
+    setPosixSignal(SIGTSTP, SIG_IGN);
+#endif
+
+    if((pid = fork()) < 0)
+        THROW(pid);
+    else if(pid > 0)
+        exit(0);
+
+
+#if defined(SIGTSTP) && defined(TIOCNOTTY)
+    int fd;
+    if(setpgid(0, getpid()) == -1)
+        THROW(-1);
+
+    if((fd = open(_PATH_TTY, O_RDWR)) >= 0) {
+        ioctl(fd, TIOCNOTTY, NULL);
+        close(fd);
+    }
+#else
+
+#ifdef  HAVE_SETPGRP
+    if(setpgrp() == -1)
+        THROW(-1);
+#else
+    if(setpgid(0, getpid()) == -1)
+        THROW(-1);
+#endif
+
+    setPosixSignal(SIGHUP, SIG_IGN);
+
+    if((pid = fork()) < 0)
+        THROW(-1);
+    else if(pid > 0)
+        exit(0);
+#endif
+
+    if(dev && *dev) {
+        ::open(dev, O_RDWR);
+        ::open(dev, O_RDWR);
+        ::open(dev, O_RDWR);
+    }
+}
+
+void Process::setScheduler(const char *pol)
+{
+#ifdef  _POSIX_PRIORITY_SCHEDULING
+    struct sched_param p;
+    int policy, orig;
+    pthread_t ptid = pthread_self();
+
+    if(pthread_getschedparam(ptid, &policy, &p))
+        return;
+
+    orig = policy;
+    if(pol) {
+#if defined(SCHED_TS)
+        policy = SCHED_TS;
+#elif defined(SCHED_OTHER)
+        policy = SCHED_OTHER;
+#else
+        policy = 0;
+#endif
+
+#ifdef  SCHED_RR
+        if(ucommon::eq_case(pol, "rr"))
+            policy = SCHED_RR;
+#endif
+#if !defined(SCHED_RR) && defined(SCHED_FIFO)
+        if(ucommon::eq_case(pol, "rr"))
+            policy = SCHED_FIFO;
+#endif
+#ifdef  SCHED_FIFO
+        if(ucommon::eq_case(pol, "fifo")) {
+            rtflag = true;
+            policy = SCHED_FIFO;
+        }
+#endif
+#ifdef  SCHED_TS
+        if(ucommon::eq_case(pol, "ts"))
+            policy = SCHED_TS;
+#endif
+#ifdef  SCHED_OTHER
+        if(ucommon::eq_case(pol, "other"))
+            policy = SCHED_OTHER;
+#endif
+    }
+    else
+        policy = orig;
+
+    int min = sched_get_priority_min(policy);
+    int max = sched_get_priority_max(policy);
+
+    if(p.sched_priority < min)
+        p.sched_priority = min;
+    else if(p.sched_priority > max)
+        p.sched_priority = max;
+
+    pthread_setschedparam(ptid, policy, &p);
+#endif
+}
+
+void Process::setPriority(int pri)
+{
+#ifdef  _POSIX_PRIORITY_SCHEDULING
+    struct sched_param p;
+    int policy;
+    pthread_t ptid = pthread_self();
+
+    pthread_getschedparam(ptid, &policy, &p);
+
+    int min = sched_get_priority_min(policy);
+    int max = sched_get_priority_max(policy);
+
+    if(pri < min)
+        pri = min;
+    if(pri > max)
+        pri = max;
+    p.sched_priority = pri;
+    pthread_setschedparam(ptid, policy, &p);
+#else
+    if(pri < -20)
+        pri = -20;
+    if(pri > 20)
+        pri = 20;
+    nice(-pri);
+#endif
+}
+
+bool Process::isScheduler(void)
+{
+#ifdef  _POSIX_PRIORITY_SCHEDULING
+    return true;
+#else
+    return false;
+#endif
+}
+
+void Process::setRealtime(int pri)
+{
+    if(pri < 1)
+        pri = 1;
+
+    setScheduler("rr");
+    setPriority(pri);
+}
+
+#endif
+
+#ifdef  _OSF_SOURCE
+#undef  HAVE_SETENV
+#endif
+
+void Process::setEnv(const char *name, const char *value, bool overwrite)
+{
+#ifdef  HAVE_SETENV
+    ::setenv(name, value, (int)overwrite);
+#else
+    char strbuf[256];
+
+    snprintf(strbuf, sizeof(strbuf), "%s=%s", name, value);
+    if(!overwrite)
+        if(getenv(strbuf))
+            return;
+
+    ::putenv(strdup(strbuf));
+#endif
+}
+
+const char *Process::getEnv(const char *name)
+{
+    return ::getenv(name);
+}
+
+#if defined(HAVE_MLOCKALL) && defined(MCL_FUTURE)
+
+#include <sys/mman.h>
+
+bool Process::lock(bool future)
+{
+    int rc;
+
+    if(future)
+        rc = mlockall(MCL_CURRENT | MCL_FUTURE);
+    else
+        rc = mlockall(MCL_CURRENT);
+    if(rc)
+        return false;
+
+    return true;
+}
+
+void Process::unlock(void)
+{
+    munlockall();
+}
+#else
+
+bool Process::lock(bool future)
+{
+    return false;
+}
+
+void Process::unlock(void)
+{
+}
+
+#endif
+
+#ifdef  _MSWINDOWS_
+
+Lockfile::Lockfile()
+{
+    _mutex = INVALID_HANDLE_VALUE;
+    _flagged = false;
+}
+
+Lockfile::Lockfile(const char *name)
+{
+    _mutex = INVALID_HANDLE_VALUE;
+    _flagged = false;
+    lock(name);
+}
+
+bool Lockfile::lock(const char *name)
+{
+    char mname[65];
+    char *ext = strrchr((char *)name, '/');
+
+    if(ext)
+        name = ++ext;
+
+    unlock();
+    snprintf(mname, sizeof(mname) - 4, "_lock_%s", name);
+    ext = strrchr(mname, '.');
+    if(ext && !stricmp(ext, ".lock")) {
+        *ext = 0;
+        ext = NULL;
+    }
+    if(!ext)
+        addString(mname, sizeof(mname), ".lck");
+    _mutex = CreateMutex(NULL, FALSE, mname);
+    if(WaitForSingleObject(_mutex, 200) == WAIT_OBJECT_0)
+        _flagged = true;
+    return _flagged;
+}
+
+void Lockfile::unlock(void)
+{
+    if(_mutex == INVALID_HANDLE_VALUE)
+        return;
+
+    if(_flagged)
+        ReleaseMutex(_mutex);
+    CloseHandle(_mutex);
+    _flagged = false;
+    _mutex = INVALID_HANDLE_VALUE;
+}
+
+bool Lockfile::isLocked(void)
+{
+    return _flagged;
+}
+
+#else
+Lockfile::Lockfile()
+{
+    _path = NULL;
+}
+
+Lockfile::Lockfile(const char *name)
+{
+    _path = NULL;
+    lock(name);
+}
+
+bool Lockfile::lock(const char *name)
+{
+    struct stat ino;
+    int fd, pid, status;
+    const char *ext;
+    char buffer[128];
+    bool rtn = true;
+
+    unlock();
+
+    ext = strrchr(name, '/');
+    if(ext)
+        ext = strrchr(ext, '.');
+    else
+        ext = strrchr(name, '.');
+
+    if(strchr(name, '/')) {
+        _path = new char[strlen(name) + 1];
+        strcpy(_path, name);
+    }
+    else if(ext && !strcmp(ext, ".pid")) {
+        if(stat("/var/run", &ino))
+            snprintf(buffer, sizeof(buffer), "/tmp/.%s", name);
+        else
+            snprintf(buffer, sizeof(buffer), "/var/run/%s", name);
+        _path = new char[strlen(buffer) + 1];
+        strcpy(_path, buffer);
+    }
+    else {
+        if(!ext)
+            ext = ".lock";
+        if(stat("/var/lock", &ino))
+            snprintf(buffer, sizeof(buffer), "/tmp/.%s%s", name, ext);
+        else
+            snprintf(buffer, sizeof(buffer), "/var/lock/%s%s", name, ext);
+
+        _path = new char[strlen(buffer) + 1];
+        strcpy(_path, buffer);
+    }
+
+    for(;;) {
+        fd = ::open(_path, O_WRONLY | O_CREAT | O_EXCL, 0660);
+        if(fd > 0) {
+            pid = getpid();
+            snprintf(buffer, sizeof(buffer), "%d\n", pid);
+            if(::write(fd, buffer, strlen(buffer)))
+                rtn = false;
+            ::close(fd);
+            return rtn;
+        }
+        if(fd < 0 && errno != EEXIST) {
+            delete[] _path;
+            return false;
+        }
+
+        fd = ::open(_path, O_RDONLY);
+        if(fd < 0) {
+            if(errno == ENOENT)
+                continue;
+            delete[] _path;
+            return false;
+        }
+
+        Thread::sleep(2000);
+        status = ::read(fd, buffer, sizeof(buffer) - 1);
+        if(status < 1) {
+            ::close(fd);
+            continue;
+        }
+
+        buffer[status] = 0;
+        pid = atoi(buffer);
+        if(pid) {
+            if(pid == getpid()) {
+                status = -1;
+                errno = 0;
+            }
+            else
+                status = kill(pid, 0);
+
+            if(!status || (errno == EPERM)) {
+                ::close(fd);
+                delete[] _path;
+                return false;
+            }
+        }
+        ::close(fd);
+        ::unlink(_path);
+    }
+}
+
+void Lockfile::unlock(void)
+{
+    if(_path) {
+        remove(_path);
+        delete[] _path;
+        _path = NULL;
+    }
+}
+
+bool Lockfile::isLocked(void)
+{
+    if(_path)
+        return true;
+
+    return false;
+}
+
+#endif
+
+
diff --git a/jni/libucommon/sources/commoncpp/serial.cpp b/jni/libucommon/sources/commoncpp/serial.cpp
new file mode 100644
index 0000000..975bc1b
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/serial.cpp
@@ -0,0 +1,1863 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#include <ucommon-config.h>
+#include <commoncpp/config.h>
+#include <commoncpp/export.h>
+#include <commoncpp/exception.h>
+#include <commoncpp/thread.h>
+#include <commoncpp/serial.h>
+#include <cstdlib>
+#include <climits>
+
+#ifdef  _MSWINDOWS_
+
+#define B256000     CBR_256000
+#define B128000     CBR_128000
+#define B115200     CBR_115200
+#define B57600      CBR_57600
+#define B56000      CBR_56000
+#define B38400      CBR_38400
+#define B19200      CBR_19200
+#define B14400      CBR_14400
+#define B9600       CBR_9600
+#define B4800       CBR_4800
+#define B2400       CBR_2400
+#define B1200       CBR_1200
+#define B600        CBR_600
+#define B300        CBR_300
+#define B110        CBR_110
+
+#include <io.h>
+#else
+#include <sys/ioctl.h>
+#ifdef  HAVE_TERMIOS_H
+#include <termios.h>
+#endif
+#endif
+
+#include <fcntl.h>
+#include <cerrno>
+#include <iostream>
+
+NAMESPACE_COMMONCPP
+using std::streambuf;
+using std::iostream;
+using std::ios;
+
+#ifndef MAX_INPUT
+#define MAX_INPUT 255
+#endif
+
+#ifndef MAX_CANON
+#define MAX_CANON MAX_INPUT
+#endif
+
+#ifdef  __FreeBSD__
+#undef  _PC_MAX_INPUT
+#undef  _PC_MAX_CANON
+#endif
+
+#if defined(__QNX__)
+#define CRTSCTS (IHFLOW | OHFLOW)
+#endif
+
+#if defined(_THR_UNIXWARE) || defined(__hpux) || defined(_AIX)
+#include <sys/termiox.h>
+#define CRTSCTS (CTSXON | RTSXOFF)
+#endif
+
+// IRIX
+
+#ifndef CRTSCTS
+#ifdef  CNEW_RTSCTS
+#define CRTSCTS (CNEW_RTSCTS)
+#endif
+#endif
+
+#if defined(CTSXON) && defined(RTSXOFF) && !defined(CRTSCTS)
+#define CRTSCTS (CTSXON | RTSXOFF)
+#endif
+
+#ifndef CRTSCTS
+#define CRTSCTS 0
+#endif
+
+Serial::Serial(const char *fname)
+{
+    initSerial();
+
+#if defined(_MSWINDOWS_) || defined(HAVE_TERMIOS_H)
+    open(fname);
+#endif
+
+#ifdef  _MSWINDOWS_
+    if(dev == INVALID_HANDLE_VALUE)
+#elif defined(HAVE_TERMIOS_H)
+    if(dev < 0)
+#else
+    if(1)
+#endif
+    {
+        error(errOpenFailed);
+        return;
+    }
+
+#ifdef  _MSWINDOWS_
+    COMMTIMEOUTS  CommTimeOuts ;
+
+    GetCommTimeouts(dev, &CommTimeOuts);
+
+//    CommTimeOuts.ReadIntervalTimeout = MAXDWORD;
+    CommTimeOuts.ReadIntervalTimeout = 0;
+
+    CommTimeOuts.ReadTotalTimeoutMultiplier = 0 ;
+    CommTimeOuts.ReadTotalTimeoutConstant = 0;
+    CommTimeOuts.WriteTotalTimeoutMultiplier = 0 ;
+    CommTimeOuts.WriteTotalTimeoutConstant = 1000;
+
+    SetCommTimeouts(dev, &CommTimeOuts) ;
+
+#elif defined(HAVE_TERMIOS_H)
+
+    if(!isatty(dev)) {
+        Serial::close();
+        error(errOpenNoTty);
+        return;
+    }
+#endif
+}
+
+Serial::~Serial()
+{
+    endSerial();
+}
+
+void Serial::initConfig(void)
+{
+#ifdef  _MSWINDOWS_
+
+#define ASCII_XON       0x11
+#define ASCII_XOFF      0x13
+
+    DCB * attr = (DCB *)current;
+    DCB * orig = (DCB *)original;
+
+    attr->DCBlength = sizeof(DCB);
+    orig->DCBlength = sizeof(DCB);
+
+    GetCommState(dev, orig);
+    GetCommState(dev, attr);
+
+    attr->DCBlength = sizeof(DCB);
+    attr->BaudRate = 1200;
+    attr->Parity = NOPARITY;
+    attr->ByteSize = 8;
+
+    attr->XonChar = ASCII_XON;
+    attr->XoffChar = ASCII_XOFF;
+    attr->XonLim = 100;
+    attr->XoffLim = 100;
+    attr->fOutxDsrFlow = 0;
+    attr->fDtrControl = DTR_CONTROL_ENABLE;
+    attr->fOutxCtsFlow = 1;
+    attr->fRtsControl = RTS_CONTROL_ENABLE;
+    attr->fInX = attr->fOutX = 0;
+
+    attr->fBinary = true;
+    attr->fParity = true;
+
+    SetCommState(dev, attr);
+
+#elif defined(HAVE_TERMIOS_H)
+    struct termios *attr = (struct termios *)current;
+    struct termios *orig = (struct termios *)original;
+    long ioflags = fcntl(dev, F_GETFL);
+
+    tcgetattr(dev, (struct termios *)original);
+    tcgetattr(dev, (struct termios *)current);
+
+    attr->c_oflag = attr->c_lflag = 0;
+    attr->c_cflag = CLOCAL | CREAD | HUPCL;
+    attr->c_iflag = IGNBRK;
+
+    memset(attr->c_cc, 0, sizeof(attr->c_cc));
+    attr->c_cc[VMIN] = 1;
+
+    // inherit original settings, maybe we should keep more??
+    cfsetispeed(attr, cfgetispeed(orig));
+    cfsetospeed(attr, cfgetospeed(orig));
+    attr->c_cflag |= orig->c_cflag & (CRTSCTS | CSIZE | PARENB | PARODD | CSTOPB);
+    attr->c_iflag |= orig->c_iflag & (IXON | IXANY | IXOFF);
+
+    tcsetattr(dev, TCSANOW, attr);
+    fcntl(dev, F_SETFL, ioflags & ~O_NDELAY);
+
+#if defined(TIOCM_RTS) && defined(TIOCMODG)
+    int mcs = 0;
+    ioctl(dev, TIOCMODG, &mcs);
+    mcs |= TIOCM_RTS;
+    ioctl(dev, TIOCMODS, &mcs);
+#endif
+
+#ifdef  _COHERENT
+    ioctl(dev, TIOCSRTS, 0);
+#endif
+
+#endif  // WIN32
+    }
+
+void Serial::restore(void)
+{
+#ifdef  _MSWINDOWS_
+    memcpy(current, original, sizeof(DCB));
+    SetCommState(dev, (DCB *)current);
+#elif defined(HAVE_TERMIOS_H)
+    memcpy(current, original, sizeof(struct termios));
+    tcsetattr(dev, TCSANOW, (struct termios *)current);
+#endif
+}
+
+void Serial::initSerial(void)
+{
+    flags.thrown = false;
+    flags.linebuf = false;
+    errid = errSuccess;
+    errstr = NULL;
+
+    dev = INVALID_HANDLE_VALUE;
+#ifdef  _MSWINDOWS_
+    current = new DCB;
+    original = new DCB;
+#elif defined(HAVE_TERMIOS_H)
+    current = new struct termios;
+    original = new struct termios;
+#endif
+}
+
+void Serial::endSerial(void)
+{
+#ifdef  _MSWINDOWS_
+    if(dev == INVALID_HANDLE_VALUE && original)
+        SetCommState(dev, (DCB *)original);
+
+    if(current)
+        delete (DCB *)current;
+
+    if(original)
+        delete (DCB *)original;
+#elif defined(HAVE_TERMIOS_H)
+    if(dev < 0 && original)
+        tcsetattr(dev, TCSANOW, (struct termios *)original);
+
+    if(current)
+        delete (struct termios *)current;
+
+    if(original)
+        delete (struct termios *)original;
+#endif
+    Serial::close();
+
+    current = NULL;
+    original = NULL;
+}
+
+Serial::Error Serial::error(Error err, char *errs)
+{
+    errid = err;
+    errstr = errs;
+    if(!err)
+        return err;
+
+    if(flags.thrown)
+        return err;
+
+    // prevents recursive throws
+
+    flags.thrown = true;
+#ifdef  CCXX_EXCEPTIONS
+    if(Thread::getException() == Thread::throwObject)
+            throw((Serial *)this);
+#ifdef  COMMON_STD_EXCEPTION
+    else if(Thread::getException() == Thread::throwException) {
+        if(!errs)
+            errs = (char *)"";
+        throw SerException(String(errs));
+    }
+#endif
+#endif
+    return err;
+}
+
+int Serial::setPacketInput(int size, unsigned char btimer)
+{
+#ifdef  _MSWINDOWS_
+    //  Still to be done......
+    return 0;
+#elif defined(HAVE_TERMIOS_H)
+
+#ifdef  _PC_MAX_INPUT
+    int max = fpathconf(dev, _PC_MAX_INPUT);
+#else
+    int max = MAX_INPUT;
+#endif
+    struct termios *attr = (struct termios *)current;
+
+    if(size > max)
+        size = max;
+
+    attr->c_cc[VEOL] = attr->c_cc[VEOL2] = 0;
+    attr->c_cc[VMIN] = (unsigned char)size;
+    attr->c_cc[VTIME] = btimer;
+    attr->c_lflag &= ~ICANON;
+    tcsetattr(dev, TCSANOW, attr);
+    bufsize = size;
+    return size;
+#endif
+}
+
+int Serial::setLineInput(char newline, char nl1)
+{
+#ifdef  _MSWINDOWS_
+    //  Still to be done......
+    return 0;
+#elif defined(HAVE_TERMIOS_H)
+
+    struct termios *attr = (struct termios *)current;
+    attr->c_cc[VMIN] = attr->c_cc[VTIME] = 0;
+    attr->c_cc[VEOL] = newline;
+    attr->c_cc[VEOL2] = nl1;
+    attr->c_lflag |= ICANON;
+    tcsetattr(dev, TCSANOW, attr);
+#ifdef _PC_MAX_CANON
+    bufsize = fpathconf(dev, _PC_MAX_CANON);
+#else
+    bufsize = MAX_CANON;
+#endif
+    return bufsize;
+#endif
+}
+
+void Serial::flushInput(void)
+{
+#ifdef  _MSWINDOWS_
+    PurgeComm(dev, PURGE_RXABORT | PURGE_RXCLEAR);
+#elif defined(HAVE_TERMIOS_H)
+    tcflush(dev, TCIFLUSH);
+#endif
+}
+
+void Serial::flushOutput(void)
+{
+#ifdef  _MSWINDOWS_
+    PurgeComm(dev, PURGE_TXABORT | PURGE_TXCLEAR);
+#elif defined(HAVE_TERMIOS_H)
+    tcflush(dev, TCOFLUSH);
+#endif
+}
+
+void Serial::waitOutput(void)
+{
+#ifdef  _MSWINDOWS_
+
+#elif defined(HAVE_TERMIOS_H)
+    tcdrain(dev);
+#endif
+}
+
+Serial &Serial::operator=(const Serial &ser)
+{
+    Serial::close();
+
+    if(ser.dev < 0)
+        return *this;
+
+#ifdef  _MSWINDOWS_
+    HANDLE process = GetCurrentProcess();
+
+    int result = DuplicateHandle(process, ser.dev, process, &dev, DUPLICATE_SAME_ACCESS, 0, 0);
+
+    if (0 == result) {
+        memcpy(current, ser.current, sizeof(DCB));
+        memcpy(original, ser.original, sizeof(DCB));
+    }
+#elif defined(HAVE_TERMIOS_H)
+    dev = dup(ser.dev);
+
+    memcpy(current, ser.current, sizeof(struct termios));
+    memcpy(original, ser.original, sizeof(struct termios));
+#endif
+    return *this;
+}
+
+
+void Serial::open(const char * fname)
+{
+
+#ifndef _MSWINDOWS_
+    int cflags = O_RDWR | O_NDELAY;
+    dev = ::open(fname, cflags);
+    if(dev > -1)
+        initConfig();
+#elif defined(HAVE_TERMIOS_H)
+    // open COMM device
+    dev = CreateFile(fname,
+        GENERIC_READ | GENERIC_WRITE,
+        0,                    // exclusive access
+        NULL,                 // no security attrs
+        OPEN_EXISTING,
+        FILE_FLAG_OVERLAPPED | FILE_ATTRIBUTE_NORMAL | FILE_FLAG_WRITE_THROUGH | FILE_FLAG_NO_BUFFERING,
+        NULL);
+    if(dev != INVALID_HANDLE_VALUE)
+        initConfig();
+#endif
+}
+
+#ifdef  _MSWINDOWS_
+int Serial::aRead(char * Data, const int Length)
+{
+
+    unsigned long   dwLength = 0, dwError, dwReadLength;
+    COMSTAT cs;
+    OVERLAPPED ol;
+
+    // Return zero if handle is invalid
+    if(dev == INVALID_HANDLE_VALUE)
+        return 0;
+
+    // Read max length or only what is available
+    ClearCommError(dev, &dwError, &cs);
+
+    // If not requiring an exact byte count, get whatever is available
+    if(Length > (int)cs.cbInQue)
+        dwReadLength = cs.cbInQue;
+    else
+        dwReadLength = Length;
+
+    memset(&ol, 0, sizeof(OVERLAPPED));
+    ol.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+
+    if(dwReadLength > 0) {
+        if(ReadFile(dev, Data, dwReadLength, &dwLength, &ol) == FALSE) {
+            if(GetLastError() == ERROR_IO_PENDING) {
+                WaitForSingleObject(ol.hEvent, INFINITE);
+                GetOverlappedResult(dev, &ol, &dwLength, TRUE);
+            }
+            else
+                ClearCommError(dev, &dwError, &cs);
+        }
+    }
+
+    if(ol.hEvent != INVALID_HANDLE_VALUE)
+        CloseHandle(ol.hEvent);
+
+    return dwLength;
+}
+
+int Serial::aWrite(const char * Data, const int Length)
+{
+    COMSTAT cs;
+    unsigned long dwError = 0;
+    OVERLAPPED ol;
+
+    // Clear the com port of any error condition prior to read
+    ClearCommError(dev, &dwError, &cs);
+
+    unsigned long retSize = 0;
+
+    memset(&ol, 0, sizeof(OVERLAPPED));
+    ol.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+
+    if(WriteFile(dev, Data, Length, &retSize, &ol) == FALSE) {
+        if(GetLastError() == ERROR_IO_PENDING) {
+            WaitForSingleObject(ol.hEvent, INFINITE);
+            GetOverlappedResult(dev, &ol, &retSize, TRUE);
+        }
+        else
+            ClearCommError(dev, &dwError, &cs);
+    }
+
+    if(ol.hEvent != INVALID_HANDLE_VALUE)
+        CloseHandle(ol.hEvent);
+
+    return retSize;
+}
+#else
+int Serial::aRead(char *Data, const int Length)
+{
+    return ::read(dev, Data, Length);
+}
+
+int Serial::aWrite(const char *Data, const int Length)
+{
+    return ::write(dev, Data, Length);
+}
+#endif
+
+void Serial::close()
+{
+#ifdef  _MSWINDOWS_
+    CloseHandle(dev);
+#else
+    ::close(dev);
+#endif
+
+    dev = INVALID_HANDLE_VALUE;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+const int iAsync::getTimeOuts(unsigned long & readTimeout, unsigned long & writeTimeout)
+{
+    return GetCommTimeouts(_TheHandle, &CommTimeOuts);
+    }
+
+const int iAsync::setTimeOuts(unsigned long readTimeout, unsigned long writeTimeout)
+{
+    COMMTIMEOUTS  CommTimeOuts ;
+
+    getTimeOuts(CommTimeOuts);
+
+    CommTimeOuts.ReadIntervalTimeout = readTimeout;
+    CommTimeOuts.ReadTotalTimeoutMultiplier = 0 ;
+    CommTimeOuts.ReadTotalTimeoutConstant = 0;
+    CommTimeOuts.WriteTotalTimeoutMultiplier = 0 ;
+    CommTimeOuts.WriteTotalTimeoutConstant = 1000;
+
+    return GetCommTimeouts(_TheHandle, &CommTimeOuts);
+    }
+    return SetCommTimeouts(_TheHandle, &CommTimeOuts) ;
+{
+    DCB        dcb ;
+
+    dcb.DCBlength = sizeof(DCB) ;
+
+    GetCommState(_TheHandle, &dcb) ;
+
+    // hardcode this stuff for now.....
+    dcb.BaudRate = _TheBaudrate;
+    dcb.ByteSize = 8;
+    dcb.Parity   = NOPARITY;
+    dcb.StopBits = ONESTOPBIT;
+    dcb.fOutxDsrFlow = 0;
+    dcb.fDtrControl = DTR_CONTROL_ENABLE ;
+    dcb.fOutxCtsFlow = 1;
+    dcb.fRtsControl = RTS_CONTROL_HANDSHAKE ;
+    dcb.fInX = dcb.fOutX = 0;
+
+    dcb.XonChar = ASCII_XON;
+    dcb.XoffChar = ASCII_XOFF;
+    dcb.XonLim = 100;
+    dcb.XoffLim = 100;
+
+    // other various settings
+
+    dcb.fBinary = TRUE;
+    dcb.fParity = TRUE;
+
+    GetCommState(_TheHandle, &dcb) ;
+    dcb.DCBlength = sizeof(DCB) ;
+    dcb.BaudRate = _TheBaudrate;
+    SetCommState(_TheHandle, &dcb) ;
+
+    }
+*/
+
+Serial::Error Serial::setSpeed(unsigned long speed)
+{
+    unsigned long rate;
+
+    switch(speed) {
+#ifdef B115200
+        case 115200:
+                rate = B115200;
+                break;
+#endif
+#ifdef B57600
+        case 57600:
+                rate = B57600;
+                break;
+#endif
+#ifdef B38400
+        case 38400:
+                rate = B38400;
+                break;
+#endif
+        case 19200:
+                rate = B19200;
+                break;
+        case 9600:
+                rate = B9600;
+                break;
+        case 4800:
+                rate = B4800;
+                break;
+        case 2400:
+                rate = B2400;
+                break;
+        case 1200:
+                rate = B1200;
+                break;
+        case 600:
+                rate = B600;
+                break;
+        case 300:
+                rate = B300;
+                break;
+        case 110:
+                rate = B110;
+                break;
+#ifdef  B0
+        case 0:
+                rate = B0;
+                break;
+#endif
+    default:
+        return error(errSpeedInvalid);
+    }
+
+#ifdef  _MSWINDOWS_
+
+    DCB     * dcb = (DCB *)current;
+    dcb->DCBlength = sizeof(DCB);
+    GetCommState(dev, dcb);
+
+    dcb->BaudRate = rate;
+    SetCommState(dev, dcb) ;
+
+#else
+    struct termios *attr = (struct termios *)current;
+    cfsetispeed(attr, rate);
+    cfsetospeed(attr, rate);
+    tcsetattr(dev, TCSANOW, attr);
+#endif
+    return errSuccess;
+    }
+
+Serial::Error Serial::setFlowControl(Flow flow)
+{
+#ifdef  _MSWINDOWS_
+
+    DCB * attr = (DCB *)current;
+    attr->XonChar = ASCII_XON;
+    attr->XoffChar = ASCII_XOFF;
+    attr->XonLim = 100;
+    attr->XoffLim = 100;
+
+    switch(flow) {
+    case flowSoft:
+        attr->fInX = attr->fOutX = 1;
+        break;
+    case flowBoth:
+        attr->fInX = attr->fOutX = 1;
+    case flowHard:
+        attr->fOutxCtsFlow = 1;
+        attr->fRtsControl = RTS_CONTROL_HANDSHAKE;
+        break;
+    case flowNone:
+        break;
+    default:
+        return error(errFlowInvalid);
+    }
+
+    SetCommState(dev, attr);
+#else
+
+    struct termios *attr = (struct termios *)current;
+
+    attr->c_cflag &= ~CRTSCTS;
+    attr->c_iflag &= ~(IXON | IXANY | IXOFF);
+
+    switch(flow) {
+    case flowSoft:
+        attr->c_iflag |= (IXON | IXANY | IXOFF);
+        break;
+    case flowBoth:
+        attr->c_iflag |= (IXON | IXANY | IXOFF);
+    case flowHard:
+        attr->c_cflag |= CRTSCTS;
+        break;
+    case flowNone:
+        break;
+    default:
+        return error(errFlowInvalid);
+    }
+
+    tcsetattr(dev, TCSANOW, attr);
+
+#endif
+    return errSuccess;
+    }
+
+Serial::Error Serial::setStopBits(int bits)
+{
+#ifdef  _MSWINDOWS_
+
+    DCB * attr = (DCB *)current;
+    switch(bits) {
+    case 1:
+        attr->StopBits = ONESTOPBIT;
+        break;
+    case 2:
+        attr->StopBits = TWOSTOPBITS;
+        break;
+    default:
+        return error(errStopbitsInvalid);
+    }
+
+    SetCommState(dev, attr);
+#else
+    struct termios *attr = (struct termios *)current;
+    attr->c_cflag &= ~CSTOPB;
+
+    switch(bits) {
+    case 1:
+        break;
+    case 2:
+        attr->c_cflag |= CSTOPB;
+        break;
+    default:
+        return error(errStopbitsInvalid);
+    }
+    tcsetattr(dev, TCSANOW, attr);
+#endif
+    return errSuccess;
+    }
+
+Serial::Error Serial::setCharBits(int bits)
+{
+#ifdef  _MSWINDOWS_
+
+    DCB * attr = (DCB *)current;
+    switch(bits) {
+    case 5:
+    case 6:
+    case 7:
+    case 8:
+        attr->ByteSize = bits;
+        break;
+    default:
+        return error(errCharsizeInvalid);
+    }
+    SetCommState(dev, attr);
+#else
+    struct termios *attr = (struct termios *)current;
+    attr->c_cflag &= ~CSIZE;
+
+    switch(bits) {
+    case 5:
+        attr->c_cflag |= CS5;
+        break;
+    case 6:
+        attr->c_cflag |= CS6;
+        break;
+    case 7:
+        attr->c_cflag |= CS7;
+        break;
+    case 8:
+        attr->c_cflag |= CS8;
+        break;
+    default:
+        return error(errCharsizeInvalid);
+    }
+    tcsetattr(dev, TCSANOW, attr);
+#endif
+    return errSuccess;
+    }
+
+Serial::Error Serial::setParity(Parity parity)
+{
+#ifdef  _MSWINDOWS_
+
+    DCB * attr = (DCB *)current;
+    switch(parity) {
+    case parityEven:
+        attr->Parity = EVENPARITY;
+        break;
+    case parityOdd:
+        attr->Parity = ODDPARITY;
+        break;
+    case parityNone:
+        attr->Parity = NOPARITY;
+        break;
+    default:
+        return error(errParityInvalid);
+    }
+    SetCommState(dev, attr);
+#else
+    struct termios *attr = (struct termios *)current;
+    attr->c_cflag &= ~(PARENB | PARODD);
+
+    switch(parity) {
+    case parityEven:
+        attr->c_cflag |= PARENB;
+        break;
+    case parityOdd:
+        attr->c_cflag |= (PARENB | PARODD);
+        break;
+    case parityNone:
+        break;
+    default:
+        return error(errParityInvalid);
+    }
+    tcsetattr(dev, TCSANOW, attr);
+#endif
+    return errSuccess;
+    }
+
+void Serial::sendBreak(void)
+{
+#ifdef  _MSWINDOWS_
+    SetCommBreak(dev);
+    Thread::sleep(100L);
+    ClearCommBreak(dev);
+#else
+    tcsendbreak(dev, 0);
+#endif
+    }
+
+void Serial::toggleDTR(timeout_t millisec)
+{
+#ifdef  _MSWINDOWS_
+    EscapeCommFunction(dev, CLRDTR);
+    if(millisec) {
+        Thread::sleep(millisec);
+        EscapeCommFunction(dev, SETDTR);
+    }
+
+#else
+    struct termios tty, old;
+    tcgetattr(dev, &tty);
+    tcgetattr(dev, &old);
+    cfsetospeed(&tty, B0);
+    cfsetispeed(&tty, B0);
+    tcsetattr(dev, TCSANOW, &tty);
+
+    if(millisec) {
+        Thread::sleep(millisec);
+        tcsetattr(dev, TCSANOW, &old);
+    }
+#endif
+    }
+
+bool Serial::isPending(Pending pending, timeout_t timeout)
+{
+#ifdef  _MSWINDOWS_
+    unsigned long   dwError;
+    COMSTAT cs;
+
+    ClearCommError(dev, &dwError, &cs);
+
+    if(timeout == 0 || ((pending == pendingInput) && (0 != cs.cbInQue)) ||
+       ((pending == pendingOutput) && (0 != cs.cbOutQue)) || (pending == pendingError))
+    {
+        switch(pending) {
+        case pendingInput:
+            return (0 != cs.cbInQue);
+        case pendingOutput:
+            return (0 != cs.cbOutQue);
+        case pendingError:
+            return false;
+        }
+        }
+    else {
+        OVERLAPPED ol;
+        DWORD dwMask;
+        DWORD dwEvents = 0;
+        BOOL suc;
+
+        memset(&ol, 0, sizeof(OVERLAPPED));
+        ol.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+
+        if(pending == pendingInput)
+            dwMask = EV_RXCHAR;
+        else if(pending == pendingOutput)
+            dwMask = EV_TXEMPTY;
+        else   // on error
+            dwMask = EV_ERR;
+
+        SetCommMask(dev, dwMask);
+        // let's wait for event or timeout
+        if((suc = WaitCommEvent(dev, &dwEvents, &ol)) == FALSE) {
+            if(GetLastError() == ERROR_IO_PENDING) {
+                DWORD transferred;
+
+                dwError = WaitForSingleObject(ol.hEvent, timeout);
+                if (dwError != WAIT_OBJECT_0)
+                    SetCommMask(dev, 0);
+
+                suc = GetOverlappedResult(dev, &ol, &transferred, TRUE);
+                if (suc)
+                    suc = (dwEvents & dwMask) ? TRUE : FALSE;
+                }
+            else
+                ClearCommError(dev, &dwError, &cs);
+            }
+
+        if(ol.hEvent != INVALID_HANDLE_VALUE)
+            CloseHandle(ol.hEvent);
+
+        if(suc == FALSE)
+                return false;
+        return true;
+        }
+#else
+
+
+    int status = 0;
+#ifdef HAVE_POLL
+    struct pollfd pfd;
+
+    pfd.fd = dev;
+    pfd.revents = 0;
+    switch(pending) {
+    case pendingInput:
+        pfd.events = POLLIN;
+        break;
+    case pendingOutput:
+        pfd.events = POLLOUT;
+        break;
+    case pendingError:
+        pfd.events = POLLERR | POLLHUP;
+        break;
+    }
+
+    status = 0;
+    while(status < 1) {
+        if(timeout == TIMEOUT_INF)
+            status = poll(&pfd, 1, -1);
+        else
+            status = poll(&pfd, 1, timeout);
+
+        if(status < 1) {
+            if(status == -1 && errno == EINTR)
+                continue;
+            return false;
+        }
+    }
+
+    if(pfd.revents & pfd.events)
+        return true;
+
+#else
+    struct timeval tv;
+    fd_set grp;
+    struct timeval *tvp = &tv;
+
+    if(timeout == TIMEOUT_INF)
+        tvp = NULL;
+    else {
+        tv.tv_usec = (timeout % 1000) * 1000;
+        tv.tv_sec = timeout / 1000;
+    }
+
+    FD_ZERO(&grp);
+    FD_SET(dev, &grp);
+    switch(pending) {
+    case pendingInput:
+        status = select(dev + 1, &grp, NULL, NULL, tvp);
+        break;
+    case pendingOutput:
+        status = select(dev + 1, NULL, &grp, NULL, tvp);
+        break;
+    case pendingError:
+        status = select(dev + 1, NULL, NULL, &grp, tvp);
+        break;
+    }
+    if(status < 1)
+        return false;
+
+    if(FD_ISSET(dev, &grp))
+        return true;
+
+#endif
+
+#endif  //  WIN32
+
+    return false;
+    }
+
+
+
+
+
+TTYStream::TTYStream(const char *filename, timeout_t to)
+    :   streambuf(),
+        Serial(filename),
+#ifdef  HAVE_OLD_IOSTREAM
+        iostream()
+#else
+        iostream((streambuf *)this)
+#endif
+{
+#ifdef  HAVE_OLD_IOSTREAM
+    init((streambuf *)this);
+#endif
+    gbuf = pbuf = NULL;
+    timeout = to;
+
+    if(INVALID_HANDLE_VALUE != dev)
+        allocate();
+        }
+
+TTYStream::TTYStream()
+    :   streambuf(),
+        Serial(),
+#ifdef  HAVE_OLD_IOSTREAM
+        iostream()
+#else
+        iostream((streambuf *)this)
+#endif
+{
+#ifdef  HAVE_OLD_IOSTREAM
+    init((streambuf *)this);
+#endif
+    timeout = 0;
+    gbuf = pbuf = NULL;
+            }
+
+TTYStream::~TTYStream()
+{
+    endStream();
+    endSerial();
+            }
+
+void TTYStream::endStream(void)
+{
+    if(bufsize)
+        sync();
+
+    if(gbuf) {
+        delete[] gbuf;
+        gbuf = NULL;
+    }
+    if(pbuf) {
+        delete[] pbuf;
+        pbuf = NULL;
+    }
+    bufsize = 0;
+    clear();
+            }
+
+void TTYStream::allocate(void)
+{
+    if(INVALID_HANDLE_VALUE == dev)
+        return;
+
+#ifdef _PC_MAX_INPUT
+    bufsize = fpathconf(dev, _PC_MAX_INPUT);
+#else
+    bufsize = MAX_INPUT;
+#endif
+
+    gbuf = new char[bufsize];
+    pbuf = new char[bufsize];
+
+    if(!pbuf || !gbuf) {
+        error(errResourceFailure);
+        return;
+    }
+
+    clear();
+
+#if !(defined(STLPORT) || defined(__KCC))
+    setg(gbuf, gbuf + bufsize, 0);
+#endif
+
+    setg(gbuf, gbuf + bufsize, gbuf + bufsize);
+    setp(pbuf, pbuf + bufsize);
+            }
+
+int TTYStream::doallocate()
+{
+    if(bufsize)
+        return 0;
+
+    allocate();
+    return 1;
+            }
+
+void TTYStream::interactive(bool iflag)
+{
+#ifdef  _MSWINDOWS_
+    if(dev == INVALID_HANDLE_VALUE)
+#else
+    if(dev < 0)
+#endif
+        return;
+
+    if(bufsize >= 1)
+        endStream();
+
+    if(iflag) {
+        // setting to unbuffered mode
+
+        bufsize = 1;
+        gbuf = new char[bufsize];
+
+#if !(defined(STLPORT) || defined(__KCC))
+#if defined(__GNUC__) && (__GNUC__ < 3)
+        setb(0,0);
+#endif
+#endif
+        setg(gbuf, gbuf+bufsize, gbuf+bufsize);
+        setp(pbuf, pbuf);
+        return;
+    }
+
+    if(bufsize < 2)
+        allocate();
+            }
+
+int TTYStream::uflow(void)
+{
+    int rlen;
+    unsigned char ch;
+
+    if(bufsize < 2) {
+        if(timeout) {
+            if(Serial::isPending(pendingInput, timeout))
+                rlen = aRead((char *)&ch, 1);
+            else
+                rlen = -1;
+        }
+        else
+            rlen = aRead((char *)&ch, 1);
+        if(rlen < 1) {
+            if(rlen < 0)
+                clear(ios::failbit | rdstate());
+            return EOF;
+        }
+        return ch;
+    }
+    else {
+        ch = underflow();
+        gbump(1);
+        return ch;
+    }
+            }
+
+int TTYStream::underflow(void)
+{
+    ssize_t rlen = 1;
+
+    if(!gptr())
+        return EOF;
+
+    if(gptr() < egptr())
+        return (unsigned char)*gptr();
+
+    rlen = (ssize_t)((gbuf + bufsize) - eback());
+    if(timeout && !Serial::isPending(pendingInput, timeout))
+        rlen = -1;
+    else
+        rlen = aRead((char *)eback(), rlen);
+
+    if(rlen < 1) {
+        if(rlen < 0) {
+            clear(ios::failbit | rdstate());
+            error(errInput);
+        }
+        return EOF;
+    }
+
+    setg(eback(), eback(), eback() + rlen);
+    return (unsigned char) *gptr();
+            }
+
+int TTYStream::sync(void)
+{
+    if(bufsize > 1 && pbase() && ((pptr() - pbase()) > 0)) {
+        overflow(0);
+        waitOutput();
+        setp(pbuf, pbuf + bufsize);
+    }
+    setg(gbuf, gbuf + bufsize, gbuf + bufsize);
+    return 0;
+            }
+
+int TTYStream::overflow(int c)
+{
+    unsigned char ch;
+    ssize_t rlen, req;
+
+    if(bufsize < 2) {
+        if(c == EOF)
+            return 0;
+
+        ch = (unsigned char)(c);
+        rlen = aWrite((char *)&ch, 1);
+        if(rlen < 1) {
+            if(rlen < 0)
+                clear(ios::failbit | rdstate());
+            return EOF;
+        }
+        else
+            return c;
+    }
+
+    if(!pbase())
+        return EOF;
+
+    req = (ssize_t)(pptr() - pbase());
+    if(req) {
+        rlen = aWrite((char *)pbase(), req);
+        if(rlen < 1) {
+            if(rlen < 0)
+                clear(ios::failbit | rdstate());
+            return EOF;
+        }
+        req -= rlen;
+    }
+
+    if(req)
+//      memmove(pptr(), pptr() + rlen, req);
+        memmove(pbuf, pbuf + rlen, req);
+    setp(pbuf + req, pbuf + bufsize);
+
+    if(c != EOF) {
+        *pptr() = (unsigned char)c;
+        pbump(1);
+    }
+    return c;
+            }
+
+bool TTYStream::isPending(Pending pending, timeout_t timer)
+{
+//  if(pending == pendingInput && in_avail())
+//      return true;
+//  else if(pending == pendingOutput)
+//      flush();
+
+    return Serial::isPending(pending, timer);
+            }
+
+
+
+
+
+
+ttystream::ttystream() :
+TTYStream()
+{
+    setError(false);
+            }
+
+ttystream::ttystream(const char *name) :
+TTYStream()
+{
+    setError(false);
+    open(name);
+            }
+
+void ttystream::close(void)
+{
+#ifdef  _MSWINDOWS_
+    if (INVALID_HANDLE_VALUE == dev)
+#else
+    if(dev < 0)
+#endif
+        return;
+
+    endStream();
+    restore();
+    TTYStream::close();
+            }
+
+void ttystream::open(const char *name)
+{
+    const char *cpp;
+    char *cp;
+    char pathname[256];
+    size_t namelen;
+    long opt;
+
+    if (INVALID_HANDLE_VALUE != dev) {
+        restore();
+        close();
+    }
+
+    cpp = strrchr(name, ':');
+    if(cpp)
+        namelen = cpp - name;
+    else
+        namelen = strlen(name);
+
+    cp = pathname;
+
+#ifndef _MSWINDOWS_
+    if(*name != '/') {
+        strcpy(pathname, "/dev/");
+        cp += 5;
+    }
+
+    if((cp - pathname) + namelen > 255) {
+        error(errResourceFailure);
+        return;
+    }
+#endif
+    setString(cp, pathname - cp + sizeof(pathname), name);
+    cp += namelen;
+#ifdef  _MSWINDOWS_
+    *cp++ = ':';
+#endif
+    *cp = 0;
+
+    Serial::open(pathname);
+
+    if(INVALID_HANDLE_VALUE == dev) {
+        error(errOpenFailed);
+        return;
+    }
+
+    allocate();
+
+    setString(pathname, sizeof(pathname), name + namelen);
+    cp = pathname + 1;
+
+    if(*pathname == ':')
+        cp = strtok(cp, ",");
+    else
+        cp = NULL;
+
+    while(cp) {
+        switch(*cp) {
+        case 'h':
+        case 'H':
+            setFlowControl(flowHard);
+            break;
+        case 's':
+        case 'S':
+            setFlowControl(flowSoft);
+            break;
+        case 'b':
+        case 'B':
+            setFlowControl(flowBoth);
+            break;
+        case 'n':
+        case 'N':
+            setParity(parityNone);
+            break;
+        case 'O':
+        case 'o':
+            setParity(parityOdd);
+            break;
+        case 'e':
+        case 'E':
+            setParity(parityEven);
+            break;
+        case '0':
+        case '1':
+        case '2':
+        case '3':
+        case '4':
+        case '5':
+        case '6':
+        case '7':
+        case '8':
+        case '9':
+            opt = atol(cp);
+            if(opt == 1 || opt == 2) {
+                setStopBits((int)opt);
+                break;
+            }
+            if(opt > 4 && opt < 9) {
+                setCharBits((int)opt);
+                break;
+            }
+            setSpeed(opt);
+            break;
+        default:
+            error(errOptionInvalid);
+        }
+        cp = strtok(NULL, ",");
+    }
+            }
+
+TTYSession::TTYSession(const char *filename, int pri, int stack) :
+Thread(pri, stack), TTYStream(filename)
+{
+    setError(false);
+            }
+
+
+TTYSession::~TTYSession()
+{
+    terminate();
+    endSerial();
+            }
+
+#ifndef _MSWINDOWS_
+//  Not supporting this right now........
+//
+
+SerialPort::SerialPort(SerialService *svc, const char *name) :
+Serial(name),
+detect_pending(true),
+detect_output(false),
+detect_disconnect(true)
+{
+    next = prev = NULL;
+    service = NULL;
+
+#ifdef  _MSWINDOWS_
+    if(INVALID_HANDLE_VALUE != dev)
+#else
+    if(dev > -1)
+#endif
+    {
+        setError(false);
+        service = svc;
+        svc->attach(this);
+    }
+                }
+
+SerialPort::~SerialPort()
+{
+    if(service)
+        service->detach(this);
+
+    endSerial();
+                }
+
+void SerialPort::expired(void)
+{
+                }
+
+void SerialPort::pending(void)
+{
+                }
+
+void SerialPort::disconnect(void)
+{
+                }
+
+void SerialPort::output(void)
+{
+                }
+
+void SerialPort::setTimer(timeout_t ptimer)
+{
+    TimerPort::setTimer(ptimer);
+    service->update();
+                }
+
+void SerialPort::incTimer(timeout_t ptimer)
+{
+    TimerPort::incTimer(ptimer);
+    service->update();
+                }
+
+
+void SerialPort::setDetectPending( bool val )
+{
+    if ( detect_pending != val ) {
+        detect_pending = val;
+#ifdef USE_POLL
+        if ( ufd ) {
+            if ( val ) {
+                ufd->events |= POLLIN;
+            } else {
+                ufd->events &= ~POLLIN;
+            }
+        }
+#endif
+        service->update();
+    }
+                }
+
+void SerialPort::setDetectOutput( bool val )
+{
+    if ( detect_output != val ) {
+        detect_output = val;
+#ifdef  USE_POLL
+        if ( ufd ) {
+            if ( val ) {
+                ufd->events |= POLLOUT;
+            } else {
+                ufd->events &= ~POLLOUT;
+            }
+        }
+#endif
+        service->update();
+    }
+                }
+
+
+SerialService::SerialService(int pri, size_t stack, const char *id) :
+Thread(pri, stack), Mutex()
+{
+    long opt;
+
+    first = last = NULL;
+    count = 0;
+    FD_ZERO(&connect);
+    if(::pipe(iosync)) {
+#ifdef  CCXX_EXCEPTIONS
+                switch(Thread::getException()) {
+                case throwObject:
+                        throw(this);
+                        return;
+#ifdef  COMMON_STD_EXCEPTION
+                case throwException:
+                        throw(ThrException("no service pipe"));
+                        return;
+#endif
+                default:
+                        return;
+                        }
+#else
+                return;
+#endif
+    }
+    hiwater = iosync[0] + 1;
+    FD_SET(iosync[0], &connect);
+
+    opt = fcntl(iosync[0], F_GETFL);
+    fcntl(iosync[0], F_SETFL, opt | O_NDELAY);
+                }
+
+SerialService::~SerialService()
+{
+    update(0);
+    terminate();
+
+    while(first)
+        delete first;
+                }
+
+void SerialService::onUpdate(unsigned char flag)
+{
+                }
+
+void SerialService::onEvent(void)
+{
+                }
+
+void SerialService::onCallback(SerialPort *port)
+{
+                }
+
+void SerialService::attach(SerialPort *port)
+{
+    enterMutex();
+#ifdef  USE_POLL
+    port->ufd = 0;
+#endif
+    if(last)
+        last->next = port;
+
+    port->prev = last;
+    last = port;
+    FD_SET(port->dev, &connect);
+    if(port->dev >= hiwater)
+        hiwater = port->dev + 1;
+
+    if(!first) {
+        first = port;
+        leaveMutex();
+        ++count;
+        start();
+    }
+    else {
+        leaveMutex();
+        update();
+        ++count;
+    }
+                }
+
+void SerialService::detach(SerialPort *port)
+{
+    enterMutex();
+
+#ifndef USE_POLL
+    FD_CLR(port->dev, &connect);
+#endif
+
+    if(port->prev)
+        port->prev->next = port->next;
+    else
+        first = port->next;
+
+    if(port->next)
+        port->next->prev = port->prev;
+    else
+        last = port->prev;
+
+    --count;
+    leaveMutex();
+    update();
+                }
+
+void SerialService::update(unsigned char flag)
+{
+    if(::write(iosync[1], (char *)&flag, 1) < 1) {
+
+#ifdef  CCXX_EXCEPTIONS
+                switch(Thread::getException()) {
+                case throwObject:
+                        throw(this);
+                        return;
+#ifdef  COMMON_STD_EXCEPTION
+                case throwException:
+                        throw(ThrException("update failed"));
+                        return;
+#endif
+                default:
+                        return;
+                        }
+#else
+                return;
+#endif
+    }
+                }
+
+
+void SerialService::run(void)
+{
+    timeout_t timer, expires;
+    SerialPort *port;
+    unsigned char buf;
+
+#ifdef  USE_POLL
+
+    Poller  mfd;
+    pollfd *p_ufd;
+    int lastcount = 0;
+
+    // initialize ufd in all attached ports :
+    // probably don't need this but it can't hurt.
+    enterMutex();
+    port = first;
+    while(port) {
+        port->ufd = 0;
+        port = port->next;
+    }
+    leaveMutex();
+
+#else
+    struct timeval timeout, *tvp;
+    fd_set inp, out, err;
+    int dev;
+    FD_ZERO(&inp);
+    FD_ZERO(&out);
+    FD_ZERO(&err);
+#endif
+
+    for(;;) {
+        timer = TIMEOUT_INF;
+        while(1 == ::read(iosync[0], (char *)&buf, 1)) {
+            if(buf) {
+                onUpdate(buf);
+                continue;
+            }
+
+            Thread::exit();
+        }
+
+#ifdef  USE_POLL
+
+        bool    reallocate = false;
+
+        enterMutex();
+        onEvent();
+        port = first;
+        while(port) {
+            onCallback(port);
+            if ( ( p_ufd = port->ufd ) ) {
+
+                if ( ( POLLHUP | POLLNVAL ) & p_ufd->revents ) {
+                    // Avoid infinite loop from disconnected sockets
+                    port->detect_disconnect = false;
+                    p_ufd->events &= ~POLLHUP;
+                    port->disconnect();
+                }
+
+                if ( ( POLLIN | POLLPRI ) & p_ufd->revents )
+                    port->pending();
+
+                if ( POLLOUT & p_ufd->revents )
+                    port->output();
+
+            } else {
+                reallocate = true;
+            }
+
+retry:
+            expires = port->getTimer();
+            if(expires > 0)
+                if(expires < timer)
+                    timer = expires;
+
+            if(!expires) {
+                port->endTimer();
+                port->expired();
+                goto retry;
+            }
+
+            port = port->next;
+        }
+
+        //
+        // reallocate things if we saw a ServerPort without
+        // ufd set !
+        if ( reallocate || ( ( count + 1 ) != lastcount ) ) {
+            lastcount = count + 1;
+            p_ufd = mfd.getList( count + 1 );
+
+            // Set up iosync polling
+            p_ufd->fd = iosync[0];
+            p_ufd->events = POLLIN | POLLHUP;
+            p_ufd ++;
+
+            port = first;
+            while(port) {
+                p_ufd->fd = port->dev;
+                p_ufd->events =
+                    ( port->detect_disconnect ? POLLHUP : 0 )
+                    | ( port->detect_output ? POLLOUT : 0 )
+                    | ( port->detect_pending ? POLLIN : 0 )
+                ;
+                port->ufd = p_ufd;
+                p_ufd ++;
+                port = port->next;
+            }
+        }
+        leaveMutex();
+
+        poll( mfd.getList(), count + 1, timer );
+
+#else
+        enterMutex();
+        onEvent();
+        port = first;
+
+        while(port) {
+            onCallback(port);
+            dev = port->dev;
+            if(FD_ISSET(dev, &err)) {
+                port->detect_disconnect = false;
+                port->disconnect();
+            }
+
+            if(FD_ISSET(dev, &inp))
+                port->pending();
+
+            if(FD_ISSET(dev, &out))
+                port->output();
+
+retry:
+            expires = port->getTimer();
+            if(expires > 0)
+                if(expires < timer)
+                    timer = expires;
+
+            if(!expires) {
+                port->endTimer();
+                port->expired();
+                goto retry;
+            }
+
+            port = port->next;
+        }
+
+        FD_ZERO(&inp);
+        FD_ZERO(&out);
+        FD_ZERO(&err);
+        int so;
+        port = first;
+        while(port) {
+            so = port->dev;
+
+            if(port->detect_pending)
+                FD_SET(so, &inp);
+
+            if(port->detect_output)
+                FD_SET(so, &out);
+
+            if(port->detect_disconnect)
+                FD_SET(so, &err);
+
+            port = port->next;
+        }
+
+        leaveMutex();
+        if(timer == TIMEOUT_INF)
+            tvp = NULL;
+        else {
+            tvp = &timeout;
+            timeout.tv_sec = timer / 1000;
+            timeout.tv_usec = (timer % 1000) * 1000;
+        }
+        select(hiwater, &inp, &out, &err, tvp);
+#endif
+    }
+                }
+
+#endif
+
+END_NAMESPACE
+
+/** EMACS **
+ * Local variables:
+ * mode: c++
+ * c-basic-offset: 8
+ * End:
+ */
diff --git a/jni/libucommon/sources/commoncpp/slog.cpp b/jni/libucommon/sources/commoncpp/slog.cpp
new file mode 100644
index 0000000..d12fe22
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/slog.cpp
@@ -0,0 +1,516 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#include <ucommon-config.h>
+#include <commoncpp/config.h>
+#include <commoncpp/export.h>
+#include <commoncpp/slog.h>
+#ifdef  __BORLANDC__
+#include <stdio.h>
+#include <stdarg.h>
+#else
+#include <cstdio>
+#include <cstdarg>
+#endif
+
+#ifdef  HAVE_SYSLOG_H
+#include <syslog.h>
+#endif
+
+using std::streambuf;
+using std::ofstream;
+using std::ostream;
+using std::clog;
+using std::endl;
+using std::ios;
+
+using namespace COMMONCPP_NAMESPACE;
+
+Slog ost::slog;
+
+Slog::Slog(void) :
+streambuf()
+#ifdef  OLD_IOSTREAM
+,ostream()
+#else
+,ostream((streambuf *)this)
+#endif
+{
+#ifdef  OLD_IOSTREAM
+    init((streambuf *)this);
+#endif
+    _enable = true;
+    _level = levelDebug;
+        _clogEnable = true;
+#ifndef HAVE_SYSLOG_H
+    syslog = NULL;
+#endif
+}
+
+Slog::~Slog(void)
+{
+#ifdef  HAVE_SYSLOG_H
+    closelog();
+#else
+    if(syslog)
+        fclose(syslog);
+#endif
+}
+
+void Slog::close(void)
+{
+#ifdef  HAVE_SYSLOG_H
+    closelog();
+#else
+    pthread_mutex_lock(&lock);
+    if(syslog)
+        fclose(syslog);
+    syslog = NULL;
+    pthread_mutex_unlock(&lock);
+#endif
+}
+
+void Slog::open(const char *ident, Class grp)
+{
+    const char *cp;
+
+#ifdef  HAVE_SYSLOG_H
+    cp = strrchr(ident, '/');
+    if(cp)
+        ident = ++cp;
+
+    int fac;
+
+    switch(grp) {
+    case classUser:
+        fac = LOG_USER;
+        break;
+
+    case classDaemon:
+        fac = LOG_DAEMON;
+        break;
+
+    case classAudit:
+#ifdef  LOG_AUTHPRIV
+        fac = LOG_AUTHPRIV;
+        break;
+#endif
+    case classSecurity:
+        fac = LOG_AUTH;
+        break;
+
+    case classLocal0:
+        fac = LOG_LOCAL0;
+        break;
+
+    case classLocal1:
+        fac = LOG_LOCAL1;
+        break;
+
+    case classLocal2:
+        fac = LOG_LOCAL2;
+        break;
+
+    case classLocal3:
+        fac = LOG_LOCAL3;
+        break;
+
+    case classLocal4:
+        fac = LOG_LOCAL4;
+        break;
+
+    case classLocal5:
+        fac = LOG_LOCAL5;
+        break;
+
+    case classLocal6:
+        fac = LOG_LOCAL6;
+        break;
+
+    case classLocal7:
+        fac = LOG_LOCAL7;
+        break;
+
+    default:
+        fac = LOG_USER;
+        break;
+    }
+    openlog(ident, 0, fac);
+#else
+    char *buf;
+
+    pthread_mutex_lock(&lock);
+    if(syslog)
+            fclose(syslog);
+    buf = new char[strlen(ident) + 1];
+    strcpy(buf, ident);
+    cp = (const char *)buf;
+    buf = strrchr(buf, '.');
+    if(buf) {
+        if(!stricmp(buf, ".exe"))
+            strcpy(buf, ".log");
+    }
+    syslog = fopen(cp, "a");
+    delete[] (char *)cp;
+    pthread_mutex_unlock(&lock);
+#endif
+}
+
+void Slog::error(const char *format, ...)
+{
+    Thread *thread = Thread::get();
+    va_list args;
+    va_start(args, format);
+    overflow(EOF);
+
+    if(!thread)
+        return;
+
+    error();
+
+    vsnprintf(thread->msgbuf, sizeof(thread->msgbuf), format, args);
+    thread->msgpos = strlen(thread->msgbuf);
+    overflow(EOF);
+    va_end(args);
+}
+
+void Slog::warn(const char *format, ...)
+{
+    Thread *thread = Thread::get();
+    va_list args;
+
+    if(!thread)
+        return;
+
+    va_start(args, format);
+    overflow(EOF);
+    warn();
+    vsnprintf(thread->msgbuf, sizeof(thread->msgbuf), format, args);
+    thread->msgpos = strlen(thread->msgbuf);
+    overflow(EOF);
+    va_end(args);
+}
+
+void Slog::debug(const char *format, ...)
+{
+    Thread *thread = Thread::get();
+    va_list args;
+
+    if(!thread)
+        return;
+
+    va_start(args, format);
+    overflow(EOF);
+    debug();
+    vsnprintf(thread->msgbuf, sizeof(thread->msgbuf), format, args);
+    thread->msgpos = strlen(thread->msgbuf);
+    overflow(EOF);
+    va_end(args);
+}
+
+void Slog::emerg(const char *format, ...)
+{
+    Thread *thread = Thread::get();
+    va_list args;
+
+    if(!thread)
+        return;
+
+    va_start(args, format);
+    overflow(EOF);
+    emerg();
+    vsnprintf(thread->msgbuf, sizeof(thread->msgbuf), format, args);
+    thread->msgpos = strlen(thread->msgbuf);
+    overflow(EOF);
+    va_end(args);
+}
+
+void Slog::alert(const char *format, ...)
+{
+    Thread *thread = Thread::get();
+    va_list args;
+
+    if(!thread)
+        return;
+
+    va_start(args, format);
+    overflow(EOF);
+    alert();
+    vsnprintf(thread->msgbuf, sizeof(thread->msgbuf), format, args);
+    thread->msgpos = strlen(thread->msgbuf);
+    overflow(EOF);
+    va_end(args);
+}
+
+void Slog::critical(const char *format, ...)
+{
+    Thread *thread = Thread::get();
+    va_list args;
+
+    if(!thread)
+        return;
+
+    va_start(args, format);
+    overflow(EOF);
+    critical();
+    vsnprintf(thread->msgbuf, sizeof(thread->msgbuf), format, args);
+    thread->msgpos = strlen(thread->msgbuf);
+    overflow(EOF);
+    va_end(args);
+}
+
+void Slog::notice(const char *format, ...)
+{
+    Thread *thread = Thread::get();
+    va_list args;
+
+    if(!thread)
+        return;
+
+    va_start(args, format);
+    overflow(EOF);
+    notice();
+    vsnprintf(thread->msgbuf, sizeof(thread->msgbuf), format, args);
+    thread->msgpos = strlen(thread->msgbuf);
+    overflow(EOF);
+    va_end(args);
+}
+
+void Slog::info(const char *format, ...)
+{
+    Thread *thread = Thread::get();
+    va_list args;
+
+    if(!thread)
+        return;
+
+    va_start(args, format);
+    overflow(EOF);
+    info();
+    vsnprintf(thread->msgbuf, sizeof(thread->msgbuf), format, args);
+    thread->msgpos = strlen(thread->msgbuf);
+    overflow(EOF);
+    va_end(args);
+}
+
+int Slog::overflow(int c)
+{
+    Thread *thread = Thread::get();
+    if(!thread)
+        return c;
+
+    if(c == '\n' || !c || c == EOF) {
+        if(!thread->msgpos)
+            return c;
+
+        thread->msgbuf[thread->msgpos] = 0;
+        if (_enable)
+#ifdef  HAVE_SYSLOG_H
+            ::syslog(priority, "%s", thread->msgbuf);
+#else
+        {
+            time_t now;
+            struct tm *dt;
+            time(&now);
+            dt = localtime(&now);
+            char buf[256];
+            const char *p = "unknown";
+            switch(priority) {
+            case levelEmergency:
+                p = "emerg";
+                break;
+            case levelInfo:
+                p = "info";
+                break;
+            case levelError:
+                p = "error";
+                break;
+            case levelAlert:
+                p = "alert";
+                break;
+            case levelDebug:
+                p = "debug";
+                break;
+            case levelNotice:
+                p = "notice";
+                break;
+            case levelWarning:
+                p = "warn";
+                break;
+            case levelCritical:
+                p = "crit";
+                break;
+            }
+
+            pthread_mutex_lock(&lock);
+            snprintf(buf, sizeof(buf), "%04d-%02d-%02d %02d:%02d:%02d [%s] %s\n",
+                dt->tm_year + 1900, dt->tm_mon + 1, dt->tm_mday,
+                dt->tm_hour, dt->tm_min, dt->tm_sec,
+                p, thread->msgbuf);
+            if(syslog)
+                fputs(buf, syslog);
+//              syslog << "[" << priority << "] " << thread->msgbuf << endl;
+            pthread_mutex_unlock(&lock);
+        }
+#endif
+        thread->msgpos = 0;
+
+        if ( _enable && _clogEnable
+#ifndef _MSWINDOWS_
+            && (getppid() > 1)
+#endif
+            )
+            clog << thread->msgbuf << endl;
+        _enable = true;
+        return c;
+    }
+
+    if (thread->msgpos < (int)(sizeof(thread->msgbuf) - 1))
+        thread->msgbuf[thread->msgpos++] = c;
+
+    return c;
+}
+
+Slog &Slog::operator()(const char *ident, Class grp, Level lev)
+{
+    Thread *thread = Thread::get();
+
+    if(!thread)
+        return *this;
+
+    thread->msgpos = 0;
+    _enable = true;
+    open(ident, grp);
+    return this->operator()(lev, grp);
+}
+
+Slog &Slog::operator()(Level lev, Class grp)
+{
+    Thread *thread = Thread::get();
+
+    if(!thread)
+        return *this;
+
+    thread->msgpos = 0;
+    if(_level >= lev)
+        _enable = true;
+    else
+        _enable = false;
+
+#ifdef  HAVE_SYSLOG_H
+    switch(lev) {
+    case levelEmergency:
+        priority = LOG_EMERG;
+        break;
+    case levelAlert:
+        priority = LOG_ALERT;
+        break;
+    case levelCritical:
+        priority = LOG_CRIT;
+        break;
+    case levelError:
+        priority = LOG_ERR;
+        break;
+    case levelWarning:
+        priority = LOG_WARNING;
+        break;
+    case levelNotice:
+        priority = LOG_NOTICE;
+        break;
+    case levelInfo:
+        priority = LOG_INFO;
+        break;
+    case levelDebug:
+        priority = LOG_DEBUG;
+        break;
+    }
+    switch(grp) {
+    case classAudit:
+#ifdef  LOG_AUTHPRIV
+        priority |= LOG_AUTHPRIV;
+        break;
+#endif
+    case classSecurity:
+        priority |= LOG_AUTH;
+        break;
+    case classUser:
+        priority |= LOG_USER;
+        break;
+    case classDaemon:
+        priority |= LOG_DAEMON;
+        break;
+    case classDefault:
+        priority |= LOG_USER;
+        break;
+    case classLocal0:
+        priority |= LOG_LOCAL0;
+        break;
+    case classLocal1:
+        priority |= LOG_LOCAL1;
+        break;
+    case classLocal2:
+        priority |= LOG_LOCAL2;
+        break;
+    case classLocal3:
+        priority |= LOG_LOCAL3;
+        break;
+    case classLocal4:
+        priority |= LOG_LOCAL4;
+        break;
+    case classLocal5:
+        priority |= LOG_LOCAL5;
+        break;
+    case classLocal6:
+        priority |= LOG_LOCAL6;
+        break;
+    case classLocal7:
+        priority |= LOG_LOCAL7;
+        break;
+    }
+#else
+    priority = lev;
+#endif
+    return *this;
+}
+
+Slog &Slog::operator()(void)
+{
+    return *this;
+}
+
+
diff --git a/jni/libucommon/sources/commoncpp/socket.cpp b/jni/libucommon/sources/commoncpp/socket.cpp
new file mode 100644
index 0000000..46157f2
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/socket.cpp
@@ -0,0 +1,1154 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#include <ucommon-config.h>
+#include <commoncpp/config.h>
+#include <commoncpp/export.h>
+#include <commoncpp/address.h>
+#include <commoncpp/socket.h>
+
+#include <fcntl.h>
+
+#ifdef _MSWINDOWS_
+#include <io.h>
+#define _IOLEN64    (unsigned)
+#define _IORET64    (int)
+typedef int socklen_t;
+
+#define socket_errno    WSAGetLastError()
+#else
+#include <sys/ioctl.h>
+#include <netinet/tcp.h>
+#ifdef HAVE_NET_IP6_H
+#include <netinet/ip6.h>
+#endif
+#define socket_errno errno
+# ifndef  O_NONBLOCK
+#  define O_NONBLOCK    O_NDELAY
+# endif
+# ifdef IPPROTO_IP
+#  ifndef  SOL_IP
+#   define SOL_IP   IPPROTO_IP
+#  endif // !SOL_IP
+# endif  // IPPROTO_IP
+#endif   // !WIN32
+
+#ifndef INADDR_LOOPBACK
+#define INADDR_LOOPBACK (unsigned long)0x7f000001
+#endif
+
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#if defined(__hpux)
+#define _XOPEN_SOURCE_EXTENDED
+#endif
+
+#ifdef  HAVE_NET_IF_H
+#include <net/if.h>
+#endif
+
+#ifndef _IOLEN64
+#define _IOLEN64
+#endif
+
+#ifndef _IORET64
+#define _IORET64
+#endif
+
+using namespace COMMONCPP_NAMESPACE;
+
+#if defined(_MSWINDOWS_) && !defined(__MINGW32__)
+socket_t Socket::dupSocket(socket_t so, enum Socket::State state)
+{
+    if (state == Socket::STREAM)
+        return dup((int)so);
+
+    HANDLE pidHandle = GetCurrentProcess();
+    HANDLE dupHandle;
+    if(DuplicateHandle(pidHandle, reinterpret_cast<HANDLE>(so), pidHandle, &dupHandle, 0, FALSE, DUPLICATE_SAME_ACCESS))
+        return reinterpret_cast<socket_t>(dupHandle);
+    return (socket_t)(-1);
+}
+# define DUP_SOCK(s,state) dupSocket(s,state)
+#else
+socket_t Socket::dupSocket(socket_t so, State state)
+{
+    return dup(so);
+}
+#endif
+
+Mutex Socket::mutex;
+
+void Socket::setSocket(void)
+{
+    flags.thrown    = false;
+    flags.broadcast = false;
+    flags.route     = true;
+    flags.keepalive = false;
+    flags.loopback  = true;
+    flags.multicast = false;
+    flags.linger    = false;
+    flags.ttl   = 1;
+    errid           = errSuccess;
+    errstr          = NULL;
+    syserr          = 0;
+    state           = INITIAL;
+    so              = INVALID_SOCKET;
+}
+
+void Socket::endSocket(void)
+{
+    if(Socket::state == STREAM) {
+        state = INITIAL;
+        if(so != INVALID_SOCKET) {
+            SOCKET sosave = so;
+            so = INVALID_SOCKET;
+            release(sosave);
+        }
+        return;
+    }
+
+    state = INITIAL;
+    if(so == INVALID_SOCKET)
+        return;
+
+#ifdef  SO_LINGER
+    struct linger linger;
+
+    if(flags.linger) {
+        linger.l_onoff = 1;
+        linger.l_linger = 60;
+    }
+    else
+        linger.l_onoff = linger.l_linger = 0;
+    setsockopt(so, SOL_SOCKET, SO_LINGER, (char *)&linger,
+        (socklen_t)sizeof(linger));
+#endif
+//  shutdown(so, 2);
+    ucommon::Socket::release();
+}
+
+Socket::Socket() : ucommon::Socket()
+{
+    setSocket();
+}
+
+Socket::Socket(int domain, int type, int protocol) : ucommon::Socket()
+{
+    setSocket();
+    so = socket(domain, type, protocol);
+    if(so == INVALID_SOCKET) {
+        error(errCreateFailed,(char *)"Could not create socket",socket_errno);
+        return;
+    }
+#ifdef  SO_NOSIGPIPE
+    int opt = 1;
+    setsockopt(so, SOL_SOCKET, SO_NOSIGPIPE, (char *)&opt, sizeof(opt));
+#endif
+    state = AVAILABLE;
+}
+
+Socket::Socket(socket_t fd) : ucommon::Socket()
+{
+    setSocket();
+    if (fd == INVALID_SOCKET) {
+        error(errCreateFailed,(char *)"Invalid socket handle passed",0);
+        return;
+    }
+    so = fd;
+    state = AVAILABLE;
+}
+
+Socket::Socket(const Socket &orig) : ucommon::Socket()
+{
+    setSocket();
+    so = dupSocket(orig.so,orig.state);
+    if(so == INVALID_SOCKET)
+        error(errCopyFailed,(char *)"Could not duplicate socket handle",socket_errno);
+    state = orig.state;
+}
+
+Socket::~Socket()
+{
+    endSocket();
+}
+
+Socket::Error Socket::error(Error err, const char *errs, long systemError) const
+{
+    errid  = err;
+    errstr = errs;
+    syserr = systemError;
+    if(!err)
+        return err;
+
+    if(flags.thrown)
+        return err;
+
+    // prevents recursive throws
+
+    flags.thrown = true;
+#ifdef  CCXX_EXCEPTIONS
+    switch(Thread::getException()) {
+    case Thread::throwObject:
+        THROW((Socket *)this);
+    case Thread::throwException:
+        if(!errs)
+            errs = (char *)"";
+        THROW(SockException(String(errs), err, systemError));
+    case Thread::throwNothing:
+        break;
+    }
+#endif
+    return err;
+}
+
+#ifdef _MSWINDOWS_
+Socket::Error Socket::connectError(void)
+{
+    const char* str = "Could not connect to remote host";
+    switch(WSAGetLastError()) {
+    case WSAENETDOWN:
+        return error(errResourceFailure,str,socket_errno);
+    case WSAEINPROGRESS:
+        return error(errConnectBusy,str,socket_errno);
+    case WSAEADDRNOTAVAIL:
+        return error(errConnectInvalid,str,socket_errno);
+    case WSAECONNREFUSED:
+        return error(errConnectRefused,str,socket_errno);
+    case WSAENETUNREACH:
+        return error(errConnectNoRoute,str,socket_errno);
+    default:
+        return error(errConnectFailed,str,socket_errno);
+    }
+}
+#else
+Socket::Error Socket::connectError(void)
+{
+    char* str = (char *)"Could not connect to remote host";
+    switch(errno) {
+#ifdef  EHOSTUNREACH
+    case EHOSTUNREACH:
+        return error(errConnectNoRoute,str,socket_errno);
+#endif
+#ifdef  ENETUNREACH
+    case ENETUNREACH:
+        return error(errConnectNoRoute,str,socket_errno);
+#endif
+    case EINPROGRESS:
+        return error(errConnectBusy,str,socket_errno);
+#ifdef  EADDRNOTAVAIL
+    case EADDRNOTAVAIL:
+        return error(errConnectInvalid,str,socket_errno);
+#endif
+    case ECONNREFUSED:
+        return error(errConnectRefused,str,socket_errno);
+    case ETIMEDOUT:
+        return error(errConnectTimeout,str,socket_errno);
+    default:
+        return error(errConnectFailed,str,socket_errno);
+    }
+}
+#endif
+
+Socket::Error Socket::sendLimit(int limit)
+{
+#ifdef  SO_SNDLOWAT
+    if(setsockopt(so, SOL_SOCKET, SO_SNDLOWAT, (char *)&limit, sizeof(limit)))
+        return errInvalidValue;
+
+    return errSuccess;
+
+#else
+    return errServiceUnavailable;
+#endif
+}
+
+Socket::Error Socket::receiveLimit(int limit)
+{
+#ifdef  SO_RCVLOWAT
+    if(setsockopt(so, SOL_SOCKET, SO_RCVLOWAT, (char *)&limit, sizeof(limit)))
+        return errInvalidValue;
+
+    return errSuccess;
+
+#else
+    return errServiceUnavailable;
+#endif
+}
+
+Socket::Error Socket::sendTimeout(timeout_t to)
+{
+#ifdef  SO_SNDTIMEO
+    struct timeval tv;
+
+    tv.tv_sec = to / 1000;
+    tv.tv_usec = (to % 1000) * 1000;
+
+    if(setsockopt(so, SOL_SOCKET, SO_SNDTIMEO, (char *)&tv, sizeof(tv)))
+        return errInvalidValue;
+
+    return errSuccess;
+
+#else
+    return errServiceUnavailable;
+#endif
+}
+
+Socket::Error Socket::receiveTimeout(timeout_t to)
+{
+#ifdef  SO_RCVTIMEO
+    struct timeval tv;
+
+    tv.tv_sec = to / 1000;
+    tv.tv_usec = (to % 1000) * 1000;
+
+    if(setsockopt(so, SOL_SOCKET, SO_RCVTIMEO, (char *)&tv, sizeof(tv)))
+        return errInvalidValue;
+
+    return errSuccess;
+#else
+    return errServiceUnavailable;
+#endif
+}
+
+Socket::Error Socket::sendBuffer(unsigned bufsize)
+{
+#ifdef  SO_SNDBUF
+    if(setsockopt(so, SOL_SOCKET, SO_SNDBUF, (char *)&bufsize, sizeof(bufsize)))
+        return errInvalidValue;
+    return errSuccess;
+#else
+    return errServiceUnavailable;
+#endif
+}
+
+Socket::Error Socket::bufferSize(unsigned bufsize)
+{
+    Error err = receiveBuffer(bufsize);
+    if(err == errSuccess)
+        err = sendBuffer(bufsize);
+
+    return err;
+}
+
+Socket::Error Socket::receiveBuffer(unsigned bufsize)
+{
+#ifdef  SO_RCVBUF
+    if(setsockopt(so, SOL_SOCKET, SO_RCVBUF, (char *)&bufsize, sizeof(bufsize)))
+        return errInvalidValue;
+    return errSuccess;
+#else
+    return errServiceUnavailable;
+#endif
+}
+
+Socket::Error Socket::setBroadcast(bool enable)
+{
+    int opt = (enable ? 1 : 0);
+    if(setsockopt(so, SOL_SOCKET, SO_BROADCAST,
+              (char *)&opt, (socklen_t)sizeof(opt)))
+        return error(errBroadcastDenied,(char *)"Could not set socket broadcast option",socket_errno);
+    flags.broadcast = enable;
+    return errSuccess;
+}
+
+Socket::Error Socket::setMulticastByFamily(bool enable, Family family)
+{
+    socklen_t len;
+
+    switch(family) {
+#ifdef  CCXX_IPV6
+    case IPV6:
+        struct sockaddr_in6 addr;
+        len = sizeof(addr);
+
+        if(enable == flags.multicast)
+            return errSuccess;
+
+        flags.multicast = enable;
+        if(enable)
+            getsockname(so, (struct sockaddr *)&addr, &len);
+        else
+            memset(&addr.sin6_addr, 0, sizeof(addr.sin6_addr));
+
+        setsockopt(so, IPPROTO_IPV6, IPV6_MULTICAST_IF, (char *)&addr.sin6_addr, sizeof(addr.sin6_addr));
+        return errSuccess;
+#endif
+    case IPV4:
+#ifdef  IP_MULTICAST_IF
+        struct sockaddr_in addr4;
+        len = sizeof(addr4);
+
+        if(enable == flags.multicast)
+            return errSuccess;
+
+        flags.multicast = enable;
+        if(enable)
+            getsockname(so, (struct sockaddr *)&addr4, &len);
+        else
+            memset(&addr4.sin_addr, 0, sizeof(addr4.sin_addr));
+
+        setsockopt(so, IPPROTO_IP, IP_MULTICAST_IF, (char *)&addr4.sin_addr, sizeof(addr4.sin_addr));
+        return errSuccess;
+#endif
+    default:
+        return error(errServiceUnavailable,(char *)"Multicast not supported");
+    }
+}
+
+Socket::Error Socket::setTimeToLiveByFamily(unsigned char ttl, Family fam)
+{
+    if(!flags.multicast)
+        return error(errMulticastDisabled,(char *)"Multicast not enabled on socket");
+
+    switch(fam) {
+#ifdef  CCXX_IPV6
+    case IPV6:
+        flags.ttl = ttl;
+        setsockopt(so, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, (char *)&ttl, sizeof(ttl));
+        return errSuccess;
+#endif
+    case IPV4:
+#ifdef  IP_MULTICAST_TTL
+        flags.ttl = ttl;
+        setsockopt(so, IPPROTO_IP, IP_MULTICAST_TTL, (char *)&ttl, sizeof(ttl));
+        return errSuccess;
+#endif
+    default:
+        return error(errServiceUnavailable, (char *)"Multicast not supported");
+    }
+}
+
+Socket::Error Socket::setLoopbackByFamily(bool enable, Family family)
+{
+    unsigned char loop;
+
+    if(!flags.multicast)
+        return error(errMulticastDisabled,(char *)"Multicast not enabled on socket");
+
+    if(enable)
+        loop = 1;
+    else
+        loop = 0;
+    flags.loopback = enable;
+
+    switch(family) {
+#ifdef  CCXX_IPV6
+    case IPV6:
+        setsockopt(so, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, (char *)&loop, sizeof(loop));
+        return errSuccess;
+#endif
+    case IPV4:
+#ifdef  IP_MULTICAST_LOOP
+        setsockopt(so, IPPROTO_IP, IP_MULTICAST_LOOP, (char *)&loop, sizeof(loop));
+        return errSuccess;
+#endif
+    default:
+        return error(errServiceUnavailable,(char *)"Multicast not supported");
+    }
+}
+
+Socket::Error Socket::join(const IPV4Multicast &ia)
+{
+#ifdef  IP_ADD_MEMBERSHIP
+    struct ip_mreq group;
+    struct sockaddr_in myaddr;
+    socklen_t len = sizeof(myaddr);
+
+    if(!flags.multicast)
+        return error(errMulticastDisabled,(char *)"Multicast not enabled on socket");
+
+    getsockname(so, (struct sockaddr *)&myaddr, &len);
+    group.imr_interface.s_addr = INADDR_ANY;
+    group.imr_multiaddr = ia.getAddress();
+    setsockopt(so, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *)&group, sizeof(group));
+    return errSuccess;
+#else
+    return error(errServiceUnavailable,(char *)"Multicast not supported");
+#endif
+}
+
+#ifdef  CCXX_IPV6
+Socket::Error Socket::join(const IPV6Multicast &ia)
+{
+#ifdef  IPV6_ADD_MEMBERSHIP
+    struct ipv6_mreq group;
+    struct sockaddr_in6 myaddr;
+    socklen_t len = sizeof(myaddr);
+
+    if(!flags.multicast)
+        return error(errMulticastDisabled,(char *)"Multicast not enabled on socket");
+
+    getsockname(so, (struct sockaddr *)&myaddr, &len);
+    group.ipv6mr_interface = 0;
+    group.ipv6mr_multiaddr = ia.getAddress();
+    setsockopt(so, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, (char *)&group, sizeof(group));
+    return errSuccess;
+#else
+    return error(errServiceUnavailable,(char *)"Multicast not supported");
+#endif
+}
+
+#endif
+
+Socket::Error Socket::drop(const IPV4Multicast &ia)
+{
+#ifdef  IP_DROP_MEMBERSHIP
+    struct ip_mreq group;
+    struct sockaddr_in myaddr;
+    socklen_t len = sizeof(myaddr);
+
+    if(!flags.multicast)
+        return error(errMulticastDisabled,(char *)"Multicast not enabled on socket");
+
+    getsockname(so, (struct sockaddr *)&myaddr, &len);
+    group.imr_interface.s_addr = INADDR_ANY;
+    group.imr_multiaddr = ia.getAddress();
+    setsockopt(so, IPPROTO_IP, IP_DROP_MEMBERSHIP, (char *)&group, sizeof(group));
+    return errSuccess;
+#else
+    return error(errServiceUnavailable,(char *)"Multicast not supported");
+#endif
+}
+
+#ifdef  CCXX_IPV6
+Socket::Error Socket::drop(const IPV6Multicast &ia)
+{
+#ifdef  IPV6_DROP_MEMBERSHIP
+    struct ipv6_mreq group;
+    struct sockaddr_in6 myaddr;
+    socklen_t len = sizeof(myaddr);
+
+    if(!flags.multicast)
+        return error(errMulticastDisabled,(char *)"Multicast not enabled on socket");
+
+    getsockname(so, (struct sockaddr *)&myaddr, &len);
+    group.ipv6mr_interface = 0;
+    group.ipv6mr_multiaddr = ia.getAddress();
+    setsockopt(so, IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP, (char *)&group, sizeof(group));
+    return errSuccess;
+#else
+    return error(errServiceUnavailable,(char *)"Multicast not supported");
+#endif
+}
+#endif
+
+Socket::Error Socket::setRouting(bool enable)
+{
+    int opt = (enable ? 1 : 0);
+
+#ifdef  SO_DONTROUTE
+    if(setsockopt(so, SOL_SOCKET, SO_DONTROUTE,
+              (char *)&opt, (socklen_t)sizeof(opt)))
+        return error(errRoutingDenied,(char *)"Could not set dont-route socket option",socket_errno);
+#endif
+    flags.route = enable;
+    return errSuccess;
+}
+
+Socket::Error Socket::setNoDelay(bool enable)
+{
+    int opt = (enable ? 1 : 0);
+
+    if(setsockopt(so, IPPROTO_TCP, TCP_NODELAY,
+              (char *)&opt, (socklen_t)sizeof(opt)))
+        return error(errNoDelay,(char *)"Could not set tcp-nodelay socket option",socket_errno);
+
+
+    return errSuccess;
+}
+
+ssize_t Socket::readLine(char *str, size_t request, timeout_t timeout)
+{
+    bool crlf = false;
+    bool nl = false;
+    size_t nleft = request - 1; // leave also space for terminator
+    int nstat,c;
+
+    if(request < 1)
+        return 0;
+
+    str[0] = 0;
+
+    while(nleft && !nl) {
+        if(timeout) {
+            if(!isPending(pendingInput, timeout)) {
+                error(errTimeout,(char *)"Read timeout", 0);
+                return -1;
+            }
+        }
+        nstat = ::recv(so, str, _IOLEN64 nleft, MSG_PEEK);
+        if(nstat <= 0) {
+            error(errInput,(char *)"Could not read from socket", socket_errno);
+            return -1;
+        }
+
+        // FIXME: if unique char in buffer is '\r' return "\r"
+        //        if buffer end in \r try to read another char?
+        //        and if timeout ??
+        //        remember last \r
+
+        for(c=0; c < nstat; ++c) {
+            if(str[c] == '\n') {
+                if (c > 0 && str[c-1] == '\r')
+                    crlf = true;
+                ++c;
+                nl = true;
+                break;
+            }
+        }
+        nstat = ::recv(so, str, _IOLEN64 c, 0);
+        // TODO: correct ???
+        if(nstat < 0)
+            break;
+
+        // adjust ending \r\n in \n
+        if(crlf) {
+            --nstat;
+            str[nstat - 1] = '\n';
+        }
+
+        str += nstat;
+        nleft -= nstat;
+    }
+    *str = 0;
+    return (ssize_t)(request - nleft - 1);
+}
+
+ssize_t Socket::readData(void *Target, size_t Size, char Separator, timeout_t timeout)
+{
+    if ((Separator == 0x0D) || (Separator == 0x0A))
+        return (readLine ((char *) Target, Size, timeout));
+
+    if (Size < 1)
+        return (0);
+
+    ssize_t nstat;
+
+    if (Separator == 0) {       // Flat-out read for a number of bytes.
+        if (timeout) {
+            if (!isPending (pendingInput, timeout)) {
+                error(errTimeout);
+                return (-1);
+            }
+        }
+        nstat =::recv (so, (char *)Target, _IOLEN64 Size, 0);
+
+        if (nstat < 0) {
+            error (errInput);
+            return (-1);
+        }
+        return (nstat);
+    }
+    /////////////////////////////////////////////////////////////
+    // Otherwise, we have a special char separator to use
+    /////////////////////////////////////////////////////////////
+    bool found = false;
+    size_t nleft = Size;
+    int c;
+    char *str = (char *) Target;
+
+    memset (str, 0, Size);
+
+    while (nleft && !found) {
+        if (timeout) {
+            if (!isPending (pendingInput, timeout)) {
+                error(errTimeout);
+                return (-1);
+            }
+        }
+        nstat =::recv (so, str, _IOLEN64 nleft, MSG_PEEK);
+        if (nstat <= 0) {
+            error (errInput);
+            return (-1);
+        }
+
+        for (c = 0; (c < nstat) && !found; ++c) {
+            if (str[c] == Separator)
+                found = true;
+        }
+
+        memset (str, 0, nleft);
+        nstat =::recv (so, str, c, 0);
+        if (nstat < 0)
+            break;
+
+        str += nstat;
+        nleft -= nstat;
+    }
+    return (ssize_t)(Size - (ssize_t) nleft);
+}
+
+ssize_t Socket::writeData(const void *Source, size_t Size, timeout_t timeout)
+{
+    if (Size < 1)
+        return (0);
+
+    ssize_t nstat;
+    const char *Slide = (const char *) Source;
+
+    while (true) {
+        if (timeout) {
+            if (!isPending (pendingOutput, timeout)) {
+                error(errOutput);
+                return (-1);
+            }
+        }
+        nstat =::send (so, Slide, _IOLEN64 Size, MSG_NOSIGNAL);
+
+        if (nstat <= 0) {
+            error(errOutput);
+            return (-1);
+        }
+        Size -= nstat;
+        Slide += nstat;
+
+
+        if (Size <= 0)
+            break;
+    }
+    return (nstat);
+}
+
+const char *Socket::getSystemErrorString(void) const
+{
+#ifdef  CCXX_EXCEPTIONS
+    SockException e(errstr, errid, syserr);
+    return e.getSystemErrorString();
+#else
+    return NULL;
+#endif
+}
+
+bool Socket::isPending(Pending pending, timeout_t timeout)
+{
+    int status = 0;
+#ifdef USE_POLL
+    struct pollfd pfd;
+
+    pfd.fd = so;
+    pfd.revents = 0;
+
+    if(so == INVALID_SOCKET)
+        return true;
+
+    switch(pending) {
+    case pendingInput:
+        pfd.events = POLLIN;
+        break;
+    case pendingOutput:
+        pfd.events = POLLOUT;
+        break;
+    case pendingError:
+        pfd.events = POLLERR | POLLHUP;
+        break;
+    }
+
+    status = 0;
+    while(status < 1) {
+
+        if(timeout == TIMEOUT_INF)
+            status = poll(&pfd, 1, -1);
+        else
+            status = poll(&pfd, 1, timeout);
+
+        if(status < 1) {
+            // don't stop polling because of a simple
+            // signal :)
+            if(status == -1 && errno == EINTR)
+                continue;
+
+            return false;
+        }
+    }
+
+    if(pfd.revents & pfd.events)
+        return true;
+    return false;
+#else
+    struct timeval tv;
+    struct timeval *tvp = &tv;
+    fd_set grp;
+
+    if(timeout == TIMEOUT_INF)
+        tvp = NULL;
+    else {
+        tv.tv_usec = (timeout % 1000) * 1000;
+        tv.tv_sec = timeout / 1000;
+    }
+
+    FD_ZERO(&grp);
+    SOCKET sosave = so;
+    if(so == INVALID_SOCKET)
+        return true;
+    FD_SET(sosave, &grp);
+    switch(pending) {
+    case pendingInput:
+        status = ::select((int)so + 1, &grp, NULL, NULL, tvp);
+        break;
+    case pendingOutput:
+        status = ::select((int)so + 1, NULL, &grp, NULL, tvp);
+        break;
+    case pendingError:
+        status = ::select((int)so + 1, NULL, NULL, &grp, tvp);
+        break;
+    }
+    if(status < 1)
+        return false;
+    if(FD_ISSET(so, &grp))
+        return true;
+    return false;
+#endif
+}
+
+bool Socket::operator!() const
+{
+    return (Socket::state == INITIAL) ? true : false;
+}
+
+Socket::operator bool() const
+{
+    return (Socket::state == INITIAL) ? false : true;
+}
+
+Socket &Socket::operator=(const Socket &from)
+{
+    if(so == from.so)
+        return *this;
+
+    if(state != INITIAL)
+        endSocket();
+
+    so = dupSocket(from.so,from.state);
+    if(so == INVALID_SOCKET) {
+        error(errCopyFailed,(char *)"Could not duplicate socket handle",socket_errno);
+        state = INITIAL;
+    }
+    else
+        state = from.state;
+
+    return *this;
+}
+
+bool Socket::check(Family fam)
+{
+    SOCKET so = INVALID_SOCKET;
+
+    switch(fam) {
+    case IPV4:
+        so = socket(fam, SOCK_DGRAM, IPPROTO_UDP);
+        break;
+#ifdef  CCXX_IPV6
+    case IPV6:
+        so = socket(fam, SOCK_DGRAM, IPPROTO_UDP);
+        break;
+#endif
+    default:
+        return false;
+    }
+
+    if(so == INVALID_SOCKET)
+        return false;
+
+    release(so);
+    return true;
+}
+
+IPV4Host Socket::getIPV4Sender(tpport_t *port) const
+{
+    struct sockaddr_in from;
+    char buf;
+    socklen_t len = sizeof(from);
+    int rc = ::recvfrom(so, &buf, 1, MSG_PEEK,
+                (struct sockaddr *)&from, &len);
+
+#ifdef _MSWINDOWS_
+    if(rc < 1 && WSAGetLastError() != WSAEMSGSIZE) {
+        if(port)
+            *port = 0;
+
+        memset((void*) &from, 0, sizeof(from));
+        error(errInput,(char *)"Could not read from socket",socket_errno);
+    }
+#else
+    if(rc < 0) {
+        if(port)
+            *port = 0;
+
+        memset((void*) &from, 0, sizeof(from));
+        error(errInput,(char *)"Could not read from socket",socket_errno);
+    }
+#endif
+    else {
+        if(rc < 1)
+            memset((void*) &from, 0, sizeof(from));
+
+        if(port)
+            *port = ntohs(from.sin_port);
+    }
+
+    return IPV4Host(from.sin_addr);
+}
+
+#ifdef  CCXX_IPV6
+IPV6Host Socket::getIPV6Sender(tpport_t *port) const
+{
+    struct sockaddr_in6 from;
+    char buf;
+    socklen_t len = sizeof(from);
+    int rc = ::recvfrom(so, &buf, 1, MSG_PEEK,
+                (struct sockaddr *)&from, &len);
+
+#ifdef _MSWINDOWS_
+    if(rc < 1 && WSAGetLastError() != WSAEMSGSIZE) {
+        if(port)
+            *port = 0;
+
+        memset((void*) &from, 0, sizeof(from));
+        error(errInput,(char *)"Could not read from socket",socket_errno);
+    }
+#else
+    if(rc < 0) {
+        if(port)
+            *port = 0;
+
+        memset((void*) &from, 0, sizeof(from));
+        error(errInput,(char *)"Could not read from socket",socket_errno);
+    }
+#endif
+    else {
+        if(rc < 1)
+            memset((void*) &from, 0, sizeof(from));
+
+        if(port)
+            *port = ntohs(from.sin6_port);
+    }
+
+    return IPV6Host(from.sin6_addr);
+}
+#endif
+
+IPV4Host Socket::getIPV4Local(tpport_t *port) const
+{
+    struct sockaddr_in addr;
+    socklen_t len = sizeof(addr);
+
+    if(getsockname(so, (struct sockaddr *)&addr, &len)) {
+        error(errResourceFailure,(char *)"Could not get socket address",socket_errno);
+            if(port)
+            *port = 0;
+        memset(&addr.sin_addr, 0, sizeof(addr.sin_addr));
+    }
+    else {
+        if(port)
+                *port = ntohs(addr.sin_port);
+    }
+    return IPV4Host(addr.sin_addr);
+}
+
+#ifdef  CCXX_IPV6
+IPV6Host Socket::getIPV6Local(tpport_t *port) const
+{
+    struct sockaddr_in6 addr;
+    socklen_t len = sizeof(addr);
+
+    if(getsockname(so, (struct sockaddr *)&addr, &len)) {
+        error(errResourceFailure,(char *)"Could not get socket address",socket_errno);
+            if(port)
+            *port = 0;
+        memset(&addr.sin6_addr, 0, sizeof(addr.sin6_addr));
+    }
+    else {
+        if(port)
+                *port = ntohs(addr.sin6_port);
+    }
+    return IPV6Host(addr.sin6_addr);
+}
+#endif
+
+IPV4Host Socket::getIPV4Peer(tpport_t *port) const
+{
+    struct sockaddr_in addr;
+    socklen_t len = sizeof(addr);
+
+    if(getpeername(so, (struct sockaddr *)&addr, &len)) {
+#ifndef _MSWINDOWS_
+        if(errno == ENOTCONN)
+            error(errNotConnected,(char *)"Could not get peer address",socket_errno);
+        else
+#endif
+            error(errResourceFailure,(char *)"Could not get peer address",socket_errno);
+        if(port)
+            *port = 0;
+        memset(&addr.sin_addr, 0, sizeof(addr.sin_addr));
+    }
+    else {
+        if(port)
+                *port = ntohs(addr.sin_port);
+    }
+    return IPV4Host(addr.sin_addr);
+}
+
+#ifdef  CCXX_IPV6
+IPV6Host Socket::getIPV6Peer(tpport_t *port) const
+{
+    struct sockaddr_in6 addr;
+    socklen_t len = sizeof(addr);
+
+    if(getpeername(so, (struct sockaddr *)&addr, &len)) {
+#ifndef _MSWINDOWS_
+        if(errno == ENOTCONN)
+            error(errNotConnected,(char *)"Could not get peer address",socket_errno);
+        else
+#endif
+            error(errResourceFailure,(char *)"Could not get peer address",socket_errno);
+        if(port)
+            *port = 0;
+        memset(&addr.sin6_addr, 0, sizeof(addr.sin6_addr));
+    }
+    else {
+        if(port)
+                *port = ntohs(addr.sin6_port);
+    }
+    return IPV6Host(addr.sin6_addr);
+}
+#endif
+
+void Socket::setCompletion(bool immediate)
+{
+    flags.completion = immediate;
+#ifdef _MSWINDOWS_
+    unsigned long flag;
+    // note that this will not work on some versions of Windows for Workgroups. Tough. -- jfc
+    switch( immediate ) {
+    case false:
+        // this will not work if you are using WSAAsyncSelect or WSAEventSelect.
+        // -- perhaps I should throw an exception
+        flag = 1;
+//      ioctlsocket( so, FIONBIO, (unsigned long *) 1);
+        break;
+    case true:
+        flag = 0;
+//      ioctlsocket( so, FIONBIO, (unsigned long *) 0);
+        break;
+    }
+    ioctlsocket(so, FIONBIO, &flag);
+#else
+    int fflags = fcntl(so, F_GETFL);
+
+    if(immediate) {
+        fflags &=~ O_NONBLOCK;
+        fcntl(so, F_SETFL, fflags);
+    }
+    else {
+        fflags |= O_NONBLOCK;
+        fcntl(so, F_SETFL, fflags);
+    }
+#endif
+}
+
+Socket::Error Socket::setKeepAlive(bool enable)
+{
+    int opt = (enable ? ~0: 0);
+#if (defined(SO_KEEPALIVE) || defined(_MSWINDOWS_))
+    if(setsockopt(so, SOL_SOCKET, SO_KEEPALIVE,
+              (char *)&opt, (socklen_t)sizeof(opt)))
+        return error(errKeepaliveDenied,(char *)"Could not set socket keep-alive option",socket_errno);
+#endif
+    flags.keepalive = enable;
+    return errSuccess;
+}
+
+Socket::Error Socket::setLinger(bool linger)
+{
+#ifdef  SO_LINGER
+    flags.linger = linger;
+    return errSuccess;
+#else
+    return error(errServiceUnavailable,(char *)"Socket lingering not supported");
+#endif
+}
+
+Socket::Error Socket::setTypeOfService(Tos service)
+{
+#ifdef  SOL_IP
+    unsigned char tos;
+    switch(service) {
+#ifdef  IPTOS_LOWDELAY
+    case tosLowDelay:
+        tos = IPTOS_LOWDELAY;
+        break;
+#endif
+#ifdef  IPTOS_THROUGHPUT
+    case tosThroughput:
+        tos = IPTOS_THROUGHPUT;
+        break;
+#endif
+#ifdef  IPTOS_RELIABILITY
+    case tosReliability:
+        tos = IPTOS_RELIABILITY;
+        break;
+#endif
+#ifdef  IPTOS_MINCOST
+    case tosMinCost:
+        tos = IPTOS_MINCOST;
+        break;
+#endif
+    default:
+        return error(errServiceUnavailable,(char *)"Unknown type-of-service");
+    }
+    if(setsockopt(so, SOL_IP, IP_TOS,(char *)&tos, (socklen_t)sizeof(tos)))
+        return error(errServiceDenied,(char *)"Could not set type-of-service",socket_errno);
+    return errSuccess;
+#else
+    return error(errServiceUnavailable,(char *)"Socket type-of-service not supported",socket_errno);
+#endif
+}
+
+bool Socket::isConnected(void) const
+{
+    return (Socket::state == CONNECTED) ? true : false;
+}
+
+bool Socket::isActive(void) const
+{
+    return (state != INITIAL) ? true : false;
+}
+
diff --git a/jni/libucommon/sources/commoncpp/strchar.cpp b/jni/libucommon/sources/commoncpp/strchar.cpp
new file mode 100644
index 0000000..3b85064
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/strchar.cpp
@@ -0,0 +1,134 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#include <ucommon-config.h>
+#include <ctype.h>
+#include <commoncpp/config.h>
+#include <commoncpp/export.h>
+#include <commoncpp/string.h>
+#include <commoncpp/numbers.h>
+
+NAMESPACE_COMMONCPP
+
+char *newString(const char *src, size_t size)
+{
+    char *dest;
+
+    if(!size)
+        size = strlen(src) + 1;
+
+    dest = new char[size];
+    return setString(dest, size, src);
+}
+
+void delString(char *str)
+{
+    delete[] str;
+}
+
+char *setUpper(char *string, size_t size)
+{
+    char *ret = string;
+
+    if(!size)
+        size = strlen(string);
+
+    while(size && *string) {
+        *string = toupper(*string);
+        ++string;
+        --size;
+    }
+
+    return ret;
+}
+
+char *setLower(char *string, size_t size)
+{
+    char *ret = string;
+
+    if(!size)
+        size = strlen(string);
+
+    while(size && *string) {
+        *string = tolower(*string);
+        ++string;
+        --size;
+    }
+
+    return ret;
+}
+
+char *rsetField(char *dest, size_t size, const char *src, const char fill)
+{
+    size_t len = 0;
+
+    if(src)
+        len = strlen(src);
+
+    if(len > size)
+        len = size;
+
+    if(len)
+        memmove(dest + size - len, (void *)src, len);
+
+    if(len < size && fill)
+        memset(dest, fill, size - len);
+
+    return dest;
+}
+
+char *lsetField(char *dest, size_t size, const char *src, const char fill)
+{
+    size_t len = 0;
+
+    if(src)
+        len = strlen(src);
+
+    if(len > size)
+        len = size;
+
+    if(len)
+        memmove(dest, src, len);
+
+    if(len < size && fill)
+        memset(dest + len, fill, size - len);
+
+    return dest;
+}
+
+END_NAMESPACE
diff --git a/jni/libucommon/sources/commoncpp/tcp.cpp b/jni/libucommon/sources/commoncpp/tcp.cpp
new file mode 100644
index 0000000..1bec40e
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/tcp.cpp
@@ -0,0 +1,1294 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#include <ucommon-config.h>
+#include <commoncpp/config.h>
+#include <commoncpp/export.h>
+#include <commoncpp/string.h>
+#include <commoncpp/socket.h>
+#include <commoncpp/tcp.h>
+
+#include <iostream>
+
+#ifdef _MSWINDOWS_
+#include <io.h>
+#define _IOLEN64    (unsigned)
+#define _IORET64    (int)
+typedef int socklen_t;
+
+#define socket_errno    WSAGetLastError()
+#else
+#include <sys/ioctl.h>
+#include <netinet/tcp.h>
+#ifdef HAVE_NET_IP6_H
+#include <netinet/ip6.h>
+#endif
+#define socket_errno errno
+# ifndef  O_NONBLOCK
+#  define O_NONBLOCK    O_NDELAY
+# endif
+# ifdef IPPROTO_IP
+#  ifndef  SOL_IP
+#   define SOL_IP   IPPROTO_IP
+#  endif // !SOL_IP
+# endif  // IPPROTO_IP
+#endif   // !WIN32
+
+#ifndef INADDR_LOOPBACK
+#define INADDR_LOOPBACK (unsigned long)0x7f000001
+#endif
+
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#if defined(__hpux)
+#define _XOPEN_SOURCE_EXTENDED
+#endif
+
+#ifdef  HAVE_NET_IF_H
+#include <net/if.h>
+#endif
+
+#ifndef _IOLEN64
+#define _IOLEN64
+#endif
+
+#ifndef _IORET64
+#define _IORET64
+#endif
+
+using namespace COMMONCPP_NAMESPACE;
+using namespace std;
+
+void TCPSocket::setSegmentSize(unsigned mss)
+{
+#ifdef  TCP_MAXSEG
+    if(mss > 1)
+        setsockopt(so, IPPROTO_TCP, TCP_MAXSEG, (char *)&mss, sizeof(mss));
+#endif
+    segsize = mss;
+}
+
+#ifdef  HAVE_GETADDRINFO
+TCPSocket::TCPSocket(const char *name, unsigned backlog, unsigned mss) :
+Socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)
+{
+    char namebuf[128], *cp;
+    struct addrinfo hint, *list = NULL, *first;
+    snprintf(namebuf, sizeof(namebuf), "%s", name);
+    cp = strrchr(namebuf, '/');
+    if(!cp)
+        cp = strrchr(namebuf, ':');
+
+    if(!cp) {
+        cp = namebuf;
+        name = NULL;
+    }
+    else {
+        name = namebuf;
+        *(cp++) = 0;
+        if(!strcmp(name, "*"))
+            name = NULL;
+    }
+
+    memset(&hint, 0, sizeof(hint));
+    hint.ai_family = AF_INET;
+    hint.ai_socktype = SOCK_STREAM;
+    hint.ai_protocol = IPPROTO_TCP;
+    hint.ai_flags = AI_PASSIVE;
+
+    if(getaddrinfo(name, cp, &hint, &list) || !list) {
+        endSocket();
+        error(errBindingFailed, (char *)"Could not find service", errno);
+        return;
+    }
+
+#if defined(SO_REUSEADDR)
+    int opt = 1;
+    setsockopt(so, SOL_SOCKET, SO_REUSEADDR, (char *)&opt,
+        (socklen_t)sizeof(opt));
+#endif
+
+    first = list;
+    while(list) {
+        if(!bind(so, list->ai_addr, (socklen_t)list->ai_addrlen)) {
+            state = BOUND;
+            break;
+        }
+        list = list->ai_next;
+    }
+    freeaddrinfo(first);
+    if(state != BOUND) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not bind socket",socket_errno);
+        return;
+    }
+
+    setSegmentSize(mss);
+    if(listen(so, backlog)) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not listen on socket",socket_errno);
+        return;
+    }
+}
+
+#else
+TCPSocket::TCPSocket(const char *name, unsigned backlog, unsigned mss) :
+Socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)
+{
+    char namebuf[128], *cp;
+    struct sockaddr_in addr;
+    struct servent *svc;
+
+    memset(&addr, 0, sizeof(addr));
+    snprintf(namebuf, sizeof(namebuf), "%s", name);
+    cp = strrchr(namebuf, '/');
+    if(!cp)
+        cp = strrchr(namebuf, ':');
+
+    if(!cp) {
+        cp = namebuf;
+        name = "*";
+    }
+    else {
+        name = namebuf;
+        *(cp++) = 0;
+    }
+
+    addr.sin_family = AF_INET;
+    if(isdigit(*cp))
+        addr.sin_port = htons(atoi(cp));
+    else {
+        mutex.enter();
+        svc = getservbyname(cp, "tcp");
+        if(svc)
+            addr.sin_port = svc->s_port;
+        mutex.leave();
+        if(!svc) {
+                    endSocket();
+                    error(errBindingFailed, "Could not find service", errno);
+                    return;
+
+        }
+    }
+
+    IPV4Address ia(name);
+    addr.sin_addr = getaddress(ia);
+
+#if defined(SO_REUSEADDR)
+    int opt = 1;
+    setsockopt(so, SOL_SOCKET, SO_REUSEADDR, (char *)&opt,
+        (socklen_t)sizeof(opt));
+#endif
+
+    if(bind(so, (struct sockaddr *)&addr, sizeof(addr))) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not bind socket",socket_errno);
+        return;
+    }
+
+    setSegmentSize(mss);
+    if(listen(so, backlog)) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not listen on socket",
+            socket_errno);
+        return;
+    }
+    state = BOUND;
+}
+
+#endif
+
+TCPSocket::TCPSocket(const IPV4Address &ia, tpport_t port, unsigned backlog, unsigned mss) :
+Socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)
+{
+    struct sockaddr_in addr;
+
+    memset(&addr, 0, sizeof(addr));
+    addr.sin_family = AF_INET;
+    addr.sin_addr = getaddress(ia);
+    addr.sin_port = htons(port);
+
+#if defined(SO_REUSEADDR)
+    int opt = 1;
+    setsockopt(so, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, (socklen_t)sizeof(opt));
+#endif
+    if(bind(so, (struct sockaddr *)&addr, sizeof(addr))) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not bind socket",socket_errno);
+        return;
+    }
+
+    setSegmentSize(mss);
+
+    if(listen(so, backlog)) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not listen on socket",socket_errno);
+        return;
+    }
+    state = BOUND;
+}
+
+bool TCPSocket::onAccept(const IPV4Host &ia, tpport_t port)
+{
+    return true;
+}
+
+TCPSocket::~TCPSocket()
+{
+    endSocket();
+}
+
+#ifdef  CCXX_IPV6
+
+void TCPV6Socket::setSegmentSize(unsigned mss)
+{
+#ifdef  TCP_MAXSEG
+    if(mss > 1)
+        setsockopt(so, IPPROTO_TCP, TCP_MAXSEG, (char *)&mss, sizeof(mss));
+#endif
+    segsize = mss;
+}
+
+TCPV6Socket::TCPV6Socket(const char *name, unsigned backlog, unsigned mss) :
+Socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP)
+{
+    char namebuf[128], *cp;
+    struct addrinfo hint, *list = NULL, *first;
+
+    snprintf(namebuf, sizeof(namebuf), "%s", name);
+    cp = strrchr(namebuf, '/');
+
+    if(!cp) {
+        cp = namebuf;
+        name = NULL;
+    }
+    else {
+        name = namebuf;
+        *(cp++) = 0;
+        if(!strcmp(name, "*"))
+            name = NULL;
+    }
+
+    memset(&hint, 0, sizeof(hint));
+    hint.ai_family = AF_INET6;
+    hint.ai_socktype = SOCK_STREAM;
+    hint.ai_protocol = IPPROTO_TCP;
+    hint.ai_flags = AI_PASSIVE;
+
+    if(getaddrinfo(name, cp, &hint, &list) || !list) {
+        endSocket();
+        error(errBindingFailed, (char *)"Could not find service", errno);
+        return;
+    }
+
+#if defined(SO_REUSEADDR)
+    int opt = 1;
+    setsockopt(so, SOL_SOCKET, SO_REUSEADDR, (char *)&opt,
+        (socklen_t)sizeof(opt));
+#endif
+
+    first = list;
+    while(list) {
+        if(!bind(so, list->ai_addr, (socklen_t)list->ai_addrlen)) {
+            state = BOUND;
+            break;
+        }
+        list = list->ai_next;
+    }
+    freeaddrinfo(first);
+    if(state != BOUND) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not bind socket",socket_errno);
+        return;
+    }
+
+    setSegmentSize(mss);
+
+    if(listen(so, backlog)) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not listen on socket",socket_errno);
+        return;
+    }
+}
+
+TCPV6Socket::TCPV6Socket(const IPV6Address &ia, tpport_t port, unsigned backlog, unsigned mss) :
+Socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP)
+{
+    struct sockaddr_in6 addr;
+
+    memset(&addr, 0, sizeof(addr));
+    addr.sin6_family = AF_INET6;
+    addr.sin6_addr = getaddress(ia);
+    addr.sin6_port = htons(port);
+
+#if defined(SO_REUSEADDR)
+    int opt = 1;
+    setsockopt(so, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, (socklen_t)sizeof(opt));
+#endif
+    if(bind(so, (struct sockaddr *)&addr, sizeof(addr))) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not bind socket",socket_errno);
+        return;
+    }
+
+    setSegmentSize(mss);
+
+    if(listen(so, backlog)) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not listen on socket",socket_errno);
+        return;
+    }
+    state = BOUND;
+}
+
+bool TCPV6Socket::onAccept(const IPV6Host &ia, tpport_t port)
+{
+    return true;
+}
+
+TCPV6Socket::~TCPV6Socket()
+{
+    endSocket();
+}
+
+#endif
+
+void TCPSocket::reject(void)
+{
+    SOCKET rej = accept(so, NULL, NULL);
+    ::shutdown(rej, 2);
+    release(rej);
+}
+
+#ifdef  CCXX_IPV6
+void TCPV6Socket::reject(void)
+{
+    SOCKET rej = accept(so, NULL, NULL);
+    ::shutdown(rej, 2);
+    release(rej);
+}
+#endif
+
+TCPStream::TCPStream(TCPSocket &server, bool throwflag, timeout_t to) :
+    streambuf(), Socket(accept(server.getSocket(), NULL, NULL)),
+#ifdef  OLD_IOSTREAM
+    iostream()
+#else
+    iostream((streambuf *)this)
+#endif
+    ,bufsize(0)
+    ,gbuf(NULL)
+    ,pbuf(NULL) {
+    tpport_t port;
+    family = IPV4;
+
+#ifdef  OLD_IOSTREAM
+    init((streambuf *)this);
+#endif
+
+    timeout = to;
+    setError(throwflag);
+    IPV4Host host = getPeer(&port);
+    if(!server.onAccept(host, port)) {
+        endSocket();
+        error(errConnectRejected);
+        iostream::clear(ios::failbit | rdstate());
+        return;
+    }
+
+    segmentBuffering(server.getSegmentSize());
+    Socket::state = CONNECTED;
+}
+
+#ifdef  CCXX_IPV6
+TCPStream::TCPStream(TCPV6Socket &server, bool throwflag, timeout_t to) :
+    streambuf(), Socket(accept(server.getSocket(), NULL, NULL)),
+#ifdef  OLD_IOSTREAM
+    iostream()
+#else
+    iostream((streambuf *)this)
+#endif
+    ,bufsize(0)
+    ,gbuf(NULL)
+    ,pbuf(NULL) {
+    tpport_t port;
+
+    family = IPV6;
+
+#ifdef  OLD_IOSTREAM
+    init((streambuf *)this);
+#endif
+
+    timeout = to;
+    setError(throwflag);
+    IPV6Host host = getIPV6Peer(&port);
+    if(!server.onAccept(host, port)) {
+        endSocket();
+        error(errConnectRejected);
+        iostream::clear(ios::failbit | rdstate());
+        return;
+    }
+
+    segmentBuffering(server.getSegmentSize());
+    Socket::state = CONNECTED;
+}
+#endif
+
+TCPStream::TCPStream(const IPV4Host &host, tpport_t port, unsigned size, bool throwflag, timeout_t to) :
+    streambuf(), Socket(AF_INET, SOCK_STREAM, IPPROTO_TCP),
+#ifdef  OLD_IOSTREAM
+    iostream(),
+#else
+    iostream((streambuf *)this),
+#endif
+    bufsize(0),gbuf(NULL),pbuf(NULL) {
+#ifdef  OLD_IOSTREAM
+    init((streambuf *)this);
+#endif
+    family = IPV4;
+    timeout = to;
+    setError(throwflag);
+    connect(host, port, size);
+}
+
+#ifdef  CCXX_IPV6
+TCPStream::TCPStream(const IPV6Host &host, tpport_t port, unsigned size, bool throwflag, timeout_t to) :
+    streambuf(), Socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP),
+#ifdef OLD_IOSTREAM
+    iostream(),
+#else
+    iostream((streambuf *)this),
+#endif
+    bufsize(0),gbuf(NULL),pbuf(NULL) {
+    family = IPV6;
+
+#ifdef  OLD_IOSTREAM
+    init((streambuf *)this);
+#endif
+    timeout = to;
+    setError(throwflag);
+    connect(host, port, size);
+}
+#endif
+
+TCPStream::~TCPStream()
+{
+#ifdef  CCXX_EXCEPTIONS
+        try { endStream(); }
+        catch( ... ) { if ( ! std::uncaught_exception()) throw;};
+#else
+        endStream();
+#endif
+}
+
+#ifdef  HAVE_GETADDRINFO
+
+void TCPStream::connect(const char *target, unsigned mss)
+{
+    char namebuf[128];
+    char *cp;
+    struct addrinfo hint, *list = NULL, *next, *first;
+    bool connected = false;
+
+    snprintf(namebuf, sizeof(namebuf), "%s", target);
+    cp = strrchr(namebuf, '/');
+    if(!cp)
+        cp = strrchr(namebuf, ':');
+
+    if(!cp) {
+        endStream();
+        connectError();
+        return;
+    }
+
+    *(cp++) = 0;
+
+    memset(&hint, 0, sizeof(hint));
+    hint.ai_family = family;
+    hint.ai_socktype = SOCK_STREAM;
+    hint.ai_protocol = IPPROTO_TCP;
+
+    if(getaddrinfo(namebuf, cp, &hint, &list) || !list) {
+        endStream();
+        connectError();
+        return;
+    }
+
+    first = list;
+
+#ifdef  TCP_MAXSEG
+    if(mss)
+        setsockopt(so, IPPROTO_TCP, TCP_MAXSEG, (char *)&mss, sizeof(mss));
+#endif
+
+    while(list) {
+        if(!::connect(so, list->ai_addr, (socklen_t)list->ai_addrlen)) {
+            connected = true;
+            break;
+        }
+        next = list->ai_next;
+        list = next;
+    }
+
+    freeaddrinfo(first);
+
+    if(!connected) {
+        endStream();
+        connectError();
+        return;
+    }
+
+    segmentBuffering(mss);
+    Socket::state = CONNECTED;
+}
+
+#else
+void TCPStream::connect(const char *target, unsigned mss)
+{
+    char namebuf[128];
+    char *cp;
+    struct servent *svc;
+    tpport_t port;
+
+    snprintf(namebuf, sizeof(namebuf), "%s", target);
+    cp = strrchr(namebuf, '/');
+    if(!cp)
+        cp = strrchr(namebuf, ':');
+
+    if(!cp) {
+        endStream();
+        connectError();
+        return;
+    }
+
+    *(cp++) = 0;
+
+    if(isdigit(*cp))
+        port = atoi(cp);
+    else {
+        mutex.enter();
+        svc = getservbyname(cp, "tcp");
+        if(svc)
+            port = ntohs(svc->s_port);
+        mutex.leave();
+        if(!svc) {
+            endStream();
+            connectError();
+            return;
+        }
+    }
+
+    switch(family) {
+    case IPV4:
+        connect(IPV4Host(namebuf), port, mss);
+        break;
+#ifdef  CCXX_IPV6
+    case IPV6:
+        connect(IPV6Host(namebuf), port, mss);
+        break;
+#endif
+    default:
+        endStream();
+        connectError();
+    }
+}
+#endif
+
+void TCPStream::connect(const IPV4Host &host, tpport_t port, unsigned mss)
+{
+    size_t i;
+    fd_set fds;
+    struct timeval to;
+    bool connected = false;
+    int rtn;
+    int sockopt;
+    socklen_t len = sizeof(sockopt);
+
+#ifdef  TCP_MAXSEG
+    if(mss)
+        setsockopt(so, IPPROTO_TCP, TCP_MAXSEG, (char *)&mss, sizeof(mss));
+#endif
+
+    for(i = 0 ; i < host.getAddressCount(); i++) {
+        struct sockaddr_in addr;
+        memset(&addr, 0, sizeof(addr));
+        addr.sin_family = AF_INET;
+        addr.sin_addr = host.getAddress(i);
+        addr.sin_port = htons(port);
+
+        if(timeout)
+            setCompletion(false);
+
+        // Win32 will crash if you try to connect to INADDR_ANY.
+        if ( INADDR_ANY == addr.sin_addr.s_addr )
+            addr.sin_addr.s_addr = INADDR_LOOPBACK;
+        rtn = ::connect(so, (struct sockaddr *)&addr, (socklen_t)sizeof(addr));
+        if(!rtn) {
+            connected = true;
+            break;
+        }
+
+#ifndef _MSWINDOWS_
+        if(errno == EINPROGRESS)
+#else
+        if(WSAGetLastError() == WSAEINPROGRESS)
+#endif
+        {
+            FD_ZERO(&fds);
+            FD_SET(so, &fds);
+            to.tv_sec = timeout / 1000;
+            to.tv_usec = timeout % 1000 * 1000;
+
+            // timeout check for connect completion
+
+            if(::select((int)so + 1, NULL, &fds, NULL, &to) < 1)
+                continue;
+
+            getsockopt(so, SOL_SOCKET, SO_ERROR, (char *)&sockopt, &len);
+            if(!sockopt) {
+                connected = true;
+                break;
+            }
+            endSocket();
+            so = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
+            if(so == INVALID_SOCKET)
+                break;
+        }
+    }
+
+    setCompletion(true);
+    if(!connected) {
+        rtn = errno;
+        endStream();
+        errno = rtn;
+        connectError();
+        return;
+    }
+
+    segmentBuffering(mss);
+    Socket::state = CONNECTED;
+}
+
+#ifdef  CCXX_IPV6
+void TCPStream::connect(const IPV6Host &host, tpport_t port, unsigned mss)
+{
+    size_t i;
+    fd_set fds;
+    struct timeval to;
+    bool connected = false;
+    int rtn;
+    int sockopt;
+    socklen_t len = sizeof(sockopt);
+
+#ifdef  TCP_MAXSEG
+    if(mss)
+        setsockopt(so, IPPROTO_TCP, TCP_MAXSEG, (char *)&mss, sizeof(mss));
+#endif
+
+    for(i = 0 ; i < host.getAddressCount(); i++) {
+        struct sockaddr_in6 addr;
+        memset(&addr, 0, sizeof(addr));
+        addr.sin6_family = AF_INET6;
+        addr.sin6_addr = host.getAddress(i);
+        addr.sin6_port = htons(port);
+
+        if(timeout)
+            setCompletion(false);
+
+        // Win32 will crash if you try to connect to INADDR_ANY.
+        if ( !memcmp(&addr.sin6_addr, &in6addr_any, sizeof(in6addr_any)))
+            memcpy(&addr.sin6_addr, &in6addr_loopback, sizeof(in6addr_loopback));
+        rtn = ::connect(so, (struct sockaddr *)&addr, (socklen_t)sizeof(addr));
+        if(!rtn) {
+            connected = true;
+            break;
+        }
+
+#ifndef _MSWINDOWS_
+        if(errno == EINPROGRESS)
+#else
+        if(WSAGetLastError() == WSAEINPROGRESS)
+#endif
+        {
+            FD_ZERO(&fds);
+            FD_SET(so, &fds);
+            to.tv_sec = timeout / 1000;
+            to.tv_usec = timeout % 1000 * 1000;
+
+            // timeout check for connect completion
+
+            if(::select((int)so + 1, NULL, &fds, NULL, &to) < 1)
+                continue;
+
+            getsockopt(so, SOL_SOCKET, SO_ERROR, (char *)&sockopt, &len);
+            if(!sockopt) {
+                connected = true;
+                break;
+            }
+            endSocket();
+            so = socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP);
+            if(so == INVALID_SOCKET)
+                break;
+        }
+    }
+
+    setCompletion(true);
+    if(!connected) {
+        rtn = errno;
+        endStream();
+        errno = rtn;
+        connectError();
+        return;
+    }
+
+    segmentBuffering(mss);
+    Socket::state = CONNECTED;
+}
+#endif
+
+TCPStream::TCPStream(const char *target, Family fam, unsigned mss, bool throwflag, timeout_t to) :
+streambuf(), Socket(PF_INET, SOCK_STREAM, IPPROTO_TCP),
+#ifdef  OLD_IOSTREAM
+iostream(),
+#else
+iostream((streambuf *)this),
+#endif
+timeout(to), bufsize(0),gbuf(NULL),pbuf(NULL)
+{
+    family = fam;
+#ifdef  OLD_IOSTREAM
+    init((streambuf *)this);
+#endif
+    setError(throwflag);
+    connect(target, mss);
+}
+
+TCPStream::TCPStream(Family fam, bool throwflag, timeout_t to) :
+streambuf(), Socket(PF_INET, SOCK_STREAM, IPPROTO_TCP),
+#ifdef  OLD_IOSTREAM
+iostream(),
+#else
+iostream((streambuf *)this),
+#endif
+timeout(to), bufsize(0),gbuf(NULL),pbuf(NULL)
+{
+    family = fam;
+#ifdef  OLD_IOSTREAM
+    init((streambuf *)this);
+#endif
+    setError(throwflag);
+}
+
+void TCPStream::connect(TCPSocket &tcpip)
+{
+    tpport_t port;
+
+    endStream();
+    family = IPV4;
+    so = accept(tcpip.getSocket(), NULL, NULL);
+    if(so == INVALID_SOCKET)
+        return;
+
+    IPV4Host host = getPeer(&port);
+    if(!tcpip.onAccept(host, port)) {
+        endSocket();
+        iostream::clear(ios::failbit | rdstate());
+        return;
+    }
+
+    segmentBuffering(tcpip.getSegmentSize());
+    Socket::state = CONNECTED;
+}
+
+#ifdef  CCXX_IPV6
+
+void TCPStream::connect(TCPV6Socket &tcpip)
+{
+    tpport_t port;
+
+    endStream();
+    family = IPV6;
+    so = accept(tcpip.getSocket(), NULL, NULL);
+    if(so == INVALID_SOCKET)
+        return;
+
+    IPV6Host host = getIPV6Peer(&port);
+    if(!tcpip.onAccept(host, port)) {
+        endSocket();
+        iostream::clear(ios::failbit | rdstate());
+        return;
+    }
+
+    segmentBuffering(tcpip.getSegmentSize());
+        Socket::state = CONNECTED;
+}
+#endif
+
+void TCPStream::segmentBuffering(unsigned mss)
+{
+    unsigned max = 0;
+
+    if(mss == 1) {  // special interactive
+        allocate(1);
+        return;
+    }
+
+#ifdef  TCP_MAXSEG
+    socklen_t alen = sizeof(max);
+
+    if(mss)
+        setsockopt(so, IPPROTO_TCP, TCP_MAXSEG, (char *)&max, sizeof(max));
+    getsockopt(so, IPPROTO_TCP, TCP_MAXSEG, (char *)&max, &alen);
+#endif
+
+    if(max && max < mss)
+        mss = max;
+
+    if(!mss) {
+        if(max)
+            mss = max;
+        else
+            mss = 536;
+        allocate(mss);
+        return;
+    }
+
+#ifdef  TCP_MAXSEG
+    setsockopt(so, IPPROTO_TCP, TCP_MAXSEG, (char *)&mss, sizeof(mss));
+#endif
+
+    if(mss < 80)
+        mss = 80;
+
+    if(mss * 7 < 64000)
+        bufferSize(mss * 7);
+    else if(mss * 6 < 64000)
+        bufferSize(mss * 6);
+    else
+        bufferSize(mss * 5);
+
+    if(mss < 512)
+        sendLimit(mss * 4);
+
+    allocate(mss);
+}
+
+int TCPStream::getSegmentSize(void)
+{
+    unsigned mss = 0;
+#ifdef  TCP_MAXSEG
+    socklen_t alen = sizeof(mss);
+
+    getsockopt(so, IPPROTO_TCP, TCP_MAXSEG, (char *)&mss, &alen);
+#endif
+    if(!mss)
+        return (int)bufsize;
+
+    return mss;
+}
+
+void TCPStream::disconnect(void)
+{
+    if(Socket::state == AVAILABLE)
+        return;
+
+    endStream();
+    so = socket(family, SOCK_STREAM, IPPROTO_TCP);
+    if(so != INVALID_SOCKET)
+        Socket::state = AVAILABLE;
+}
+
+void TCPStream::endStream(void)
+{
+    if(bufsize)
+        sync();
+    if(gbuf)
+        delete[] gbuf;
+    if(pbuf)
+        delete[] pbuf;
+    gbuf = pbuf = NULL;
+    bufsize = 0;
+    iostream::clear();
+    endSocket();
+}
+
+void TCPStream::allocate(size_t size)
+{
+    if(size < 2) {
+        bufsize = 1;
+        gbuf = pbuf = 0;
+        return;
+    }
+
+    gbuf = new char[size];
+    pbuf = new char[size];
+    if(!pbuf || !gbuf) {
+        error(errResourceFailure, (char *)"Could not allocate socket stream buffers");
+        return;
+    }
+    bufsize = size;
+    iostream::clear();
+
+#if (defined(__GNUC__) && (__GNUC__ < 3)) && !defined(_MSWINDOWS_) && !defined(STLPORT)
+    setb(gbuf, gbuf + size, 0);
+#endif
+    setg(gbuf, gbuf + size, gbuf + size);
+    setp(pbuf, pbuf + size);
+}
+
+int TCPStream::doallocate()
+{
+    if(bufsize)
+        return 0;
+
+    allocate(1);
+    return 1;
+}
+
+int TCPStream::uflow()
+{
+    int ret = underflow();
+
+    if (ret == EOF)
+        return EOF;
+
+    if (bufsize != 1)
+        gbump(1);
+
+    return ret;
+}
+
+int TCPStream::underflow()
+{
+    ssize_t rlen = 1;
+    unsigned char ch;
+
+    if(bufsize == 1) {
+        if(Socket::state == STREAM)
+            rlen = ::read((int)so, (char *)&ch, 1);
+        else if(timeout && !Socket::isPending(pendingInput, timeout)) {
+            iostream::clear(ios::failbit | rdstate());
+            error(errTimeout,(char *)"Socket read timed out",socket_errno);
+            return EOF;
+        }
+        else
+            rlen = readData(&ch, 1);
+        if(rlen < 1) {
+            if(rlen < 0) {
+                iostream::clear(ios::failbit | rdstate());
+                error(errInput,(char *)"Could not read from socket",socket_errno);
+            }
+            return EOF;
+        }
+        return ch;
+    }
+
+    if(!gptr())
+        return EOF;
+
+    if(gptr() < egptr())
+        return (unsigned char)*gptr();
+
+    rlen = (ssize_t)((gbuf + bufsize) - eback());
+    if(Socket::state == STREAM)
+        rlen = ::read((int)so, (char *)eback(), _IOLEN64 rlen);
+    else if(timeout && !Socket::isPending(pendingInput, timeout)) {
+        iostream::clear(ios::failbit | rdstate());
+        error(errTimeout,(char *)"Socket read timed out",socket_errno);
+        return EOF;
+    }
+    else
+        rlen = readData(eback(), rlen);
+    if(rlen < 1) {
+//      clear(ios::failbit | rdstate());
+        if(rlen < 0)
+                        error(errNotConnected,(char *)"Connection error",socket_errno);
+        else {
+            error(errInput,(char *)"Could not read from socket",socket_errno);
+            iostream::clear(ios::failbit | rdstate());
+        }
+        return EOF;
+    }
+    error(errSuccess);
+
+    setg(eback(), eback(), eback() + rlen);
+    return (unsigned char) *gptr();
+}
+
+bool TCPStream::isPending(Pending pending, timeout_t timer)
+{
+    if(pending == pendingInput && in_avail())
+        return true;
+    else if(pending == pendingOutput)
+        flush();
+
+    return Socket::isPending(pending, timer);
+}
+
+int TCPStream::sync(void)
+{
+    overflow(EOF);
+    setg(gbuf, gbuf + bufsize, gbuf + bufsize);
+    return 0;
+}
+
+size_t TCPStream::printf(const char *format, ...)
+{
+    va_list args;
+    size_t len;
+    char *buf;
+
+    va_start(args, format);
+    overflow(EOF);
+    len = pptr() - pbase();
+    buf = pptr();
+    vsnprintf(buf, len, format, args);
+    va_end(args);
+    len = strlen(buf);
+    if(Socket::state == STREAM)
+        return ::write((int)so, buf, _IOLEN64 len);
+    else
+        return writeData(buf, len);
+}
+
+int TCPStream::overflow(int c)
+{
+    unsigned char ch;
+    ssize_t rlen, req;
+
+    if(bufsize == 1) {
+        if(c == EOF)
+            return 0;
+
+        ch = (unsigned char)(c);
+        if(Socket::state == STREAM)
+            rlen = ::write((int)so, (const char *)&ch, 1);
+        else
+            rlen = writeData(&ch, 1);
+        if(rlen < 1) {
+            if(rlen < 0) {
+                iostream::clear(ios::failbit | rdstate());
+                error(errOutput,(char *)"Could not write to socket",socket_errno);
+            }
+            return EOF;
+        }
+        else
+            return c;
+    }
+
+    if(!pbase())
+        return EOF;
+
+    req = (ssize_t)(pptr() - pbase());
+    if(req) {
+        if(Socket::state == STREAM)
+            rlen = ::write((int)so, (const char *)pbase(), req);
+        else
+            rlen = writeData(pbase(), req);
+        if(rlen < 1) {
+            if(rlen < 0) {
+                iostream::clear(ios::failbit | rdstate());
+                error(errOutput,(char *)"Could not write to socket",socket_errno);
+            }
+            return EOF;
+        }
+        req -= rlen;
+    }
+
+    // if write "partial", rebuffer remainder
+
+    if(req)
+//      memmove(pbuf, pptr() + rlen, req);
+        memmove(pbuf, pbuf + rlen, req);
+    setp(pbuf, pbuf + bufsize);
+    pbump(req);
+
+    if(c != EOF) {
+        *pptr() = (unsigned char)c;
+        pbump(1);
+    }
+    return c;
+}
+
+TCPSession::TCPSession(const IPV4Host &ia, tpport_t port, size_t size, int pri, size_t stack) :
+Thread(pri, stack), TCPStream(IPV4)
+{
+    setCompletion(false);
+    setError(false);
+    allocate(size);
+
+    size_t i;
+    for(i = 0 ; i < ia.getAddressCount(); i++) {
+        struct sockaddr_in addr;
+        memset(&addr, 0, sizeof(addr));
+        addr.sin_family = AF_INET;
+        addr.sin_addr = ia.getAddress(i);
+        addr.sin_port = htons(port);
+
+        // Win32 will crash if you try to connect to INADDR_ANY.
+        if ( INADDR_ANY == addr.sin_addr.s_addr )
+            addr.sin_addr.s_addr = INADDR_LOOPBACK;
+        if(::connect(so, (struct sockaddr *)&addr, (socklen_t)sizeof(addr)) == 0)
+            break;
+
+#ifdef _MSWINDOWS_
+        if(WSAGetLastError() == WSAEISCONN || WSAGetLastError() == WSAEWOULDBLOCK)
+#else
+        if(errno == EINPROGRESS)
+#endif
+        {
+            Socket::state = CONNECTING;
+            return;
+        }
+    }
+
+    if(i == ia.getAddressCount()) {
+        endSocket();
+        Socket::state = INITIAL;
+        return;
+    }
+
+    setCompletion(true);
+    Socket::state = CONNECTED;
+}
+
+#ifdef  CCXX_IPV6
+TCPSession::TCPSession(const IPV6Host &ia, tpport_t port, size_t size, int pri, size_t stack) :
+Thread(pri, stack), TCPStream(IPV6)
+{
+    setCompletion(false);
+    setError(false);
+    allocate(size);
+
+    size_t i;
+    for(i = 0 ; i < ia.getAddressCount(); i++) {
+        struct sockaddr_in6 addr;
+        memset(&addr, 0, sizeof(addr));
+        addr.sin6_family = AF_INET6;
+        addr.sin6_addr = ia.getAddress(i);
+        addr.sin6_port = htons(port);
+
+        // Win32 will crash if you try to connect to INADDR_ANY.
+        if(!memcmp(&addr.sin6_addr, &in6addr_any, sizeof(in6addr_any)))
+            memcpy(&addr.sin6_addr, &in6addr_loopback, sizeof(in6addr_loopback));
+        if(::connect(so, (struct sockaddr *)&addr, (socklen_t)sizeof(addr)) == 0)
+            break;
+
+#ifdef _MSWINDOWS_
+//      if(WSAGetLastError() == WSAEWOULDBLOCK)
+        if(WSAGetLastError() == WSAEISCONN)
+#else
+        if(errno == EINPROGRESS)
+#endif
+        {
+            Socket::state = CONNECTING;
+            return;
+        }
+    }
+
+    if(i == ia.getAddressCount()) {
+        endSocket();
+        Socket::state = INITIAL;
+        return;
+    }
+
+    setCompletion(true);
+    Socket::state = CONNECTED;
+}
+#endif
+
+TCPSession::TCPSession(TCPSocket &s, int pri, size_t stack) :
+Thread(pri, stack), TCPStream(s)
+{
+    setCompletion(true);
+    setError(false);
+}
+
+#ifdef  CCXX_IPV6
+TCPSession::TCPSession(TCPV6Socket &s, int pri, size_t stack) :
+Thread(pri, stack), TCPStream(s)
+{
+    setCompletion(true);
+    setError(false);
+}
+#endif
+
+TCPSession::~TCPSession()
+{
+    endStream();
+}
+
+int TCPSession::waitConnection(timeout_t timer)
+{
+    int sockopt = 0;
+    socklen_t len = sizeof(sockopt);
+
+    switch(Socket::state) {
+    case INITIAL:
+        return -1;
+    case CONNECTED:
+        break;
+    case CONNECTING:
+        if(!Socket::isPending(pendingOutput, timer)) {
+            endSocket();
+            Socket::state = INITIAL;
+            return -1;
+        }
+
+        getsockopt(so, SOL_SOCKET, SO_ERROR, (char *)&sockopt, &len);
+        if(sockopt) {
+            endSocket();
+            Socket::state = INITIAL;
+            return -1;
+        }
+    default:
+        break;
+    }
+    Socket::state = CONNECTED;
+    return 0;
+}
+
+void TCPSession::initial(void)
+{
+    if(waitConnection(60000))
+        exit();
+}
+
+
diff --git a/jni/libucommon/sources/commoncpp/thread.cpp b/jni/libucommon/sources/commoncpp/thread.cpp
new file mode 100644
index 0000000..1cbf693
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/thread.cpp
@@ -0,0 +1,943 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#include <ucommon-config.h>
+#include <commoncpp/config.h>
+#include <commoncpp/export.h>
+#include <commoncpp/string.h>
+#include <commoncpp/exception.h>
+#include <commoncpp/thread.h>
+
+#ifdef  _MSWINDOWS_
+#define MAX_SEM_VALUE 1000000
+#endif
+
+using namespace COMMONCPP_NAMESPACE;
+
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+extern int _posix_clocking;
+#endif
+
+static class __EXPORT MainThread : public Thread
+{
+private:
+    void run(void);
+
+public:
+    MainThread();
+
+    ~MainThread();
+} _mainthread;
+
+extern "C" {
+#ifdef  _MSWINDOWS_
+    static unsigned __stdcall exec_thread(void *obj) {
+        assert(obj != NULL);
+
+        ucommon::Thread *th = static_cast<ucommon::Thread *>(obj);
+        Thread *cth = static_cast<Thread *>(obj);
+        th->setPriority();
+        cth->map();
+        cth->initial();
+        cth->run();
+        cth->finalize();
+        cth->exit();
+        return 0;
+    }
+#else
+    static void *exec_thread(void *obj)
+    {
+        assert(obj != NULL);
+
+        ucommon::Thread *th = static_cast<ucommon::Thread *>(obj);
+        Thread *cth = static_cast<Thread *>(obj);
+        th->setPriority();
+        cth->map();
+        cth->initial();
+        cth->run();
+        cth->finalize();
+        cth->exit();
+        return NULL;
+    }
+#endif
+}
+
+MainThread::MainThread() : Thread()
+{
+    ucommon::Thread::init();
+    ucommon::Socket::init();
+    map();
+}
+
+MainThread::~MainThread()
+{
+}
+
+void MainThread::run(void)
+{
+}
+
+Thread::Thread(int pri, size_t stack) : ucommon::JoinableThread(stack)
+{
+    priority = pri;
+    detached = false;
+    terminated = false;
+    msgpos = 0;
+
+    if(this == &_mainthread) {
+        parent = this;
+        exceptions = throwObject;
+    }
+    else {
+        parent = Thread::get();
+        if(!parent)
+            parent = &_mainthread;
+        exceptions = parent->exceptions;
+    }
+}
+
+Thread::~Thread()
+{
+    if(!detached)
+        join();
+    finalize();
+}
+
+bool Thread::isRunning(void)
+{
+    return !detached && running && !terminated;
+}
+
+void Thread::finalize(void)
+{
+    if(terminated)
+        return;
+
+    terminated = true;
+    if(parent)
+        parent->notify(this);
+    final();
+}
+
+bool Thread::isThread(void)
+{
+    pthread_t self = pthread_self();
+
+    if(equal(tid, self))
+        return true;
+
+    return false;
+}
+
+void Thread::terminate(void)
+{
+    pthread_t self = pthread_self();
+
+    if(detached && equal(tid, self))
+        ucommon::Thread::exit();
+    else if(!detached)
+        join();
+}
+
+void Thread::exit(void)
+{
+    pthread_t self = pthread_self();
+
+    if(detached && equal(tid, self)) {
+        delete this;
+        ucommon::Thread::exit();
+    }
+    terminate();
+}
+
+void Thread::initial(void)
+{
+}
+
+void Thread::final(void)
+{
+}
+
+void Thread::notify(Thread *thread)
+{
+}
+
+#ifdef  _MSWINDOWS_
+
+void Thread::start(void)
+{
+    if(running != INVALID_HANDLE_VALUE)
+        return;
+
+    if(stack == 1)
+        stack = 1024;
+
+    running = (HANDLE)_beginthreadex(NULL, stack, &exec_thread, this, 0, (unsigned int *)&tid);
+    if(!running)
+        running = INVALID_HANDLE_VALUE;
+    else
+        terminated = false;
+}
+
+void Thread::detach(void)
+{
+    HANDLE hThread;;
+
+    if(stack == 1)
+        stack = 1024;
+
+    hThread = (HANDLE)_beginthreadex(NULL, stack, &exec_thread, this, 0, (unsigned int *)&tid);
+    CloseHandle(hThread);
+}
+
+#else
+
+void Thread::start(void)
+{
+    int result;
+
+    if(running)
+        return;
+
+#ifndef __PTH__
+    pthread_attr_t attr;
+    pthread_attr_init(&attr);
+    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+    #ifndef ANDROID
+    pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);
+    #endif
+#endif
+// we typically use "stack 1" for min stack...
+#ifdef  PTHREAD_STACK_MIN
+    if(stack && stack < PTHREAD_STACK_MIN)
+        stack = PTHREAD_STACK_MIN;
+#else
+    if(stack && stack < 2)
+        stack = 0;
+#endif
+#ifdef  __PTH__
+    pth_attr_t attr = PTH_ATTR_DEFAULT;
+    pth_attr_set(attr, PTH_ATTR_JOINABLE);
+    tid = pth_spawn(attr, &exec_thread, this);
+#else
+    if(stack)
+        pthread_attr_setstacksize(&attr, stack);
+    result = pthread_create(&tid, &attr, &exec_thread, this);
+    pthread_attr_destroy(&attr);
+    if(!result) {
+        terminated = false;
+        running = true;
+    }
+#endif
+}
+
+void Thread::detach(void)
+{
+#ifndef __PTH__
+    pthread_attr_t attr;
+    pthread_attr_init(&attr);
+    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+    #ifndef ANDROID
+    pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);
+    #endif
+#endif
+// we typically use "stack 1" for min stack...
+#ifdef  PTHREAD_STACK_MIN
+    if(stack && stack < PTHREAD_STACK_MIN)
+        stack = PTHREAD_STACK_MIN;
+#else
+    if(stack && stack < 2)
+        stack = 0;
+#endif
+#ifdef  __PTH__
+    tid = pth_spawn(PTH_ATTR_DEFAULT, &exec_thread, this);
+#else
+    if(stack)
+        pthread_attr_setstacksize(&attr, stack);
+    pthread_create(&tid, &attr, &exec_thread, this);
+    pthread_attr_destroy(&attr);
+#endif
+}
+
+#endif
+
+Thread::Throw Thread::getException(void)
+{
+    Thread *th = Thread::get();
+    if(!th)
+        return throwNothing;
+    return th->exceptions;
+}
+
+void Thread::setException(Thread::Throw _throw)
+{
+    Thread *th = Thread::get();
+    if(th)
+        th->exceptions = _throw;
+}
+
+void Conditional::signal(bool broadcast)
+{
+    if(broadcast)
+        ucommon::Conditional::broadcast();
+    else
+        ucommon::Conditional::signal();
+}
+
+bool Conditional::wait(timeout_t timeout, bool locked)
+{
+    bool result;
+    if(!locked)
+        ucommon::Conditional::lock();
+    result = ucommon::Conditional::wait(timeout);
+    if(!locked)
+        ucommon::Conditional::unlock();
+    return result;
+}
+
+static pthread_mutex_t mlock;
+
+time_t SysTime::getTime(time_t *tloc)
+{
+    time_t ret;
+    pthread_mutex_lock(&mlock);
+    time_t temp;
+    ::time(&temp);
+    memcpy(&ret, &temp, sizeof(time_t));
+    if (tloc != NULL)
+        memcpy(tloc, &ret, sizeof(time_t));
+    pthread_mutex_unlock(&mlock);
+    return ret;
+}
+
+int SysTime::getTimeOfDay(struct timeval *tp)
+{
+    struct timeval temp;
+    int ret(0);
+    pthread_mutex_lock(&mlock);
+
+#ifdef  _MSWINDOWS_
+    // We could use _ftime(), but it is not available on WinCE.
+    // (WinCE also lacks time.h)
+    // Note also that the average error of _ftime is around 20 ms :)
+    time_t now;
+    time(&now);
+    temp.tv_sec = (long)now;
+    temp.tv_usec = (GetTickCount() % 1000) * 1000;
+    memcpy(tp, &temp, sizeof(struct timeval));
+#else
+    ret = ::gettimeofday(&temp, NULL);
+    if(ret == 0)
+        memcpy(tp, &temp, sizeof(struct timeval));
+#endif
+
+    pthread_mutex_unlock(&mlock);
+    return ret;
+}
+
+struct tm *SysTime::getLocalTime(const time_t *clock, struct tm* result)
+{
+    pthread_mutex_lock(&mlock);
+    struct tm *temp = ::localtime(clock);
+    memcpy(result, temp, sizeof(struct tm));
+    pthread_mutex_unlock(&mlock);
+    return result;
+}
+
+struct tm *SysTime::getGMTTime(const time_t *clock, struct tm* result)
+{
+    pthread_mutex_lock(&mlock);
+    struct tm *temp = ::gmtime(clock);
+    memcpy(result, temp, sizeof(struct tm));
+    pthread_mutex_unlock(&mlock);
+    return result;
+}
+
+#ifndef _MSWINDOWS_
+
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+TimerPort::TimerPort()
+{
+    struct timespec ts;
+    active = false;
+
+    ::clock_gettime(_posix_clocking, &ts);
+    timer.tv_sec = ts.tv_sec;
+    timer.tv_usec = ts.tv_nsec / 1000;
+}
+#else
+TimerPort::TimerPort()
+{
+    active = false;
+       SysTime::getTimeOfDay(&timer);
+}
+#endif
+
+void TimerPort::setTimer(timeout_t timeout)
+{
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+    struct timespec ts;
+    ::clock_gettime(_posix_clocking, &ts);
+    timer.tv_sec = ts.tv_sec;
+    timer.tv_usec = ts.tv_nsec / 1000l;
+#else
+       SysTime::getTimeOfDay(&timer);
+#endif
+    active = false;
+    if(timeout)
+        incTimer(timeout);
+}
+
+void TimerPort::incTimer(timeout_t timeout)
+{
+    int secs = timeout / 1000;
+    int usecs = (timeout % 1000) * 1000;
+
+    timer.tv_usec += usecs;
+    if(timer.tv_usec >= 1000000l) {
+        ++timer.tv_sec;
+        timer.tv_usec %= 1000000l;
+    }
+    timer.tv_sec += secs;
+    active = true;
+}
+
+void TimerPort::decTimer(timeout_t timeout)
+{
+    int secs = timeout / 1000;
+    int usecs = (timeout % 1000) * 1000;
+
+    if(timer.tv_usec < usecs) {
+        --timer.tv_sec;
+        timer.tv_usec = 1000000l + timer.tv_usec - usecs;
+    }
+    else
+        timer.tv_usec -= usecs;
+
+    timer.tv_sec -= secs;
+    active = true;
+}
+
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+void TimerPort::sleepTimer(void)
+{
+    struct timespec ts;
+    ts.tv_sec = timer.tv_sec;
+    ts.tv_nsec = timer.tv_usec * 1000l;
+
+    ::clock_nanosleep(_posix_clocking, TIMER_ABSTIME, &ts, NULL);
+}
+#else
+void TimerPort::sleepTimer(void)
+{
+    timeout_t remaining = getTimer();
+    if(remaining && remaining != TIMEOUT_INF)
+        Thread::sleep(remaining);
+}
+#endif
+
+void TimerPort::endTimer(void)
+{
+    active = false;
+}
+
+timeout_t TimerPort::getTimer(void) const
+{
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+    struct timespec now;
+#else
+    struct timeval now;
+#endif
+    long diff;
+
+    if(!active)
+        return TIMEOUT_INF;
+
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+    ::clock_gettime(_posix_clocking, &now);
+    diff = (timer.tv_sec - now.tv_sec) * 1000l;
+    diff += (timer.tv_usec - (now.tv_nsec / 1000)) / 1000l;
+#else
+       SysTime::getTimeOfDay(&now);
+    diff = (timer.tv_sec - now.tv_sec) * 1000l;
+    diff += (timer.tv_usec - now.tv_usec) / 1000l;
+#endif
+
+    if(diff < 0)
+        return 0l;
+
+    return diff;
+}
+
+timeout_t TimerPort::getElapsed(void) const
+{
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+    struct timespec now;
+#else
+    struct timeval now;
+#endif
+    long diff;
+
+    if(!active)
+        return TIMEOUT_INF;
+
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+    ::clock_gettime(_posix_clocking, &now);
+    diff = (now.tv_sec - timer.tv_sec) * 1000l;
+    diff += ((now.tv_nsec / 1000l) - timer.tv_usec) / 1000l;
+#else
+       SysTime::getTimeOfDay(&now);
+    diff = (now.tv_sec -timer.tv_sec) * 1000l;
+    diff += (now.tv_usec - timer.tv_usec) / 1000l;
+#endif
+    if(diff < 0)
+        return 0;
+    return diff;
+}
+#else // WIN32
+TimerPort::TimerPort()
+{
+    active = false;
+    timer = GetTickCount();
+}
+
+void TimerPort::setTimer(timeout_t timeout)
+{
+    timer = GetTickCount();
+    active = false;
+    if(timeout)
+        incTimer(timeout);
+}
+
+void TimerPort::incTimer(timeout_t timeout)
+{
+    timer += timeout;
+    active = true;
+}
+
+void TimerPort::decTimer(timeout_t timeout)
+{
+    timer -= timeout;
+    active = true;
+}
+
+void TimerPort::sleepTimer(void)
+{
+    timeout_t remaining = getTimer();
+    if(remaining && remaining != TIMEOUT_INF)
+        Thread::sleep(remaining);
+}
+
+void TimerPort::endTimer(void)
+{
+    active = false;
+}
+
+timeout_t TimerPort::getTimer(void) const
+{
+    DWORD now;
+    long diff;
+
+    if(!active)
+        return TIMEOUT_INF;
+
+    now = GetTickCount();
+    diff = timer - now;
+
+    if(diff < 0)
+        return 0l;
+
+    return diff;
+}
+
+timeout_t TimerPort::getElapsed(void) const
+{
+    DWORD now;
+    long diff;
+
+    if(!active)
+        return TIMEOUT_INF;
+
+    now = GetTickCount();
+    diff = now - timer;
+
+    if(diff < 0)
+        return 0l;
+
+    return diff;
+}
+#endif
+
+MutexCounter::MutexCounter() : Mutex()
+{
+    counter = 0;
+}
+
+MutexCounter::MutexCounter(int initial) : Mutex()
+{
+    counter = initial;
+}
+
+int MutexCounter::operator++()
+{
+    int rtn;
+
+    enterMutex();
+    rtn = counter++;
+    leaveMutex();
+    return rtn;
+}
+
+// ??? why cannot be < 0 ???
+int MutexCounter::operator--()
+{
+    int rtn = 0;
+
+    enterMutex();
+    if(counter) {
+        rtn = --counter;
+        if(!rtn) {
+            leaveMutex();
+            THROW(mc);
+        }
+    }
+    leaveMutex();
+    return rtn;
+}
+
+#ifndef _MSWINDOWS_
+
+timespec *getTimeout(struct timespec *spec, timeout_t timer)
+{
+    static  struct timespec myspec;
+
+    if(spec == NULL)
+        spec = &myspec;
+
+#ifdef  PTHREAD_GET_EXPIRATION_NP
+    struct timespec offset;
+
+    offset.tv_sec = timer / 1000;
+    offset.tv_nsec = (timer % 1000) * 1000000;
+    pthread_get_expiration_np(&offset, spec);
+#else
+    struct timeval current;
+
+    SysTime::getTimeOfDay(&current);
+    spec->tv_sec = current.tv_sec + ((timer + current.tv_usec / 1000) / 1000);
+    spec->tv_nsec = ((current.tv_usec / 1000 + timer) % 1000) * 1000000;
+
+#endif
+    return spec;
+}
+
+#endif
+
+const size_t Buffer::timeout = ((size_t)(-1l));
+
+#ifdef  _MSWINDOWS_
+Buffer::Buffer(size_t capacity) : Mutex()
+#else
+Buffer::Buffer(size_t capacity) : Conditional()
+#endif
+{
+#ifdef  _MSWINDOWS_
+    sem_head = ::CreateSemaphore((LPSECURITY_ATTRIBUTES)NULL, 0, MAX_SEM_VALUE, (LPCTSTR)NULL);
+    sem_tail = ::CreateSemaphore((LPSECURITY_ATTRIBUTES)NULL, (LONG)capacity, MAX_SEM_VALUE, (LPCTSTR)NULL);
+#endif
+    _size = capacity;
+    _used = 0;
+}
+
+Buffer::~Buffer()
+{
+#ifdef  _MSWINDOWS_
+    ::CloseHandle(sem_head);
+    ::CloseHandle(sem_tail);
+#endif
+}
+
+#ifdef  _MSWINDOWS_
+
+size_t Buffer::wait(void *buf, timeout_t timeout)
+{
+    size_t  rc;
+
+    if(!timeout)
+            timeout = INFINITE;
+    if(WaitForSingleObject(sem_head, timeout) != WAIT_OBJECT_0)
+        return Buffer::timeout;
+    enterMutex();
+    rc = onWait(buf);
+    --_used;
+    leaveMutex();
+    ::ReleaseSemaphore(sem_tail, 1, (LPLONG)NULL);
+    return rc;
+}
+
+size_t Buffer::post(void *buf, timeout_t timeout)
+{
+    size_t  rc;
+
+    if(!timeout)
+            timeout = INFINITE;
+
+    if(WaitForSingleObject(sem_tail, timeout) != WAIT_OBJECT_0)
+        return Buffer::timeout;
+    enterMutex();
+    rc = onPost(buf);
+    ++_used;
+    leaveMutex();
+    ::ReleaseSemaphore(sem_head, 1, (LPLONG)NULL);
+    return rc;
+}
+
+#else
+
+size_t Buffer::wait(void *buf, timeout_t timeout)
+{
+    size_t rc = 0;
+    enterMutex();
+    while(!_used) {
+        if(!Conditional::wait(timeout, true)) {
+            leaveMutex();
+            return Buffer::timeout;
+        }
+    }
+    rc = (ssize_t)onWait(buf);
+    --_used;
+    Conditional::signal(false);
+    leaveMutex();
+    return rc;
+}
+
+size_t Buffer::post(void *buf, timeout_t timeout)
+{
+    size_t rc = 0;
+
+    enterMutex();
+    while(_used == _size) {
+        if(!Conditional::wait(timeout, true)) {
+            leaveMutex();
+            return Buffer::timeout;
+        }
+    }
+    rc = (ssize_t)onPost(buf);
+    ++_used;
+    Conditional::signal(false);
+    leaveMutex();
+    return rc;
+}
+
+size_t Buffer::peek(void *buf)
+{
+    size_t rc;
+
+    enterMutex();
+    if(!_used) {
+        leaveMutex();
+        return 0;
+    }
+    rc = onPeek(buf);
+    leaveMutex();
+    return rc;
+}
+
+#endif
+
+bool Buffer::isValid(void)
+{
+    return true;
+}
+
+FixedBuffer::FixedBuffer(size_t capacity, size_t osize) :
+Buffer(capacity)
+{
+    objsize = osize;
+    buf = new char[capacity * objsize];
+
+#ifdef  CCXX_EXCEPTIONS
+    if(!buf && Thread::getException() == Thread::throwObject)
+        throw(this);
+    else if(!buf && Thread::getException() == Thread::throwException)
+        throw(SyncException("fixed buffer failure"));
+#endif
+
+    head = tail = buf;
+}
+
+FixedBuffer::~FixedBuffer()
+{
+    if(buf)
+        delete[] buf;
+}
+
+bool FixedBuffer::isValid(void)
+{
+    if(head && tail)
+        return true;
+
+    return false;
+}
+
+#define MAXBUF  (buf + (getSize() * objsize))
+
+size_t FixedBuffer::onWait(void *data)
+{
+    memcpy(data, head, objsize);
+    if((head += objsize) >= MAXBUF)
+        head = buf;
+    return objsize;
+}
+
+size_t FixedBuffer::onPost(void *data)
+{
+    memcpy(tail, data, objsize);
+    if((tail += objsize) >= MAXBUF)
+        tail = buf;
+    return objsize;
+}
+
+size_t FixedBuffer::onPeek(void *data)
+{
+    memcpy(data, head, objsize);
+    return objsize;
+}
+
+ThreadQueue::ThreadQueue(const char *id, int pri, size_t stack) :
+Mutex(), Thread(pri, stack), Semaphore(0), name(id)
+{
+    first = last = NULL;
+    started = false;
+    timeout = 0;
+}
+
+ThreadQueue::~ThreadQueue()
+{
+    data_t *data, *next;
+    if(started) {
+        started = false;
+    }
+    data = first;
+    while(data) {
+        next = data->next;
+        delete[] data;
+        data = next;
+    }
+}
+
+void ThreadQueue::run(void)
+{
+    bool posted;
+    data_t *prev;
+    started = true;
+    for(;;) {
+        posted = Semaphore::wait(timeout);
+        if(!posted) {
+            onTimer();
+            if(!first)
+                continue;
+        }
+        if(!started)
+            sleep((timeout_t)~0);
+        startQueue();
+        while(first) {
+            runQueue(first->data);
+            enterMutex();
+            prev = first;
+            first = first->next;
+            delete[] prev;
+            if(!first)
+                last = NULL;
+            leaveMutex();
+            if(first)
+                Semaphore::wait(); // demark semaphore
+        }
+        stopQueue();
+    }
+}
+
+void ThreadQueue::final()
+{
+}
+
+void ThreadQueue::onTimer(void)
+{
+}
+
+void ThreadQueue::setTimer(timeout_t timed)
+{
+    enterMutex();
+    timeout = timed;
+    leaveMutex();
+    if(!started) {
+        start();
+        started = true;
+    }
+    else if(!first)
+        Semaphore::post();
+}
+
+void ThreadQueue::post(const void *dp, unsigned len)
+{
+    data_t *data = (data_t *)new char[sizeof(data_t) + len];
+    memcpy(data->data, dp, len);
+    data->len = len;
+    data->next = NULL;
+    enterMutex();
+    if(!first)
+        first = data;
+    if(last)
+        last->next = data;
+    last = data;
+    if(!started) {
+        start();
+        started = true;
+    }
+    leaveMutex();
+    Semaphore::post();
+}
+
+void ThreadQueue::startQueue(void)
+{
+}
+
+void ThreadQueue::stopQueue(void)
+{
+}
+
diff --git a/jni/libucommon/sources/commoncpp/tokenizer.cpp b/jni/libucommon/sources/commoncpp/tokenizer.cpp
new file mode 100644
index 0000000..9f3d781
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/tokenizer.cpp
@@ -0,0 +1,147 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#include <ucommon-config.h>
+#include <commoncpp/config.h>
+#include <commoncpp/export.h>
+#include <commoncpp/string.h>
+#include <commoncpp/exception.h>
+#include <commoncpp/thread.h>
+#include <commoncpp/tokenizer.h>
+#include <cstdlib>
+#include <cstdio>
+
+NAMESPACE_COMMONCPP
+using namespace std;
+
+// sorted by the usual probability of occurence
+// see also: manpage of isspace()
+const char * const StringTokenizer::SPACE=" \t\n\r\f\v";
+
+StringTokenizer::StringTokenizer (const char *_str, const char *_delim, bool _skipAll, bool _trim) :
+str(_str),delim(_delim),skipAll(_skipAll),trim(_trim)
+{
+    if (str == 0)
+        itEnd = iterator(*this, 0);
+    else
+        itEnd = iterator(*this,strchr(str, '\0')+1);
+}
+
+StringTokenizer::StringTokenizer (const char *s) :
+str(s), delim(SPACE), skipAll(false),trim(true)
+{
+    if (str == 0)
+        itEnd = iterator(*this, 0);
+    else
+        itEnd = iterator(*this,strchr(str, '\0')+1);
+}
+
+
+StringTokenizer::iterator& StringTokenizer::iterator::operator ++ () THROWS (StringTokenizer::NoSuchElementException)
+{
+
+    // someone requested to read beyond the end .. tsts
+    if (endp == myTok->itEnd.endp)
+        THROW (NoSuchElementException());
+
+    if (token) {
+        // this is to help people find their bugs, if they
+        // still maintain a pointer to this invalidated
+        // area :-)
+        *token = '\0';
+        delete[] token;
+        token = 0;
+    }
+
+    start = ++endp;
+    if (endp == myTok->itEnd.endp) return *this; // done
+
+    // search for next delimiter
+    while (*endp && strchr(myTok->delim, *endp)==NULL)
+        ++endp;
+
+    tokEnd = endp;
+
+    if (*endp && myTok->skipAll) { // skip all delimiters
+        while (*(endp+1) && strchr(myTok->delim, *(endp+1)))
+            ++endp;
+    }
+    return *this;
+}
+
+/*
+ * if no one requests the token, no time is spent skipping the whitespaces
+ * or allocating memory.
+ */
+const char * StringTokenizer::iterator::operator * () THROWS (StringTokenizer::NoSuchElementException)
+{
+    // someone requested to read beyond the end .. tsts
+    if (endp == myTok->itEnd.endp)
+        THROW (NoSuchElementException());
+
+    if (!token) {
+        /*
+         * someone requests this token; return a copy to provide
+         * a NULL terminated string.
+         */
+
+        /* don't clobber tokEnd, it is used in nextDelimiter() */
+        const char *wsTokEnd = tokEnd;
+        if (myTok->trim) {
+            while (wsTokEnd > start && strchr(SPACE, *start))
+                ++start;
+            while (wsTokEnd > start && strchr(SPACE,*(wsTokEnd-1)))
+                --wsTokEnd;
+        }
+        size_t tokLen = wsTokEnd - start;
+        if (start > wsTokEnd) {
+            tokLen = 0;
+        }
+        token = newString(start, tokLen + 1);
+    }
+    return token;
+}
+
+END_NAMESPACE
+
+/** EMACS **
+ * Local variables:
+ * mode: c++
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/jni/libucommon/sources/commoncpp/udp.cpp b/jni/libucommon/sources/commoncpp/udp.cpp
new file mode 100644
index 0000000..fd84156
--- /dev/null
+++ b/jni/libucommon/sources/commoncpp/udp.cpp
@@ -0,0 +1,924 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+#include <ucommon-config.h>
+#include <commoncpp/config.h>
+#include <commoncpp/export.h>
+#include <commoncpp/string.h>
+#include <commoncpp/socket.h>
+#include <commoncpp/udp.h>
+
+#ifdef _MSWINDOWS_
+#include <io.h>
+#define _IOLEN64    (unsigned)
+#define _IORET64    (int)
+typedef int socklen_t;
+
+#define socket_errno    WSAGetLastError()
+#else
+#include <sys/ioctl.h>
+#include <netinet/tcp.h>
+#ifdef HAVE_NET_IP6_H
+#include <netinet/ip6.h>
+#endif
+#define socket_errno errno
+# ifndef  O_NONBLOCK
+#  define O_NONBLOCK    O_NDELAY
+# endif
+# ifdef IPPROTO_IP
+#  ifndef  SOL_IP
+#   define SOL_IP   IPPROTO_IP
+#  endif // !SOL_IP
+# endif  // IPPROTO_IP
+#endif   // !WIN32
+
+#ifndef INADDR_LOOPBACK
+#define INADDR_LOOPBACK (unsigned long)0x7f000001
+#endif
+
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+
+#if defined(__hpux)
+#define _XOPEN_SOURCE_EXTENDED
+#endif
+
+#ifdef  HAVE_NET_IF_H
+#include <net/if.h>
+#endif
+
+#ifndef _IOLEN64
+#define _IOLEN64
+#endif
+
+#ifndef _IORET64
+#define _IORET64
+#endif
+
+using namespace COMMONCPP_NAMESPACE;
+
+#ifdef  HAVE_GETADDRINFO
+
+UDPSocket::UDPSocket(const char *name, Family fam) :
+Socket(fam, SOCK_DGRAM, IPPROTO_UDP)
+{
+    char namebuf[128], *cp;
+    struct addrinfo hint, *list = NULL, *first;
+
+    family = fam;
+
+    switch(fam) {
+#ifdef  CCXX_IPV6
+    case IPV6:
+        peer.ipv6.sin6_family = family;
+        break;
+#endif
+    case IPV4:
+        peer.ipv4.sin_family = family;
+    }
+
+    snprintf(namebuf, sizeof(namebuf), "%s", name);
+    cp = strrchr(namebuf, '/');
+    if(!cp && family == IPV4)
+        cp = strrchr(namebuf, ':');
+
+    if(!cp) {
+        cp = namebuf;
+        name = NULL;
+    }
+    else {
+        name = namebuf;
+        *(cp++) = 0;
+        if(!strcmp(name, "*"))
+            name = NULL;
+    }
+
+    memset(&hint, 0, sizeof(hint));
+
+    hint.ai_family = family;
+    hint.ai_socktype = SOCK_DGRAM;
+    hint.ai_protocol = IPPROTO_UDP;
+    hint.ai_flags = AI_PASSIVE;
+
+    if(getaddrinfo(name, cp, &hint, &list) || !list) {
+        error(errBindingFailed, (char *)"Could not find service", errno);
+        endSocket();
+        return;
+    }
+
+#if defined(SO_REUSEADDR)
+    int opt = 1;
+    setsockopt(so, SOL_SOCKET, SO_REUSEADDR, (char *)&opt,
+        (socklen_t)sizeof(opt));
+#endif
+
+    first = list;
+
+    while(list) {
+        if(!bind(so, list->ai_addr, (socklen_t)list->ai_addrlen)) {
+            state = BOUND;
+            break;
+        }
+        list = list->ai_next;
+    }
+    freeaddrinfo(first);
+
+    if(state != BOUND) {
+        endSocket();
+        error(errBindingFailed, (char *)"Count not bind socket", errno);
+        return;
+    }
+}
+
+#else
+
+UDPSocket::UDPSocket(const char *name, Family fam) :
+Socket(fam, SOCK_DGRAM, IPPROTO_UDP)
+{
+    char namebuf[128], *cp;
+    tpport_t port = 0;
+    struct servent *svc = NULL;
+    socklen_t alen = 0;
+    struct sockaddr *addr = NULL;
+
+    family = fam;
+
+    snprintf(namebuf, sizeof(namebuf), "%s", name);
+    cp = strrchr(namebuf, '/');
+    if(!cp && family == IPV4)
+        cp = strrchr(namebuf, ':');
+
+    if(!cp) {
+        cp = namebuf;
+        name = "*";
+    }
+    else {
+        name = namebuf;
+        *(cp++) = 0;
+    }
+
+    if(isdigit(*cp))
+        port = atoi(cp);
+    else {
+        mutex.enter();
+        svc = getservbyname(cp, "udp");
+        if(svc)
+            port = ntohs(svc->s_port);
+        mutex.leave();
+        if(!svc) {
+            error(errBindingFailed, (char *)"Could not find service", errno);
+            endSocket();
+            return;
+        }
+    }
+
+    struct sockaddr_in addr4;
+    IPV4Address ia4(name);
+#ifdef  CCXX_IPV6
+    struct sockaddr_in6 addr6;
+    IPV6Address ia6(name);
+#endif
+
+    switch(family) {
+#ifdef  CCXX_IPV6
+    case IPV6:
+        peer.ipv6.sin6_family = family;
+        memset(&addr6, 0, sizeof(addr6));
+        addr6.sin6_family = family;
+        addr6.sin6_addr = ia6.getAddress();
+        addr6.sin6_port = htons(port);
+        alen = sizeof(addr6);
+        addr = (struct sockaddr *)&addr6;
+        break;
+#endif
+    case IPV4:
+        peer.ipv4.sin_family = family;
+        memset(&addr4, 0, sizeof(addr4));
+        addr4.sin_family = family;
+        addr4.sin_addr = ia4.getAddress();
+        addr4.sin_port = htons(port);
+        alen = sizeof(&addr4);
+        addr = (struct sockaddr *)&addr4;
+    }
+
+#if defined(SO_REUSEADDR)
+    int opt = 1;
+    setsockopt(so, SOL_SOCKET, SO_REUSEADDR, (char *)&opt,
+        (socklen_t)sizeof(opt));
+#endif
+
+    if(addr && !bind(so, addr, alen))
+        state = BOUND;
+
+    if(state != BOUND) {
+        endSocket();
+        error(errBindingFailed, (char *)"Count not bind socket", errno);
+        return;
+    }
+}
+
+#endif
+
+UDPSocket::UDPSocket(Family fam) :
+Socket(fam, SOCK_DGRAM, IPPROTO_UDP)
+{
+    family = fam;
+    memset(&peer, 0, sizeof(peer));
+    switch(fam) {
+#ifdef  CCXX_IPV6
+    case IPV6:
+        peer.ipv6.sin6_family = family;
+        break;
+#endif
+    case IPV4:
+        peer.ipv4.sin_family = family;
+    }
+}
+
+UDPSocket::UDPSocket(const IPV4Address &ia, tpport_t port) :
+Socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)
+{
+    family = IPV4;
+    memset(&peer.ipv4, 0, sizeof(peer));
+    peer.ipv4.sin_family = AF_INET;
+    peer.ipv4.sin_addr = ia.getAddress();
+    peer.ipv4.sin_port = htons(port);
+#if defined(SO_REUSEADDR)
+    int opt = 1;
+    setsockopt(so, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, (socklen_t)sizeof(opt));
+#endif
+    if(bind(so, (struct sockaddr *)&peer.ipv4, sizeof(peer.ipv4))) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not bind socket",socket_errno);
+        return;
+    }
+    state = BOUND;
+}
+
+#ifdef  CCXX_IPV6
+UDPSocket::UDPSocket(const IPV6Address &ia, tpport_t port) :
+Socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP)
+{
+    family = IPV6;
+    memset(&peer.ipv6, 0, sizeof(peer));
+    peer.ipv6.sin6_family = AF_INET6;
+    peer.ipv6.sin6_addr = ia.getAddress();
+    peer.ipv6.sin6_port = htons(port);
+#if defined(SO_REUSEADDR)
+    int opt = 1;
+    setsockopt(so, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, (socklen_t)sizeof(opt));
+#endif
+    if(bind(so, (struct sockaddr *)&peer.ipv6, sizeof(peer.ipv6))) {
+        endSocket();
+        error(errBindingFailed,(char *)"Could not bind socket",socket_errno);
+        return;
+    }
+    state = BOUND;
+}
+#endif
+
+UDPSocket::~UDPSocket()
+{
+    endSocket();
+}
+
+ssize_t UDPSocket::send(const void *buf, size_t len)
+{
+    struct sockaddr *addr = NULL;
+    socklen_t alen = 0;
+
+    switch(family) {
+#ifdef  CCXX_IPV6
+    case IPV6:
+        addr = (struct sockaddr *)&peer.ipv6;
+        alen = sizeof(struct sockaddr_in6);
+        break;
+#endif
+    case IPV4:
+        addr = (struct sockaddr *)&peer.ipv4;
+        alen = sizeof(struct sockaddr_in);
+        break;
+    default:
+        return -1;
+    }
+
+    if(isConnected()) {
+        addr = NULL;
+        alen = 0;
+    }
+
+    return _IORET64 ::sendto(so, (const char *)buf, _IOLEN64 len, MSG_NOSIGNAL, addr, alen);
+}
+
+ssize_t UDPSocket::receive(void *buf, size_t len, bool reply)
+{
+    struct sockaddr *addr = NULL;
+    struct sockaddr_in senderAddress;  // DMC 2/7/05 ADD for use below.
+    socklen_t alen = 0;
+
+    switch(family) {
+#ifdef  CCXX_IPV6
+    case IPV6:
+        addr = (struct sockaddr *)&peer.ipv6;
+        alen = sizeof(struct sockaddr_in6);
+        break;
+#endif
+    case IPV4:
+        addr = (struct sockaddr *)&peer.ipv4;
+        alen = sizeof(struct sockaddr_in);
+        break;
+    default:
+        return -1;
+    }
+
+    if(isConnected() || !reply) {
+        // DMC 2/7/05 MOD to use senderAddress instead of NULL, to prevent 10014 error
+        // from recvfrom.
+        //addr = NULL;
+        //alen = 0;
+        addr = (struct sockaddr*)(&senderAddress);
+        alen = sizeof(struct sockaddr_in);
+    }
+
+    int bytes = ::recvfrom(so, (char *)buf, _IOLEN64 len, 0, addr, &alen);
+
+#ifdef  _MSWINDOWS_
+
+    if (bytes == SOCKET_ERROR) {
+        WSAGetLastError();
+    }
+#endif
+
+    return _IORET64 bytes;
+}
+
+Socket::Error UDPSocket::join(const IPV4Multicast &ia,int InterfaceIndex)
+{
+
+#if defined(_MSWINDOWS_) && defined(IP_ADD_MEMBERSHIP)
+
+        // DMC 2/7/05: Added WIN32 block.  Win32 does not define the ip_mreqn structure,
+        // so we must use ip_mreq with INADDR_ANY.
+        struct ip_mreq      group;
+    struct sockaddr_in   myaddr;
+    socklen_t            len = sizeof(myaddr);
+
+    if(!flags.multicast)
+      return error(errMulticastDisabled);
+
+    memset(&group, 0, sizeof(group));
+    getsockname(so, (struct sockaddr *)&myaddr, &len);
+    group.imr_multiaddr.s_addr = ia.getAddress().s_addr;
+    group.imr_interface.s_addr = INADDR_ANY;
+    setsockopt(so, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *)&group, sizeof(group));
+    return errSuccess;
+
+#elif defined(IP_ADD_MEMBERSHIP) && defined(SIOCGIFINDEX) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(_OSF_SOURCE) && !defined(__hpux) && !defined(__GNU__)
+
+        struct ip_mreqn      group;
+    struct sockaddr_in   myaddr;
+    socklen_t            len = sizeof(myaddr);
+
+    if(!flags.multicast)
+      return error(errMulticastDisabled);
+
+    getsockname(so, (struct sockaddr *)&myaddr, &len);
+    memset(&group, 0, sizeof(group));
+    memcpy(&group.imr_address, &myaddr.sin_addr, sizeof(myaddr.sin_addr));
+    group.imr_multiaddr = ia.getAddress();
+    group.imr_ifindex   = InterfaceIndex;
+    setsockopt(so, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *)&group, sizeof(group));
+    return errSuccess;
+#elif defined(IP_ADD_MEMBERSHIP)
+    // if no by index, use INADDR_ANY
+    struct ip_mreq group;
+    struct sockaddr_in myaddr;
+    socklen_t len = sizeof(myaddr);
+
+    if(!flags.multicast)
+        return error(errMulticastDisabled);
+
+    getsockname(so, (struct sockaddr *)&myaddr, &len);
+    memset(&group, sizeof(group), 0);
+    group.imr_multiaddr.s_addr = ia.getAddress().s_addr;
+    group.imr_interface.s_addr = INADDR_ANY;
+    setsockopt(so, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *)&group, sizeof(group));
+    return errSuccess;
+#else
+    return error(errServiceUnavailable);
+#endif
+}
+
+Socket::Error UDPSocket::getInterfaceIndex(const char *DeviceName,int& InterfaceIndex)
+{
+#ifndef _MSWINDOWS_
+#if defined(IP_ADD_MEMBERSHIP) && defined(SIOCGIFINDEX) && !defined(__FreeBSD__) && !defined(__FreeBSD_kernel__) && !defined(_OSF_SOURCE) && !defined(__hpux) && !defined(__GNU__)
+
+    struct ip_mreqn  mreqn;
+    struct ifreq       m_ifreq;
+    int            i;
+    sockaddr_in*          in4 = (sockaddr_in*) &peer.ipv4;
+    InterfaceIndex = -1;
+
+    memset(&mreqn, 0, sizeof(mreqn));
+    memcpy(&mreqn.imr_multiaddr.s_addr, &in4->sin_addr, sizeof(mreqn.imr_multiaddr.s_addr));
+
+    for (i = 0; i < IFNAMSIZ && DeviceName[i]; ++i)
+        m_ifreq.ifr_name[i] = DeviceName[i];
+    for (; i < IFNAMSIZ; ++i)
+        m_ifreq.ifr_name[i] = 0;
+
+    if (ioctl (so, SIOCGIFINDEX, &m_ifreq))
+        return error(errServiceUnavailable);
+
+#if defined(__FreeBSD__) || defined(__GNU__)
+    InterfaceIndex = m_ifreq.ifr_ifru.ifru_index;
+#else
+    InterfaceIndex = m_ifreq.ifr_ifindex;
+#endif
+    return errSuccess;
+#else
+    return error(errServiceUnavailable);
+#endif
+#else
+    return error(errServiceUnavailable);
+#endif // WIN32
+}
+
+#ifdef  AF_UNSPEC
+Socket::Error UDPSocket::disconnect(void)
+{
+    struct sockaddr_in addr;
+    int len = sizeof(addr);
+
+    if(so == INVALID_SOCKET)
+        return errSuccess;
+
+    Socket::state = BOUND;
+
+    memset(&addr, 0, len);
+#ifndef _MSWINDOWS_
+    addr.sin_family = AF_UNSPEC;
+#else
+    addr.sin_family = AF_INET;
+    memset(&addr.sin_addr, 0, sizeof(addr.sin_addr));
+#endif
+    if(::connect(so, (sockaddr *)&addr, len))
+        return connectError();
+    return errSuccess;
+}
+#else
+Socket::Error UDPSocket::disconnect(void)
+{
+    if(so == INVALID_SOCKET)
+        return errSuccess;
+
+    Socket::state = BOUND;
+    return connect(getLocal());
+}
+#endif
+
+void UDPSocket::setPeer(const IPV4Host &ia, tpport_t port)
+{
+    memset(&peer.ipv4, 0, sizeof(peer.ipv4));
+    peer.ipv4.sin_family = AF_INET;
+    peer.ipv4.sin_addr = ia.getAddress();
+    peer.ipv4.sin_port = htons(port);
+}
+
+void UDPSocket::connect(const IPV4Host &ia, tpport_t port)
+{
+    setPeer(ia, port);
+    if(so == INVALID_SOCKET)
+        return;
+
+    if(!::connect(so, (struct sockaddr *)&peer.ipv4, sizeof(struct sockaddr_in)))
+        Socket::state = CONNECTED;
+}
+
+#ifdef  CCXX_IPV6
+void UDPSocket::setPeer(const IPV6Host &ia, tpport_t port)
+{
+    memset(&peer.ipv6, 0, sizeof(peer.ipv6));
+    peer.ipv6.sin6_family = AF_INET6;
+    peer.ipv6.sin6_addr = ia.getAddress();
+    peer.ipv6.sin6_port = htons(port);
+}
+
+void UDPSocket::connect(const IPV6Host &ia, tpport_t port)
+{
+    setPeer(ia, port);
+
+    if(so == INVALID_SOCKET)
+        return;
+
+    if(!::connect(so, (struct sockaddr *)&peer.ipv6, sizeof(struct sockaddr_in6)))
+        Socket::state = CONNECTED;
+
+}
+
+#endif
+
+#ifdef  HAVE_GETADDRINFO
+
+void UDPSocket::setPeer(const char *name)
+{
+    char namebuf[128], *cp;
+    struct addrinfo hint, *list;
+
+    snprintf(namebuf, sizeof(namebuf), "%s", name);
+    cp = strrchr(namebuf, '/');
+    if(!cp)
+        cp = strrchr(namebuf, ':');
+
+    if(!cp)
+        return;
+
+    memset(&hint, 0, sizeof(hint));
+    hint.ai_family = family;
+    hint.ai_socktype = SOCK_DGRAM;
+    hint.ai_protocol = IPPROTO_UDP;
+
+    if(getaddrinfo(namebuf, cp, &hint, &list) || !list)
+        return;
+
+    switch(family) {
+#ifdef  CCXX_IPV6
+    case IPV6:
+        memcpy(&peer.ipv6, list->ai_addr, sizeof(peer.ipv6));
+        break;
+#endif
+    case IPV4:
+        memcpy(&peer.ipv4, list->ai_addr, sizeof(peer.ipv4));
+        break;
+    }
+
+    freeaddrinfo(list);
+}
+
+#else
+
+void UDPSocket::setPeer(const char *name)
+{
+    char namebuf[128], *cp;
+    struct servent *svc;
+    tpport_t port;
+
+    snprintf(namebuf, sizeof(namebuf), "%s", name);
+    cp = strrchr(namebuf, '/');
+    if(!cp)
+        cp = strrchr(namebuf, ':');
+
+    if(!cp)
+        return;
+
+    if(isdigit(*cp))
+        port = atoi(cp);
+    else {
+        mutex.enter();
+        svc = getservbyname(cp, "udp");
+        if(svc)
+            port = ntohs(svc->s_port);
+        mutex.leave();
+        if(!svc)
+            return;
+    }
+
+    memset(&peer, 0, sizeof(peer));
+
+    switch(family) {
+#ifdef  CCXX_IPV6
+    case IPV6:
+        setPeer(IPV6Host(namebuf), port);
+        break;
+#endif
+    case IPV4:
+        setPeer(IPV4Host(namebuf), port);
+        break;
+    }
+}
+
+#endif
+
+void UDPSocket::connect(const char *service)
+{
+    int rtn = -1;
+
+    setPeer(service);
+
+    if(so == INVALID_SOCKET)
+        return;
+
+    switch(family) {
+#ifdef  CCXX_IPV6
+    case IPV6:
+        rtn = ::connect(so, (struct sockaddr *)&peer.ipv6, sizeof(struct sockaddr_in6));
+        break;
+#endif
+    case IPV4:
+        rtn = ::connect(so, (struct sockaddr *)&peer.ipv4, sizeof(struct sockaddr_in));
+        break;
+    }
+    if(!rtn)
+        Socket::state = CONNECTED;
+}
+
+IPV4Host UDPSocket::getIPV4Peer(tpport_t *port) const
+{
+    // FIXME: insufficient buffer
+    //        how to retrieve peer ??
+    char buf;
+    socklen_t len = sizeof(peer.ipv4);
+    int rtn = ::recvfrom(so, &buf, 1, MSG_PEEK, (struct sockaddr *)&peer.ipv4, &len);
+
+#ifdef _MSWINDOWS_
+    if(rtn < 1 && WSAGetLastError() != WSAEMSGSIZE) {
+        if(port)
+            *port = 0;
+
+        memset((void*) &peer.ipv4, 0, sizeof(peer.ipv4));
+    }
+#else
+    if(rtn < 1) {
+        if(port)
+            *port = 0;
+
+        memset((void*) &peer.ipv4, 0, sizeof(peer.ipv4));
+    }
+#endif
+    else {
+        if(port)
+            *port = ntohs(peer.ipv4.sin_port);
+    }
+    return IPV4Host(peer.ipv4.sin_addr);
+}
+
+#ifdef  CCXX_IPV6
+IPV6Host UDPSocket::getIPV6Peer(tpport_t *port) const
+{
+    // FIXME: insufficient buffer
+    //        how to retrieve peer ??
+    char buf;
+    socklen_t len = sizeof(peer.ipv6);
+    int rtn = ::recvfrom(so, &buf, 1, MSG_PEEK, (struct sockaddr *)&peer.ipv6, &len);
+
+#ifdef _MSWINDOWS_
+    if(rtn < 1 && WSAGetLastError() != WSAEMSGSIZE) {
+        if(port)
+            *port = 0;
+
+        memset((void*) &peer.ipv6, 0, sizeof(peer.ipv6));
+    }
+#else
+    if(rtn < 1) {
+        if(port)
+            *port = 0;
+
+        memset((void*) &peer.ipv6, 0, sizeof(peer.ipv6));
+    }
+#endif
+    else {
+        if(port)
+            *port = ntohs(peer.ipv6.sin6_port);
+    }
+    return IPV6Host(peer.ipv6.sin6_addr);
+}
+#endif
+
+UDPBroadcast::UDPBroadcast(const IPV4Address &ia, tpport_t port) :
+UDPSocket(ia, port)
+{
+    if(so != INVALID_SOCKET)
+        setBroadcast(true);
+}
+
+void UDPBroadcast::setPeer(const IPV4Broadcast &ia, tpport_t port)
+{
+    memset(&peer.ipv4, 0, sizeof(peer.ipv4));
+    peer.ipv4.sin_family = AF_INET;
+    peer.ipv4.sin_addr = ia.getAddress();
+    peer.ipv4.sin_port = htons(port);
+}
+
+UDPTransmit::UDPTransmit(const IPV4Address &ia, tpport_t port) :
+UDPSocket(ia, port)
+{
+    disconnect();   // assure not started live
+    ::shutdown(so, 0);
+    receiveBuffer(0);
+}
+
+#ifdef  CCXX_IPV6
+UDPTransmit::UDPTransmit(const IPV6Address &ia, tpport_t port) :
+UDPSocket(ia, port)
+{
+    disconnect();   // assure not started live
+    ::shutdown(so, 0);
+    receiveBuffer(0);
+}
+#endif
+
+UDPTransmit::UDPTransmit(Family family) : UDPSocket(family)
+{
+    disconnect();
+    ::shutdown(so, 0);
+    receiveBuffer(0);
+}
+
+Socket::Error UDPTransmit::cConnect(const IPV4Address &ia, tpport_t port)
+{
+    int len = sizeof(peer.ipv4);
+
+    peer.ipv4.sin_family = AF_INET;
+    peer.ipv4.sin_addr = ia.getAddress();
+    peer.ipv4.sin_port = htons(port);
+    // Win32 will crash if you try to connect to INADDR_ANY.
+    if ( INADDR_ANY == peer.ipv4.sin_addr.s_addr )
+        peer.ipv4.sin_addr.s_addr = INADDR_LOOPBACK;
+    if(::connect(so, (sockaddr *)&peer.ipv4, len))
+        return connectError();
+    return errSuccess;
+}
+
+
+#ifdef  CCXX_IPV6
+
+Socket::Error UDPTransmit::connect(const IPV6Address &ia, tpport_t port)
+{
+    int len = sizeof(peer.ipv6);
+
+    peer.ipv6.sin6_family = AF_INET6;
+    peer.ipv6.sin6_addr = ia.getAddress();
+    peer.ipv6.sin6_port = htons(port);
+    // Win32 will crash if you try to connect to INADDR_ANY.
+    if(!memcmp(&peer.ipv6.sin6_addr, &in6addr_any, sizeof(in6addr_any)))
+        memcpy(&peer.ipv6.sin6_addr, &in6addr_loopback,
+            sizeof(in6addr_loopback));
+    if(::connect(so, (struct sockaddr *)&peer.ipv6, len))
+        return connectError();
+    return errSuccess;
+}
+#endif
+
+Socket::Error UDPTransmit::connect(const IPV4Host &ia, tpport_t port)
+{
+    if(isBroadcast())
+        setBroadcast(false);
+
+    return cConnect((IPV4Address)ia,port);
+}
+
+Socket::Error UDPTransmit::connect(const IPV4Broadcast &subnet, tpport_t  port)
+{
+    if(!isBroadcast())
+        setBroadcast(true);
+
+    return cConnect((IPV4Address)subnet,port);
+}
+
+Socket::Error UDPTransmit::connect(const IPV4Multicast &group, tpport_t port)
+{
+    Error err;
+    if(!( err = UDPSocket::setMulticast(true) ))
+        return err;
+
+    return cConnect((IPV4Address)group,port);
+}
+
+#ifdef  CCXX_IPV6
+Socket::Error UDPTransmit::connect(const IPV6Multicast &group, tpport_t port)
+{
+    Error error;
+    if(!( error = UDPSocket::setMulticast(true) ))
+        return error;
+
+    return connect((IPV6Address)group,port);
+}
+#endif
+
+UDPReceive::UDPReceive(const IPV4Address &ia, tpport_t port) :
+UDPSocket(ia, port)
+{
+    ::shutdown(so, 1);
+    sendBuffer(0);
+}
+
+#ifdef  CCXX_IPV6
+UDPReceive::UDPReceive(const IPV6Address &ia, tpport_t port) :
+UDPSocket(ia, port)
+{
+    ::shutdown(so, 1);
+    sendBuffer(0);
+}
+#endif
+
+Socket::Error UDPReceive::connect(const IPV4Host &ia, tpport_t port)
+{
+    int len = sizeof(peer.ipv4);
+
+    peer.ipv4.sin_family = AF_INET;
+    peer.ipv4.sin_addr = ia.getAddress();
+    peer.ipv4.sin_port = htons(port);
+    // Win32 will crash if you try to connect to INADDR_ANY.
+    if ( INADDR_ANY == peer.ipv4.sin_addr.s_addr )
+        peer.ipv4.sin_addr.s_addr = INADDR_LOOPBACK;
+    if(::connect(so, (struct sockaddr *)&peer.ipv4, len))
+        return connectError();
+    return errSuccess;
+}
+
+#ifdef  CCXX_IPV6
+Socket::Error UDPReceive::connect(const IPV6Host &ia, tpport_t port)
+{
+    int len = sizeof(peer.ipv6);
+
+    peer.ipv6.sin6_family = AF_INET6;
+    peer.ipv6.sin6_addr = ia.getAddress();
+    peer.ipv6.sin6_port = htons(port);
+    // Win32 will crash if you try to connect to INADDR_ANY.
+    if(!memcmp(&peer.ipv6.sin6_addr, &in6addr_any, sizeof(in6addr_any)))
+        memcpy(&peer.ipv6.sin6_addr, &in6addr_loopback, sizeof(in6addr_loopback));
+    if(::connect(so, (sockaddr *)&peer.ipv6, len))
+        return connectError();
+    return errSuccess;
+}
+#endif
+
+UDPDuplex::UDPDuplex(const IPV4Address &bind, tpport_t port) :
+UDPTransmit(bind, port + 1), UDPReceive(bind, port)
+{}
+
+#ifdef  CCXX_IPV6
+UDPDuplex::UDPDuplex(const IPV6Address &bind, tpport_t port) :
+UDPTransmit(bind, port + 1), UDPReceive(bind, port)
+{}
+#endif
+
+Socket::Error UDPDuplex::connect(const IPV4Host &host, tpport_t port)
+{
+    Error rtn = UDPTransmit::connect(host, port);
+    if(rtn) {
+        UDPTransmit::disconnect();
+        UDPReceive::disconnect();
+        return rtn;
+    }
+    return UDPReceive::connect(host, port + 1);
+}
+
+#ifdef  CCXX_IPV6
+Socket::Error UDPDuplex::connect(const IPV6Host &host, tpport_t port)
+{
+    Error rtn = UDPTransmit::connect(host, port);
+    if(rtn) {
+        UDPTransmit::disconnect();
+        UDPReceive::disconnect();
+        return rtn;
+    }
+    return UDPReceive::connect(host, port + 1);
+}
+#endif
+
+Socket::Error UDPDuplex::disconnect(void)
+{
+    Error rtn = UDPTransmit::disconnect();
+    Error rtn2 = UDPReceive::disconnect();
+    if (rtn) return rtn;
+        return rtn2;
+}
+
diff --git a/jni/libucommon/sources/config.log b/jni/libucommon/sources/config.log
new file mode 100644
index 0000000..845def8
--- /dev/null
+++ b/jni/libucommon/sources/config.log
@@ -0,0 +1,3009 @@
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by ucommon configure 6.0.7, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  $ ./configure 
+
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = pcal
+uname -m = x86_64
+uname -r = 3.12.7-300.fc20.x86_64
+uname -s = Linux
+uname -v = #1 SMP Fri Jan 10 15:35:31 UTC 2014
+
+/usr/bin/uname -p = x86_64
+/bin/uname -X     = unknown
+
+/bin/arch              = x86_64
+/usr/bin/arch -k       = unknown
+/usr/convex/getsysinfo = unknown
+/usr/bin/hostinfo      = unknown
+/bin/machine           = unknown
+/usr/bin/oslevel       = unknown
+/bin/universe          = unknown
+
+PATH: /usr/lib64/qt-3.3/bin
+PATH: /usr/lib64/ccache
+PATH: /usr/local/bin
+PATH: /usr/bin
+PATH: /bin
+PATH: /usr/local/sbin
+PATH: /usr/sbin
+PATH: /home/lisional/.local/bin
+PATH: /usr/local/bin
+PATH: /home/lisional/bin
+PATH: /home/lisional/Dev/ADT/sdk/tools
+PATH: /home/lisional/Dev/ADT/sdk/platform-tools
+PATH: /home/lisional/Dev/ADT/ndk
+PATH: /home/lisional/.local/bin
+PATH: /home/lisional/Dev/ant/bin/ant
+PATH: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.4.1.fc20.x86_64
+PATH: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.4.1.fc20.x86_64/bin
+PATH: /home/lisional/.local/bin
+PATH: /usr/local/bin
+PATH: /home/lisional/bin
+PATH: /home/lisional/Dev/ADT/sdk/tools
+PATH: /home/lisional/Dev/ADT/sdk/platform-tools
+PATH: /home/lisional/Dev/ADT/ndk
+PATH: /home/lisional/.local/bin
+PATH: /home/lisional/Dev/ant/bin/ant
+PATH: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.4.1.fc20.x86_64
+PATH: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.4.1.fc20.x86_64/bin
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+configure:2533: checking build system type
+configure:2547: result: x86_64-unknown-linux-gnu
+configure:2567: checking host system type
+configure:2580: result: x86_64-unknown-linux-gnu
+configure:2600: checking target system type
+configure:2613: result: x86_64-unknown-linux-gnu
+configure:2688: checking for gcc
+configure:2704: found /usr/lib64/ccache/gcc
+configure:2715: result: gcc
+configure:2944: checking for C compiler version
+configure:2953: gcc --version >&5
+gcc (GCC) 4.8.2 20131212 (Red Hat 4.8.2-7)
+Copyright (C) 2013 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.
+
+configure:2964: $? = 0
+configure:2953: gcc -v >&5
+Using built-in specs.
+COLLECT_GCC=/usr/bin/gcc
+COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper
+Target: x86_64-redhat-linux
+Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-isl=/builddir/build/BUILD/gcc-4.8.2-20131212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.2-20131212/obj-x86_64-redhat-linux/cloog-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
+Thread model: posix
+gcc version 4.8.2 20131212 (Red Hat 4.8.2-7) (GCC) 
+configure:2964: $? = 0
+configure:2953: gcc -V >&5
+gcc: error: unrecognized command line option '-V'
+gcc: fatal error: no input files
+compilation terminated.
+configure:2964: $? = 4
+configure:2953: gcc -qversion >&5
+gcc: error: unrecognized command line option '-qversion'
+gcc: fatal error: no input files
+compilation terminated.
+configure:2964: $? = 4
+configure:2984: checking whether the C compiler works
+configure:3006: gcc    conftest.c  >&5
+configure:3010: $? = 0
+configure:3058: result: yes
+configure:3061: checking for C compiler default output file name
+configure:3063: result: a.out
+configure:3069: checking for suffix of executables
+configure:3076: gcc -o conftest    conftest.c  >&5
+configure:3080: $? = 0
+configure:3102: result: 
+configure:3124: checking whether we are cross compiling
+configure:3132: gcc -o conftest    conftest.c  >&5
+configure:3136: $? = 0
+configure:3143: ./conftest
+configure:3147: $? = 0
+configure:3162: result: no
+configure:3167: checking for suffix of object files
+configure:3189: gcc -c   conftest.c >&5
+configure:3193: $? = 0
+configure:3214: result: o
+configure:3218: checking whether we are using the GNU C compiler
+configure:3237: gcc -c   conftest.c >&5
+configure:3237: $? = 0
+configure:3246: result: yes
+configure:3255: checking whether gcc accepts -g
+configure:3275: gcc -c -g  conftest.c >&5
+configure:3275: $? = 0
+configure:3316: result: yes
+configure:3333: checking for gcc option to accept ISO C89
+configure:3396: gcc  -c -g -O2  conftest.c >&5
+configure:3396: $? = 0
+configure:3409: result: none needed
+configure:3434: checking how to run the C preprocessor
+configure:3465: gcc -E  conftest.c
+configure:3465: $? = 0
+configure:3479: gcc -E  conftest.c
+conftest.c:9:28: fatal error: ac_nonexistent.h: No such file or directory
+ #include <ac_nonexistent.h>
+                            ^
+compilation terminated.
+configure:3479: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| /* end confdefs.h.  */
+| #include <ac_nonexistent.h>
+configure:3504: result: gcc -E
+configure:3524: gcc -E  conftest.c
+configure:3524: $? = 0
+configure:3538: gcc -E  conftest.c
+conftest.c:9:28: fatal error: ac_nonexistent.h: No such file or directory
+ #include <ac_nonexistent.h>
+                            ^
+compilation terminated.
+configure:3538: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| /* end confdefs.h.  */
+| #include <ac_nonexistent.h>
+configure:3614: checking for gcc
+configure:3641: result: gcc
+configure:3870: checking for C compiler version
+configure:3879: gcc --version >&5
+gcc (GCC) 4.8.2 20131212 (Red Hat 4.8.2-7)
+Copyright (C) 2013 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.
+
+configure:3890: $? = 0
+configure:3879: gcc -v >&5
+Using built-in specs.
+COLLECT_GCC=/usr/bin/gcc
+COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper
+Target: x86_64-redhat-linux
+Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-isl=/builddir/build/BUILD/gcc-4.8.2-20131212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.2-20131212/obj-x86_64-redhat-linux/cloog-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
+Thread model: posix
+gcc version 4.8.2 20131212 (Red Hat 4.8.2-7) (GCC) 
+configure:3890: $? = 0
+configure:3879: gcc -V >&5
+gcc: error: unrecognized command line option '-V'
+gcc: fatal error: no input files
+compilation terminated.
+configure:3890: $? = 4
+configure:3879: gcc -qversion >&5
+gcc: error: unrecognized command line option '-qversion'
+gcc: fatal error: no input files
+compilation terminated.
+configure:3890: $? = 4
+configure:3894: checking whether we are using the GNU C compiler
+configure:3922: result: yes
+configure:3931: checking whether gcc accepts -g
+configure:3992: result: yes
+configure:4009: checking for gcc option to accept ISO C89
+configure:4085: result: none needed
+configure:4163: checking for g++
+configure:4179: found /usr/lib64/ccache/g++
+configure:4190: result: g++
+configure:4217: checking for C++ compiler version
+configure:4226: g++ --version >&5
+g++ (GCC) 4.8.2 20131212 (Red Hat 4.8.2-7)
+Copyright (C) 2013 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.
+
+configure:4237: $? = 0
+configure:4226: g++ -v >&5
+Using built-in specs.
+COLLECT_GCC=/usr/bin/g++
+COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper
+Target: x86_64-redhat-linux
+Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-isl=/builddir/build/BUILD/gcc-4.8.2-20131212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.2-20131212/obj-x86_64-redhat-linux/cloog-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
+Thread model: posix
+gcc version 4.8.2 20131212 (Red Hat 4.8.2-7) (GCC) 
+configure:4237: $? = 0
+configure:4226: g++ -V >&5
+g++: error: unrecognized command line option '-V'
+g++: fatal error: no input files
+compilation terminated.
+configure:4237: $? = 4
+configure:4226: g++ -qversion >&5
+g++: error: unrecognized command line option '-qversion'
+g++: fatal error: no input files
+compilation terminated.
+configure:4237: $? = 4
+configure:4241: checking whether we are using the GNU C++ compiler
+configure:4260: g++ -c   conftest.cpp >&5
+configure:4260: $? = 0
+configure:4269: result: yes
+configure:4278: checking whether g++ accepts -g
+configure:4298: g++ -c -g  conftest.cpp >&5
+configure:4298: $? = 0
+configure:4339: result: yes
+configure:4367: checking how to run the C++ preprocessor
+configure:4394: g++ -E  conftest.cpp
+configure:4394: $? = 0
+configure:4408: g++ -E  conftest.cpp
+conftest.cpp:9:28: fatal error: ac_nonexistent.h: No such file or directory
+ #include <ac_nonexistent.h>
+                            ^
+compilation terminated.
+configure:4408: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| /* end confdefs.h.  */
+| #include <ac_nonexistent.h>
+configure:4433: result: g++ -E
+configure:4453: g++ -E  conftest.cpp
+configure:4453: $? = 0
+configure:4467: g++ -E  conftest.cpp
+conftest.cpp:9:28: fatal error: ac_nonexistent.h: No such file or directory
+ #include <ac_nonexistent.h>
+                            ^
+compilation terminated.
+configure:4467: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| /* end confdefs.h.  */
+| #include <ac_nonexistent.h>
+configure:4607: checking for C++ compiler version
+configure:4616: g++ --version >&5
+g++ (GCC) 4.8.2 20131212 (Red Hat 4.8.2-7)
+Copyright (C) 2013 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.
+
+configure:4627: $? = 0
+configure:4616: g++ -v >&5
+Using built-in specs.
+COLLECT_GCC=/usr/bin/g++
+COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper
+Target: x86_64-redhat-linux
+Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-isl=/builddir/build/BUILD/gcc-4.8.2-20131212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.2-20131212/obj-x86_64-redhat-linux/cloog-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
+Thread model: posix
+gcc version 4.8.2 20131212 (Red Hat 4.8.2-7) (GCC) 
+configure:4627: $? = 0
+configure:4616: g++ -V >&5
+g++: error: unrecognized command line option '-V'
+g++: fatal error: no input files
+compilation terminated.
+configure:4627: $? = 4
+configure:4616: g++ -qversion >&5
+g++: error: unrecognized command line option '-qversion'
+g++: fatal error: no input files
+compilation terminated.
+configure:4627: $? = 4
+configure:4631: checking whether we are using the GNU C++ compiler
+configure:4659: result: yes
+configure:4668: checking whether g++ accepts -g
+configure:4729: result: yes
+configure:5101: checking how to print strings
+configure:5128: result: printf
+configure:5149: checking for a sed that does not truncate output
+configure:5213: result: /usr/bin/sed
+configure:5231: checking for grep that handles long lines and -e
+configure:5289: result: /usr/bin/grep
+configure:5294: checking for egrep
+configure:5356: result: /usr/bin/grep -E
+configure:5361: checking for fgrep
+configure:5423: result: /usr/bin/grep -F
+configure:5458: checking for ld used by gcc
+configure:5525: result: /usr/bin/ld
+configure:5532: checking if the linker (/usr/bin/ld) is GNU ld
+configure:5547: result: yes
+configure:5559: checking for BSD- or MS-compatible name lister (nm)
+configure:5608: result: /usr/bin/nm -B
+configure:5738: checking the name lister (/usr/bin/nm -B) interface
+configure:5745: gcc -c -g -O2  conftest.c >&5
+configure:5748: /usr/bin/nm -B "conftest.o"
+configure:5751: output
+0000000000000000 B some_variable
+configure:5758: result: BSD nm
+configure:5761: checking whether ln -s works
+configure:5765: result: yes
+configure:5773: checking the maximum length of command line arguments
+configure:5903: result: 1572864
+configure:5920: checking whether the shell understands some XSI constructs
+configure:5930: result: yes
+configure:5934: checking whether the shell understands "+="
+configure:5940: result: yes
+configure:5975: checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format
+configure:6015: result: func_convert_file_noop
+configure:6022: checking how to convert x86_64-unknown-linux-gnu file names to toolchain format
+configure:6042: result: func_convert_file_noop
+configure:6049: checking for /usr/bin/ld option to reload object files
+configure:6056: result: -r
+configure:6130: checking for objdump
+configure:6157: result: objdump
+configure:6186: checking how to recognize dependent libraries
+configure:6388: result: pass_all
+configure:6473: checking for dlltool
+configure:6500: result: dlltool
+configure:6530: checking how to associate runtime and link libraries
+configure:6557: result: printf %s\n
+configure:6618: checking for ar
+configure:6634: found /usr/bin/ar
+configure:6645: result: ar
+configure:6682: checking for archiver @FILE support
+configure:6699: gcc -c -g -O2  conftest.c >&5
+configure:6699: $? = 0
+configure:6702: ar cru libconftest.a @conftest.lst >&5
+configure:6705: $? = 0
+configure:6710: ar cru libconftest.a @conftest.lst >&5
+ar: conftest.o: No such file or directory
+configure:6713: $? = 1
+configure:6725: result: @
+configure:6783: checking for strip
+configure:6799: found /usr/bin/strip
+configure:6810: result: strip
+configure:6882: checking for ranlib
+configure:6898: found /usr/bin/ranlib
+configure:6909: result: ranlib
+configure:6986: checking for gawk
+configure:7002: found /usr/bin/gawk
+configure:7013: result: gawk
+configure:7053: checking command to parse /usr/bin/nm -B output from gcc object
+configure:7173: gcc -c -g -O2  conftest.c >&5
+configure:7176: $? = 0
+configure:7180: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | sed '/ __gnu_lto/d' \> conftest.nm
+configure:7183: $? = 0
+configure:7249: gcc -o conftest -g -O2   conftest.c conftstm.o >&5
+configure:7252: $? = 0
+configure:7290: result: ok
+configure:7327: checking for sysroot
+configure:7357: result: no
+configure:7434: gcc -c -g -O2  conftest.c >&5
+configure:7437: $? = 0
+configure:7619: checking for mt
+configure:7649: result: no
+configure:7669: checking if : is a manifest tool
+configure:7675: : '-?'
+configure:7683: result: no
+configure:8321: checking for ANSI C header files
+configure:8341: gcc -c -g -O2  conftest.c >&5
+configure:8341: $? = 0
+configure:8414: gcc -o conftest -g -O2   conftest.c  >&5
+configure:8414: $? = 0
+configure:8414: ./conftest
+configure:8414: $? = 0
+configure:8425: result: yes
+configure:8438: checking for sys/types.h
+configure:8438: gcc -c -g -O2  conftest.c >&5
+configure:8438: $? = 0
+configure:8438: result: yes
+configure:8438: checking for sys/stat.h
+configure:8438: gcc -c -g -O2  conftest.c >&5
+configure:8438: $? = 0
+configure:8438: result: yes
+configure:8438: checking for stdlib.h
+configure:8438: gcc -c -g -O2  conftest.c >&5
+configure:8438: $? = 0
+configure:8438: result: yes
+configure:8438: checking for string.h
+configure:8438: gcc -c -g -O2  conftest.c >&5
+configure:8438: $? = 0
+configure:8438: result: yes
+configure:8438: checking for memory.h
+configure:8438: gcc -c -g -O2  conftest.c >&5
+configure:8438: $? = 0
+configure:8438: result: yes
+configure:8438: checking for strings.h
+configure:8438: gcc -c -g -O2  conftest.c >&5
+configure:8438: $? = 0
+configure:8438: result: yes
+configure:8438: checking for inttypes.h
+configure:8438: gcc -c -g -O2  conftest.c >&5
+configure:8438: $? = 0
+configure:8438: result: yes
+configure:8438: checking for stdint.h
+configure:8438: gcc -c -g -O2  conftest.c >&5
+configure:8438: $? = 0
+configure:8438: result: yes
+configure:8438: checking for unistd.h
+configure:8438: gcc -c -g -O2  conftest.c >&5
+configure:8438: $? = 0
+configure:8438: result: yes
+configure:8452: checking for dlfcn.h
+configure:8452: gcc -c -g -O2  conftest.c >&5
+configure:8452: $? = 0
+configure:8452: result: yes
+configure:8667: checking for objdir
+configure:8682: result: .libs
+configure:8949: checking if gcc supports -fno-rtti -fno-exceptions
+configure:8967: gcc -c -g -O2  -fno-rtti -fno-exceptions conftest.c >&5
+cc1: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C [enabled by default]
+cc1: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C [enabled by default]
+configure:8971: $? = 0
+configure:8984: result: no
+configure:9311: checking for gcc option to produce PIC
+configure:9318: result: -fPIC -DPIC
+configure:9326: checking if gcc PIC flag -fPIC -DPIC works
+configure:9344: gcc -c -g -O2  -fPIC -DPIC -DPIC conftest.c >&5
+configure:9348: $? = 0
+configure:9361: result: yes
+configure:9390: checking if gcc static flag -static works
+configure:9418: result: no
+configure:9433: checking if gcc supports -c -o file.o
+configure:9454: gcc -c -g -O2  -o out/conftest2.o conftest.c >&5
+configure:9458: $? = 0
+configure:9480: result: yes
+configure:9488: checking if gcc supports -c -o file.o
+configure:9535: result: yes
+configure:9568: checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries
+configure:10721: result: yes
+configure:10758: checking whether -lc should be explicitly linked in
+configure:10766: gcc -c -g -O2  conftest.c >&5
+configure:10769: $? = 0
+configure:10784: gcc -shared  -fPIC -DPIC conftest.o  -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| /usr/bin/grep  -lc  \>/dev/null 2\>\&1
+configure:10787: $? = 0
+configure:10801: result: no
+configure:10961: checking dynamic linker characteristics
+configure:11472: gcc -o conftest -g -O2   -Wl,-rpath -Wl,/foo conftest.c  >&5
+configure:11472: $? = 0
+configure:11698: result: GNU/Linux ld.so
+configure:11805: checking how to hardcode library paths into programs
+configure:11830: result: immediate
+configure:12370: checking whether stripping libraries is possible
+configure:12375: result: yes
+configure:12410: checking if libtool supports shared libraries
+configure:12412: result: yes
+configure:12415: checking whether to build shared libraries
+configure:12436: result: yes
+configure:12439: checking whether to build static libraries
+configure:12443: result: yes
+configure:12466: checking how to run the C++ preprocessor
+configure:12532: result: g++ -E
+configure:12552: g++ -E  conftest.cpp
+configure:12552: $? = 0
+configure:12566: g++ -E  conftest.cpp
+conftest.cpp:21:28: fatal error: ac_nonexistent.h: No such file or directory
+ #include <ac_nonexistent.h>
+                            ^
+compilation terminated.
+configure:12566: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| /* end confdefs.h.  */
+| #include <ac_nonexistent.h>
+configure:12735: checking for ld used by g++
+configure:12802: result: /usr/bin/ld -m elf_x86_64
+configure:12809: checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld
+configure:12824: result: yes
+configure:12879: checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries
+configure:13884: result: yes
+configure:13920: g++ -c -g -O2  conftest.cpp >&5
+configure:13923: $? = 0
+configure:14443: checking for g++ option to produce PIC
+configure:14450: result: -fPIC -DPIC
+configure:14458: checking if g++ PIC flag -fPIC -DPIC works
+configure:14476: g++ -c -g -O2  -fPIC -DPIC -DPIC conftest.cpp >&5
+configure:14480: $? = 0
+configure:14493: result: yes
+configure:14516: checking if g++ static flag -static works
+configure:14544: result: no
+configure:14556: checking if g++ supports -c -o file.o
+configure:14577: g++ -c -g -O2  -o out/conftest2.o conftest.cpp >&5
+configure:14581: $? = 0
+configure:14603: result: yes
+configure:14608: checking if g++ supports -c -o file.o
+configure:14655: result: yes
+configure:14685: checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries
+configure:14721: result: yes
+configure:14862: checking dynamic linker characteristics
+configure:15533: result: GNU/Linux ld.so
+configure:15586: checking how to hardcode library paths into programs
+configure:15611: result: immediate
+configure:15688: checking for a BSD-compatible install
+configure:15756: result: /usr/bin/install -c
+configure:15767: checking whether build environment is sane
+configure:15822: result: yes
+configure:15973: checking for a thread-safe mkdir -p
+configure:16012: result: /usr/bin/mkdir -p
+configure:16015: checking whether make sets $(MAKE)
+configure:16037: result: yes
+configure:16067: checking for style of include used by make
+configure:16095: result: GNU
+configure:16129: checking whether make supports nested variables
+configure:16146: result: yes
+configure:16231: checking dependency style of gcc
+configure:16342: result: gcc3
+configure:16359: checking dependency style of g++
+configure:16470: result: gcc3
+configure:16489: checking for C/C++ restrict keyword
+configure:16514: gcc -c -g -O2  conftest.c >&5
+configure:16514: $? = 0
+configure:16522: result: __restrict
+configure:16535: checking for working volatile
+configure:16554: gcc -c -g -O2  conftest.c >&5
+configure:16554: $? = 0
+configure:16561: result: yes
+configure:16569: checking for inline
+configure:16585: gcc -c -g -O2  conftest.c >&5
+configure:16585: $? = 0
+configure:16593: result: inline
+configure:16687: checking full c++ support and linking model
+configure:16697: result: yes
+configure:16742: checking for stdint.h
+configure:16742: result: yes
+configure:16742: checking poll.h usability
+configure:16742: gcc -c -g -O2  conftest.c >&5
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking poll.h presence
+configure:16742: gcc -E  conftest.c
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking for poll.h
+configure:16742: result: yes
+configure:16742: checking sys/mman.h usability
+configure:16742: gcc -c -g -O2  conftest.c >&5
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking sys/mman.h presence
+configure:16742: gcc -E  conftest.c
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking for sys/mman.h
+configure:16742: result: yes
+configure:16742: checking sys/shm.h usability
+configure:16742: gcc -c -g -O2  conftest.c >&5
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking sys/shm.h presence
+configure:16742: gcc -E  conftest.c
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking for sys/shm.h
+configure:16742: result: yes
+configure:16742: checking sys/poll.h usability
+configure:16742: gcc -c -g -O2  conftest.c >&5
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking sys/poll.h presence
+configure:16742: gcc -E  conftest.c
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking for sys/poll.h
+configure:16742: result: yes
+configure:16742: checking sys/timeb.h usability
+configure:16742: gcc -c -g -O2  conftest.c >&5
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking sys/timeb.h presence
+configure:16742: gcc -E  conftest.c
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking for sys/timeb.h
+configure:16742: result: yes
+configure:16742: checking endian.h usability
+configure:16742: gcc -c -g -O2  conftest.c >&5
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking endian.h presence
+configure:16742: gcc -E  conftest.c
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking for endian.h
+configure:16742: result: yes
+configure:16742: checking sys/filio.h usability
+configure:16742: gcc -c -g -O2  conftest.c >&5
+conftest.c:64:23: fatal error: sys/filio.h: No such file or directory
+ #include <sys/filio.h>
+                       ^
+compilation terminated.
+configure:16742: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #ifdef HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #ifdef HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #ifdef STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # ifdef HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #ifdef HAVE_STRING_H
+| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #ifdef HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #ifdef HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #endif
+| #ifdef HAVE_STDINT_H
+| # include <stdint.h>
+| #endif
+| #ifdef HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <sys/filio.h>
+configure:16742: result: no
+configure:16742: checking sys/filio.h presence
+configure:16742: gcc -E  conftest.c
+conftest.c:31:23: fatal error: sys/filio.h: No such file or directory
+ #include <sys/filio.h>
+                       ^
+compilation terminated.
+configure:16742: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| /* end confdefs.h.  */
+| #include <sys/filio.h>
+configure:16742: result: no
+configure:16742: checking for sys/filio.h
+configure:16742: result: no
+configure:16742: checking dirent.h usability
+configure:16742: gcc -c -g -O2  conftest.c >&5
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking dirent.h presence
+configure:16742: gcc -E  conftest.c
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking for dirent.h
+configure:16742: result: yes
+configure:16742: checking sys/resource.h usability
+configure:16742: gcc -c -g -O2  conftest.c >&5
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking sys/resource.h presence
+configure:16742: gcc -E  conftest.c
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking for sys/resource.h
+configure:16742: result: yes
+configure:16742: checking wchar.h usability
+configure:16742: gcc -c -g -O2  conftest.c >&5
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking wchar.h presence
+configure:16742: gcc -E  conftest.c
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking for wchar.h
+configure:16742: result: yes
+configure:16742: checking netinet/in.h usability
+configure:16742: gcc -c -g -O2  conftest.c >&5
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking netinet/in.h presence
+configure:16742: gcc -E  conftest.c
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking for netinet/in.h
+configure:16742: result: yes
+configure:16742: checking net/if.h usability
+configure:16742: gcc -c -g -O2  conftest.c >&5
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking net/if.h presence
+configure:16742: gcc -E  conftest.c
+configure:16742: $? = 0
+configure:16742: result: yes
+configure:16742: checking for net/if.h
+configure:16742: result: yes
+configure:16755: checking mach/clock.h usability
+configure:16755: gcc -c -g -O2  conftest.c >&5
+conftest.c:69:24: fatal error: mach/clock.h: No such file or directory
+ #include <mach/clock.h>
+                        ^
+compilation terminated.
+configure:16755: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #ifdef HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #ifdef HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #ifdef STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # ifdef HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #ifdef HAVE_STRING_H
+| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #ifdef HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #ifdef HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #endif
+| #ifdef HAVE_STDINT_H
+| # include <stdint.h>
+| #endif
+| #ifdef HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <mach/clock.h>
+configure:16755: result: no
+configure:16755: checking mach/clock.h presence
+configure:16755: gcc -E  conftest.c
+conftest.c:36:24: fatal error: mach/clock.h: No such file or directory
+ #include <mach/clock.h>
+                        ^
+compilation terminated.
+configure:16755: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| /* end confdefs.h.  */
+| #include <mach/clock.h>
+configure:16755: result: no
+configure:16755: checking for mach/clock.h
+configure:16755: result: no
+configure:16755: checking mach-o/dyld.h usability
+configure:16755: gcc -c -g -O2  conftest.c >&5
+conftest.c:69:25: fatal error: mach-o/dyld.h: No such file or directory
+ #include <mach-o/dyld.h>
+                         ^
+compilation terminated.
+configure:16755: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #ifdef HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #ifdef HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #ifdef STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # ifdef HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #ifdef HAVE_STRING_H
+| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #ifdef HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #ifdef HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #endif
+| #ifdef HAVE_STDINT_H
+| # include <stdint.h>
+| #endif
+| #ifdef HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <mach-o/dyld.h>
+configure:16755: result: no
+configure:16755: checking mach-o/dyld.h presence
+configure:16755: gcc -E  conftest.c
+conftest.c:36:25: fatal error: mach-o/dyld.h: No such file or directory
+ #include <mach-o/dyld.h>
+                         ^
+compilation terminated.
+configure:16755: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| /* end confdefs.h.  */
+| #include <mach-o/dyld.h>
+configure:16755: result: no
+configure:16755: checking for mach-o/dyld.h
+configure:16755: result: no
+configure:16755: checking linux/version.h usability
+configure:16755: gcc -c -g -O2  conftest.c >&5
+configure:16755: $? = 0
+configure:16755: result: yes
+configure:16755: checking linux/version.h presence
+configure:16755: gcc -E  conftest.c
+configure:16755: $? = 0
+configure:16755: result: yes
+configure:16755: checking for linux/version.h
+configure:16755: result: yes
+configure:16755: checking sys/inotify.h usability
+configure:16755: gcc -c -g -O2  conftest.c >&5
+configure:16755: $? = 0
+configure:16755: result: yes
+configure:16755: checking sys/inotify.h presence
+configure:16755: gcc -E  conftest.c
+configure:16755: $? = 0
+configure:16755: result: yes
+configure:16755: checking for sys/inotify.h
+configure:16755: result: yes
+configure:16755: checking sys/event.h usability
+configure:16755: gcc -c -g -O2  conftest.c >&5
+conftest.c:71:23: fatal error: sys/event.h: No such file or directory
+ #include <sys/event.h>
+                       ^
+compilation terminated.
+configure:16755: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_LINUX_VERSION_H 1
+| #define HAVE_SYS_INOTIFY_H 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #ifdef HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #ifdef HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #ifdef STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # ifdef HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #ifdef HAVE_STRING_H
+| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #ifdef HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #ifdef HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #endif
+| #ifdef HAVE_STDINT_H
+| # include <stdint.h>
+| #endif
+| #ifdef HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <sys/event.h>
+configure:16755: result: no
+configure:16755: checking sys/event.h presence
+configure:16755: gcc -E  conftest.c
+conftest.c:38:23: fatal error: sys/event.h: No such file or directory
+ #include <sys/event.h>
+                       ^
+compilation terminated.
+configure:16755: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_LINUX_VERSION_H 1
+| #define HAVE_SYS_INOTIFY_H 1
+| /* end confdefs.h.  */
+| #include <sys/event.h>
+configure:16755: result: no
+configure:16755: checking for sys/event.h
+configure:16755: result: no
+configure:16755: checking syslog.h usability
+configure:16755: gcc -c -g -O2  conftest.c >&5
+configure:16755: $? = 0
+configure:16755: result: yes
+configure:16755: checking syslog.h presence
+configure:16755: gcc -E  conftest.c
+configure:16755: $? = 0
+configure:16755: result: yes
+configure:16755: checking for syslog.h
+configure:16755: result: yes
+configure:16755: checking sys/wait.h usability
+configure:16755: gcc -c -g -O2  conftest.c >&5
+configure:16755: $? = 0
+configure:16755: result: yes
+configure:16755: checking sys/wait.h presence
+configure:16755: gcc -E  conftest.c
+configure:16755: $? = 0
+configure:16755: result: yes
+configure:16755: checking for sys/wait.h
+configure:16755: result: yes
+configure:16755: checking termios.h usability
+configure:16755: gcc -c -g -O2  conftest.c >&5
+configure:16755: $? = 0
+configure:16755: result: yes
+configure:16755: checking termios.h presence
+configure:16755: gcc -E  conftest.c
+configure:16755: $? = 0
+configure:16755: result: yes
+configure:16755: checking for termios.h
+configure:16755: result: yes
+configure:16755: checking termio.h usability
+configure:16755: gcc -c -g -O2  conftest.c >&5
+configure:16755: $? = 0
+configure:16755: result: yes
+configure:16755: checking termio.h presence
+configure:16755: gcc -E  conftest.c
+configure:16755: $? = 0
+configure:16755: result: yes
+configure:16755: checking for termio.h
+configure:16755: result: yes
+configure:16755: checking fcntl.h usability
+configure:16755: gcc -c -g -O2  conftest.c >&5
+configure:16755: $? = 0
+configure:16755: result: yes
+configure:16755: checking fcntl.h presence
+configure:16755: gcc -E  conftest.c
+configure:16755: $? = 0
+configure:16755: result: yes
+configure:16755: checking for fcntl.h
+configure:16755: result: yes
+configure:16755: checking for unistd.h
+configure:16755: result: yes
+configure:16768: checking sys/param.h usability
+configure:16768: gcc -c -g -O2  conftest.c >&5
+configure:16768: $? = 0
+configure:16768: result: yes
+configure:16768: checking sys/param.h presence
+configure:16768: gcc -E  conftest.c
+configure:16768: $? = 0
+configure:16768: result: yes
+configure:16768: checking for sys/param.h
+configure:16768: result: yes
+configure:16768: checking sys/lockf.h usability
+configure:16768: gcc -c -g -O2  conftest.c >&5
+conftest.c:78:23: fatal error: sys/lockf.h: No such file or directory
+ #include <sys/lockf.h>
+                       ^
+compilation terminated.
+configure:16768: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_LINUX_VERSION_H 1
+| #define HAVE_SYS_INOTIFY_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_TERMIOS_H 1
+| #define HAVE_TERMIO_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_SYS_PARAM_H 1
+| /* end confdefs.h.  */
+| #include <stdio.h>
+| #ifdef HAVE_SYS_TYPES_H
+| # include <sys/types.h>
+| #endif
+| #ifdef HAVE_SYS_STAT_H
+| # include <sys/stat.h>
+| #endif
+| #ifdef STDC_HEADERS
+| # include <stdlib.h>
+| # include <stddef.h>
+| #else
+| # ifdef HAVE_STDLIB_H
+| #  include <stdlib.h>
+| # endif
+| #endif
+| #ifdef HAVE_STRING_H
+| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+| #  include <memory.h>
+| # endif
+| # include <string.h>
+| #endif
+| #ifdef HAVE_STRINGS_H
+| # include <strings.h>
+| #endif
+| #ifdef HAVE_INTTYPES_H
+| # include <inttypes.h>
+| #endif
+| #ifdef HAVE_STDINT_H
+| # include <stdint.h>
+| #endif
+| #ifdef HAVE_UNISTD_H
+| # include <unistd.h>
+| #endif
+| #include <sys/lockf.h>
+configure:16768: result: no
+configure:16768: checking sys/lockf.h presence
+configure:16768: gcc -E  conftest.c
+conftest.c:45:23: fatal error: sys/lockf.h: No such file or directory
+ #include <sys/lockf.h>
+                       ^
+compilation terminated.
+configure:16768: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_LINUX_VERSION_H 1
+| #define HAVE_SYS_INOTIFY_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_TERMIOS_H 1
+| #define HAVE_TERMIO_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_SYS_PARAM_H 1
+| /* end confdefs.h.  */
+| #include <sys/lockf.h>
+configure:16768: result: no
+configure:16768: checking for sys/lockf.h
+configure:16768: result: no
+configure:16768: checking sys/file.h usability
+configure:16768: gcc -c -g -O2  conftest.c >&5
+configure:16768: $? = 0
+configure:16768: result: yes
+configure:16768: checking sys/file.h presence
+configure:16768: gcc -E  conftest.c
+configure:16768: $? = 0
+configure:16768: result: yes
+configure:16768: checking for sys/file.h
+configure:16768: result: yes
+configure:16768: checking for dlfcn.h
+configure:16768: result: yes
+configure:16779: checking regex.h usability
+configure:16779: gcc -c -g -O2  conftest.c >&5
+configure:16779: $? = 0
+configure:16779: result: yes
+configure:16779: checking regex.h presence
+configure:16779: gcc -E  conftest.c
+configure:16779: $? = 0
+configure:16779: result: yes
+configure:16779: checking for regex.h
+configure:16779: result: yes
+configure:16785: checking for regfree in -lregex
+configure:16810: gcc -o conftest -g -O2   conftest.c -lregex   >&5
+/usr/bin/ld: cannot find -lregex
+collect2: error: ld returned 1 exit status
+configure:16810: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_LINUX_VERSION_H 1
+| #define HAVE_SYS_INOTIFY_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_TERMIOS_H 1
+| #define HAVE_TERMIO_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_SYS_FILE_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_REGEX_H 1
+| /* 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 regfree ();
+| int
+| main ()
+| {
+| return regfree ();
+|   ;
+|   return 0;
+| }
+configure:16819: result: no
+configure:16832: checking for fopen in -lmsvcrt
+configure:16857: gcc -o conftest -g -O2   conftest.c -lmsvcrt   >&5
+/usr/bin/ld: cannot find -lmsvcrt
+collect2: error: ld returned 1 exit status
+configure:16857: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_LINUX_VERSION_H 1
+| #define HAVE_SYS_INOTIFY_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_TERMIOS_H 1
+| #define HAVE_TERMIO_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_SYS_FILE_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_REGEX_H 1
+| /* 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 fopen ();
+| int
+| main ()
+| {
+| return fopen ();
+|   ;
+|   return 0;
+| }
+configure:16866: result: no
+configure:16885: checking for __modsi3 in -lgcc
+configure:16910: gcc -o conftest -g -O2   conftest.c -lgcc   >&5
+/tmp/cct0M5uI.o: In function `main':
+/home/lisional/git/sflphone-android/jni/libucommon/sources/conftest.c:59: undefined reference to `__modsi3'
+collect2: error: ld returned 1 exit status
+configure:16910: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_LINUX_VERSION_H 1
+| #define HAVE_SYS_INOTIFY_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_TERMIOS_H 1
+| #define HAVE_TERMIO_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_SYS_FILE_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_REGEX_H 1
+| /* 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 __modsi3 ();
+| int
+| main ()
+| {
+| return __modsi3 ();
+|   ;
+|   return 0;
+| }
+configure:16919: result: no
+configure:16928: checking for socketpair in -lc
+configure:16953: gcc -o conftest -g -O2   conftest.c -lc   >&5
+configure:16953: $? = 0
+configure:16963: result: yes
+configure:17019: checking for getaddrinfo in -lc
+configure:17044: gcc -o conftest -g -O2   conftest.c -lc   >&5
+configure:17044: $? = 0
+configure:17054: result: yes
+configure:17110: checking for gethostbyname2 in -lc
+configure:17135: gcc -o conftest -g -O2   conftest.c -lc   >&5
+configure:17135: $? = 0
+configure:17145: result: yes
+configure:17202: checking for inet_ntop in -lc
+configure:17227: gcc -o conftest -g -O2   conftest.c -lc   >&5
+configure:17227: $? = 0
+configure:17237: result: yes
+configure:17343: checking for socket in -lsocket
+configure:17368: gcc -o conftest -g -O2   conftest.c -lsocket   >&5
+/usr/bin/ld: cannot find -lsocket
+collect2: error: ld returned 1 exit status
+configure:17368: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_LINUX_VERSION_H 1
+| #define HAVE_SYS_INOTIFY_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_TERMIOS_H 1
+| #define HAVE_TERMIO_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_SYS_FILE_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_REGEX_H 1
+| #define HAVE_SOCKETPAIR 1
+| #define HAVE_GETADDRINFO 1
+| #define HAVE_GETHOSTBYNAME2 1
+| #define HAVE_INET_NTOP 1
+| /* 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 socket ();
+| int
+| main ()
+| {
+| return socket ();
+|   ;
+|   return 0;
+| }
+configure:17377: result: no
+configure:17459: checking for socks proxy support
+configure:17470: result: no
+configure:17475: checking for lstat in -lc
+configure:17500: gcc -o conftest -g -O2   conftest.c -lc   >&5
+configure:17500: $? = 0
+configure:17510: result: yes
+configure:17522: checking for strcoll in -lc
+configure:17547: gcc -o conftest -g -O2   conftest.c -lc   >&5
+configure:17547: $? = 0
+configure:17557: result: yes
+configure:17569: checking for stricmp in -lc
+configure:17594: gcc -o conftest -g -O2   conftest.c -lc   >&5
+/tmp/ccMAL7b5.o: In function `main':
+/home/lisional/git/sflphone-android/jni/libucommon/sources/conftest.c:65: undefined reference to `stricmp'
+collect2: error: ld returned 1 exit status
+configure:17594: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_LINUX_VERSION_H 1
+| #define HAVE_SYS_INOTIFY_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_TERMIOS_H 1
+| #define HAVE_TERMIO_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_SYS_FILE_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_REGEX_H 1
+| #define HAVE_SOCKETPAIR 1
+| #define HAVE_GETADDRINFO 1
+| #define HAVE_GETHOSTBYNAME2 1
+| #define HAVE_INET_NTOP 1
+| #define HAVE_LSTAT 1
+| #define HAVE_STRCOLL 1
+| /* 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 stricmp ();
+| int
+| main ()
+| {
+| return stricmp ();
+|   ;
+|   return 0;
+| }
+configure:17604: result: no
+configure:17616: checking for stristr in -lc
+configure:17641: gcc -o conftest -g -O2   conftest.c -lc   >&5
+/tmp/ccmEGX96.o: In function `main':
+/home/lisional/git/sflphone-android/jni/libucommon/sources/conftest.c:65: undefined reference to `stristr'
+collect2: error: ld returned 1 exit status
+configure:17641: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_LINUX_VERSION_H 1
+| #define HAVE_SYS_INOTIFY_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_TERMIOS_H 1
+| #define HAVE_TERMIO_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_SYS_FILE_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_REGEX_H 1
+| #define HAVE_SOCKETPAIR 1
+| #define HAVE_GETADDRINFO 1
+| #define HAVE_GETHOSTBYNAME2 1
+| #define HAVE_INET_NTOP 1
+| #define HAVE_LSTAT 1
+| #define HAVE_STRCOLL 1
+| /* 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 stristr ();
+| int
+| main ()
+| {
+| return stristr ();
+|   ;
+|   return 0;
+| }
+configure:17651: result: no
+configure:17663: checking for sysconf in -lc
+configure:17688: gcc -o conftest -g -O2   conftest.c -lc   >&5
+configure:17688: $? = 0
+configure:17698: result: yes
+configure:17710: checking for posix_memalign in -lc
+configure:17735: gcc -o conftest -g -O2   conftest.c -lc   >&5
+configure:17735: $? = 0
+configure:17745: result: yes
+configure:17757: checking for dlopen in -lc
+configure:17782: gcc -o conftest -g -O2   conftest.c -lc   >&5
+/tmp/ccPAhYfk.o: In function `main':
+/home/lisional/git/sflphone-android/jni/libucommon/sources/conftest.c:67: undefined reference to `dlopen'
+collect2: error: ld returned 1 exit status
+configure:17782: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_LINUX_VERSION_H 1
+| #define HAVE_SYS_INOTIFY_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_TERMIOS_H 1
+| #define HAVE_TERMIO_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_SYS_FILE_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_REGEX_H 1
+| #define HAVE_SOCKETPAIR 1
+| #define HAVE_GETADDRINFO 1
+| #define HAVE_GETHOSTBYNAME2 1
+| #define HAVE_INET_NTOP 1
+| #define HAVE_LSTAT 1
+| #define HAVE_STRCOLL 1
+| #define HAVE_SYSCONF 1
+| #define HAVE_POSIX_MEMALIGN 1
+| /* 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;
+| }
+configure:17792: result: no
+configure:17803: checking for dlopen in -ldl
+configure:17828: gcc -o conftest -g -O2   conftest.c -ldl   >&5
+configure:17828: $? = 0
+configure:17837: result: yes
+configure:17958: checking pthread.h usability
+configure:17958: gcc -c -g -O2  conftest.c >&5
+configure:17958: $? = 0
+configure:17958: result: yes
+configure:17958: checking pthread.h presence
+configure:17958: gcc -E  conftest.c
+configure:17958: $? = 0
+configure:17958: result: yes
+configure:17958: checking for pthread.h
+configure:17958: result: yes
+configure:17962: checking for pthread_create in -lpthread
+configure:17987: gcc -o conftest -g -O2   conftest.c -lpthread   >&5
+configure:17987: $? = 0
+configure:17996: result: yes
+configure:18137: checking for pthread_condattr_setclock in -lpthread
+configure:18162: gcc -o conftest -g -O2   conftest.c -lpthread   >&5
+configure:18162: $? = 0
+configure:18172: result: yes
+configure:18183: checking for pthread_setconcurrency in -lpthread
+configure:18208: gcc -o conftest -g -O2   conftest.c -lpthread   >&5
+configure:18208: $? = 0
+configure:18218: result: yes
+configure:18230: checking for pthread_yield in -lpthread
+configure:18255: gcc -o conftest -g -O2   conftest.c -lpthread   >&5
+configure:18255: $? = 0
+configure:18265: result: yes
+configure:18277: checking for pthread_delay in -lpthread
+configure:18302: gcc -o conftest -g -O2   conftest.c -lpthread   >&5
+/tmp/ccA6eeXJ.o: In function `main':
+/home/lisional/git/sflphone-android/jni/libucommon/sources/conftest.c:70: undefined reference to `pthread_delay'
+collect2: error: ld returned 1 exit status
+configure:18302: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_LINUX_VERSION_H 1
+| #define HAVE_SYS_INOTIFY_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_TERMIOS_H 1
+| #define HAVE_TERMIO_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_SYS_FILE_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_REGEX_H 1
+| #define HAVE_SOCKETPAIR 1
+| #define HAVE_GETADDRINFO 1
+| #define HAVE_GETHOSTBYNAME2 1
+| #define HAVE_INET_NTOP 1
+| #define HAVE_LSTAT 1
+| #define HAVE_STRCOLL 1
+| #define HAVE_SYSCONF 1
+| #define HAVE_POSIX_MEMALIGN 1
+| #define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
+| #define HAVE_PTHREAD_SETCONCURRENCY 1
+| #define HAVE_PTHREAD_YIELD 1
+| /* 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_delay ();
+| int
+| main ()
+| {
+| return pthread_delay ();
+|   ;
+|   return 0;
+| }
+configure:18312: result: no
+configure:18323: checking for pthread_delay_np in -lpthread
+configure:18348: gcc -o conftest -g -O2   conftest.c -lpthread   >&5
+/tmp/ccGlDExO.o: In function `main':
+/home/lisional/git/sflphone-android/jni/libucommon/sources/conftest.c:70: undefined reference to `pthread_delay_np'
+collect2: error: ld returned 1 exit status
+configure:18348: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_LINUX_VERSION_H 1
+| #define HAVE_SYS_INOTIFY_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_TERMIOS_H 1
+| #define HAVE_TERMIO_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_SYS_FILE_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_REGEX_H 1
+| #define HAVE_SOCKETPAIR 1
+| #define HAVE_GETADDRINFO 1
+| #define HAVE_GETHOSTBYNAME2 1
+| #define HAVE_INET_NTOP 1
+| #define HAVE_LSTAT 1
+| #define HAVE_STRCOLL 1
+| #define HAVE_SYSCONF 1
+| #define HAVE_POSIX_MEMALIGN 1
+| #define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
+| #define HAVE_PTHREAD_SETCONCURRENCY 1
+| #define HAVE_PTHREAD_YIELD 1
+| /* 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_delay_np ();
+| int
+| main ()
+| {
+| return pthread_delay_np ();
+|   ;
+|   return 0;
+| }
+configure:18358: result: no
+configure:18369: checking for pthread_setschedprio in -lpthread
+configure:18394: gcc -o conftest -g -O2   conftest.c -lpthread   >&5
+configure:18394: $? = 0
+configure:18404: result: yes
+configure:18464: checking for ftok
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for shm_open
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+/tmp/ccxiijUQ.o: In function `main':
+/home/lisional/git/sflphone-android/jni/libucommon/sources/conftest.c:95: undefined reference to `shm_open'
+collect2: error: ld returned 1 exit status
+configure:18464: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_LINUX_VERSION_H 1
+| #define HAVE_SYS_INOTIFY_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_TERMIOS_H 1
+| #define HAVE_TERMIO_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_SYS_FILE_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_REGEX_H 1
+| #define HAVE_SOCKETPAIR 1
+| #define HAVE_GETADDRINFO 1
+| #define HAVE_GETHOSTBYNAME2 1
+| #define HAVE_INET_NTOP 1
+| #define HAVE_LSTAT 1
+| #define HAVE_STRCOLL 1
+| #define HAVE_SYSCONF 1
+| #define HAVE_POSIX_MEMALIGN 1
+| #define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
+| #define HAVE_PTHREAD_SETCONCURRENCY 1
+| #define HAVE_PTHREAD_YIELD 1
+| #define HAVE_PTHREAD_SETSCHEDPRIO 1
+| #define HAVE_FTOK 1
+| /* end confdefs.h.  */
+| /* Define shm_open to an innocuous variant, in case <limits.h> declares shm_open.
+|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+| #define shm_open innocuous_shm_open
+| 
+| /* System header to define __stub macros and hopefully few prototypes,
+|     which can conflict with char shm_open (); 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 shm_open
+| 
+| /* 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 shm_open ();
+| /* 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_shm_open || defined __stub___shm_open
+| choke me
+| #endif
+| 
+| int
+| main ()
+| {
+| return shm_open ();
+|   ;
+|   return 0;
+| }
+configure:18464: result: no
+configure:18472: checking for shm_open in -lposix4
+configure:18497: gcc -o conftest -g -O2   conftest.c -lposix4   >&5
+/usr/bin/ld: cannot find -lposix4
+collect2: error: ld returned 1 exit status
+configure:18497: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "ucommon"
+| #define PACKAGE_TARNAME "ucommon"
+| #define PACKAGE_VERSION "6.0.7"
+| #define PACKAGE_STRING "ucommon 6.0.7"
+| #define PACKAGE_BUGREPORT ""
+| #define PACKAGE_URL ""
+| #define STDC_HEADERS 1
+| #define HAVE_SYS_TYPES_H 1
+| #define HAVE_SYS_STAT_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_MEMORY_H 1
+| #define HAVE_STRINGS_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_STDINT_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_DLFCN_H 1
+| #define LT_OBJDIR ".libs/"
+| #define PACKAGE "ucommon"
+| #define VERSION "6.0.7"
+| #define restrict __restrict
+| #define HAVE_STDINT_H 1
+| #define HAVE_POLL_H 1
+| #define HAVE_SYS_MMAN_H 1
+| #define HAVE_SYS_SHM_H 1
+| #define HAVE_SYS_POLL_H 1
+| #define HAVE_SYS_TIMEB_H 1
+| #define HAVE_ENDIAN_H 1
+| #define HAVE_DIRENT_H 1
+| #define HAVE_SYS_RESOURCE_H 1
+| #define HAVE_WCHAR_H 1
+| #define HAVE_NETINET_IN_H 1
+| #define HAVE_NET_IF_H 1
+| #define HAVE_LINUX_VERSION_H 1
+| #define HAVE_SYS_INOTIFY_H 1
+| #define HAVE_SYSLOG_H 1
+| #define HAVE_SYS_WAIT_H 1
+| #define HAVE_TERMIOS_H 1
+| #define HAVE_TERMIO_H 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_SYS_PARAM_H 1
+| #define HAVE_SYS_FILE_H 1
+| #define HAVE_DLFCN_H 1
+| #define HAVE_REGEX_H 1
+| #define HAVE_SOCKETPAIR 1
+| #define HAVE_GETADDRINFO 1
+| #define HAVE_GETHOSTBYNAME2 1
+| #define HAVE_INET_NTOP 1
+| #define HAVE_LSTAT 1
+| #define HAVE_STRCOLL 1
+| #define HAVE_SYSCONF 1
+| #define HAVE_POSIX_MEMALIGN 1
+| #define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
+| #define HAVE_PTHREAD_SETCONCURRENCY 1
+| #define HAVE_PTHREAD_YIELD 1
+| #define HAVE_PTHREAD_SETSCHEDPRIO 1
+| #define HAVE_FTOK 1
+| /* 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 shm_open ();
+| int
+| main ()
+| {
+| return shm_open ();
+|   ;
+|   return 0;
+| }
+configure:18507: result: no
+configure:18517: checking for shm_open in -lrt
+configure:18542: gcc -o conftest -g -O2   conftest.c -lrt   >&5
+configure:18542: $? = 0
+configure:18552: result: yes
+configure:18464: checking for nanosleep
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for clock_nanosleep
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for clock_gettime
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for strerror_r
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for localtime_r
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for gmtime_r
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for posix_fadvise
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for ftruncate
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for pwrite
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for setpgrp
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for setlocale
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for gettext
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+conftest.c:96:6: warning: conflicting types for built-in function 'gettext' [enabled by default]
+ char gettext ();
+      ^
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for execvp
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+conftest.c:97:6: warning: conflicting types for built-in function 'execvp' [enabled by default]
+ char execvp ();
+      ^
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for atexit
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for realpath
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for symlink
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for readlink
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for waitpid
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18464: checking for wait4
+configure:18464: gcc -o conftest -g -O2   conftest.c  >&5
+configure:18464: $? = 0
+configure:18464: result: yes
+configure:18854: checking stdexcept usability
+configure:18854: g++ -c   conftest.cpp >&5
+configure:18854: $? = 0
+configure:18854: result: yes
+configure:18854: checking stdexcept presence
+configure:18854: g++ -E  conftest.cpp
+configure:18854: $? = 0
+configure:18854: result: yes
+configure:18854: checking for stdexcept
+configure:18854: result: yes
+configure:18864: checking for old style iostream
+configure:18889: g++ -c   conftest.cpp >&5
+configure:18889: $? = 0
+configure:18891: result: no
+configure:18914: checking whether g++ supports -mt
+configure:18923: result: no
+configure:18914: checking whether g++ supports -pthread
+configure:18918: result: yes
+configure:18941: checking whether g++ supports -fno-check-new
+configure:18946: result: yes
+configure:18941: checking whether g++ supports -finline
+configure:18946: result: yes
+configure:18955: checking whether g++ supports visibility
+configure:18960: result: yes
+configure:19105: checking for pkg-config
+configure:19123: found /usr/bin/pkg-config
+configure:19135: result: /usr/bin/pkg-config
+configure:19160: checking pkg-config is at least version 0.9.0
+configure:19163: result: yes
+configure:19378: checking openssl/ssl.h usability
+configure:19378: gcc -c -g -O2  conftest.c >&5
+configure:19378: $? = 0
+configure:19378: result: yes
+configure:19378: checking openssl/ssl.h presence
+configure:19378: gcc -E  conftest.c
+configure:19378: $? = 0
+configure:19378: result: yes
+configure:19378: checking for openssl/ssl.h
+configure:19378: result: yes
+configure:19392: checking openssl/fips.h usability
+configure:19392: gcc -c -g -O2  conftest.c >&5
+configure:19392: $? = 0
+configure:19392: result: yes
+configure:19392: checking openssl/fips.h presence
+configure:19392: gcc -E  conftest.c
+configure:19392: $? = 0
+configure:19392: result: yes
+configure:19392: checking for openssl/fips.h
+configure:19392: result: yes
+configure:19402: checking for gnutls_init in -lgnutls
+configure:19427: gcc -o conftest -g -O2   conftest.c -lgnutls   >&5
+configure:19427: $? = 0
+configure:19436: result: yes
+configure:19482: checking secure library mode
+configure:19484: result: gnutls
+configure:19501: checking libintl.h usability
+configure:19501: gcc -c -g -O2  conftest.c >&5
+configure:19501: $? = 0
+configure:19501: result: yes
+configure:19501: checking libintl.h presence
+configure:19501: gcc -E  conftest.c
+configure:19501: $? = 0
+configure:19501: result: yes
+configure:19501: checking for libintl.h
+configure:19501: result: yes
+configure:19662: checking for doxygen
+configure:19680: found /usr/bin/doxygen
+configure:19693: result: /usr/bin/doxygen
+configure:19833: checking that generated files are newer than configure
+configure:19839: result: done
+configure:19866: creating ./config.status
+
+## ---------------------- ##
+## Running config.status. ##
+## ---------------------- ##
+
+This file was extended by ucommon config.status 6.0.7, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  CONFIG_FILES    = 
+  CONFIG_HEADERS  = 
+  CONFIG_LINKS    = 
+  CONFIG_COMMANDS = 
+  $ ./config.status 
+
+on pcal
+
+config.status:1259: creating Makefile
+config.status:1259: creating corelib/Makefile
+config.status:1259: creating commoncpp/Makefile
+config.status:1259: creating openssl/Makefile
+config.status:1259: creating gnutls/Makefile
+config.status:1259: creating nossl/Makefile
+config.status:1259: creating utils/Makefile
+config.status:1259: creating inc/Makefile
+config.status:1259: creating inc/ucommon/Makefile
+config.status:1259: creating inc/commoncpp/Makefile
+config.status:1259: creating test/Makefile
+config.status:1259: creating directive
+config.status:1259: creating commoncpp.pc
+config.status:1259: creating ucommon.pc
+config.status:1259: creating ucommon.spec
+config.status:1259: creating ucommon-config
+config.status:1259: creating commoncpp-config
+config.status:1259: creating ucommon-config.h
+config.status:1440: ucommon-config.h is unchanged
+config.status:1488: executing libtool commands
+config.status:1488: executing depfiles commands
+
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+
+ac_cv_build=x86_64-unknown-linux-gnu
+ac_cv_c_compiler_gnu=yes
+ac_cv_c_inline=inline
+ac_cv_c_restrict=__restrict
+ac_cv_c_volatile=yes
+ac_cv_cxx_compiler_gnu=yes
+ac_cv_env_CCC_set=
+ac_cv_env_CCC_value=
+ac_cv_env_CC_set=
+ac_cv_env_CC_value=
+ac_cv_env_CFLAGS_set=
+ac_cv_env_CFLAGS_value=
+ac_cv_env_CPPFLAGS_set=
+ac_cv_env_CPPFLAGS_value=
+ac_cv_env_CPP_set=
+ac_cv_env_CPP_value=
+ac_cv_env_CXXCPP_set=
+ac_cv_env_CXXCPP_value=
+ac_cv_env_CXXFLAGS_set=
+ac_cv_env_CXXFLAGS_value=
+ac_cv_env_CXX_set=
+ac_cv_env_CXX_value=
+ac_cv_env_GNUTLS_CFLAGS_set=
+ac_cv_env_GNUTLS_CFLAGS_value=
+ac_cv_env_GNUTLS_LIBS_set=
+ac_cv_env_GNUTLS_LIBS_value=
+ac_cv_env_LDFLAGS_set=
+ac_cv_env_LDFLAGS_value=
+ac_cv_env_LIBS_set=
+ac_cv_env_LIBS_value=
+ac_cv_env_OPENSSL_CFLAGS_set=
+ac_cv_env_OPENSSL_CFLAGS_value=
+ac_cv_env_OPENSSL_LIBS_set=
+ac_cv_env_OPENSSL_LIBS_value=
+ac_cv_env_PKG_CONFIG_LIBDIR_set=
+ac_cv_env_PKG_CONFIG_LIBDIR_value=
+ac_cv_env_PKG_CONFIG_PATH_set=
+ac_cv_env_PKG_CONFIG_PATH_value=
+ac_cv_env_PKG_CONFIG_set=
+ac_cv_env_PKG_CONFIG_value=
+ac_cv_env_build_alias_set=
+ac_cv_env_build_alias_value=
+ac_cv_env_host_alias_set=
+ac_cv_env_host_alias_value=
+ac_cv_env_target_alias_set=
+ac_cv_env_target_alias_value=
+ac_cv_func_atexit=yes
+ac_cv_func_clock_gettime=yes
+ac_cv_func_clock_nanosleep=yes
+ac_cv_func_execvp=yes
+ac_cv_func_ftok=yes
+ac_cv_func_ftruncate=yes
+ac_cv_func_gettext=yes
+ac_cv_func_gmtime_r=yes
+ac_cv_func_localtime_r=yes
+ac_cv_func_nanosleep=yes
+ac_cv_func_posix_fadvise=yes
+ac_cv_func_pwrite=yes
+ac_cv_func_readlink=yes
+ac_cv_func_realpath=yes
+ac_cv_func_setlocale=yes
+ac_cv_func_setpgrp=yes
+ac_cv_func_shm_open=no
+ac_cv_func_strerror_r=yes
+ac_cv_func_symlink=yes
+ac_cv_func_wait4=yes
+ac_cv_func_waitpid=yes
+ac_cv_header_dirent_h=yes
+ac_cv_header_dlfcn_h=yes
+ac_cv_header_endian_h=yes
+ac_cv_header_fcntl_h=yes
+ac_cv_header_inttypes_h=yes
+ac_cv_header_libintl_h=yes
+ac_cv_header_linux_version_h=yes
+ac_cv_header_mach_clock_h=no
+ac_cv_header_mach_o_dyld_h=no
+ac_cv_header_memory_h=yes
+ac_cv_header_net_if_h=yes
+ac_cv_header_netinet_in_h=yes
+ac_cv_header_openssl_fips_h=yes
+ac_cv_header_openssl_ssl_h=yes
+ac_cv_header_poll_h=yes
+ac_cv_header_pthread_h=yes
+ac_cv_header_regex_h=yes
+ac_cv_header_stdc=yes
+ac_cv_header_stdexcept=yes
+ac_cv_header_stdint_h=yes
+ac_cv_header_stdlib_h=yes
+ac_cv_header_string_h=yes
+ac_cv_header_strings_h=yes
+ac_cv_header_sys_event_h=no
+ac_cv_header_sys_file_h=yes
+ac_cv_header_sys_filio_h=no
+ac_cv_header_sys_inotify_h=yes
+ac_cv_header_sys_lockf_h=no
+ac_cv_header_sys_mman_h=yes
+ac_cv_header_sys_param_h=yes
+ac_cv_header_sys_poll_h=yes
+ac_cv_header_sys_resource_h=yes
+ac_cv_header_sys_shm_h=yes
+ac_cv_header_sys_stat_h=yes
+ac_cv_header_sys_timeb_h=yes
+ac_cv_header_sys_types_h=yes
+ac_cv_header_sys_wait_h=yes
+ac_cv_header_syslog_h=yes
+ac_cv_header_termio_h=yes
+ac_cv_header_termios_h=yes
+ac_cv_header_unistd_h=yes
+ac_cv_header_wchar_h=yes
+ac_cv_host=x86_64-unknown-linux-gnu
+ac_cv_lib_c___dlopen=no
+ac_cv_lib_c___getaddrinfo=yes
+ac_cv_lib_c___gethostbyname2=yes
+ac_cv_lib_c___inet_ntop=yes
+ac_cv_lib_c___lstat=yes
+ac_cv_lib_c___posix_memalign=yes
+ac_cv_lib_c___socketpair=yes
+ac_cv_lib_c___strcoll=yes
+ac_cv_lib_c___stricmp=no
+ac_cv_lib_c___stristr=no
+ac_cv_lib_c___sysconf=yes
+ac_cv_lib_dl_dlopen=yes
+ac_cv_lib_gcc___modsi3=no
+ac_cv_lib_gnutls_gnutls_init=yes
+ac_cv_lib_msvcrt_fopen=no
+ac_cv_lib_posix4_shm_open=no
+ac_cv_lib_pthread___pthread_condattr_setclock=yes
+ac_cv_lib_pthread___pthread_delay=no
+ac_cv_lib_pthread___pthread_delay_np=no
+ac_cv_lib_pthread___pthread_setconcurrency=yes
+ac_cv_lib_pthread___pthread_setschedprio=yes
+ac_cv_lib_pthread___pthread_yield=yes
+ac_cv_lib_pthread_pthread_create=yes
+ac_cv_lib_regex_regfree=no
+ac_cv_lib_rt_shm_open=yes
+ac_cv_lib_socket_socket=no
+ac_cv_objext=o
+ac_cv_path_DOXYGEN=/usr/bin/doxygen
+ac_cv_path_EGREP='/usr/bin/grep -E'
+ac_cv_path_FGREP='/usr/bin/grep -F'
+ac_cv_path_GREP=/usr/bin/grep
+ac_cv_path_SED=/usr/bin/sed
+ac_cv_path_ac_pt_PKG_CONFIG=/usr/bin/pkg-config
+ac_cv_path_install='/usr/bin/install -c'
+ac_cv_path_mkdir=/usr/bin/mkdir
+ac_cv_prog_AWK=gawk
+ac_cv_prog_CPP='gcc -E'
+ac_cv_prog_CXXCPP='g++ -E'
+ac_cv_prog_ac_ct_AR=ar
+ac_cv_prog_ac_ct_CC=gcc
+ac_cv_prog_ac_ct_CXX=g++
+ac_cv_prog_ac_ct_DLLTOOL=dlltool
+ac_cv_prog_ac_ct_OBJDUMP=objdump
+ac_cv_prog_ac_ct_RANLIB=ranlib
+ac_cv_prog_ac_ct_STRIP=strip
+ac_cv_prog_cc_c89=
+ac_cv_prog_cc_g=yes
+ac_cv_prog_cxx_g=yes
+ac_cv_prog_make_make_set=yes
+ac_cv_target=x86_64-unknown-linux-gnu
+am_cv_CC_dependencies_compiler_type=gcc3
+am_cv_CXX_dependencies_compiler_type=gcc3
+am_cv_make_support_nested_variables=yes
+lt_cv_ar_at_file=@
+lt_cv_archive_cmds_need_lc=no
+lt_cv_deplibs_check_method=pass_all
+lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_ld_reload_flag=-r
+lt_cv_nm_interface='BSD nm'
+lt_cv_objdir=.libs
+lt_cv_path_LD=/usr/bin/ld
+lt_cv_path_LDCXX='/usr/bin/ld -m elf_x86_64'
+lt_cv_path_NM='/usr/bin/nm -B'
+lt_cv_path_mainfest_tool=no
+lt_cv_prog_compiler_c_o=yes
+lt_cv_prog_compiler_c_o_CXX=yes
+lt_cv_prog_compiler_pic='-fPIC -DPIC'
+lt_cv_prog_compiler_pic_CXX='-fPIC -DPIC'
+lt_cv_prog_compiler_pic_works=yes
+lt_cv_prog_compiler_pic_works_CXX=yes
+lt_cv_prog_compiler_rtti_exceptions=no
+lt_cv_prog_compiler_static_works=no
+lt_cv_prog_compiler_static_works_CXX=no
+lt_cv_prog_gnu_ld=yes
+lt_cv_prog_gnu_ldcxx=yes
+lt_cv_sharedlib_from_linklib_cmd='printf %s\n'
+lt_cv_shlibpath_overrides_runpath=no
+lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[	 ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[	 ][	 ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'' | sed '\''/ __gnu_lto/d'\'''
+lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/  {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/  {"\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/^[ABCDGIRSTW]* \([^ ]*\) \(lib[^ ]*\)$/  {"\2", (void *) \&\2},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/  {"lib\2", (void *) \&\2},/p'\'''
+lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\'''
+lt_cv_sys_max_cmd_len=1572864
+lt_cv_to_host_file_cmd=func_convert_file_noop
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+
+ACLOCAL='${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing aclocal-1.13'
+AMDEPBACKSLASH='\'
+AMDEP_FALSE='#'
+AMDEP_TRUE=''
+AMTAR='$${TAR-tar}'
+AM_BACKSLASH='\'
+AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+AM_DEFAULT_VERBOSITY='1'
+AM_V='$(V)'
+AR='ar'
+AS='as'
+AUTOCONF='${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoconf'
+AUTOHEADER='${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoheader'
+AUTOMAKE='${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing automake-1.13'
+AWK='gawk'
+CC='gcc'
+CCDEPMODE='depmode=gcc3'
+CFLAGS='-g -O2'
+CHECKFLAGS=''
+COMPAT='commoncpp'
+CPP='gcc -E'
+CPPFLAGS=''
+CXX='g++'
+CXXCPP='g++ -E'
+CXXDEPMODE='depmode=gcc3'
+CXXFLAGS=' -g -O2'
+CYGPATH_W='echo'
+DEFS='-DHAVE_CONFIG_H'
+DEPDIR='.deps'
+DLLTOOL='dlltool'
+DOXYGEN='/usr/bin/doxygen'
+DSYMUTIL=''
+DUMPBIN=''
+ECHO_C=''
+ECHO_N='-n'
+ECHO_T=''
+EGREP='/usr/bin/grep -E'
+EXEEXT=''
+FGREP='/usr/bin/grep -F'
+GNUTLS_CFLAGS=''
+GNUTLS_LIBS='-lgnutls'
+GREP='/usr/bin/grep'
+INSTALL_DATA='${INSTALL} -m 644'
+INSTALL_PROGRAM='${INSTALL}'
+INSTALL_SCRIPT='${INSTALL}'
+INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
+LD='/usr/bin/ld -m elf_x86_64'
+LDFLAGS=''
+LIBOBJS=''
+LIBS=''
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+LIPO=''
+LN_S='ln -s'
+LTLIBOBJS=''
+LT_GENERIC='$(SHELL) $(top_builddir)/libtool'
+LT_VERSION='6:3:0'
+MAKEINFO='${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing makeinfo'
+MANIFEST_TOOL=':'
+MKDIR_P='/usr/bin/mkdir -p'
+NM='/usr/bin/nm -B'
+NMEDIT=''
+OBJDUMP='objdump'
+OBJEXT='o'
+OPENSSL_CFLAGS=''
+OPENSSL_LIBS='-lssl -lcrypto -lz '
+OTOOL64=''
+OTOOL=''
+PACKAGE='ucommon'
+PACKAGE_BUGREPORT=''
+PACKAGE_NAME='ucommon'
+PACKAGE_STRING='ucommon 6.0.7'
+PACKAGE_TARNAME='ucommon'
+PACKAGE_URL=''
+PACKAGE_VERSION='6.0.7'
+PATH_SEPARATOR=':'
+PKG_CONFIG='/usr/bin/pkg-config'
+PKG_CONFIG_LIBDIR=''
+PKG_CONFIG_PATH=''
+RANLIB='ranlib'
+SECURE='gnutls'
+SECURE_LIBS='-lgnutls'
+SECURE_LOCAL='../gnutls/libusecure.la -lgnutls'
+SED='/usr/bin/sed'
+SET_MAKE=''
+SHELL='/bin/sh'
+STRIP='strip'
+UCOMMON_CFGPATH='/etc'
+UCOMMON_CLINK=' -lc'
+UCOMMON_FLAGS=' -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1'
+UCOMMON_INCLUDES='/usr/local/include/ucommon'
+UCOMMON_LIBC='-lc'
+UCOMMON_LIBS='  -lrt  -ldl -lpthread -lc'
+UCOMMON_LINKED='  -lrt  -ldl -lpthread'
+UCOMMON_LOCALE='/usr/local/share/locale'
+UCOMMON_MODEL='CXX'
+UCOMMON_PREFIX='/usr/local'
+UCOMMON_VARPATH='/var'
+UCOMMON_VISIBILITY='1'
+VERSION='6.0.7'
+ac_ct_AR='ar'
+ac_ct_CC='gcc'
+ac_ct_CXX='g++'
+ac_ct_DUMPBIN=''
+am__EXEEXT_FALSE=''
+am__EXEEXT_TRUE='#'
+am__fastdepCC_FALSE='#'
+am__fastdepCC_TRUE=''
+am__fastdepCXX_FALSE='#'
+am__fastdepCXX_TRUE=''
+am__include='include'
+am__isrc=''
+am__leading_dot='.'
+am__nodep='_no'
+am__quote=''
+am__tar='$${TAR-tar} chof - "$$tardir"'
+am__untar='$${TAR-tar} xf -'
+bindir='${exec_prefix}/bin'
+build='x86_64-unknown-linux-gnu'
+build_alias=''
+build_cpu='x86_64'
+build_os='linux-gnu'
+build_vendor='unknown'
+datadir='${datarootdir}'
+datarootdir='${prefix}/share'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+dvidir='${docdir}'
+exec_prefix='${prefix}'
+host='x86_64-unknown-linux-gnu'
+host_alias=''
+host_cpu='x86_64'
+host_os='linux-gnu'
+host_vendor='unknown'
+htmldir='${docdir}'
+includedir='${prefix}/include'
+includes='${includedir}/ucommon'
+infodir='${datarootdir}/info'
+install_sh='${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/install-sh'
+libdir='${exec_prefix}/lib'
+libexecdir='${exec_prefix}/libexec'
+libs='/usr/local/lib'
+localedir='${datarootdir}/locale'
+localstatedir='/var'
+mandir='${datarootdir}/man'
+mkdir_p='$(MKDIR_P)'
+oldincludedir='/usr/include'
+pdfdir='${docdir}'
+prefix='/usr/local'
+program_transform_name='s,x,x,'
+psdir='${docdir}'
+sbindir='${exec_prefix}/sbin'
+sharedstatedir='${prefix}/com'
+sysconfdir='/etc'
+target='x86_64-unknown-linux-gnu'
+target_alias=''
+target_cpu='x86_64'
+target_os='linux-gnu'
+target_vendor='unknown'
+
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+
+/* confdefs.h */
+#define PACKAGE_NAME "ucommon"
+#define PACKAGE_TARNAME "ucommon"
+#define PACKAGE_VERSION "6.0.7"
+#define PACKAGE_STRING "ucommon 6.0.7"
+#define PACKAGE_BUGREPORT ""
+#define PACKAGE_URL ""
+#define STDC_HEADERS 1
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRING_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_DLFCN_H 1
+#define LT_OBJDIR ".libs/"
+#define PACKAGE "ucommon"
+#define VERSION "6.0.7"
+#define restrict __restrict
+#define HAVE_STDINT_H 1
+#define HAVE_POLL_H 1
+#define HAVE_SYS_MMAN_H 1
+#define HAVE_SYS_SHM_H 1
+#define HAVE_SYS_POLL_H 1
+#define HAVE_SYS_TIMEB_H 1
+#define HAVE_ENDIAN_H 1
+#define HAVE_DIRENT_H 1
+#define HAVE_SYS_RESOURCE_H 1
+#define HAVE_WCHAR_H 1
+#define HAVE_NETINET_IN_H 1
+#define HAVE_NET_IF_H 1
+#define HAVE_LINUX_VERSION_H 1
+#define HAVE_SYS_INOTIFY_H 1
+#define HAVE_SYSLOG_H 1
+#define HAVE_SYS_WAIT_H 1
+#define HAVE_TERMIOS_H 1
+#define HAVE_TERMIO_H 1
+#define HAVE_FCNTL_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_SYS_PARAM_H 1
+#define HAVE_SYS_FILE_H 1
+#define HAVE_DLFCN_H 1
+#define HAVE_REGEX_H 1
+#define HAVE_SOCKETPAIR 1
+#define HAVE_GETADDRINFO 1
+#define HAVE_GETHOSTBYNAME2 1
+#define HAVE_INET_NTOP 1
+#define HAVE_LSTAT 1
+#define HAVE_STRCOLL 1
+#define HAVE_SYSCONF 1
+#define HAVE_POSIX_MEMALIGN 1
+#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
+#define HAVE_PTHREAD_SETCONCURRENCY 1
+#define HAVE_PTHREAD_YIELD 1
+#define HAVE_PTHREAD_SETSCHEDPRIO 1
+#define HAVE_FTOK 1
+#define HAVE_SHM_OPEN 1
+#define HAVE_NANOSLEEP 1
+#define HAVE_CLOCK_NANOSLEEP 1
+#define HAVE_CLOCK_GETTIME 1
+#define HAVE_STRERROR_R 1
+#define HAVE_LOCALTIME_R 1
+#define HAVE_GMTIME_R 1
+#define HAVE_POSIX_FADVISE 1
+#define HAVE_FTRUNCATE 1
+#define HAVE_PWRITE 1
+#define HAVE_SETPGRP 1
+#define HAVE_SETLOCALE 1
+#define HAVE_GETTEXT 1
+#define HAVE_EXECVP 1
+#define HAVE_REALPATH 1
+#define HAVE_SYMLINK 1
+#define HAVE_READLINK 1
+#define HAVE_WAITPID 1
+#define HAVE_WAIT4 1
+#define HAVE_STDEXCEPT 1
+#define HAVE_OPENSSL_SSL_H 1
+#define HAVE_OPENSSL_FIPS_H 1
+#define HAVE_LIBINTL_H 1
+#define UCOMMON_PREFIX "/usr/local"
+#define UCOMMON_CFGPATH "/etc"
+#define UCOMMON_VARPATH "/var"
+#define UCOMMON_LOCALE "/usr/local/share/locale"
+
+configure: exit 0
diff --git a/jni/libucommon/sources/config.status b/jni/libucommon/sources/config.status
new file mode 100755
index 0000000..2652667
--- /dev/null
+++ b/jni/libucommon/sources/config.status
@@ -0,0 +1,2393 @@
+#! /bin/sh
+# Generated by configure.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # 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_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+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
+# 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
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+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
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+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
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# 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='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# 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
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# 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 #(((((
+-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
+
+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 -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
+
+
+# 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='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+
+# 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'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+# 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 ucommon $as_me 6.0.7, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+# Files that config.status was made for.
+config_files=" Makefile corelib/Makefile commoncpp/Makefile openssl/Makefile gnutls/Makefile nossl/Makefile utils/Makefile inc/Makefile inc/ucommon/Makefile inc/commoncpp/Makefile test/Makefile directive commoncpp.pc ucommon.pc ucommon.spec ucommon-config commoncpp-config"
+config_headers=" ucommon-config.h"
+config_commands=" libtool depfiles"
+
+ac_cs_usage="\
+\`$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]... [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
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+ac_cs_config=""
+ac_cs_version="\
+ucommon config.status 6.0.7
+configured by ./configure, generated by GNU Autoconf 2.69,
+  with options \"$ac_cs_config\"
+
+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."
+
+ac_pwd='/home/lisional/git/sflphone-android/jni/libucommon/sources'
+srcdir='.'
+INSTALL='/usr/bin/install -c'
+MKDIR_P='/usr/bin/mkdir -p'
+AWK='gawk'
+test -n "$AWK" || AWK=awk
+# The default lists apply if the user does not specify any file.
+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_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $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
+    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
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    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 \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+if $ac_cs_recheck; then
+  set X /bin/sh './configure'  $ac_configure_extra_args --no-create --no-recursion
+  shift
+  $as_echo "running CONFIG_SHELL=/bin/sh $*" >&6
+  CONFIG_SHELL='/bin/sh'
+  export CONFIG_SHELL
+  exec "$@"
+fi
+
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+#
+# INIT-COMMANDS
+#
+
+
+# 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
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+AS='as'
+DLLTOOL='dlltool'
+OBJDUMP='objdump'
+macro_version='2.4.2'
+macro_revision='1.3337'
+enable_shared='yes'
+enable_static='yes'
+pic_mode='default'
+enable_fast_install='yes'
+SHELL='/bin/sh'
+ECHO='printf %s\n'
+PATH_SEPARATOR=':'
+host_alias=''
+host='x86_64-unknown-linux-gnu'
+host_os='linux-gnu'
+build_alias=''
+build='x86_64-unknown-linux-gnu'
+build_os='linux-gnu'
+SED='/usr/bin/sed'
+Xsed='/usr/bin/sed -e 1s/^X//'
+GREP='/usr/bin/grep'
+EGREP='/usr/bin/grep -E'
+FGREP='/usr/bin/grep -F'
+LD='/usr/bin/ld -m elf_x86_64'
+NM='/usr/bin/nm -B'
+LN_S='ln -s'
+max_cmd_len='1572864'
+ac_objext='o'
+exeext=''
+lt_unset='unset'
+lt_SP2NL='tr \040 \012'
+lt_NL2SP='tr \015\012 \040\040'
+lt_cv_to_host_file_cmd='func_convert_file_noop'
+lt_cv_to_tool_file_cmd='func_convert_file_noop'
+reload_flag=' -r'
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+deplibs_check_method='pass_all'
+file_magic_cmd='$MAGIC_CMD'
+file_magic_glob=''
+want_nocaseglob='no'
+sharedlib_from_linklib_cmd='printf %s\n'
+AR='ar'
+AR_FLAGS='cru'
+archiver_list_spec='@'
+STRIP='strip'
+RANLIB='ranlib'
+old_postinstall_cmds='chmod 644 $oldlib~$RANLIB $tool_oldlib'
+old_postuninstall_cmds=''
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs~$RANLIB $tool_oldlib'
+lock_old_archive_extraction='no'
+CC='gcc'
+CFLAGS='-g -O2'
+compiler='g++'
+GCC='yes'
+lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[	 ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[	 ][	 ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p'\'' | sed '\''/ __gnu_lto/d'\'''
+lt_cv_sys_global_symbol_to_cdecl='sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\'''
+lt_cv_sys_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\)[ ]*$/  {\"\1\", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/  {"\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/^[ABCDGIRSTW]* \([^ ]*\) \(lib[^ ]*\)$/  {"\2", (void *) \&\2},/p'\'' -e '\''s/^[ABCDGIRSTW]* \([^ ]*\) \([^ ]*\)$/  {"lib\2", (void *) \&\2},/p'\'''
+nm_file_list_spec='@'
+lt_sysroot=''
+objdir='.libs'
+MAGIC_CMD='file'
+lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+lt_prog_compiler_pic=' -fPIC -DPIC'
+lt_prog_compiler_wl='-Wl,'
+lt_prog_compiler_static=''
+lt_cv_prog_compiler_c_o='yes'
+need_locks='no'
+MANIFEST_TOOL=':'
+DSYMUTIL=''
+NMEDIT=''
+LIPO=''
+OTOOL=''
+OTOOL64=''
+libext='a'
+shrext_cmds='.so'
+extract_expsyms_cmds=''
+archive_cmds_need_lc='no'
+enable_shared_with_static_runtimes='no'
+export_dynamic_flag_spec='${wl}--export-dynamic'
+whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+compiler_needs_object='no'
+old_archive_from_new_cmds=''
+old_archive_from_expsyms_cmds=''
+archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+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 -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+module_cmds=''
+module_expsym_cmds=''
+with_gnu_ld='yes'
+allow_undefined_flag=''
+no_undefined_flag=''
+hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+hardcode_libdir_separator=''
+hardcode_direct='no'
+hardcode_direct_absolute='no'
+hardcode_minus_L='no'
+hardcode_shlibpath_var='unsupported'
+hardcode_automatic='no'
+inherit_rpath='no'
+link_all_deplibs='unknown'
+always_export_symbols='no'
+export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+include_expsyms=''
+prelink_cmds=''
+postlink_cmds=''
+file_list_spec=''
+variables_saved_for_relink='PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH'
+need_lib_prefix='no'
+need_version='no'
+version_type='linux'
+runpath_var='LD_RUN_PATH'
+shlibpath_var='LD_LIBRARY_PATH'
+shlibpath_overrides_runpath='no'
+libname_spec='lib$name'
+library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+soname_spec='${libname}${release}${shared_ext}$major'
+install_override_mode=''
+postinstall_cmds=''
+postuninstall_cmds=''
+finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+finish_eval=''
+hardcode_into_libs='yes'
+sys_lib_search_path_spec='/usr/lib/gcc/x86_64-redhat-linux/4.8.2 /usr/lib64 /lib64 '
+sys_lib_dlsearch_path_spec='/lib64 /usr/lib64 /lib /usr/lib /usr/lib64/atlas /usr/lib64/dyninst /usr/lib64/iscsi /usr/lib64/llvm /usr/lib64/mysql /usr/lib64/qt-3.3/lib /usr/lib64/tracker-0.16 /usr/lib64/xulrunner '
+hardcode_action='immediate'
+enable_dlopen='unknown'
+enable_dlopen_self='unknown'
+enable_dlopen_self_static='unknown'
+old_striplib='strip --strip-debug'
+striplib='strip --strip-unneeded'
+compiler_lib_search_dirs=''
+predep_objects=''
+postdep_objects=''
+predeps=''
+postdeps=''
+compiler_lib_search_path=''
+LD_CXX='/usr/bin/ld -m elf_x86_64'
+reload_flag_CXX=' -r'
+reload_cmds_CXX='$LD$reload_flag -o $output$reload_objs'
+old_archive_cmds_CXX='$AR $AR_FLAGS $oldlib$oldobjs~$RANLIB $tool_oldlib'
+compiler_CXX='g++'
+GCC_CXX='yes'
+lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+lt_prog_compiler_pic_CXX=' -fPIC -DPIC'
+lt_prog_compiler_wl_CXX='-Wl,'
+lt_prog_compiler_static_CXX=''
+lt_cv_prog_compiler_c_o_CXX='yes'
+archive_cmds_need_lc_CXX='no'
+enable_shared_with_static_runtimes_CXX='no'
+export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+compiler_needs_object_CXX='no'
+old_archive_from_new_cmds_CXX=''
+old_archive_from_expsyms_cmds_CXX=''
+archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+module_cmds_CXX=''
+module_expsym_cmds_CXX=''
+with_gnu_ld_CXX='yes'
+allow_undefined_flag_CXX=''
+no_undefined_flag_CXX=''
+hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+hardcode_libdir_separator_CXX=''
+hardcode_direct_CXX='no'
+hardcode_direct_absolute_CXX='no'
+hardcode_minus_L_CXX='no'
+hardcode_shlibpath_var_CXX='unsupported'
+hardcode_automatic_CXX='no'
+inherit_rpath_CXX='no'
+link_all_deplibs_CXX='unknown'
+always_export_symbols_CXX='no'
+export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+include_expsyms_CXX=''
+prelink_cmds_CXX=''
+postlink_cmds_CXX=''
+file_list_spec_CXX=''
+hardcode_action_CXX='immediate'
+compiler_lib_search_dirs_CXX='/usr/lib/gcc/x86_64-redhat-linux/4.8.2 /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64 /lib/../lib64 /usr/lib/../lib64 /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../..'
+predep_objects_CXX='/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.2/crtbeginS.o'
+postdep_objects_CXX='/usr/lib/gcc/x86_64-redhat-linux/4.8.2/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/crtn.o'
+predeps_CXX=''
+postdeps_CXX='-lstdc++ -lm -lgcc_s -lc -lgcc_s'
+compiler_lib_search_path_CXX='-L/usr/lib/gcc/x86_64-redhat-linux/4.8.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../..'
+
+LTCC='gcc'
+LTCFLAGS='-g -O2'
+compiler='gcc'
+
+# 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 AS DLLTOOL OBJDUMP SHELL ECHO PATH_SEPARATOR SED GREP EGREP FGREP LD NM LN_S lt_SP2NL lt_NL2SP reload_flag deplibs_check_method file_magic_cmd file_magic_glob want_nocaseglob sharedlib_from_linklib_cmd AR AR_FLAGS archiver_list_spec STRIP RANLIB CC CFLAGS compiler lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl lt_cv_sys_global_symbol_to_c_name_address lt_cv_sys_global_symbol_to_c_name_address_lib_prefix nm_file_list_spec lt_prog_compiler_no_builtin_flag lt_prog_compiler_pic lt_prog_compiler_wl lt_prog_compiler_static lt_cv_prog_compiler_c_o need_locks MANIFEST_TOOL DSYMUTIL NMEDIT LIPO OTOOL OTOOL64 shrext_cmds export_dynamic_flag_spec whole_archive_flag_spec compiler_needs_object with_gnu_ld allow_undefined_flag no_undefined_flag hardcode_libdir_flag_spec hardcode_libdir_separator exclude_expsyms include_expsyms file_list_spec variables_saved_for_relink libname_spec library_names_spec soname_spec install_override_mode finish_eval old_striplib striplib compiler_lib_search_dirs predep_objects postdep_objects predeps postdeps compiler_lib_search_path LD_CXX reload_flag_CXX compiler_CXX lt_prog_compiler_no_builtin_flag_CXX lt_prog_compiler_pic_CXX lt_prog_compiler_wl_CXX lt_prog_compiler_static_CXX lt_cv_prog_compiler_c_o_CXX export_dynamic_flag_spec_CXX whole_archive_flag_spec_CXX compiler_needs_object_CXX with_gnu_ld_CXX allow_undefined_flag_CXX no_undefined_flag_CXX hardcode_libdir_flag_spec_CXX hardcode_libdir_separator_CXX exclude_expsyms_CXX include_expsyms_CXX file_list_spec_CXX compiler_lib_search_dirs_CXX predep_objects_CXX postdep_objects_CXX predeps_CXX postdeps_CXX compiler_lib_search_path_CXX; do
+    case `eval \\$ECHO \\""\\$$var"\\"` in
+    *[\\\`\"\$]*)
+      eval "lt_$var=\\\"\`\$ECHO \"\$$var\" | \$SED \"\$sed_quote_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\$$var\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds old_postinstall_cmds old_postuninstall_cmds old_archive_cmds extract_expsyms_cmds old_archive_from_new_cmds old_archive_from_expsyms_cmds archive_cmds archive_expsym_cmds 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 reload_cmds_CXX old_archive_cmds_CXX old_archive_from_new_cmds_CXX old_archive_from_expsyms_cmds_CXX archive_cmds_CXX archive_expsym_cmds_CXX module_cmds_CXX module_expsym_cmds_CXX export_symbols_cmds_CXX prelink_cmds_CXX postlink_cmds_CXX; do
+    case `eval \\$ECHO \\""\\$$var"\\"` in
+    *[\\\`\"\$]*)
+      eval "lt_$var=\\\"\`\$ECHO \"\$$var\" | \$SED -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      ;;
+    *)
+      eval "lt_$var=\\\"\$$var\\\""
+      ;;
+    esac
+done
+
+ac_aux_dir='autoconf'
+xsi_shell='yes'
+lt_shell_append='yes'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+
+    PACKAGE='ucommon'
+    VERSION='6.0.7'
+    TIMESTAMP=''
+    RM='rm -f'
+    ofile='libtool'
+
+
+
+
+
+AMDEP_TRUE="" ac_aux_dir="autoconf"
+
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "ucommon-config.h") CONFIG_HEADERS="$CONFIG_HEADERS ucommon-config.h" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "corelib/Makefile") CONFIG_FILES="$CONFIG_FILES corelib/Makefile" ;;
+    "commoncpp/Makefile") CONFIG_FILES="$CONFIG_FILES commoncpp/Makefile" ;;
+    "openssl/Makefile") CONFIG_FILES="$CONFIG_FILES openssl/Makefile" ;;
+    "gnutls/Makefile") CONFIG_FILES="$CONFIG_FILES gnutls/Makefile" ;;
+    "nossl/Makefile") CONFIG_FILES="$CONFIG_FILES nossl/Makefile" ;;
+    "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
+    "inc/Makefile") CONFIG_FILES="$CONFIG_FILES inc/Makefile" ;;
+    "inc/ucommon/Makefile") CONFIG_FILES="$CONFIG_FILES inc/ucommon/Makefile" ;;
+    "inc/commoncpp/Makefile") CONFIG_FILES="$CONFIG_FILES inc/commoncpp/Makefile" ;;
+    "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
+    "directive") CONFIG_FILES="$CONFIG_FILES directive" ;;
+    "commoncpp.pc") CONFIG_FILES="$CONFIG_FILES commoncpp.pc" ;;
+    "ucommon.pc") CONFIG_FILES="$CONFIG_FILES ucommon.pc" ;;
+    "ucommon.spec") CONFIG_FILES="$CONFIG_FILES ucommon.spec" ;;
+    "ucommon-config") CONFIG_FILES="$CONFIG_FILES ucommon-config" ;;
+    "commoncpp-config") CONFIG_FILES="$CONFIG_FILES commoncpp-config" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  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 -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || 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.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+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'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+cat >>"$ac_tmp/subs1.awk" <<\_ACAWK &&
+S["am__EXEEXT_FALSE"]=""
+S["am__EXEEXT_TRUE"]="#"
+S["LTLIBOBJS"]=""
+S["LIBOBJS"]=""
+S["LT_GENERIC"]="$(SHELL) $(top_builddir)/libtool"
+S["LT_VERSION"]="6:3:0"
+S["COMPAT"]="commoncpp"
+S["SECURE"]="gnutls"
+S["SECURE_LIBS"]="-lgnutls"
+S["SECURE_LOCAL"]="../gnutls/libusecure.la -lgnutls"
+S["UCOMMON_LIBS"]="  -lrt  -ldl -lpthread -lc"
+S["UCOMMON_LIBC"]="-lc"
+S["UCOMMON_CLINK"]=" -lc"
+S["UCOMMON_FLAGS"]=" -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1"
+S["UCOMMON_MODEL"]="CXX"
+S["UCOMMON_LINKED"]="  -lrt  -ldl -lpthread"
+S["UCOMMON_VISIBILITY"]="1"
+S["CHECKFLAGS"]=""
+S["DOXYGEN"]="/usr/bin/doxygen"
+S["UCOMMON_PREFIX"]="/usr/local"
+S["UCOMMON_VARPATH"]="/var"
+S["UCOMMON_CFGPATH"]="/etc"
+S["UCOMMON_LOCALE"]="/usr/local/share/locale"
+S["UCOMMON_INCLUDES"]="/usr/local/include/ucommon"
+S["GNUTLS_LIBS"]="-lgnutls"
+S["GNUTLS_CFLAGS"]=""
+S["OPENSSL_LIBS"]="-lssl -lcrypto -lz "
+S["OPENSSL_CFLAGS"]=""
+S["PKG_CONFIG_LIBDIR"]=""
+S["PKG_CONFIG_PATH"]=""
+S["PKG_CONFIG"]="/usr/bin/pkg-config"
+S["libs"]="/usr/local/lib"
+S["includes"]="${includedir}/ucommon"
+S["AM_BACKSLASH"]="\\"
+S["AM_DEFAULT_VERBOSITY"]="1"
+S["AM_DEFAULT_V"]="$(AM_DEFAULT_VERBOSITY)"
+S["AM_V"]="$(V)"
+S["am__fastdepCXX_FALSE"]="#"
+S["am__fastdepCXX_TRUE"]=""
+S["CXXDEPMODE"]="depmode=gcc3"
+S["am__fastdepCC_FALSE"]="#"
+S["am__fastdepCC_TRUE"]=""
+S["CCDEPMODE"]="depmode=gcc3"
+S["am__nodep"]="_no"
+S["AMDEPBACKSLASH"]="\\"
+S["AMDEP_FALSE"]="#"
+S["AMDEP_TRUE"]=""
+S["am__quote"]=""
+S["am__include"]="include"
+S["DEPDIR"]=".deps"
+S["am__untar"]="$${TAR-tar} xf -"
+S["am__tar"]="$${TAR-tar} chof - \"$$tardir\""
+S["AMTAR"]="$${TAR-tar}"
+S["am__leading_dot"]="."
+S["SET_MAKE"]=""
+S["mkdir_p"]="$(MKDIR_P)"
+S["MKDIR_P"]="/usr/bin/mkdir -p"
+S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s"
+S["install_sh"]="${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/install-sh"
+S["MAKEINFO"]="${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing makeinfo"
+S["AUTOHEADER"]="${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoheader"
+S["AUTOMAKE"]="${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing automake-1.13"
+S["AUTOCONF"]="${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoconf"
+S["ACLOCAL"]="${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing aclocal-1.13"
+S["VERSION"]="6.0.7"
+S["PACKAGE"]="ucommon"
+S["CYGPATH_W"]="echo"
+S["am__isrc"]=""
+S["INSTALL_DATA"]="${INSTALL} -m 644"
+S["INSTALL_SCRIPT"]="${INSTALL}"
+S["INSTALL_PROGRAM"]="${INSTALL}"
+S["OTOOL64"]=""
+S["OTOOL"]=""
+S["LIPO"]=""
+S["NMEDIT"]=""
+S["DSYMUTIL"]=""
+S["MANIFEST_TOOL"]=":"
+S["AWK"]="gawk"
+S["RANLIB"]="ranlib"
+S["STRIP"]="strip"
+S["ac_ct_AR"]="ar"
+S["AR"]="ar"
+S["LN_S"]="ln -s"
+S["NM"]="/usr/bin/nm -B"
+S["ac_ct_DUMPBIN"]=""
+S["DUMPBIN"]=""
+S["LD"]="/usr/bin/ld -m elf_x86_64"
+S["FGREP"]="/usr/bin/grep -F"
+S["EGREP"]="/usr/bin/grep -E"
+S["GREP"]="/usr/bin/grep"
+S["SED"]="/usr/bin/sed"
+S["LIBTOOL"]="$(SHELL) $(top_builddir)/libtool"
+S["OBJDUMP"]="objdump"
+S["DLLTOOL"]="dlltool"
+S["AS"]="as"
+S["CXXCPP"]="g++ -E"
+S["ac_ct_CXX"]="g++"
+S["CXXFLAGS"]=" -g -O2"
+S["CXX"]="g++"
+S["CPP"]="gcc -E"
+S["OBJEXT"]="o"
+S["EXEEXT"]=""
+S["ac_ct_CC"]="gcc"
+S["CPPFLAGS"]=""
+S["LDFLAGS"]=""
+S["CFLAGS"]="-g -O2"
+S["CC"]="gcc"
+S["target_os"]="linux-gnu"
+S["target_vendor"]="unknown"
+S["target_cpu"]="x86_64"
+S["target"]="x86_64-unknown-linux-gnu"
+S["host_os"]="linux-gnu"
+S["host_vendor"]="unknown"
+S["host_cpu"]="x86_64"
+S["host"]="x86_64-unknown-linux-gnu"
+S["build_os"]="linux-gnu"
+S["build_vendor"]="unknown"
+S["build_cpu"]="x86_64"
+S["build"]="x86_64-unknown-linux-gnu"
+S["target_alias"]=""
+S["host_alias"]=""
+S["build_alias"]=""
+S["LIBS"]=""
+S["ECHO_T"]=""
+S["ECHO_N"]="-n"
+S["ECHO_C"]=""
+S["DEFS"]="-DHAVE_CONFIG_H"
+S["mandir"]="${datarootdir}/man"
+S["localedir"]="${datarootdir}/locale"
+S["libdir"]="${exec_prefix}/lib"
+S["psdir"]="${docdir}"
+S["pdfdir"]="${docdir}"
+S["dvidir"]="${docdir}"
+S["htmldir"]="${docdir}"
+S["infodir"]="${datarootdir}/info"
+S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}"
+S["oldincludedir"]="/usr/include"
+S["includedir"]="${prefix}/include"
+S["localstatedir"]="/var"
+S["sharedstatedir"]="${prefix}/com"
+S["sysconfdir"]="/etc"
+S["datadir"]="${datarootdir}"
+S["datarootdir"]="${prefix}/share"
+S["libexecdir"]="${exec_prefix}/libexec"
+S["sbindir"]="${exec_prefix}/sbin"
+S["bindir"]="${exec_prefix}/bin"
+S["program_transform_name"]="s,x,x,"
+S["prefix"]="/usr/local"
+S["exec_prefix"]="${prefix}"
+S["PACKAGE_URL"]=""
+S["PACKAGE_BUGREPORT"]=""
+S["PACKAGE_STRING"]="ucommon 6.0.7"
+S["PACKAGE_VERSION"]="6.0.7"
+S["PACKAGE_TARNAME"]="ucommon"
+S["PACKAGE_NAME"]="ucommon"
+S["PATH_SEPARATOR"]=":"
+S["SHELL"]="/bin/sh"
+_ACAWK
+cat >>"$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+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 < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# 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 >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+D["PACKAGE_NAME"]=" \"ucommon\""
+D["PACKAGE_TARNAME"]=" \"ucommon\""
+D["PACKAGE_VERSION"]=" \"6.0.7\""
+D["PACKAGE_STRING"]=" \"ucommon 6.0.7\""
+D["PACKAGE_BUGREPORT"]=" \"\""
+D["PACKAGE_URL"]=" \"\""
+D["STDC_HEADERS"]=" 1"
+D["HAVE_SYS_TYPES_H"]=" 1"
+D["HAVE_SYS_STAT_H"]=" 1"
+D["HAVE_STDLIB_H"]=" 1"
+D["HAVE_STRING_H"]=" 1"
+D["HAVE_MEMORY_H"]=" 1"
+D["HAVE_STRINGS_H"]=" 1"
+D["HAVE_INTTYPES_H"]=" 1"
+D["HAVE_STDINT_H"]=" 1"
+D["HAVE_UNISTD_H"]=" 1"
+D["HAVE_DLFCN_H"]=" 1"
+D["LT_OBJDIR"]=" \".libs/\""
+D["PACKAGE"]=" \"ucommon\""
+D["VERSION"]=" \"6.0.7\""
+D["restrict"]=" __restrict"
+D["HAVE_STDINT_H"]=" 1"
+D["HAVE_POLL_H"]=" 1"
+D["HAVE_SYS_MMAN_H"]=" 1"
+D["HAVE_SYS_SHM_H"]=" 1"
+D["HAVE_SYS_POLL_H"]=" 1"
+D["HAVE_SYS_TIMEB_H"]=" 1"
+D["HAVE_ENDIAN_H"]=" 1"
+D["HAVE_DIRENT_H"]=" 1"
+D["HAVE_SYS_RESOURCE_H"]=" 1"
+D["HAVE_WCHAR_H"]=" 1"
+D["HAVE_NETINET_IN_H"]=" 1"
+D["HAVE_NET_IF_H"]=" 1"
+D["HAVE_LINUX_VERSION_H"]=" 1"
+D["HAVE_SYS_INOTIFY_H"]=" 1"
+D["HAVE_SYSLOG_H"]=" 1"
+D["HAVE_SYS_WAIT_H"]=" 1"
+D["HAVE_TERMIOS_H"]=" 1"
+D["HAVE_TERMIO_H"]=" 1"
+D["HAVE_FCNTL_H"]=" 1"
+D["HAVE_UNISTD_H"]=" 1"
+D["HAVE_SYS_PARAM_H"]=" 1"
+D["HAVE_SYS_FILE_H"]=" 1"
+D["HAVE_DLFCN_H"]=" 1"
+D["HAVE_REGEX_H"]=" 1"
+D["HAVE_SOCKETPAIR"]=" 1"
+D["HAVE_GETADDRINFO"]=" 1"
+D["HAVE_GETHOSTBYNAME2"]=" 1"
+D["HAVE_INET_NTOP"]=" 1"
+D["HAVE_LSTAT"]=" 1"
+D["HAVE_STRCOLL"]=" 1"
+D["HAVE_SYSCONF"]=" 1"
+D["HAVE_POSIX_MEMALIGN"]=" 1"
+D["HAVE_PTHREAD_CONDATTR_SETCLOCK"]=" 1"
+D["HAVE_PTHREAD_SETCONCURRENCY"]=" 1"
+D["HAVE_PTHREAD_YIELD"]=" 1"
+D["HAVE_PTHREAD_SETSCHEDPRIO"]=" 1"
+D["HAVE_FTOK"]=" 1"
+D["HAVE_SHM_OPEN"]=" 1"
+D["HAVE_NANOSLEEP"]=" 1"
+D["HAVE_CLOCK_NANOSLEEP"]=" 1"
+D["HAVE_CLOCK_GETTIME"]=" 1"
+D["HAVE_STRERROR_R"]=" 1"
+D["HAVE_LOCALTIME_R"]=" 1"
+D["HAVE_GMTIME_R"]=" 1"
+D["HAVE_POSIX_FADVISE"]=" 1"
+D["HAVE_FTRUNCATE"]=" 1"
+D["HAVE_PWRITE"]=" 1"
+D["HAVE_SETPGRP"]=" 1"
+D["HAVE_SETLOCALE"]=" 1"
+D["HAVE_GETTEXT"]=" 1"
+D["HAVE_EXECVP"]=" 1"
+D["HAVE_REALPATH"]=" 1"
+D["HAVE_SYMLINK"]=" 1"
+D["HAVE_READLINK"]=" 1"
+D["HAVE_WAITPID"]=" 1"
+D["HAVE_WAIT4"]=" 1"
+D["HAVE_STDEXCEPT"]=" 1"
+D["HAVE_OPENSSL_SSL_H"]=" 1"
+D["HAVE_OPENSSL_FIPS_H"]=" 1"
+D["HAVE_LIBINTL_H"]=" 1"
+D["UCOMMON_PREFIX"]=" \"/usr/local\""
+D["UCOMMON_CFGPATH"]=" \"/etc\""
+D["UCOMMON_VARPATH"]=" \"/var\""
+D["UCOMMON_LOCALE"]=" \"/usr/local/share/locale\""
+  for (key in D) D_is_set[key] = 1
+  FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)/ {
+  line = $ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$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 `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $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.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+# 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
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/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:${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;}
+  ac_datarootdir_hack='
+  s&@datadir@&${datarootdir}&g
+  s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g
+  s&@infodir@&${datarootdir}/info&g
+  s&@localedir@&${datarootdir}/locale&g
+  s&@mandir@&${datarootdir}/man&g
+  s&\${datarootdir}&${prefix}/share&g' ;;
+esac
+ac_sed_extra="/^[	 ]*VPATH[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[	 ]*$//
+}
+
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+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' "$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;}
+
+  rm -f "$ac_tmp/stdin"
+  case $ac_file in
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && 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 "$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 "$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"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+	 X"$_am_arg" : 'X\(//\)$' \| \
+	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "libtool":C)
+
+    # See if we are running on zsh, and set the options which allow our
+    # commands through without removal of \ escapes.
+    if test -n "${ZSH_VERSION+set}" ; then
+      setopt NO_GLOB_SUBST
+    fi
+
+    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
+# 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.
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010, 2011 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.
+#
+# 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.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags="CXX "
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Assembler program.
+AS=$lt_AS
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Object dumper program.
+OBJDUMP=$lt_OBJDUMP
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# 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
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method = "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
+# The archiver.
+AR=$lt_AR
+
+# Flags to create an archive.
+AR_FLAGS=$lt_AR_FLAGS
+
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+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
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
+
+# The root where to search for dependent libraries,and in which our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# 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
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+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
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+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
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# 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
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using 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
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# 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
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects
+postdep_objects=$lt_postdep_objects
+predeps=$lt_predeps
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# ### END LIBTOOL CONFIG
+
+_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
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+_LT_EOF
+    ;;
+  esac
+
+
+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 '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
+
+  if test x"$xsi_shell" = xyes; then
+  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_basename ()$/,/^} # func_basename /c\
+func_basename ()\
+{\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
+func_dirname_and_basename ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
+func_stripname ()\
+{\
+\    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
+\    # positional parameters, so assign one to ordinary parameter first.\
+\    func_stripname_result=${3}\
+\    func_stripname_result=${func_stripname_result#"${1}"}\
+\    func_stripname_result=${func_stripname_result%"${2}"}\
+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
+func_split_long_opt ()\
+{\
+\    func_split_long_opt_name=${1%%=*}\
+\    func_split_long_opt_arg=${1#*=}\
+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
+func_split_short_opt ()\
+{\
+\    func_split_short_opt_arg=${1#??}\
+\    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
+func_lo2o ()\
+{\
+\    case ${1} in\
+\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
+\      *)    func_lo2o_result=${1} ;;\
+\    esac\
+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_xform ()$/,/^} # func_xform /c\
+func_xform ()\
+{\
+    func_xform_result=${1%.*}.lo\
+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_arith ()$/,/^} # func_arith /c\
+func_arith ()\
+{\
+    func_arith_result=$(( $* ))\
+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_len ()$/,/^} # func_len /c\
+func_len ()\
+{\
+    func_len_result=${#1}\
+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+fi
+
+if test x"$lt_shell_append" = xyes; then
+  sed -e '/^func_append ()$/,/^} # func_append /c\
+func_append ()\
+{\
+    eval "${1}+=\\${2}"\
+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
+func_append_quoted ()\
+{\
+\    func_quote_for_eval "${2}"\
+\    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
+
+
+   mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+
+
+    cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag_CXX
+reload_cmds=$lt_reload_cmds_CXX
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_CXX
+
+# A language specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_CXX
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_CXX
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to "yes" if using 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
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_CXX
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_CXX
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_CXX
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds_CXX
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_CXX
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_CXX
+postdep_objects=$lt_postdep_objects_CXX
+predeps=$lt_predeps_CXX
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# ### END LIBTOOL TAG CONFIG: CXX
+_LT_EOF
+
+ ;;
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # 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
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named 'Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running 'make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "$am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # 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'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+
+  esac
+done # for ac_tag
+
+
+as_fn_exit 0
diff --git a/jni/libucommon/sources/configure b/jni/libucommon/sources/configure
new file mode 100755
index 0000000..2cca180
--- /dev/null
+++ b/jni/libucommon/sources/configure
@@ -0,0 +1,22376 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69 for ucommon 6.0.7.
+#
+#
+# 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. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # 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_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+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
+# 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
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+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
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+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
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# 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='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# 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 -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
+    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
+    PATH=/empty FPATH=/empty; export PATH FPATH
+    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
+      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+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 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
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# 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_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 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
+}
+
+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
+
+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 -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 mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+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'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# 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.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='ucommon'
+PACKAGE_TARNAME='ucommon'
+PACKAGE_VERSION='6.0.7'
+PACKAGE_STRING='ucommon 6.0.7'
+PACKAGE_BUGREPORT=''
+PACKAGE_URL=''
+
+ac_unique_file="inc/ucommon/ucommon.h"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+LT_GENERIC
+LT_VERSION
+COMPAT
+SECURE
+SECURE_LIBS
+SECURE_LOCAL
+UCOMMON_LIBS
+UCOMMON_LIBC
+UCOMMON_CLINK
+UCOMMON_FLAGS
+UCOMMON_MODEL
+UCOMMON_LINKED
+UCOMMON_VISIBILITY
+CHECKFLAGS
+DOXYGEN
+UCOMMON_PREFIX
+UCOMMON_VARPATH
+UCOMMON_CFGPATH
+UCOMMON_LOCALE
+UCOMMON_INCLUDES
+GNUTLS_LIBS
+GNUTLS_CFLAGS
+OPENSSL_LIBS
+OPENSSL_CFLAGS
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+libs
+includes
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+MANIFEST_TOOL
+AWK
+RANLIB
+STRIP
+ac_ct_AR
+AR
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+EGREP
+GREP
+SED
+LIBTOOL
+OBJDUMP
+DLLTOOL
+AS
+CXXCPP
+ac_ct_CXX
+CXXFLAGS
+CXX
+CPP
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+target_os
+target_vendor
+target_cpu
+target
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_gnu_ld
+with_sysroot
+enable_libtool_lock
+enable_dependency_tracking
+enable_silent_rules
+enable_posix_timers
+enable_stdcpp
+with_sslstack
+with_libc
+enable_debug
+enable_socks
+enable_atomics
+enable_pth
+with_pkg_config
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+CXX
+CXXFLAGS
+CCC
+CXXCPP
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+OPENSSL_CFLAGS
+OPENSSL_LIBS
+GNUTLS_CFLAGS
+GNUTLS_LIBS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) 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.
+    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 ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $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}"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  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'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_myself" : 'X\(//\)[^/]' \| \
+	 X"$as_myself" : 'X\(//\)$' \| \
+	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures ucommon 6.0.7 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking ...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/ucommon]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of ucommon 6.0.7:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-shared[=PKGS]  build shared libraries [default=yes]
+  --enable-static[=PKGS]  build static libraries [default=yes]
+  --enable-fast-install[=PKGS]
+                          optimize for fast installation [default=yes]
+  --disable-libtool-lock  avoid locking (might break parallel builds)
+  --enable-dependency-tracking
+                          do not reject slow dependency extractors
+  --disable-dependency-tracking
+                          speeds up one-time build
+  --enable-silent-rules   less verbose build output (undo: "make V=1")
+  --disable-silent-rules  verbose build output (undo: "make V=0")
+  --enable-posix-timers   enable posix timers
+  --disable-stdcpp        compile without stdc++ runtime overhead
+  --enable-debug          compile for debugging
+  --enable-socks          compile with socks proxy support
+
+      --enable-atomics        enable gcc atomic support
+
+      --enable-pth            always use GNU pth for threading
+
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
+                          both]
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
+  --with-sysroot=DIR Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).
+  --with-sslstack=lib     specify which ssl stack to build
+  --with-libc=path        specify path to alternate libc
+  --with-pkg-config       enable support for pkg-config
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  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    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  CXXCPP      C++ preprocessor
+  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
+  OPENSSL_CFLAGS
+              C compiler flags for OPENSSL, overriding pkg-config
+  OPENSSL_LIBS
+              linker flags for OPENSSL, overriding pkg-config
+  GNUTLS_CFLAGS
+              C compiler flags for GNUTLS, overriding pkg-config
+  GNUTLS_LIBS linker flags for GNUTLS, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to the package provider.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+ucommon configure 6.0.7
+generated by GNU Autoconf 2.69
+
+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
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# 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
+
+	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 ()
+{
+  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
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_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_cxx_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
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_cxx_try_cpp LINENO
+# ------------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_cpp ()
+{
+  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_cxx_preproc_warn_flag$ac_cxx_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
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_cpp
+
+# 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
+
+	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
+
+} # ac_fn_c_try_link
+
+# 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
+
+# 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
+
+} # ac_fn_c_try_run
+
+# 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
+
+/* 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.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* 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
+
+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
+
+# ac_fn_cxx_try_link LINENO
+# -------------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_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_cxx_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
+
+	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
+
+} # ac_fn_cxx_try_link
+
+# 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; }
+
+# 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; }
+
+# 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;}
+    ;;
+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
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_cxx_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_cxx_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_cxx_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; }
+
+# 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_cxx_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; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_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;}
+    ;;
+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
+
+} # ac_fn_cxx_check_header_mongrel
+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 ucommon $as_me 6.0.7, 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;}
+
+# 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
+
+    $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
+
+    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
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+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
+
+# 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
+
+
+
+
+LT_VERSION="6:3:0"
+OPENSSL_REQUIRES="0.9.7"
+
+ac_aux_dir=
+for ac_dir in autoconf "$srcdir"/autoconf; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in autoconf \"$srcdir\"/autoconf" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${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_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${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_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if ${ac_cv_target+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$target_alias" = x; then
+  ac_cv_target=$ac_cv_host
+else
+  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+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
+  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
+
+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
+
+
+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:${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
+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
+
+  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
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $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
+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
+
+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
+
+
+  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
+  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:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $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
+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$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
+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
+
+
+    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 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="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_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
+
+  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
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# 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.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_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:${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:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $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=
+
+else
+  ac_file=''
+fi
+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
+
+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
+  { { $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; }
+
+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 ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+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:${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; }
+  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:${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
+    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; }
+
+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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $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
+
+{ { $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
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $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
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $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
+  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 ()
+{
+
+  ;
+  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.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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
+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;
+}
+
+/* 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"
+  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 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
+      # 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 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 :
+
+else
+  # 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
+
+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
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  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
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # 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
+
+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 :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+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
+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
+  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
+
+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
+
+
+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:${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
+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
+
+  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
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $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
+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
+
+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
+
+
+  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
+  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:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $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
+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$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
+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
+
+
+    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 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="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_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
+
+  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
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $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
+  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 ()
+{
+
+  ;
+  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.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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
+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;
+}
+
+/* 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"
+  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=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if ${ac_cv_prog_cxx_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+else
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+ac_ext=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=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $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; }
+if test -z "$CXXCPP"; then
+  if ${ac_cv_prog_CXXCPP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <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_cxx_try_cpp "$LINENO"; then :
+
+else
+  # 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_cxx_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
+
+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
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <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_cxx_try_cpp "$LINENO"; then :
+
+else
+  # 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_cxx_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
+
+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 :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+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=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if ${ac_cv_prog_cxx_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+else
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+ac_ext=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
+
+enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; 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_AS+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AS"; then
+  ac_cv_prog_AS="$AS" # 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_AS="${ac_tool_prefix}as"
+    $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
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+  ac_ct_AS=$AS
+  # Extract the first word of "as", so it can be a program name with args.
+set dummy as; 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_AS+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AS"; then
+  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # 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_AS="as"
+    $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_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_AS" = x; then
+    AS="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
+    AS=$ac_ct_AS
+  fi
+else
+  AS="$ac_cv_prog_AS"
+fi
+
+  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
+
+  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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump"
+    $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
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_OBJDUMP="objdump"
+    $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_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OBJDUMP" = x; then
+    OBJDUMP="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
+    OBJDUMP=$ac_ct_OBJDUMP
+  fi
+else
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+  ;;
+esac
+
+test -z "$AS" && AS=as
+
+
+
+
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+case `pwd` in
+  *\ * | *\	*)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.4.2'
+macro_revision='1.3337'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+$as_echo_n "checking how to print strings... " >&6; }
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='printf %s\n'
+else
+  # Use this function as a fallback that always works.
+  func_fallback_echo ()
+  {
+    eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+  }
+  ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO ""
+}
+
+case "$ECHO" in
+  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
+$as_echo "printf" >&6; } ;;
+  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
+$as_echo "print -r" >&6; } ;;
+  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
+$as_echo "cat" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+  $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
+  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
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ $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
+
+      $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
+
+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"
+
+
+{ $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
+
+      $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
+
+   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"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+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
+   then ac_cv_path_FGREP="$GREP -F"
+   else
+     if test -z "$FGREP"; then
+  ac_path_FGREP_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 fgrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+      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
+*GNU*)
+  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_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 '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
+    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"
+      ac_path_FGREP_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_FGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_FGREP"; then
+    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_FGREP=$FGREP
+fi
+
+   fi
+fi
+{ $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"
+
+
+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
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $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:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+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
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $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 ${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.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $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
+
+
+
+
+
+
+
+
+
+{ $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 ${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"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  : ${lt_cv_path_NM=no}
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DUMPBIN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DUMPBIN"; then
+  ac_cv_prog_DUMPBIN="$DUMPBIN" # 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_DUMPBIN="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$DUMPBIN" && break
+  done
+fi
+if test -z "$DUMPBIN"; then
+  ac_ct_DUMPBIN=$DUMPBIN
+  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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DUMPBIN"; then
+  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # 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_DUMPBIN="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_DUMPBIN" && break
+done
+
+  if test "x$ac_ct_DUMPBIN" = x; then
+    DUMPBIN=":"
+  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
+    DUMPBIN=$ac_ct_DUMPBIN
+  fi
+fi
+
+    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
+
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $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 ${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:$LINENO: $ac_compile\"" >&5)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&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:$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:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&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:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ $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 ${lt_cv_sys_max_cmd_len+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+    i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw* | cegcc*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  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*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  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
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      # 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
+        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"`env echo "$teststring$teststring" 2>/dev/null` \
+	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on
+      # massive amounts of additional arguments before passing them to the
+      # linker.  It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+  { $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:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,b/c, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
+$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
+if ${lt_cv_to_host_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
+    ;;
+  *-*-cygwin* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_noop
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+        ;;
+    esac
+    ;;
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
+    ;;
+esac
+
+fi
+
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
+$as_echo "$lt_cv_to_host_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
+$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
+if ${lt_cv_to_tool_file_cmd+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  #assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+        ;;
+    esac
+    ;;
+esac
+
+fi
+
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
+$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if ${lt_cv_ld_reload_flag+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+{ $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
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test "$GCC" != yes; then
+      reload_cmds=false
+    fi
+    ;;
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump"
+    $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
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_OBJDUMP="objdump"
+    $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_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OBJDUMP" = x; then
+    OBJDUMP="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
+    OBJDUMP=$ac_ct_OBJDUMP
+  fi
+else
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+{ $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 ${lt_cv_deplibs_check_method+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[45]*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    # 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*)
+  # 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'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+haiku*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-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_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix[3-9]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+  case $host_os in
+  mingw* | pw32*)
+    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+      want_nocaseglob=yes
+    else
+      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
+    fi
+    ;;
+  esac
+fi
+
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${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 to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
+$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in ar
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$AR" && break
+  done
+fi
+if test -z "$AR"; then
+  ac_ct_AR=$AR
+  for ac_prog in ar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_AR+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_AR="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_AR" && break
+done
+
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    AR=$ac_ct_AR
+  fi
+fi
+
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
+$as_echo_n "checking for archiver @FILE support... " >&6; }
+if ${lt_cv_ar_at_file+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ar_at_file=no
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
+      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+      if test "$ac_status" -eq 0; then
+	# Ensure the archiver fails upon bogus file names.
+	rm -f conftest.$ac_objext libconftest.a
+	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
+  (eval $lt_ar_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+	if test "$ac_status" -ne 0; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
+$as_echo "$lt_cv_ar_at_file" >&6; }
+
+if test "x$lt_cv_ar_at_file" = xno; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if 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
+IFS=$as_save_IFS
+
+fi
+fi
+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:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $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_STRIP+:} false; 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 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
+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:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $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
+
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $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
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $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_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $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_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  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
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+    ;;
+  esac
+  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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_AWK+:} 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
+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_AWK="$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
+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:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $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 ${lt_cv_sys_global_symbol_pipe+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[BCDT]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[ABCDGISTW]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[ABCDEGRST]'
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[BCDEGRST]'
+  ;;
+osf*)
+  symcode='[BCDEGQRST]'
+  ;;
+solaris*)
+  symcode='[BDRT]'
+  ;;
+sco3.2v5*)
+  symcode='[DT]'
+  ;;
+sysv4.2uw2*)
+  symcode='[DT]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[ABDT]'
+  ;;
+sysv4)
+  symcode='[DFNSTU]'
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[ABCDGIRSTW]' ;;
+esac
+
+# 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'"
+
+# 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'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  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.
+    # 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};"\
+"     \$ 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))}"\
+"     ' 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
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+  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
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
+  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
+  ac_status=$?
+  $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"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+	  cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols.  */
+LT_DLSYM_CONST struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_globsym_save_LIBS=$LIBS
+	  lt_globsym_save_CFLAGS=$CFLAGS
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS=$lt_globsym_save_LIBS
+	  CFLAGS=$lt_globsym_save_CFLAGS
+	else
+	  echo "cannot find nm_test_func in $nlist" >&5
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&5
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+    fi
+  else
+    echo "$progname: failed program was:" >&5
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+  { $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 "$GCC" = yes; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
+$as_echo "${with_sysroot}" >&6; }
+   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
+   ;;
+esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
+$as_echo "${lt_sysroot:-no}" >&6; }
+
+
+
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+  enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+      *ELF-32*)
+	HPUX_IA64_MODE="32"
+	;;
+      *ELF-64*)
+	HPUX_IA64_MODE="64"
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    if test "$lt_cv_prog_gnu_ld" = yes; then
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -melf32bsmip"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -melf32bmipn32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -melf64bmip"
+	;;
+      esac
+    else
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -32"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -n32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -64"
+	  ;;
+      esac
+    fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.o` in
+      *32-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_i386_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_i386"
+	    ;;
+	  powerpc64le-*linux*)
+	    LD="${LD-ld} -m elf32lppclinux"
+	    ;;
+	  powerpc64-*linux*)
+	    LD="${LD-ld} -m elf32ppclinux"
+	    ;;
+	  s390x-*linux*)
+	    LD="${LD-ld} -m elf_s390"
+	    ;;
+	  sparc64-*linux*)
+	    LD="${LD-ld} -m elf32_sparc"
+	    ;;
+	esac
+	;;
+      *64-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_x86_64_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_x86_64"
+	    ;;
+	  powerpcle-*linux*)
+	    LD="${LD-ld} -m elf64lppc"
+	    ;;
+	  powerpc-*linux*)
+	    LD="${LD-ld} -m elf64ppc"
+	    ;;
+	  s390*-*linux*|s390*-*tpf*)
+	    LD="${LD-ld} -m elf64_s390"
+	    ;;
+	  sparc*-*linux*)
+	    LD="${LD-ld} -m elf64_sparc"
+	    ;;
+	esac
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  { $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 ${lt_cv_cc_needs_belf+:} 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
+
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_cc_needs_belf=yes
+else
+  lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*)
+        case $host in
+        i?86-*-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"
+	fi
+	;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${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 "x$lt_cv_path_mainfest_tool" != xyes; then
+  MANIFEST_TOOL=:
+fi
+
+
+
+
+
+
+  case $host_os in
+    rhapsody* | darwin*)
+    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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DSYMUTIL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DSYMUTIL"; then
+  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="${ac_tool_prefix}dsymutil"
+    $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
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DSYMUTIL"; then
+  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # 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_DSYMUTIL="dsymutil"
+    $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_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_DSYMUTIL" = x; then
+    DSYMUTIL=":"
+  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
+    DSYMUTIL=$ac_ct_DSYMUTIL
+  fi
+else
+  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_NMEDIT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$NMEDIT"; then
+  ac_cv_prog_NMEDIT="$NMEDIT" # 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_NMEDIT="${ac_tool_prefix}nmedit"
+    $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
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_NMEDIT"; then
+  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # 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_NMEDIT="nmedit"
+    $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_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_NMEDIT" = x; then
+    NMEDIT=":"
+  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
+    NMEDIT=$ac_ct_NMEDIT
+  fi
+else
+  NMEDIT="$ac_cv_prog_NMEDIT"
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LIPO+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LIPO"; then
+  ac_cv_prog_LIPO="$LIPO" # 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_LIPO="${ac_tool_prefix}lipo"
+    $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
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_LIPO"; then
+  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # 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_LIPO="lipo"
+    $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_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_LIPO" = x; then
+    LIPO=":"
+  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
+    LIPO=$ac_ct_LIPO
+  fi
+else
+  LIPO="$ac_cv_prog_LIPO"
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL"; then
+  ac_cv_prog_OTOOL="$OTOOL" # 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_OTOOL="${ac_tool_prefix}otool"
+    $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
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL"; then
+  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # 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_OTOOL="otool"
+    $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_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OTOOL" = x; then
+    OTOOL=":"
+  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
+    OTOOL=$ac_ct_OTOOL
+  fi
+else
+  OTOOL="$ac_cv_prog_OTOOL"
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_OTOOL64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL64"; then
+  ac_cv_prog_OTOOL64="$OTOOL64" # 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_OTOOL64="${ac_tool_prefix}otool64"
+    $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
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+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:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL64"; then
+  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # 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_OTOOL64="otool64"
+    $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_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_OTOOL64" = x; then
+    OTOOL64=":"
+  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
+    OTOOL64=$ac_ct_OTOOL64
+  fi
+else
+  OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $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 ${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
+	# 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
+	# link flags.
+	rm -rf libconftest.dylib*
+	echo "int foo(void){return 1;}" > conftest.c
+	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+	# 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 $_lt_result -eq 0; then
+	  lt_cv_apple_cc_single_mod=yes
+	else
+	  cat conftest.err >&5
+	fi
+	rm -rf libconftest.dylib*
+	rm -f conftest.*
+      fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if ${lt_cv_ld_exported_symbols_list+:} false; then :
+  $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 confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_ld_exported_symbols_list=yes
+else
+  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"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
+$as_echo_n "checking for -force_load linker flag... " >&6; }
+if ${lt_cv_ld_force_load+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_ld_force_load=no
+      cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+      echo "$AR cru libconftest.a conftest.o" >&5
+      $AR cru libconftest.a conftest.o 2>&5
+      echo "$RANLIB libconftest.a" >&5
+      $RANLIB libconftest.a 2>&5
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
+      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+      _lt_result=$?
+      if test -s conftest.err && $GREP force_load conftest.err; then
+	cat conftest.err >&5
+      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
+	lt_cv_ld_force_load=yes
+      else
+	cat conftest.err >&5
+      fi
+        rm -f conftest.err libconftest.a conftest conftest.c
+        rm -rf conftest.dSYM
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
+$as_echo "$lt_cv_ld_force_load" >&6; }
+    case $host_os in
+    rhapsody* | darwin1.[012])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+      _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' ;;
+	10.*)
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; 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'
+    else
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+
+
+{ $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 ()
+{
+
+  ;
+  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>
+
+_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 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 :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat 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
+  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
+{ $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
+
+done
+
+
+for ac_header in dlfcn.h
+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 HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+func_stripname_cnf ()
+{
+  case ${2} in
+  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+  esac
+} # func_stripname_cnf
+
+
+
+
+
+# Set options
+
+
+
+        enable_dlopen=no
+
+
+
+            # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+  enableval=$enable_shared; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+  # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+  enableval=$enable_static; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_static=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_static=yes
+fi
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+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
+
+
+
+
+
+
+
+  # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+  enableval=$enable_fast_install; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac
+else
+  enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if ${lt_cv_objdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_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
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# 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"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+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 "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+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:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+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_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+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_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  else
+    MAGIC_CMD=:
+  fi
+fi
+
+  fi
+  ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+  case $cc_basename in
+  nvcc*)
+    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
+  *)
+    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
+  esac
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+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"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&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 "$_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
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+    :
+fi
+
+fi
+
+
+
+
+
+
+  lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic='-fPIC'
+        ;;
+      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'.
+            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    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).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
+
+    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
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='-fPIC'
+	;;
+      esac
+      ;;
+
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
+
+    *)
+      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
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      else
+	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    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'
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-KPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='--shared'
+	lt_prog_compiler_static='--static'
+	;;
+      nagfor*)
+	# NAG Fortran compiler
+	lt_prog_compiler_wl='-Wl,-Wl,,'
+	lt_prog_compiler_pic='-PIC'
+	lt_prog_compiler_static='-Bstatic'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fpic'
+	lt_prog_compiler_static='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      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,'
+	  ;;
+        *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'
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    rdos*)
+      lt_prog_compiler_static='-non_shared'
+      ;;
+
+    solaris*)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+	lt_prog_compiler_wl='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic='-Kconform_pic'
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
+
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
+
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
+  fi
+
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+    ;;
+esac
+
+{ $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:${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 ${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"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&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 "$_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
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+     esac
+else
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+#
+# 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:${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 ${lt_cv_prog_compiler_static_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "$_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
+       fi
+     else
+       lt_cv_prog_compiler_static_works=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+  { $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 ${lt_cv_prog_compiler_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&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 "$_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
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+  { $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 ${lt_cv_prog_compiler_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&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 "$_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
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $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
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+
+
+
+
+
+  { $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=
+  allow_undefined_flag=
+  always_export_symbols=no
+  archive_cmds=
+  archive_expsym_cmds=
+  compiler_needs_object=no
+  enable_shared_with_static_runtimes=no
+  export_dynamic_flag_spec=
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  hardcode_automatic=no
+  hardcode_direct=no
+  hardcode_direct_absolute=no
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_separator=
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  inherit_rpath=no
+  link_all_deplibs=unknown
+  module_cmds=
+  module_expsym_cmds=
+  old_archive_from_new_cmds=
+  old_archive_from_expsyms_cmds=
+  thread_safe_flag_spec=
+  whole_archive_flag_spec=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_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
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  ld_shlibs=yes
+
+  # 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 "$with_gnu_ld" = yes; 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 "$lt_use_gnu_ld_interface" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&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 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[3-9]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** 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 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
+      ;;
+
+    amigaos*)
+      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_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	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'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _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/;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'
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    haiku*)
+      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      link_all_deplibs=yes
+      ;;
+
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; 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
+      then
+	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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	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' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  whole_archive_flag_spec=
+	  tmp_sharedflag='--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; 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'
+
+        if test "x$supports_anon_versioning" = xyes; then
+          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	    echo "local: *; };" >> $output_objdir/$libname.ver~
+	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+        fi
+
+	case $cc_basename in
+	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='${wl}-rpath ${wl}$libdir'
+	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; 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 $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        ld_shlibs=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds='$CC -shared $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
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	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
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  # For security reasons, it is highly recommended that you always
+	  # use absolute paths for naming shared libraries, and exclude the
+	  # DT_RUNPATH tag from executables and libraries.  But doing so
+	  # requires that you compile everything twice, which is a pain.
+	  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'
+	  else
+	    ld_shlibs=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $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
+      runpath_var=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct=unsupported
+      fi
+      ;;
+
+    aix[4-9]*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	# Also, AIX nm treats weak defined symbols like other global
+	# defined symbols, whereas GNU nm marks them as "W".
+	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") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	  for ld_flag in $LDFLAGS; do
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	    aix_use_runtimelinking=yes
+	    break
+	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_direct_absolute=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      file_list_spec='${wl}-f,'
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	  # We have reworked collect2
+	  :
+	  else
+	  # We have old collect2
+	  hardcode_direct=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  hardcode_minus_L=yes
+	  hardcode_libdir_flag_spec='-L$libdir'
+	  hardcode_libdir_separator=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      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
+	# 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.
+        if test "${lt_cv_aix_libpath+set}" = 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
+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
+
+  aix_libpath=$lt_cv_aix_libpath_
+fi
+
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag="-z nodefs"
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an
+	 # empty executable.
+	 if test "${lt_cv_aix_libpath+set}" = 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
+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
+
+  aix_libpath=$lt_cv_aix_libpath_
+fi
+
+	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag=' ${wl}-bernotok'
+	  allow_undefined_flag=' ${wl}-berok'
+	  if test "$with_gnu_ld" = yes; 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'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      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_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[45]*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      case $cc_basename in
+      cl*)
+	# Native MSVC
+	hardcode_libdir_flag_spec=' '
+	allow_undefined_flag=unsupported
+	always_export_symbols=yes
+	file_list_spec='@'
+	# Tell ltmain to make .lib files, not .a files.
+	libext=lib
+	# Tell ltmain to make .dll files, not .so files.
+	shrext_cmds=".dll"
+	# FIXME: Setting linknames here is a bad hack.
+	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	  else
+	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	  fi~
+	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	  linknames='
+	# The linker will not automatically build a static lib if we build a DLL.
+	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
+	enable_shared_with_static_runtimes=yes
+	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*)
+
+
+  archive_cmds_need_lc=no
+  hardcode_direct=no
+  hardcode_automatic=yes
+  hardcode_shlibpath_var=unsupported
+  if test "$lt_cv_ld_force_load" = "yes"; 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"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; 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
+  fi
+
+      ;;
+
+    dgux*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2.*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds='$CC -shared $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 $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; 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_separator=:
+	hardcode_direct=yes
+	hardcode_direct_absolute=yes
+	export_dynamic_flag_spec='${wl}-E'
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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'
+	  ;;
+	ia64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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 x"$lt_cv_prog_compiler__b" = xyes; 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'
+	hardcode_libdir_separator=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+	  ;;
+	*)
+	  hardcode_direct=yes
+	  hardcode_direct_absolute=yes
+	  export_dynamic_flag_spec='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared $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.
+	# 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
+if ac_fn_c_try_link "$LINENO"; then :
+  lt_cv_irix_exported_symbol=yes
+else
+  lt_cv_irix_exported_symbol=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+           LDFLAGS="$save_LDFLAGS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
+$as_echo "$lt_cv_irix_exported_symbol" >&6; }
+	if test "$lt_cv_irix_exported_symbol" = yes; then
+          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+	fi
+      else
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      inherit_rpath=yes
+      link_all_deplibs=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    openbsd*)
+      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
+	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+	fi
+      else
+	ld_shlibs=no
+      fi
+      ;;
+
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && 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" && 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_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} $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" && 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 "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_separator=:
+      ;;
+
+    solaris*)
+      no_undefined_flag=' -z defs'
+      if test "$GCC" = yes; 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 $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_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'
+	  ;;
+	*)
+	  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'
+	  ;;
+	esac
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      link_all_deplibs=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds='$CC -r -o $output$reload_objs'
+	  hardcode_direct=no
+        ;;
+	motorola)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag='${wl}-z,text'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-R,$libdir'
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      ld_shlibs=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	export_dynamic_flag_spec='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
+  fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $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; }
+if ${lt_cv_archive_cmds_need_lc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  $RM conftest*
+	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } 2>conftest.err; then
+	  soname=conftest
+	  lib=conftest
+	  libobjs=conftest.$ac_objext
+	  deplibs=
+	  wl=$lt_prog_compiler_wl
+	  pic_flag=$lt_prog_compiler_pic
+	  compiler_flags=-v
+	  linker_flags=-v
+	  verstring=
+	  output_objdir=.
+	  libname=conftest
+	  lt_save_allow_undefined_flag=$allow_undefined_flag
+	  allow_undefined_flag=
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+	  then
+	    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
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  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 '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.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[lt_foo]++; }
+  if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+  # 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"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux # 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'
+  ;;
+
+aix[4-9]*)
+  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
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<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
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  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}'
+    ;;
+  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=`func_echo_all "$lib" | $SED '\''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'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  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'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  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'\''`~
+      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'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+
+      sys_lib_search_path_spec="$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}'
+      ;;
+    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.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
+    ;;
+
+  *)
+    # Assume MSVC wrapper
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
+    ;;
+  esac
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux # 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
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[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}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2.*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux # 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
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+haiku*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  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=yes
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+  postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
+  ;;
+
+interix[3-9]*)
+  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'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux # 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}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-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
+  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
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+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
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+
+fi
+
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux # 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
+  ;;
+
+*nto* | *qnx*)
+  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'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux # 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
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux # 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=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 # 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 "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = 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"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $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 "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:${as_lineno-$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
+
+
+
+
+
+
+  if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32* | 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
+
+fi
+
+    ;;
+
+  *)
+    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.  */
+
+/* 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.  */
+
+/* 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.  */
+
+/* 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
+{ $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 "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:${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 "$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 $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 -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+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 "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if ${lt_cv_dlopen_self_static+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  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 -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+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 which 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 "$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:${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 "$enable_shared" = yes || 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"
+
+      if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $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; }
+if test -z "$CXXCPP"; then
+  if ${ac_cv_prog_CXXCPP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <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_cxx_try_cpp "$LINENO"; then :
+
+else
+  # 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_cxx_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
+
+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
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <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_cxx_try_cpp "$LINENO"; then :
+
+else
+  # 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_cxx_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
+
+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 :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+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
+
+else
+  _lt_caught_CXX_error=yes
+fi
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+compiler_needs_object_CXX=no
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_direct_absolute_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+inherit_rpath_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+reload_flag_CXX=$reload_flag
+reload_cmds_CXX=$reload_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# No sense in running all these tests if we already determined that
+# 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
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="int some_variable = 0;"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+  # save warnings/boilerplate of simple test code
+  ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+  ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC=$CC
+  lt_save_CFLAGS=$CFLAGS
+  lt_save_LD=$LD
+  lt_save_GCC=$GCC
+  GCC=$GXX
+  lt_save_with_gnu_ld=$with_gnu_ld
+  lt_save_path_LD=$lt_cv_path_LD
+  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+  else
+    $as_unset lt_cv_prog_gnu_ld
+  fi
+  if test -n "${lt_cv_path_LDCXX+set}"; then
+    lt_cv_path_LD=$lt_cv_path_LDCXX
+  else
+    $as_unset lt_cv_path_LD
+  fi
+  test -z "${LDCXX+set}" || LD=$LDCXX
+  CC=${CXX-"c++"}
+  CFLAGS=$CXXFLAGS
+  compiler=$CC
+  compiler_CXX=$CC
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+
+
+  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
+      lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+    else
+      lt_prog_compiler_no_builtin_flag_CXX=
+    fi
+
+    if test "$GXX" = yes; then
+      # Set up default GNU C++ configuration
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $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
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $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:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+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
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $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 ${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.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $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
+
+
+
+
+
+
+
+      # Check if GNU C++ uses GNU ld as the underlying linker, since the
+      # archiving commands below assume that GNU ld is being used.
+      if test "$with_gnu_ld" = yes; then
+        archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+        export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+        # If archive_cmds runs LD, not CC, wlarc should be empty
+        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+        #     investigate it a little bit more. (MM)
+        wlarc='${wl}'
+
+        # ancient GNU ld didn't support --whole-archive et. al.
+        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+	  $GREP 'no-whole-archive' > /dev/null; then
+          whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+        else
+          whole_archive_flag_spec_CXX=
+        fi
+      else
+        with_gnu_ld=no
+        wlarc=
+
+        # A generic and very simple default shared library creation
+        # command for GNU C++ for the case where it uses the native
+        # linker, instead of GNU ld.  If possible, this setting should
+        # overridden to take advantage of the native linker features on
+        # the platform it is being used on.
+        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      fi
+
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+    else
+      GXX=no
+      with_gnu_ld=no
+      wlarc=
+    fi
+
+    # PORTME: fill in a description of your system's C++ link characteristics
+    { $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; }
+    ld_shlibs_CXX=yes
+    case $host_os in
+      aix3*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+      aix[4-9]*)
+        if test "$host_cpu" = ia64; then
+          # On IA64, the linker does run time linking by default, so we don't
+          # have to do anything special.
+          aix_use_runtimelinking=no
+          exp_sym_flag='-Bexport'
+          no_entry_flag=""
+        else
+          aix_use_runtimelinking=no
+
+          # Test if we are trying to use run time linking or normal
+          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+          # need to do runtime linking.
+          case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+	    for ld_flag in $LDFLAGS; do
+	      case $ld_flag in
+	      *-brtl*)
+	        aix_use_runtimelinking=yes
+	        break
+	        ;;
+	      esac
+	    done
+	    ;;
+          esac
+
+          exp_sym_flag='-bexport'
+          no_entry_flag='-bnoentry'
+        fi
+
+        # When large executables or shared objects are built, AIX ld can
+        # have problems creating the table of contents.  If linking a library
+        # or program results in "error TOC overflow" add -mminimal-toc to
+        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+        archive_cmds_CXX=''
+        hardcode_direct_CXX=yes
+        hardcode_direct_absolute_CXX=yes
+        hardcode_libdir_separator_CXX=':'
+        link_all_deplibs_CXX=yes
+        file_list_spec_CXX='${wl}-f,'
+
+        if test "$GXX" = yes; then
+          case $host_os in aix4.[012]|aix4.[012].*)
+          # We only want to do this on AIX 4.2 and lower, the check
+          # below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	    # We have reworked collect2
+	    :
+	  else
+	    # We have old collect2
+	    hardcode_direct_CXX=unsupported
+	    # It fails to find uninstalled libraries when the uninstalled
+	    # path is not listed in the libpath.  Setting hardcode_minus_L
+	    # to unsupported forces relinking
+	    hardcode_minus_L_CXX=yes
+	    hardcode_libdir_flag_spec_CXX='-L$libdir'
+	    hardcode_libdir_separator_CXX=
+	  fi
+          esac
+          shared_flag='-shared'
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag="$shared_flag "'${wl}-G'
+	  fi
+        else
+          # not using gcc
+          if test "$host_cpu" = ia64; then
+	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	  # chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+          else
+	    if test "$aix_use_runtimelinking" = yes; then
+	      shared_flag='${wl}-G'
+	    else
+	      shared_flag='${wl}-bM:SRE'
+	    fi
+          fi
+        fi
+
+        export_dynamic_flag_spec_CXX='${wl}-bexpall'
+        # It seems that -bexpall does not export symbols beginning with
+        # underscore (_), so it is better to generate a list of symbols to
+	# export.
+        always_export_symbols_CXX=yes
+        if test "$aix_use_runtimelinking" = yes; then
+          # Warning - without using the other runtime loading flags (-brtl),
+          # -berok will link without error, but may produce a broken library.
+          allow_undefined_flag_CXX='-berok'
+          # Determine the default libpath from the value encoded in an empty
+          # executable.
+          if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath__CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  if test -z "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+  fi
+
+fi
+
+  aix_libpath=$lt_cv_aix_libpath__CXX
+fi
+
+          hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+          archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        else
+          if test "$host_cpu" = ia64; then
+	    hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+	    allow_undefined_flag_CXX="-z nodefs"
+	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+          else
+	    # Determine the default libpath from the value encoded in an
+	    # empty executable.
+	    if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  if ${lt_cv_aix_libpath__CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+  lt_aix_libpath_sed='
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }'
+  lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  if test -z "$lt_cv_aix_libpath__CXX"; then
+    lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+  fi
+
+fi
+
+  aix_libpath=$lt_cv_aix_libpath__CXX
+fi
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+	    # Warning - without using the other run time loading flags,
+	    # -berok will link without error, but may produce a broken library.
+	    no_undefined_flag_CXX=' ${wl}-bernotok'
+	    allow_undefined_flag_CXX=' ${wl}-berok'
+	    if test "$with_gnu_ld" = yes; then
+	      # We only use this code for GNU lds that support --whole-archive.
+	      whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    else
+	      # Exported symbols can be pulled into shared objects from archives
+	      whole_archive_flag_spec_CXX='$convenience'
+	    fi
+	    archive_cmds_need_lc_CXX=yes
+	    # This is similar to how AIX traditionally builds its shared
+	    # libraries.
+	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+          fi
+        fi
+        ;;
+
+      beos*)
+	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	  allow_undefined_flag_CXX=unsupported
+	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+	  # support --undefined.  This deserves some investigation.  FIXME
+	  archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	else
+	  ld_shlibs_CXX=no
+	fi
+	;;
+
+      chorus*)
+        case $cc_basename in
+          *)
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	  ;;
+        esac
+        ;;
+
+      cygwin* | mingw* | pw32* | cegcc*)
+	case $GXX,$cc_basename in
+	,cl* | no,cl*)
+	  # Native MSVC
+	  # hardcode_libdir_flag_spec is actually meaningless, as there is
+	  # no search path for DLLs.
+	  hardcode_libdir_flag_spec_CXX=' '
+	  allow_undefined_flag_CXX=unsupported
+	  always_export_symbols_CXX=yes
+	  file_list_spec_CXX='@'
+	  # Tell ltmain to make .lib files, not .a files.
+	  libext=lib
+	  # Tell ltmain to make .dll files, not .so files.
+	  shrext_cmds=".dll"
+	  # FIXME: Setting linknames here is a bad hack.
+	  archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	  archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	    else
+	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	    fi~
+	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	    linknames='
+	  # The linker will not automatically build a static lib if we build a DLL.
+	  # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
+	  enable_shared_with_static_runtimes_CXX=yes
+	  # Don't use ranlib
+	  old_postinstall_cmds_CXX='chmod 644 $oldlib'
+	  postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
+	    lt_tool_outputfile="@TOOL_OUTPUT@"~
+	    case $lt_outputfile in
+	      *.exe|*.EXE) ;;
+	      *)
+		lt_outputfile="$lt_outputfile.exe"
+		lt_tool_outputfile="$lt_tool_outputfile.exe"
+		;;
+	    esac~
+	    func_to_tool_file "$lt_outputfile"~
+	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	      $RM "$lt_outputfile.manifest";
+	    fi'
+	  ;;
+	*)
+	  # g++
+	  # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+	  # as there is no search path for DLLs.
+	  hardcode_libdir_flag_spec_CXX='-L$libdir'
+	  export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
+	  allow_undefined_flag_CXX=unsupported
+	  always_export_symbols_CXX=no
+	  enable_shared_with_static_runtimes_CXX=yes
+
+	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	    # If the export-symbols file already is a .def file (1st line
+	    # is EXPORTS), use it as is; otherwise, prepend...
+	    archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	      cp $export_symbols $output_objdir/$soname.def;
+	    else
+	      echo EXPORTS > $output_objdir/$soname.def;
+	      cat $export_symbols >> $output_objdir/$soname.def;
+	    fi~
+	    $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	  else
+	    ld_shlibs_CXX=no
+	  fi
+	  ;;
+	esac
+	;;
+      darwin* | rhapsody*)
+
+
+  archive_cmds_need_lc_CXX=no
+  hardcode_direct_CXX=no
+  hardcode_automatic_CXX=yes
+  hardcode_shlibpath_var_CXX=unsupported
+  if test "$lt_cv_ld_force_load" = "yes"; then
+    whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+
+  else
+    whole_archive_flag_spec_CXX=''
+  fi
+  link_all_deplibs_CXX=yes
+  allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=func_echo_all
+    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+       if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+    fi
+
+  else
+  ld_shlibs_CXX=no
+  fi
+
+	;;
+
+      dgux*)
+        case $cc_basename in
+          ec++*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          ghcx*)
+	    # Green Hills C++ Compiler
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
+
+      freebsd2.*)
+        # C++ shared libraries reported to be fairly broken before
+	# switch to ELF
+        ld_shlibs_CXX=no
+        ;;
+
+      freebsd-elf*)
+        archive_cmds_need_lc_CXX=no
+        ;;
+
+      freebsd* | dragonfly*)
+        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+        # conventions
+        ld_shlibs_CXX=yes
+        ;;
+
+      gnu*)
+        ;;
+
+      haiku*)
+        archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        link_all_deplibs_CXX=yes
+        ;;
+
+      hpux9*)
+        hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator_CXX=:
+        export_dynamic_flag_spec_CXX='${wl}-E'
+        hardcode_direct_CXX=yes
+        hardcode_minus_L_CXX=yes # Not in the search PATH,
+				             # but as the default
+				             # location of the library.
+
+        case $cc_basename in
+          CC*)
+            # FIXME: insert proper C++ library support
+            ld_shlibs_CXX=no
+            ;;
+          aCC*)
+            archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            # Commands to make compiler produce verbose output that lists
+            # what "hidden" libraries, object files and flags are used when
+            # linking a shared library.
+            #
+            # There doesn't appear to be a way to prevent this compiler from
+            # explicitly linking system object files so we need to strip them
+            # from the output so that they don't get included in the library
+            # dependencies.
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+            ;;
+          *)
+            if test "$GXX" = yes; then
+              archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            else
+              # FIXME: insert proper C++ library support
+              ld_shlibs_CXX=no
+            fi
+            ;;
+        esac
+        ;;
+
+      hpux10*|hpux11*)
+        if test $with_gnu_ld = no; then
+	  hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
+
+          case $host_cpu in
+            hppa*64*|ia64*)
+              ;;
+            *)
+	      export_dynamic_flag_spec_CXX='${wl}-E'
+              ;;
+          esac
+        fi
+        case $host_cpu in
+          hppa*64*|ia64*)
+            hardcode_direct_CXX=no
+            hardcode_shlibpath_var_CXX=no
+            ;;
+          *)
+            hardcode_direct_CXX=yes
+            hardcode_direct_absolute_CXX=yes
+            hardcode_minus_L_CXX=yes # Not in the search PATH,
+					         # but as the default
+					         # location of the library.
+            ;;
+        esac
+
+        case $cc_basename in
+          CC*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          aCC*)
+	    case $host_cpu in
+	      hppa*64*)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      ia64*)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      *)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	    esac
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test $with_gnu_ld = no; then
+	        case $host_cpu in
+	          hppa*64*)
+	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          ia64*)
+	            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          *)
+	            archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	        esac
+	      fi
+	    else
+	      # FIXME: insert proper C++ library support
+	      ld_shlibs_CXX=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      interix[3-9]*)
+	hardcode_direct_CXX=no
+	hardcode_shlibpath_var_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec_CXX='${wl}-E'
+	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+	# Instead, shared libraries are loaded at an image base (0x10000000 by
+	# default) and relocated if they conflict, which is a slow very memory
+	# consuming and fragmenting process.  To avoid this, we pick a random,
+	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+	archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	;;
+      irix5* | irix6*)
+        case $cc_basename in
+          CC*)
+	    # SGI C++
+	    archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && 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
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test "$with_gnu_ld" = no; then
+	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	      else
+	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+	      fi
+	    fi
+	    link_all_deplibs_CXX=yes
+	    ;;
+        esac
+        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+        hardcode_libdir_separator_CXX=:
+        inherit_rpath_CXX=yes
+        ;;
+
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	    old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+	    ;;
+	  icpc* | ecpc* )
+	    # Intel C++
+	    with_gnu_ld=yes
+	    # version 8.0 and above of icpc choke on multiply defined symbols
+	    # if we add $predep_objects and $postdep_objects, however 7.1 and
+	    # earlier do not add the objects themselves.
+	    case `$CC -V 2>&1` in
+	      *"Version 7."*)
+	        archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	      *)  # Version 8.0 or newer
+	        tmp_idyn=
+	        case $host_cpu in
+		  ia64*) tmp_idyn=' -i_dynamic';;
+		esac
+	        archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	    esac
+	    archive_cmds_need_lc_CXX=no
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    ;;
+          pgCC* | pgcpp*)
+            # Portland Group C++ compiler
+	    case `$CC -V` in
+	    *pgCC\ [1-5].* | *pgcpp\ [1-5].*)
+	      prelink_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+	      old_archive_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+		$RANLIB $oldlib'
+	      archive_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      archive_expsym_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    *) # Version 6 and above use weak symbols
+	      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    esac
+
+	    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+            ;;
+	  cxx*)
+	    # Compaq C++
+	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	    runpath_var=LD_RUN_PATH
+	    hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	    hardcode_libdir_separator_CXX=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`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* | mpixl* | bgxl*)
+	    # IBM XL 8.0 on PPC, with GNU ld
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    if test "x$supports_anon_versioning" = xyes; then
+	      archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
+		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+		echo "local: *; };" >> $output_objdir/$libname.ver~
+		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	    fi
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      no_undefined_flag_CXX=' -zdefs'
+	      archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	      hardcode_libdir_flag_spec_CXX='-R$libdir'
+	      whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	      compiler_needs_object_CXX=yes
+
+	      # Not sure whether something based on
+	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+	      # would be better.
+	      output_verbose_link_cmd='func_echo_all'
+
+	      # Archives containing C++ object files must be created using
+	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	      # necessary to make sure instantiated templates are included
+	      # in the archive.
+	      old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+
+      lynxos*)
+        # FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
+
+      m88k*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+	;;
+
+      mvs*)
+        case $cc_basename in
+          cxx*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+	  *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+	esac
+	;;
+
+      netbsd*)
+        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	  archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+	  wlarc=
+	  hardcode_libdir_flag_spec_CXX='-R$libdir'
+	  hardcode_direct_CXX=yes
+	  hardcode_shlibpath_var_CXX=no
+	fi
+	# Workaround some broken pre-1.5 toolchains
+	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+	;;
+
+      *nto* | *qnx*)
+        ld_shlibs_CXX=yes
+	;;
+
+      openbsd2*)
+        # C++ shared libraries are fairly broken
+	ld_shlibs_CXX=no
+	;;
+
+      openbsd*)
+	if test -f /usr/libexec/ld.so; then
+	  hardcode_direct_CXX=yes
+	  hardcode_shlibpath_var_CXX=no
+	  hardcode_direct_absolute_CXX=yes
+	  archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	    archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+	    export_dynamic_flag_spec_CXX='${wl}-E'
+	    whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+	  fi
+	  output_verbose_link_cmd=func_echo_all
+	else
+	  ld_shlibs_CXX=no
+	fi
+	;;
+
+      osf3* | osf4* | osf5*)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    hardcode_libdir_separator_CXX=:
+
+	    # Archives containing C++ object files must be created using
+	    # the KAI C++ compiler.
+	    case $host in
+	      osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
+	      *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
+	    esac
+	    ;;
+          RCC*)
+	    # Rational C++ 2.4.1
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          cxx*)
+	    case $host in
+	      osf3*)
+	        allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+		;;
+	      *)
+	        allow_undefined_flag_CXX=' -expect_unresolved \*'
+	        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	        archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	          echo "-hidden">> $lib.exp~
+	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
+	          $RM $lib.exp'
+	        hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+		;;
+	    esac
+
+	    hardcode_libdir_separator_CXX=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    ;;
+	  *)
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	      case $host in
+	        osf3*)
+	          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	        *)
+	          archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	      esac
+
+	      hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	      hardcode_libdir_separator_CXX=:
+
+	      # Commands to make compiler produce verbose output that lists
+	      # what "hidden" libraries, object files and flags are used when
+	      # linking a shared library.
+	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+	    else
+	      # FIXME: insert proper C++ library support
+	      ld_shlibs_CXX=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      psos*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+
+      sunos4*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.x
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          lcc*)
+	    # Lucid
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
+
+      solaris*)
+        case $cc_basename in
+          CC* | sunCC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+            archive_cmds_need_lc_CXX=yes
+	    no_undefined_flag_CXX=' -zdefs'
+	    archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	    hardcode_libdir_flag_spec_CXX='-R$libdir'
+	    hardcode_shlibpath_var_CXX=no
+	    case $host_os in
+	      solaris2.[0-5] | solaris2.[0-5].*) ;;
+	      *)
+		# The compiler driver will combine and reorder linker options,
+		# but understands `-z linker_flag'.
+	        # Supported since Solaris 2.6 (maybe 2.5.1?)
+		whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+	        ;;
+	    esac
+	    link_all_deplibs_CXX=yes
+
+	    output_verbose_link_cmd='func_echo_all'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	    ;;
+          gcx*)
+	    # Green Hills C++ Compiler
+	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	    # The C++ compiler must be used to create the archive.
+	    old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    # GNU C++ compiler with Solaris linker
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+	        archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        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
+	        # platform.
+	        archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+	      fi
+
+	      hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+	      case $host_os in
+		solaris2.[0-5] | solaris2.[0-5].*) ;;
+		*)
+		  whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+		  ;;
+	      esac
+	    fi
+	    ;;
+        esac
+        ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag_CXX='${wl}-z,text'
+      archive_cmds_need_lc_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      runpath_var='LD_RUN_PATH'
+
+      case $cc_basename in
+        CC*)
+	  archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+      esac
+      ;;
+
+      sysv5* | sco3.2v5* | sco5v6*)
+	# Note: We can NOT use -z defs as we might desire, because we do not
+	# link with -lc, and that would cause any symbols used from libc to
+	# always be unresolved, which means just about no library would
+	# ever link correctly.  If we're not using GNU ld we use -z text
+	# though, which does catch some bad symbols but isn't as heavy-handed
+	# as -z defs.
+	no_undefined_flag_CXX='${wl}-z,text'
+	allow_undefined_flag_CXX='${wl}-z,nodefs'
+	archive_cmds_need_lc_CXX=no
+	hardcode_shlibpath_var_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+	hardcode_libdir_separator_CXX=':'
+	link_all_deplibs_CXX=yes
+	export_dynamic_flag_spec_CXX='${wl}-Bexport'
+	runpath_var='LD_RUN_PATH'
+
+	case $cc_basename in
+          CC*)
+	    archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
+	      '"$old_archive_cmds_CXX"
+	    reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
+	      '"$reload_cmds_CXX"
+	    ;;
+	  *)
+	    archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	esac
+      ;;
+
+      tandem*)
+        case $cc_basename in
+          NCC*)
+	    # NonStop-UX NCC 3.20
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
+
+      vxworks*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+
+      *)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+    esac
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+    test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+    GCC_CXX="$GXX"
+    LD_CXX="$LD"
+
+    ## 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...
+    # Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+_LT_EOF
+
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+esac
+
+if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  for p in `eval "$output_verbose_link_cmd"`; do
+    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
+	 prev=$p
+	 continue
+       fi
+
+       # Expand the sysroot to ease extracting the directories later.
+       if test -z "$prev"; then
+         case $p in
+         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+         esac
+       fi
+       case $p in
+       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+       esac
+       if test "$pre_test_object_deps_done" = no; then
+	 case ${prev} in
+	 -L | -R)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$compiler_lib_search_path_CXX"; then
+	     compiler_lib_search_path_CXX="${prev}${p}"
+	   else
+	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$postdeps_CXX"; then
+	   postdeps_CXX="${prev}${p}"
+	 else
+	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+	 fi
+       fi
+       prev=
+       ;;
+
+    *.lto.$objext) ;; # Ignore GCC LTO objects
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$predep_objects_CXX"; then
+	   predep_objects_CXX="$p"
+	 else
+	   predep_objects_CXX="$predep_objects_CXX $p"
+	 fi
+       else
+	 if test -z "$postdep_objects_CXX"; then
+	   postdep_objects_CXX="$p"
+	 else
+	   postdep_objects_CXX="$postdep_objects_CXX $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix[3-9]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  predep_objects_CXX=
+  postdep_objects_CXX=
+  postdeps_CXX=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC* | sunCC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+ compiler_lib_search_dirs_CXX=
+if test -n "${compiler_lib_search_path_CXX}"; then
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    lt_prog_compiler_wl_CXX='-Wl,'
+    lt_prog_compiler_static_CXX='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_CXX='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic_CXX='-fPIC'
+        ;;
+      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'.
+            lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    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).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_CXX='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      lt_prog_compiler_pic_CXX=
+      ;;
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      lt_prog_compiler_static_CXX=
+      ;;
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_CXX=-Kconform_pic
+      fi
+      ;;
+    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
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	;;
+      *)
+	lt_prog_compiler_pic_CXX='-fPIC'
+	;;
+      esac
+      ;;
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic_CXX='-fPIC -shared'
+      ;;
+    *)
+      lt_prog_compiler_pic_CXX='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix[4-9]*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  lt_prog_compiler_static_CXX='-Bstatic'
+	else
+	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+      mingw* | cygwin* | os2* | pw32* | cegcc*)
+	# This hack is so that the source file can tell whether it is being
+	# built for inclusion in a dll (and should export symbols for example).
+	lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+	;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      lt_prog_compiler_pic_CXX='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      lt_prog_compiler_pic_CXX='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    ;;
+	  ecpc* )
+	    # old Intel C++ for x86_64 which still supported -KPIC.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  icpc* )
+	    # Intel C++, used to be incompatible with GCC.
+	    # ICC 10 doesn't accept -KPIC any more.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  pgCC* | pgcpp*)
+	    # Portland Group C++ compiler
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fpic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  xlc* | xlC* | bgxl[cC]* | mpixl[cC]*)
+	    # IBM XL 8.0, 9.0 on PPC and BlueGene
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-qpic'
+	    lt_prog_compiler_static_CXX='-qstaticlink'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      lt_prog_compiler_pic_CXX='-KPIC'
+	      lt_prog_compiler_static_CXX='-Bstatic'
+	      lt_prog_compiler_wl_CXX='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    lt_prog_compiler_pic_CXX='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        lt_prog_compiler_pic_CXX='-fPIC -shared'
+        ;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC* | sunCC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    lt_prog_compiler_wl_CXX='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    lt_prog_compiler_pic_CXX='-pic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	lt_prog_compiler_can_build_shared_CXX=no
+	;;
+    esac
+  fi
+
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_CXX=
+    ;;
+  *)
+    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+    ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+if ${lt_cv_prog_compiler_pic_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; }
+lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
+if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_works_CXX=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&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 "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works_CXX=yes
+     fi
+   fi
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+    case $lt_prog_compiler_pic_CXX in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+     esac
+else
+    lt_prog_compiler_pic_CXX=
+     lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ $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 ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works_CXX=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&5
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works_CXX=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works_CXX=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+    :
+else
+    lt_prog_compiler_static_CXX=
+fi
+
+
+
+
+    { $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 ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&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 "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+    { $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 ${lt_cv_prog_compiler_c_o_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&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 "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+
+
+    { $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; }
+
+  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+  case $host_os in
+  aix[4-9]*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    # Also, AIX nm treats weak defined symbols like other global defined
+    # symbols, whereas GNU nm marks them as "W".
+    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    else
+      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    export_symbols_cmds_CXX="$ltdll_cmds"
+    ;;
+  cygwin* | mingw* | cegcc*)
+    case $cc_basename in
+    cl*)
+      exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+      ;;
+    *)
+      export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+      exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+      ;;
+    esac
+    ;;
+  *)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+    ;;
+  esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+with_gnu_ld_CXX=$with_gnu_ld
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_CXX=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_CXX in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $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; }
+if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  $RM conftest*
+	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } 2>conftest.err; then
+	  soname=conftest
+	  lib=conftest
+	  libobjs=conftest.$ac_objext
+	  deplibs=
+	  wl=$lt_prog_compiler_wl_CXX
+	  pic_flag=$lt_prog_compiler_pic_CXX
+	  compiler_flags=-v
+	  linker_flags=-v
+	  verstring=
+	  output_objdir=.
+	  libname=conftest
+	  lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+	  allow_undefined_flag_CXX=
+	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+  (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+	  then
+	    lt_cv_archive_cmds_need_lc_CXX=no
+	  else
+	    lt_cv_archive_cmds_need_lc_CXX=yes
+	  fi
+	  allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+	else
+	  cat conftest.err 1>&5
+	fi
+	$RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5
+$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; }
+      archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux # 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'
+  ;;
+
+aix[4-9]*)
+  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
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[01] | aix4.[01].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<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
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  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}'
+    ;;
+  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=`func_echo_all "$lib" | $SED '\''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'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[45]*)
+  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'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  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'\''`~
+      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'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      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.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
+    ;;
+
+  *)
+    # Assume MSVC wrapper
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
+    ;;
+  esac
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux # 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
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[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}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2.*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux # 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
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+haiku*)
+  version_type=linux # correct to gnu/linux during the next big refactor
+  need_lib_prefix=no
+  need_version=no
+  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=yes
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+  postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
+  ;;
+
+interix[3-9]*)
+  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'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux # 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}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-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
+  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
+	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_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
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+
+fi
+
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
+
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux # 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
+  ;;
+
+*nto* | *qnx*)
+  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'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[89] | openbsd2.[89].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux # 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
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux # 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=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 # 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 "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = 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"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+    { $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_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" ||
+   test -n "$runpath_var_CXX" ||
+   test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct_CXX" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+     test "$hardcode_minus_L_CXX" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_CXX=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_CXX=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_CXX=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
+$as_echo "$hardcode_action_CXX" >&6; }
+
+if test "$hardcode_action_CXX" = relink ||
+   test "$inherit_rpath_CXX" = yes; then
+  # 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
+
+
+
+
+
+
+
+  fi # test -n "$compiler"
+
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+  LDCXX=$LD
+  LD=$lt_save_LD
+  GCC=$lt_save_GCC
+  with_gnu_ld=$lt_save_with_gnu_ld
+  lt_cv_path_LDCXX=$lt_cv_path_LD
+  lt_cv_path_LD=$lt_save_path_LD
+  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+am__api_version='1.13'
+
+# 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
+  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 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
+
+  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
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$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}'
+
+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}" != 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 ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if 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
+IFS=$as_save_IFS
+
+fi
+fi
+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:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $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_STRIP+:} false; 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 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
+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:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $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
+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
+  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
+	   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
+
+  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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+{ $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
+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
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+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
+
+
+{ $as_echo "$as_me:${as_lineno-$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
+
+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
+
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+    AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  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='ucommon'
+ VERSION='6.0.7'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# 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)'
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.  Yes, it's still used
+# in the wild :-(  We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar  pax cpio none'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+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
+
+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
+
+ 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
+
+
+depcc="$CXX"  am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named 'D' -- because '-MD' means "put the output
+  # in D".
+  rm -rf conftest.dir
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+      # This compiler won't grok '-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+
+ac_config_headers="$ac_config_headers ucommon-config.h"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
+$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
+if ${ac_cv_c_restrict+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_restrict=no
+   # The order here caters to the fact that C++ does not require restrict.
+   for ac_kw in __restrict __restrict__ _Restrict restrict; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+typedef int * int_ptr;
+	int foo (int_ptr $ac_kw ip) {
+	return ip[0];
+       }
+int
+main ()
+{
+int s[1];
+	int * $ac_kw t = s;
+	t[0] = 0;
+	return foo(t)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_restrict=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     test "$ac_cv_c_restrict" != no && break
+   done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
+$as_echo "$ac_cv_c_restrict" >&6; }
+
+ case $ac_cv_c_restrict in
+   restrict) ;;
+   no) $as_echo "#define restrict /**/" >>confdefs.h
+ ;;
+   *)  cat >>confdefs.h <<_ACEOF
+#define restrict $ac_cv_c_restrict
+_ACEOF
+ ;;
+ esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
+$as_echo_n "checking for working volatile... " >&6; }
+if ${ac_cv_c_volatile+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+volatile int x;
+int * volatile y = (int *) 0;
+return !x && !y;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_volatile=yes
+else
+  ac_cv_c_volatile=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_volatile" >&5
+$as_echo "$ac_cv_c_volatile" >&6; }
+if test $ac_cv_c_volatile = no; then
+
+$as_echo "#define volatile /**/" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+  inline | yes) ;;
+  *)
+    case $ac_cv_c_inline in
+      no) ac_val=;;
+      *) ac_val=$ac_cv_c_inline;;
+    esac
+    cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+    ;;
+esac
+
+
+UCOMMON_VISIBILITY="0"
+UCOMMON_FLAGS=""
+UCOMMON_MODEL="CXX"
+UCOMMON_CLINK=""
+UCOMMON_LIBC="-lc"
+UCOMMON_LIBS=""
+OPENSSL_LINK=""
+
+CHECKFLAGS="$CHECKFLAGS"
+
+case "$with_crypto" in
+ssl|openssl)
+    ssl="openssl"
+    ;;
+gnutls|gnu)
+    ssl="gnutls"
+    ;;
+none|nossl)
+    ssl="nossl"
+    ;;
+*)
+    ssl="detect"
+    ;;
+esac
+
+have_gettext="no"
+socket_lib=""
+posix4_lib=""
+rt_lib=""
+
+test -z "$localedir" && localedir='${datadir}/locale'
+
+
+
+# for very old gcc and for minix we disable full ucommon build by default
+# we also disable for mingw32 or when no "shared" library support because
+# libstdc++ is not dll and really bloats in linkage of plugins.  Any case,
+# you can always override with --enable-stdcpp...
+
+if test -z "$enable_stdcpp" ; then
+    if test "x$GCC" = "xyes" ; then
+        gccver=`$CC -dumpversion | cut -f1 -d.`
+    fi
+    if test -z "$gccver" ; then
+        gccver="3"
+    fi
+    if test "$gccver" -lt "3" ; then
+        enable_stdcpp="no"
+    fi
+    if test "x$enable_shared" = "xno" ; then
+        enable_stdcpp="no"
+    fi
+    case "$target_os" in
+    *minix*|mingw*)
+        enable_stdcpp="no"
+        ;;
+    esac
+fi
+
+# Check whether --enable-posix-timers was given.
+if test "${enable_posix_timers+set}" = set; then :
+  enableval=$enable_posix_timers;
+fi
+
+
+if test "x$enable_posix_timers" = "xyes" ; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -DPOSIX_TIMERS"
+fi
+
+# Check whether --enable-stdcpp was given.
+if test "${enable_stdcpp+set}" = set; then :
+  enableval=$enable_stdcpp;
+fi
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking full c++ support and linking model" >&5
+$as_echo_n "checking full c++ support and linking model... " >&6; }
+
+if test "x$enable_stdcpp" = "xno" ; then
+    UCOMMON_MODEL="CC"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    COMPAT=""
+else
+    COMPAT="commoncpp"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+
+
+# Check whether --with-sslstack was given.
+if test "${with_sslstack+set}" = set; then :
+  withval=$with_sslstack;
+    if test x$with_sslstack != x ; then
+        ssl="${with_sslstack}" ; fi
+
+fi
+
+
+
+# Check whether --with-libc was given.
+if test "${with_libc+set}" = set; then :
+  withval=$with_libc;
+    if test x$with_libc != x ; then
+        clib=`echo ${with_libc} | sed s/-l//`
+        UCOMMON_LIBC=-l${clib} ; fi
+
+fi
+
+
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+  enableval=$enable_debug;
+fi
+
+if test -z "$enable_debug" ; then
+    enable_debug="no"
+elif test $enable_debug = "yes" ; then
+    CXXFLAGS="${CXXFLAGS} -g -DDEBUG"
+fi
+
+
+
+threading="none"
+clib=`echo ${UCOMMON_LIBC} | sed s/-l//`
+tlib=""
+
+for ac_header in stdint.h poll.h sys/mman.h sys/shm.h sys/poll.h sys/timeb.h endian.h sys/filio.h dirent.h sys/resource.h wchar.h netinet/in.h net/if.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
+
+done
+
+for ac_header in mach/clock.h mach-o/dyld.h linux/version.h sys/inotify.h sys/event.h syslog.h sys/wait.h termios.h termio.h fcntl.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
+
+done
+
+for ac_header in sys/param.h sys/lockf.h sys/file.h dlfcn.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
+
+done
+
+
+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 :
+
+
+$as_echo "#define HAVE_REGEX_H 1" >>confdefs.h
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for regfree in -lregex" >&5
+$as_echo_n "checking for regfree in -lregex... " >&6; }
+if ${ac_cv_lib_regex_regfree+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lregex  $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 regfree ();
+int
+main ()
+{
+return regfree ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_regex_regfree=yes
+else
+  ac_cv_lib_regex_regfree=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_regex_regfree" >&5
+$as_echo "$ac_cv_lib_regex_regfree" >&6; }
+if test "x$ac_cv_lib_regex_regfree" = xyes; then :
+
+        UCOMMON_LIBS="$UCOMMON_LIBS -lregex"
+
+fi
+
+
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fopen in -lmsvcrt" >&5
+$as_echo_n "checking for fopen in -lmsvcrt... " >&6; }
+if ${ac_cv_lib_msvcrt_fopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmsvcrt  $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 fopen ();
+int
+main ()
+{
+return fopen ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_msvcrt_fopen=yes
+else
+  ac_cv_lib_msvcrt_fopen=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_msvcrt_fopen" >&5
+$as_echo "$ac_cv_lib_msvcrt_fopen" >&6; }
+if test "x$ac_cv_lib_msvcrt_fopen" = xyes; then :
+
+    threading="msw"
+    clib="msvcrt"
+    UCOMMON_VISIBILITY="0"
+    UCOMMON_LIBS="--enable-stdcall-fixup $UCOMMON_LIBS -lmingwex -lmingw32 -lcrypt32 -ladvapi32 -luser32 -lws2_32 -lwsock32 -lkernel32"
+    UCOMMON_LIBC="-lmsvcrt -lgcc"
+    OPENSSL_LINK="-lgdi32"
+
+$as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
+
+
+else
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __modsi3 in -lgcc" >&5
+$as_echo_n "checking for __modsi3 in -lgcc... " >&6; }
+if ${ac_cv_lib_gcc___modsi3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgcc  $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 __modsi3 ();
+int
+main ()
+{
+return __modsi3 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gcc___modsi3=yes
+else
+  ac_cv_lib_gcc___modsi3=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_gcc___modsi3" >&5
+$as_echo "$ac_cv_lib_gcc___modsi3" >&6; }
+if test "x$ac_cv_lib_gcc___modsi3" = xyes; then :
+
+        UCOMMON_LIBC="$UCOMMON_LIBC -lgcc"
+
+fi
+
+    as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_socketpair" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair in -l$clib" >&5
+$as_echo_n "checking for socketpair in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 socketpair ();
+int
+main ()
+{
+return socketpair ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+
+$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
+
+
+else
+
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair in -lsocket" >&5
+$as_echo_n "checking for socketpair in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_socketpair+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $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 socketpair ();
+int
+main ()
+{
+return socketpair ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_socketpair=yes
+else
+  ac_cv_lib_socket_socketpair=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_socket_socketpair" >&5
+$as_echo "$ac_cv_lib_socket_socketpair" >&6; }
+if test "x$ac_cv_lib_socket_socketpair" = xyes; then :
+
+$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
+
+fi
+
+
+fi
+
+    as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_getaddrinfo" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -l$clib" >&5
+$as_echo_n "checking for getaddrinfo in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 getaddrinfo ();
+int
+main ()
+{
+return getaddrinfo ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+
+$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
+
+
+else
+
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lsocket" >&5
+$as_echo_n "checking for getaddrinfo in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_getaddrinfo+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $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 getaddrinfo ();
+int
+main ()
+{
+return getaddrinfo ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_getaddrinfo=yes
+else
+  ac_cv_lib_socket_getaddrinfo=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_socket_getaddrinfo" >&5
+$as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; }
+if test "x$ac_cv_lib_socket_getaddrinfo" = xyes; then :
+
+$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
+
+fi
+
+
+fi
+
+    as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_gethostbyname2" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname2 in -l$clib" >&5
+$as_echo_n "checking for gethostbyname2 in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 gethostbyname2 ();
+int
+main ()
+{
+return gethostbyname2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+
+$as_echo "#define HAVE_GETHOSTBYNAME2 1" >>confdefs.h
+
+
+else
+
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname2 in -lsocket" >&5
+$as_echo_n "checking for gethostbyname2 in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_gethostbyname2+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $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 gethostbyname2 ();
+int
+main ()
+{
+return gethostbyname2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_gethostbyname2=yes
+else
+  ac_cv_lib_socket_gethostbyname2=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_socket_gethostbyname2" >&5
+$as_echo "$ac_cv_lib_socket_gethostbyname2" >&6; }
+if test "x$ac_cv_lib_socket_gethostbyname2" = xyes; then :
+
+$as_echo "#define HAVE_GETHOSTBYNAME2 1" >>confdefs.h
+
+fi
+
+
+fi
+
+
+    as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_inet_ntop" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntop in -l$clib" >&5
+$as_echo_n "checking for inet_ntop in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 inet_ntop ();
+int
+main ()
+{
+return inet_ntop ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+
+$as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
+
+
+else
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntop in -lsocket" >&5
+$as_echo_n "checking for inet_ntop in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_inet_ntop+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $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 inet_ntop ();
+int
+main ()
+{
+return inet_ntop ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_inet_ntop=yes
+else
+  ac_cv_lib_socket_inet_ntop=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_socket_inet_ntop" >&5
+$as_echo "$ac_cv_lib_socket_inet_ntop" >&6; }
+if test "x$ac_cv_lib_socket_inet_ntop" = xyes; then :
+
+
+$as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
+
+
+else
+
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntop in -lnsl" >&5
+$as_echo_n "checking for inet_ntop in -lnsl... " >&6; }
+if ${ac_cv_lib_nsl_inet_ntop+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl  $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 inet_ntop ();
+int
+main ()
+{
+return inet_ntop ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_nsl_inet_ntop=yes
+else
+  ac_cv_lib_nsl_inet_ntop=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_nsl_inet_ntop" >&5
+$as_echo "$ac_cv_lib_nsl_inet_ntop" >&6; }
+if test "x$ac_cv_lib_nsl_inet_ntop" = xyes; then :
+
+
+$as_echo "#define HAVE_INET_NTOP 1" >>confdefs.h
+
+                socket_lib="$socket_lib -lnsl"
+
+fi
+
+
+fi
+
+
+fi
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
+$as_echo_n "checking for socket in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_socket+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $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 socket ();
+int
+main ()
+{
+return socket ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_socket=yes
+else
+  ac_cv_lib_socket_socket=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_socket_socket" >&5
+$as_echo "$ac_cv_lib_socket_socket" >&6; }
+if test "x$ac_cv_lib_socket_socket" = xyes; then :
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair in -lsocket" >&5
+$as_echo_n "checking for socketpair in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_socketpair+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket  $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 socketpair ();
+int
+main ()
+{
+return socketpair ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_socketpair=yes
+else
+  ac_cv_lib_socket_socketpair=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_socket_socketpair" >&5
+$as_echo "$ac_cv_lib_socket_socketpair" >&6; }
+if test "x$ac_cv_lib_socket_socketpair" = xyes; then :
+
+
+$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
+
+
+fi
+
+        socket_lib="-lsocket"
+
+fi
+
+
+fi
+
+
+# Check whether --enable-socks was given.
+if test "${enable_socks+set}" = set; then :
+  enableval=$enable_socks;
+fi
+
+
+if test "x$enable_socks" = "xyes" ; then
+    enable_socks="no"
+    for ac_header in socks.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "socks.h" "ac_cv_header_socks_h" "$ac_includes_default"
+if test "x$ac_cv_header_socks_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_SOCKS_H 1
+_ACEOF
+
+        enable_socks="yes"
+
+fi
+
+done
+
+else
+    enable_socks="no"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socks proxy support" >&5
+$as_echo_n "checking for socks proxy support... " >&6; }
+
+if test "x$enable_socks" = "xyes" ; then
+    socket_lib="-lsocksd $socket_lib"
+
+$as_echo "#define HAVE_SOCKS 1" >>confdefs.h
+
+    { $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_ac_Lib=`$as_echo "ac_cv_lib_$clib''_lstat" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat in -l$clib" >&5
+$as_echo_n "checking for lstat in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 lstat ();
+int
+main ()
+{
+return lstat ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+
+$as_echo "#define HAVE_LSTAT 1" >>confdefs.h
+
+
+fi
+
+
+as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_strcoll" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcoll in -l$clib" >&5
+$as_echo_n "checking for strcoll in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 strcoll ();
+int
+main ()
+{
+return strcoll ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+
+$as_echo "#define HAVE_STRCOLL 1" >>confdefs.h
+
+
+fi
+
+
+as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_stricmp" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stricmp in -l$clib" >&5
+$as_echo_n "checking for stricmp in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 stricmp ();
+int
+main ()
+{
+return stricmp ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+
+$as_echo "#define HAVE_STRICMP 1" >>confdefs.h
+
+
+fi
+
+
+as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_stristr" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stristr in -l$clib" >&5
+$as_echo_n "checking for stristr in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 stristr ();
+int
+main ()
+{
+return stristr ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+
+$as_echo "#define HAVE_STRISTR 1" >>confdefs.h
+
+
+fi
+
+
+as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_sysconf" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf in -l$clib" >&5
+$as_echo_n "checking for sysconf in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 sysconf ();
+int
+main ()
+{
+return sysconf ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+
+$as_echo "#define HAVE_SYSCONF 1" >>confdefs.h
+
+
+fi
+
+
+as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_posix_memalign" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for posix_memalign in -l$clib" >&5
+$as_echo_n "checking for posix_memalign in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 posix_memalign ();
+int
+main ()
+{
+return posix_memalign ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+
+$as_echo "#define HAVE_POSIX_MEMALIGN 1" >>confdefs.h
+
+
+fi
+
+
+as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_dlopen" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -l$clib" >&5
+$as_echo_n "checking for dlopen in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_LIB$clib" | $as_tr_cpp` 1
+_ACEOF
+
+  LIBS="-l$clib $LIBS"
+
+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.  */
+
+/* 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 :
+  UCOMMON_LIBS="$UCOMMON_LIBS -ldl"
+else
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lcompat" >&5
+$as_echo_n "checking for dlopen in -lcompat... " >&6; }
+if ${ac_cv_lib_compat_dlopen+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcompat  $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_compat_dlopen=yes
+else
+  ac_cv_lib_compat_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_compat_dlopen" >&5
+$as_echo "$ac_cv_lib_compat_dlopen" >&6; }
+if test "x$ac_cv_lib_compat_dlopen" = xyes; then :
+  UCOMMON_LIBS="$UCOMMON_LIBS -lcompat"
+fi
+
+        { $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.  */
+
+/* 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 :
+
+
+$as_echo "#define HAVE_SHL_LOAD 1" >>confdefs.h
+
+            UCOMMON_LIBS="$UCOMMON_LIBS -ldld"
+
+fi
+
+
+fi
+
+
+fi
+
+
+PTHREAD_FLAGS=""
+
+if test "$enable_shared" = "no" ; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -DUCOMMON_STATIC" ; fi
+
+# Check whether --enable-atomics was given.
+if test "${enable_atomics+set}" = set; then :
+  enableval=$enable_atomics;
+
+$as_echo "#define HAVE_GCC_ATOMICS 1" >>confdefs.h
+
+
+fi
+
+
+# Check whether --enable-pth was given.
+if test "${enable_pth+set}" = set; then :
+  enableval=$enable_pth;
+fi
+
+
+if test "$threading" = "none" ; then
+    if test "$enable_pth" != "yes" ; then
+        ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
+if test "x$ac_cv_header_pthread_h" = xyes; then :
+
+            PTHREAD_FLAGS="-mt -pthread -pthreads"
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
+$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
+if ${ac_cv_lib_pthread_pthread_create+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread  $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 pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_pthread_pthread_create=yes
+else
+  ac_cv_lib_pthread_pthread_create=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_pthread_pthread_create" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
+
+                tlib="pthread"
+                UCOMMON_LIBS="$UCOMMON_LIBS -lpthread"
+
+fi
+
+            if test -z "$tlib" ; then
+                as_ac_Lib=`$as_echo "ac_cv_lib_$clib''_pthread_create" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -l$clib" >&5
+$as_echo_n "checking for pthread_create in -l$clib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$clib  $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 pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+  tlib="$clib"
+fi
+
+            fi
+            if test -z "$tlib" ; then
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
+$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
+if ${ac_cv_lib_c_r_pthread_create+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $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 pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_c_r_pthread_create=yes
+else
+  ac_cv_lib_c_r_pthread_create=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_c_r_pthread_create" >&5
+$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
+if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
+
+                    tlib="c_r"
+                    if test "$clib" = "c" ; then
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc in -lc_r" >&5
+$as_echo_n "checking for malloc in -lc_r... " >&6; }
+if ${ac_cv_lib_c_r_malloc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r  $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 malloc ();
+int
+main ()
+{
+return malloc ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_c_r_malloc=yes
+else
+  ac_cv_lib_c_r_malloc=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_c_r_malloc" >&5
+$as_echo "$ac_cv_lib_c_r_malloc" >&6; }
+if test "x$ac_cv_lib_c_r_malloc" = xyes; then :
+  clib="c_r"
+fi
+
+                    fi
+
+fi
+
+            fi
+            if test ! -z "$tlib" ; then
+                as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_pthread_condattr_setclock" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_condattr_setclock in -l$tlib" >&5
+$as_echo_n "checking for pthread_condattr_setclock in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 pthread_condattr_setclock ();
+int
+main ()
+{
+return pthread_condattr_setclock ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+
+$as_echo "#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1" >>confdefs.h
+
+
+fi
+
+                as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_pthread_setconcurrency" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setconcurrency in -l$tlib" >&5
+$as_echo_n "checking for pthread_setconcurrency in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 pthread_setconcurrency ();
+int
+main ()
+{
+return pthread_setconcurrency ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+
+$as_echo "#define HAVE_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
+
+
+fi
+
+
+                as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_pthread_yield" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_yield in -l$tlib" >&5
+$as_echo_n "checking for pthread_yield in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 pthread_yield ();
+int
+main ()
+{
+return pthread_yield ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+
+$as_echo "#define HAVE_PTHREAD_YIELD 1" >>confdefs.h
+
+
+fi
+
+
+                as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_pthread_delay" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_delay in -l$tlib" >&5
+$as_echo_n "checking for pthread_delay in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 pthread_delay ();
+int
+main ()
+{
+return pthread_delay ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+
+$as_echo "#define HAVE_PTHREAD_DELAY 1" >>confdefs.h
+
+
+fi
+
+                as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_pthread_delay_np" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_delay_np in -l$tlib" >&5
+$as_echo_n "checking for pthread_delay_np in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 pthread_delay_np ();
+int
+main ()
+{
+return pthread_delay_np ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+
+$as_echo "#define HAVE_PTHREAD_DELAY_NP 1" >>confdefs.h
+
+
+fi
+
+                as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_pthread_setschedprio" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setschedprio in -l$tlib" >&5
+$as_echo_n "checking for pthread_setschedprio in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 pthread_setschedprio ();
+int
+main ()
+{
+return pthread_setschedprio ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+
+$as_echo "#define HAVE_PTHREAD_SETSCHEDPRIO 1" >>confdefs.h
+
+
+fi
+
+            fi
+
+else
+
+            ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
+if test "x$ac_cv_header_windows_h" = xyes; then :
+
+else
+
+                ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
+if test "x$ac_cv_header_pth_h" = xyes; then :
+
+                    UCOMMON_LIBS="$UCOMMON_LIBS -lpth"
+                    UCOMMON_FLAGS="$UCOMMON_FLAGS -D__PTH__"
+
+else
+
+                    as_fn_error $? "\"pthread or GNU pth support required\"" "$LINENO" 5
+
+fi
+
+
+
+fi
+
+
+
+fi
+
+
+    else
+        ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
+if test "x$ac_cv_header_pth_h" = xyes; then :
+
+            UCOMMON_LIBS="$UCOMMON_LIBS -lpth"
+            UCOMMON_FLAGS="$UCOMMON_FLAGS -D__PTH__"
+
+else
+
+            as_fn_error $? "\"GNU pth required\"" "$LINENO" 5
+
+fi
+
+
+    fi
+fi
+
+for func in ftok shm_open nanosleep clock_nanosleep clock_gettime strerror_r localtime_r gmtime_r posix_fadvise ftruncate pwrite setpgrp setlocale gettext execvp atexit realpath symlink readlink waitpid wait4 ; do
+    found="no"
+    as_ac_var=`$as_echo "ac_cv_func_$func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+
+        found=$func
+
+else
+
+        as_ac_Lib=`$as_echo "ac_cv_lib_posix4_$func" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $func in -lposix4" >&5
+$as_echo_n "checking for $func in -lposix4... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix4  $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 $func ();
+int
+main ()
+{
+return $func ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+            found=$func
+            posix4_lib="-lposix4"
+
+else
+
+            as_ac_Lib=`$as_echo "ac_cv_lib_rt_$func" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $func in -lrt" >&5
+$as_echo_n "checking for $func in -lrt... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $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 $func ();
+int
+main ()
+{
+return $func ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+                found=$func
+                rt_lib="-lrt"
+
+else
+
+                if test ! -z "$tlib" ; then
+                    as_ac_Lib=`$as_echo "ac_cv_lib_$tlib''_$func" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $func in -l$tlib" >&5
+$as_echo_n "checking for $func in -l$tlib... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$tlib  $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 $func ();
+int
+main ()
+{
+return $func ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$as_ac_Lib=yes"
+else
+  eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+
+                        found=$func
+
+fi
+
+                fi
+
+fi
+
+
+fi
+
+
+fi
+
+    case $found in
+    shm_open)
+
+$as_echo "#define HAVE_SHM_OPEN 1" >>confdefs.h
+
+        ;;
+    setpgrp)
+
+$as_echo "#define HAVE_SETPGRP 1" >>confdefs.h
+
+        ;;
+    realpath)
+
+$as_echo "#define HAVE_REALPATH 1" >>confdefs.h
+
+        ;;
+    ftok)
+
+$as_echo "#define HAVE_FTOK 1" >>confdefs.h
+
+        ;;
+    gmtime_r)
+
+$as_echo "#define HAVE_GMTIME_R 1" >>confdefs.h
+
+        ;;
+    localtime_r)
+
+$as_echo "#define HAVE_LOCALTIME_R 1" >>confdefs.h
+
+        ;;
+    strerror_r)
+
+$as_echo "#define HAVE_STRERROR_R 1" >>confdefs.h
+
+        ;;
+    nanosleep)
+
+$as_echo "#define HAVE_NANOSLEEP 1" >>confdefs.h
+
+        ;;
+    clock_nanosleep)
+
+$as_echo "#define HAVE_CLOCK_NANOSLEEP 1" >>confdefs.h
+
+        ;;
+    clock_gettime)
+
+$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
+
+        ;;
+    posix_fadvise)
+
+$as_echo "#define HAVE_POSIX_FADVISE 1" >>confdefs.h
+
+        ;;
+    ftruncate)
+
+$as_echo "#define HAVE_FTRUNCATE 1" >>confdefs.h
+
+        ;;
+    pwrite)
+
+$as_echo "#define HAVE_PWRITE 1" >>confdefs.h
+
+        ;;
+    setlocale)
+
+$as_echo "#define HAVE_SETLOCALE 1" >>confdefs.h
+
+        ;;
+    gettext)
+
+$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
+
+        have_gettext="yes"
+        ;;
+    execvp)
+
+$as_echo "#define HAVE_EXECVP 1" >>confdefs.h
+
+        ;;
+    symlink)
+
+$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
+
+        ;;
+    readlink)
+
+$as_echo "#define HAVE_READLINK 1" >>confdefs.h
+
+        ;;
+    waitpid)
+
+$as_echo "#define HAVE_WAITPID 1" >>confdefs.h
+
+        ;;
+    wait4)
+
+$as_echo "#define HAVE_WAIT4 1" >>confdefs.h
+
+        ;;
+    esac
+done
+
+UCOMMON_LINKED="$socket_lib $posix4_lib $rt_lib $UCOMMON_LIBS"
+UCOMMON_LIBS="$socket_lib $posix4_lib $rt_lib $UCOMMON_LIBS $UCOMMON_LIBC"
+
+if test "$UCOMMON_MODEL" = "CC" ; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf in -lSystemstubs" >&5
+$as_echo_n "checking for printf in -lSystemstubs... " >&6; }
+if ${ac_cv_lib_Systemstubs_printf+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lSystemstubs  $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 printf ();
+int
+main ()
+{
+return printf ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_Systemstubs_printf=yes
+else
+  ac_cv_lib_Systemstubs_printf=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_Systemstubs_printf" >&5
+$as_echo "$ac_cv_lib_Systemstubs_printf" >&6; }
+if test "x$ac_cv_lib_Systemstubs_printf" = xyes; then :
+
+        UCOMMON_CLINK="$UCOMMON_CLINK -lSystemstubs"
+        UCOMMON_LIBC="$UCOMMON_LIBC -lgcc"
+
+fi
+
+fi
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+COMPILER_FLAGS=""
+
+if test "x$GCC" = "xyes" ; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -Wno-long-long" ; fi
+
+for flag in $CXXFLAGS ; do
+    case "$flag" in
+    -f*exceptions|-f*rtti|-f*check-new|-f*enforce-eh-specs|-finline|-f*except)
+        if test "$UCOMMON_MODEL" = "CXX" ; then
+            UCOMMON_FLAGS="$UCOMMON_FLAGS $flag" ; fi
+        ;;
+    -fvisibility=*)
+        VISIBLE_FLAGS=""
+        COMPILER_FLAGS="$COMPILER_FLAGS $flag"
+        ;;
+    *)
+        COMPILER_FLAGS="$COMPILER_FLAGS $flag"
+        ;;
+    esac
+done
+export CXXFLAGS="$COMPILER_FLAGS"
+
+if test "$UCOMMON_MODEL" = "CC" ; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS"
+
+    if test x"$GCC" = "xyes" ; then
+        ucflags="-fno-exceptions -fno-rtti -fno-enforce-eh-specs"
+        lcflags="-nodefaultlibs -nostdinc++"
+    else
+        ucflags="-library=no%Cstd -features=no%except -features=namespace -features=no%rtti"
+        lcflags=""
+    fi
+
+    for flag in $ucflags ; do
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports $flag" >&5
+$as_echo_n "checking whether ${CXX} supports $flag... " >&6; }
+        echo 'void f(){}' >conftest.cpp
+        if test -z "`${CXX} $flag -c conftest.cpp 2>&1`"; then
+            UCOMMON_FLAGS="$UCOMMON_FLAGS $flag"
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+            if test "$flag" = "-library=no%Cstd" ; then
+                UCOMMON_MODEL="CXX" ; fi
+        else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        fi
+        rm -f conftest*
+    done
+
+    for flag in $lcflags ; do
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports $flag" >&5
+$as_echo_n "checking whether ${CXX} supports $flag... " >&6; }
+        echo 'void f(){}' >conftest.cpp
+        if test -z "`${CXX} $flag -c conftest.cpp 2>&1`"; then
+            UCOMMON_CLINK="$UCOMMON_CLINK $flag"
+            { $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
+        rm -f conftest*
+    done
+else
+    ac_save_CXXFLAGS="$CXXFLAGS"
+    CXXFLAGS=""
+
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+for ac_header in stdexcept
+do :
+  ac_fn_cxx_check_header_mongrel "$LINENO" "stdexcept" "ac_cv_header_stdexcept" "$ac_includes_default"
+if test "x$ac_cv_header_stdexcept" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STDEXCEPT 1
+_ACEOF
+
+fi
+
+done
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for old style iostream" >&5
+$as_echo_n "checking for old style iostream... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+        #include <iostream>
+        using namespace std;
+
+        class mystr : public streambuf, public iostream
+        {
+            mystr();
+        };
+
+        mystr::mystr() : streambuf(), iostream((streambuf *)this)
+        {
+        }
+
+int
+main ()
+{
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        UCOMMON_FLAGS="$UCOMMON_FLAGS -DNEW_STDCPP"
+
+else
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+        UCOMMON_FLAGS="$UCOMMON_FLAGS -DOLD_STDCPP"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+    CXXFLAGS="$ac_save_CXXFLAGS"
+fi
+
+if test ! -z "$PTHREAD_FLAGS" ; then
+    for flag in $PTHREAD_FLAGS ; do
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports $flag" >&5
+$as_echo_n "checking whether ${CXX} supports $flag... " >&6; }
+        echo 'void f(){}' >conftest.cpp
+        if test -z "`${CXX} $flag -c conftest.cpp 2>&1`"; then
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+            UCOMMON_FLAGS="$UCOMMON_FLAGS $flag"
+            break
+        else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+        fi
+    done
+fi
+
+export CXXFLAGS
+
+# libstdc++ on some targets broken badly if inlines hidden.  Might be
+# deeper issue with ansi c++ library model...
+flags="-fno-check-new -finline"
+if test "$UCOMMON_MODEL" = "CC" ; then
+    if test "$enable_shared" != "no" ; then
+        flags="$flags -fvisibility-inlines-hidden"
+    fi
+fi
+
+for flag in $flags ; do
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports $flag" >&5
+$as_echo_n "checking whether ${CXX} supports $flag... " >&6; }
+    echo 'void f(){}' >conftest.cpp
+    if test -z "`${CXX} $flag -c conftest.cpp 2>&1`"; then
+        UCOMMON_FLAGS="$UCOMMON_FLAGS $flag"
+        { $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
+    rm -f conftest*
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports visibility" >&5
+$as_echo_n "checking whether ${CXX} supports visibility... " >&6; }
+echo 'void f(){}' >conftest.cpp
+if test -z "`${CXX} -fvisibility=hidden -c conftest.cpp 2>&1`"; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -fvisibility=hidden -DUCOMMON_VISIBILITY=1"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    UCOMMON_VISIBILITY="1"
+else
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -DUCOMMON_VISIBILITY=0"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f conftest*
+
+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
+
+
+
+        includes="$includedir"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$includes")`
+                includes=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$includes"\"
+                )`
+                result=`(echo "$includes")`
+        done
+
+
+
+        libs="$libdir"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$libs")`
+                libs=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$libs"\"
+                )`
+                result=`(echo "$libs")`
+        done
+
+
+
+case "$libs" in
+/usr/*)
+    ;;
+*)
+    UCOMMON_LINKED="-L$libs $UCOMMON_LINKED"
+    ;;
+esac
+
+case "$includes" in
+/usr/*)
+    ;;
+*)
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -I$includes"
+    ;;
+esac
+
+case "$target_os" in
+*bsd*)
+    if test "$UCOMMON_MODEL" = "CC" ; then
+        if test "$GCC" = "yes" -a "$UCOMMON_LIBC" = "-lc" ; then
+            UCOMMON_LIBC="-Wl,-lc"
+        elif test "$GCC" = "yes" -a "$UCOMMON_LIBC" = "-lc_r" ; then
+            UCOMMON_LIBC="-Wl,-lc_r"
+        fi
+    fi
+    ;;
+osf*)
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -D_POSIX_C_SOURCE=1 -D_OSF_SOURCE=1 -D__USE_STD_IOSTREAM"
+    ;;
+cygwin*|mingw*)
+    UCOMMON_LINKED="$UCOMMON_LINKED -no-undefined"
+    UCOMMON_LIBS="$UCOMMON_LIBS -no-undefined"
+    ;;
+esac
+
+UCOMMON_CLINK="$UCOMMON_CLINK $UCOMMON_LIBC"
+
+if test -z "$UCOMMON_SSLSTACK" ; then
+    UCOMMON_SSLSTACK="$sslstack" ; fi
+
+OPENSSL_LIBS=""
+GNUTLS_LIBS=""
+
+
+
+
+
+
+
+
+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
+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:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+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
+  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
+
+  ;;
+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
+
+  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
+
+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
+
+# Check whether --with-pkg-config was given.
+if test "${with_pkg_config+set}" = set; then :
+  withval=$with_pkg_config;
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
+$as_echo_n "checking for OPENSSL... " >&6; }
+
+if test -n "$OPENSSL_CFLAGS"; then
+    pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= \$OPENSSL_REQUIRES\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "openssl >= $OPENSSL_REQUIRES") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl >= $OPENSSL_REQUIRES" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$OPENSSL_LIBS"; then
+    pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl >= \$OPENSSL_REQUIRES\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "openssl >= $OPENSSL_REQUIRES") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl >= $OPENSSL_REQUIRES" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl >= $OPENSSL_REQUIRES" 2>&1`
+        else
+	        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl >= $OPENSSL_REQUIRES" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$OPENSSL_PKG_ERRORS" >&5
+
+
+        OPENSSL_LIBS=""
+        for ac_header in openssl/ssl.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENSSL_SSL_H 1
+_ACEOF
+
+            OPENSSL_LIBS="-lssl -lcrypto -lz $OPENSSL_LINK"
+
+fi
+
+done
+
+        for ac_header in openssl/fips.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/fips.h" "ac_cv_header_openssl_fips_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_fips_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENSSL_FIPS_H 1
+_ACEOF
+
+fi
+
+done
+
+
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+        OPENSSL_LIBS=""
+        for ac_header in openssl/ssl.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENSSL_SSL_H 1
+_ACEOF
+
+            OPENSSL_LIBS="-lssl -lcrypto -lz $OPENSSL_LINK"
+
+fi
+
+done
+
+        for ac_header in openssl/fips.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/fips.h" "ac_cv_header_openssl_fips_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_fips_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENSSL_FIPS_H 1
+_ACEOF
+
+fi
+
+done
+
+
+else
+	OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS
+	OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNUTLS" >&5
+$as_echo_n "checking for GNUTLS... " >&6; }
+
+if test -n "$GNUTLS_CFLAGS"; then
+    pkg_cv_GNUTLS_CFLAGS="$GNUTLS_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 2.8.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gnutls >= 2.8.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.8.0" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GNUTLS_LIBS"; then
+    pkg_cv_GNUTLS_LIBS="$GNUTLS_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls >= 2.8.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gnutls >= 2.8.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.8.0" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        GNUTLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gnutls >= 2.8.0" 2>&1`
+        else
+	        GNUTLS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gnutls >= 2.8.0" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$GNUTLS_PKG_ERRORS" >&5
+
+	GNUTLS_LIBS=""
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	GNUTLS_LIBS=""
+else
+	GNUTLS_CFLAGS=$pkg_cv_GNUTLS_CFLAGS
+	GNUTLS_LIBS=$pkg_cv_GNUTLS_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+else
+
+    for ac_header in openssl/ssl.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENSSL_SSL_H 1
+_ACEOF
+
+        OPENSSL_LIBS="-lssl -lcrypto -lz $OPENSSL_LINK"
+
+fi
+
+done
+
+    for ac_header in openssl/fips.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/fips.h" "ac_cv_header_openssl_fips_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_fips_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENSSL_FIPS_H 1
+_ACEOF
+
+fi
+
+done
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_init in -lgnutls" >&5
+$as_echo_n "checking for gnutls_init in -lgnutls... " >&6; }
+if ${ac_cv_lib_gnutls_gnutls_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgnutls  $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 gnutls_init ();
+int
+main ()
+{
+return gnutls_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_gnutls_gnutls_init=yes
+else
+  ac_cv_lib_gnutls_gnutls_init=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_gnutls_gnutls_init" >&5
+$as_echo "$ac_cv_lib_gnutls_gnutls_init" >&6; }
+if test "x$ac_cv_lib_gnutls_gnutls_init" = xyes; then :
+
+        GNUTLS_LIBS="-lgnutls"
+
+fi
+
+
+fi
+
+
+
+SECURE=""
+case "$ssl" in
+secure|any|detect)
+    if test ! -z "$GNUTLS_LIBS" ; then
+        SECURE_LIBS="$GNUTLS_LIBS"
+        SECURE="gnutls"
+    fi
+    if test -z "$SECURE" ; then
+        if test ! -z "$OPENSSL_LIBS" ; then
+            SECURE_LIBS="$OPENSSL_LIBS"
+            SECURE="openssl"
+        fi
+    fi
+    ;;
+gnutls|gnu)
+    if test ! -z "$GNUTLS_LIBS" ; then
+        SECURE_LIBS="$GNUTLS_LIBS"
+        SECURE="gnutls"
+    fi
+    ;;
+openssl|ssl)
+    if test ! -z "$OPENSSL_LIBS" ; then
+        SECURE_LIBS="$OPENSSL_LIBS"
+        SECURE="openssl"
+    fi
+    ;;
+esac
+
+if test -z "$SECURE" ; then
+    SECURE_LIBS=""
+    SECURE="nossl"
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking secure library mode" >&5
+$as_echo_n "checking secure library mode... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SECURE" >&5
+$as_echo "$SECURE" >&6; }
+
+SECURE_LOCAL="../$SECURE/libusecure.la $SECURE_LIBS"
+
+LT_GENERIC="${LIBTOOL}"
+if test "$UCOMMON_MODEL" = "CC" ; then
+    LIBTOOL='$(SHELL) $(top_srcdir)/cmodel.sh'" ${LIBTOOL}" ; fi
+
+includes='${includedir}/ucommon'
+
+if test "$sysconfdir" = '${prefix}/etc' ; then
+    sysconfdir="/etc" ; fi
+
+if test "$localstatedir" = '${prefix}/var' ; then
+    localstatedir="/var" ; fi
+
+ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
+if test "x$ac_cv_header_libintl_h" = xyes; then :
+
+
+$as_echo "#define HAVE_LIBINTL_H 1" >>confdefs.h
+
+    if test "$have_gettext" = "no" ; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
+$as_echo_n "checking for gettext in -lintl... " >&6; }
+if ${ac_cv_lib_intl_gettext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $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 gettext ();
+int
+main ()
+{
+return gettext ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_intl_gettext=yes
+else
+  ac_cv_lib_intl_gettext=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_intl_gettext" >&5
+$as_echo "$ac_cv_lib_intl_gettext" >&6; }
+if test "x$ac_cv_lib_intl_gettext" = xyes; then :
+
+
+$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
+
+            UCOMMON_LIBS="$UCOMMON_LIBS -lintl"
+
+fi
+
+    fi
+
+fi
+
+
+
+if test "$prefix" = "NONE" ; then
+    prefixdir="$ac_default_prefix"
+else
+    prefixdir="$prefix" ; fi
+
+
+        UCOMMON_INCLUDES="$includes"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$UCOMMON_INCLUDES")`
+                UCOMMON_INCLUDES=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$UCOMMON_INCLUDES"\"
+                )`
+                result=`(echo "$UCOMMON_INCLUDES")`
+        done
+
+
+
+        UCOMMON_LOCALE="$localedir"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$UCOMMON_LOCALE")`
+                UCOMMON_LOCALE=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$UCOMMON_LOCALE"\"
+                )`
+                result=`(echo "$UCOMMON_LOCALE")`
+        done
+
+
+
+        UCOMMON_CFGPATH="$sysconfdir"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$UCOMMON_CFGPATH")`
+                UCOMMON_CFGPATH=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$UCOMMON_CFGPATH"\"
+                )`
+                result=`(echo "$UCOMMON_CFGPATH")`
+        done
+
+
+
+        UCOMMON_VARPATH="$localstatedir"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$UCOMMON_VARPATH")`
+                UCOMMON_VARPATH=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$UCOMMON_VARPATH"\"
+                )`
+                result=`(echo "$UCOMMON_VARPATH")`
+        done
+
+
+
+        UCOMMON_PREFIX="$prefixdir"
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "$UCOMMON_PREFIX")`
+                UCOMMON_PREFIX=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""$UCOMMON_PREFIX"\"
+                )`
+                result=`(echo "$UCOMMON_PREFIX")`
+        done
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define UCOMMON_PREFIX "$UCOMMON_PREFIX"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define UCOMMON_CFGPATH "$UCOMMON_CFGPATH"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define UCOMMON_VARPATH "$UCOMMON_VARPATH"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define UCOMMON_LOCALE "$UCOMMON_LOCALE"
+_ACEOF
+
+
+# Extract the first word of "doxygen", so it can be a program name with args.
+set dummy doxygen; 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_DOXYGEN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $DOXYGEN in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_DOXYGEN="$DOXYGEN" # 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_DOXYGEN="$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
+
+  test -z "$ac_cv_path_DOXYGEN" && ac_cv_path_DOXYGEN="doxygen"
+  ;;
+esac
+fi
+DOXYGEN=$ac_cv_path_DOXYGEN
+if test -n "$DOXYGEN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5
+$as_echo "$DOXYGEN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_config_files="$ac_config_files Makefile corelib/Makefile commoncpp/Makefile openssl/Makefile gnutls/Makefile nossl/Makefile utils/Makefile inc/Makefile inc/ucommon/Makefile inc/commoncpp/Makefile test/Makefile directive commoncpp.pc ucommon.pc ucommon.spec ucommon-config commoncpp-config"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $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=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    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;}
+      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:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$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.
+  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 -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
+
+: "${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:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+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.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+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 :
+  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_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+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
+# 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
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+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
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+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
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# 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='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# 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
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# 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 #(((((
+-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
+
+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 -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
+
+
+# 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='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+
+# 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'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+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 ucommon $as_me 6.0.7, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$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]... [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
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to the package provider."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+ucommon config.status 6.0.7
+configured by $0, generated by GNU Autoconf 2.69,
+  with options \\"\$ac_cs_config\\"
+
+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."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+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_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $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
+    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
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    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 \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  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'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+
+
+# 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
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$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"`'
+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"`'
+deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
+file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
+want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
+sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
+archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+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_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
+lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_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"`'
+sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
+striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`'
+predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`'
+postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`'
+predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`'
+postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`'
+LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`'
+reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`'
+reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
+GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`'
+lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
+archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`'
+allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
+no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
+inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
+link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
+always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`'
+export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
+include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`'
+prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`'
+file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
+hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
+predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`'
+postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`'
+predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`'
+postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`'
+compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in AS \
+DLLTOOL \
+OBJDUMP \
+SHELL \
+ECHO \
+PATH_SEPARATOR \
+SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+file_magic_glob \
+want_nocaseglob \
+sharedlib_from_linklib_cmd \
+AR \
+AR_FLAGS \
+archiver_list_spec \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+nm_file_list_spec \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_pic \
+lt_prog_compiler_wl \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+MANIFEST_TOOL \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_separator \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+install_override_mode \
+finish_eval \
+old_striplib \
+striplib \
+compiler_lib_search_dirs \
+predep_objects \
+postdep_objects \
+predeps \
+postdeps \
+compiler_lib_search_path \
+LD_CXX \
+reload_flag_CXX \
+compiler_CXX \
+lt_prog_compiler_no_builtin_flag_CXX \
+lt_prog_compiler_pic_CXX \
+lt_prog_compiler_wl_CXX \
+lt_prog_compiler_static_CXX \
+lt_cv_prog_compiler_c_o_CXX \
+export_dynamic_flag_spec_CXX \
+whole_archive_flag_spec_CXX \
+compiler_needs_object_CXX \
+with_gnu_ld_CXX \
+allow_undefined_flag_CXX \
+no_undefined_flag_CXX \
+hardcode_libdir_flag_spec_CXX \
+hardcode_libdir_separator_CXX \
+exclude_expsyms_CXX \
+include_expsyms_CXX \
+file_list_spec_CXX \
+compiler_lib_search_dirs_CXX \
+predep_objects_CXX \
+postdep_objects_CXX \
+predeps_CXX \
+postdeps_CXX \
+compiler_lib_search_path_CXX; do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+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 \
+reload_cmds_CXX \
+old_archive_cmds_CXX \
+old_archive_from_new_cmds_CXX \
+old_archive_from_expsyms_cmds_CXX \
+archive_cmds_CXX \
+archive_expsym_cmds_CXX \
+module_cmds_CXX \
+module_expsym_cmds_CXX \
+export_symbols_cmds_CXX \
+prelink_cmds_CXX \
+postlink_cmds_CXX; do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+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
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'
+
+
+
+
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "ucommon-config.h") CONFIG_HEADERS="$CONFIG_HEADERS ucommon-config.h" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "corelib/Makefile") CONFIG_FILES="$CONFIG_FILES corelib/Makefile" ;;
+    "commoncpp/Makefile") CONFIG_FILES="$CONFIG_FILES commoncpp/Makefile" ;;
+    "openssl/Makefile") CONFIG_FILES="$CONFIG_FILES openssl/Makefile" ;;
+    "gnutls/Makefile") CONFIG_FILES="$CONFIG_FILES gnutls/Makefile" ;;
+    "nossl/Makefile") CONFIG_FILES="$CONFIG_FILES nossl/Makefile" ;;
+    "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
+    "inc/Makefile") CONFIG_FILES="$CONFIG_FILES inc/Makefile" ;;
+    "inc/ucommon/Makefile") CONFIG_FILES="$CONFIG_FILES inc/ucommon/Makefile" ;;
+    "inc/commoncpp/Makefile") CONFIG_FILES="$CONFIG_FILES inc/commoncpp/Makefile" ;;
+    "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
+    "directive") CONFIG_FILES="$CONFIG_FILES directive" ;;
+    "commoncpp.pc") CONFIG_FILES="$CONFIG_FILES commoncpp.pc" ;;
+    "ucommon.pc") CONFIG_FILES="$CONFIG_FILES ucommon.pc" ;;
+    "ucommon.spec") CONFIG_FILES="$CONFIG_FILES ucommon.spec" ;;
+    "ucommon-config") CONFIG_FILES="$CONFIG_FILES ucommon-config" ;;
+    "commoncpp-config") CONFIG_FILES="$CONFIG_FILES commoncpp-config" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap 'exit_status=$?
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+' 0
+  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 -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} || 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.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+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'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+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 < "$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 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[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# 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 >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$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 `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $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.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || 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
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/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:${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
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+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' "$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;}
+
+  rm -f "$ac_tmp/stdin"
+  case $ac_file in
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && 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 "$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 "$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"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+	 X"$_am_arg" : 'X\(//\)$' \| \
+	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "libtool":C)
+
+    # See if we are running on zsh, and set the options which allow our
+    # commands through without removal of \ escapes.
+    if test -n "${ZSH_VERSION+set}" ; then
+      setopt NO_GLOB_SUBST
+    fi
+
+    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
+# 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.
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010, 2011 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.
+#
+# 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.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags="CXX "
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Assembler program.
+AS=$lt_AS
+
+# DLL creation program.
+DLLTOOL=$lt_DLLTOOL
+
+# Object dumper program.
+OBJDUMP=$lt_OBJDUMP
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# 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
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# convert \$build file names to \$host format.
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+
+# convert \$build files to toolchain format.
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method = "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=$lt_file_magic_glob
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob=$lt_want_nocaseglob
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
+
+# The archiver.
+AR=$lt_AR
+
+# Flags to create an archive.
+AR_FLAGS=$lt_AR_FLAGS
+
+# How to feed a file listing to the archiver.
+archiver_list_spec=$lt_archiver_list_spec
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+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
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# Specify filename containing input files for \$NM.
+nm_file_list_spec=$lt_nm_file_list_spec
+
+# The root where to search for dependent libraries,and in which our libraries should be installed.
+lt_sysroot=$lt_sysroot
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Manifest tool.
+MANIFEST_TOOL=$lt_MANIFEST_TOOL
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# 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
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+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
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+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
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# 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
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using 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
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# 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
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects
+postdep_objects=$lt_postdep_objects
+predeps=$lt_predeps
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# ### END LIBTOOL CONFIG
+
+_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
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+_LT_EOF
+    ;;
+  esac
+
+
+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 '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
+
+  if test x"$xsi_shell" = xyes; then
+  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
+func_dirname ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_basename ()$/,/^} # func_basename /c\
+func_basename ()\
+{\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
+func_dirname_and_basename ()\
+{\
+\    case ${1} in\
+\      */*) func_dirname_result="${1%/*}${2}" ;;\
+\      *  ) func_dirname_result="${3}" ;;\
+\    esac\
+\    func_basename_result="${1##*/}"\
+} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
+func_stripname ()\
+{\
+\    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
+\    # positional parameters, so assign one to ordinary parameter first.\
+\    func_stripname_result=${3}\
+\    func_stripname_result=${func_stripname_result#"${1}"}\
+\    func_stripname_result=${func_stripname_result%"${2}"}\
+} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
+func_split_long_opt ()\
+{\
+\    func_split_long_opt_name=${1%%=*}\
+\    func_split_long_opt_arg=${1#*=}\
+} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
+func_split_short_opt ()\
+{\
+\    func_split_short_opt_arg=${1#??}\
+\    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
+} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
+func_lo2o ()\
+{\
+\    case ${1} in\
+\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
+\      *)    func_lo2o_result=${1} ;;\
+\    esac\
+} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_xform ()$/,/^} # func_xform /c\
+func_xform ()\
+{\
+    func_xform_result=${1%.*}.lo\
+} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_arith ()$/,/^} # func_arith /c\
+func_arith ()\
+{\
+    func_arith_result=$(( $* ))\
+} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_len ()$/,/^} # func_len /c\
+func_len ()\
+{\
+    func_len_result=${#1}\
+} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+fi
+
+if test x"$lt_shell_append" = xyes; then
+  sed -e '/^func_append ()$/,/^} # func_append /c\
+func_append ()\
+{\
+    eval "${1}+=\\${2}"\
+} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
+func_append_quoted ()\
+{\
+\    func_quote_for_eval "${2}"\
+\    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
+} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+
+
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
+$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
+fi
+
+
+   mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+
+
+    cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag_CXX
+reload_cmds=$lt_reload_cmds_CXX
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_CXX
+
+# A language specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_CXX
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_CXX
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to "yes" if using 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
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_CXX
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_CXX
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_CXX
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=$lt_postlink_cmds_CXX
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_CXX
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_CXX
+postdep_objects=$lt_postdep_objects_CXX
+predeps=$lt_predeps_CXX
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# ### END LIBTOOL TAG CONFIG: CXX
+_LT_EOF
+
+ ;;
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # 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
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named 'Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running 'make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "$am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # 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'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+
+  esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
diff --git a/jni/libucommon/sources/configure.ac b/jni/libucommon/sources/configure.ac
new file mode 100644
index 0000000..263abc4
--- /dev/null
+++ b/jni/libucommon/sources/configure.ac
@@ -0,0 +1,760 @@
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+AC_INIT([ucommon],[6.0.7])
+AC_CONFIG_SRCDIR([inc/ucommon/ucommon.h])
+
+LT_VERSION="6:3:0"
+OPENSSL_REQUIRES="0.9.7"
+
+AC_CONFIG_AUX_DIR(autoconf)
+AC_CANONICAL_SYSTEM
+AC_PROG_CPP
+AC_PROG_CC
+AC_PROG_CXXCPP
+AC_PROG_CXX
+AC_LIBTOOL_WIN32_DLL
+AM_PROG_LIBTOOL
+AM_INIT_AUTOMAKE([dist-shar dist-zip])
+AM_CONFIG_HEADER(ucommon-config.h)
+
+AC_C_RESTRICT
+AC_C_VOLATILE
+AC_C_INLINE
+
+UCOMMON_VISIBILITY="0"
+UCOMMON_FLAGS=""
+UCOMMON_MODEL="CXX"
+UCOMMON_CLINK=""
+UCOMMON_LIBC="-lc"
+UCOMMON_LIBS=""
+OPENSSL_LINK=""
+
+CHECKFLAGS="$CHECKFLAGS"
+
+case "$with_crypto" in
+ssl|openssl)
+    ssl="openssl"
+    ;;
+gnutls|gnu)
+    ssl="gnutls"
+    ;;
+none|nossl)
+    ssl="nossl"
+    ;;
+*)
+    ssl="detect"
+    ;;
+esac
+
+have_gettext="no"
+socket_lib=""
+posix4_lib=""
+rt_lib=""
+
+test -z "$localedir" && localedir='${datadir}/locale'
+
+AC_DEFUN([AC_SUBST_DIR], [
+        ifelse($2,,,$1="[$]$2")
+        result="***"
+        prior="A"
+        while test "$prior" != "$result" ; do
+                prior=`(echo "[$]$1")`
+                $1=`(
+                test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+                test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+                eval echo \""[$]$1"\"
+                )`
+                result=`(echo "[$]$1")`
+        done
+        AC_SUBST($1)
+])
+
+# for very old gcc and for minix we disable full ucommon build by default
+# we also disable for mingw32 or when no "shared" library support because
+# libstdc++ is not dll and really bloats in linkage of plugins.  Any case,
+# you can always override with --enable-stdcpp...
+
+if test -z "$enable_stdcpp" ; then
+    if test "x$GCC" = "xyes" ; then
+        gccver=`$CC -dumpversion | cut -f1 -d.`
+    fi
+    if test -z "$gccver" ; then
+        gccver="3"
+    fi
+    if test "$gccver" -lt "3" ; then
+        enable_stdcpp="no"
+    fi
+    if test "x$enable_shared" = "xno" ; then
+        enable_stdcpp="no"
+    fi
+    case "$target_os" in
+    *minix*|mingw*)
+        enable_stdcpp="no"
+        ;;
+    esac
+fi
+
+AC_ARG_ENABLE(posix-timers,
+    AC_HELP_STRING([--enable-posix-timers],
+        [enable posix timers]))
+
+if test "x$enable_posix_timers" = "xyes" ; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -DPOSIX_TIMERS"
+fi
+
+AC_ARG_ENABLE(stdcpp,
+    AC_HELP_STRING([--disable-stdcpp],
+        [compile without stdc++ runtime overhead]))
+
+    AC_MSG_CHECKING([full c++ support and linking model])
+
+if test "x$enable_stdcpp" = "xno" ; then
+    UCOMMON_MODEL="CC"
+    AC_MSG_RESULT(no)
+    COMPAT=""
+else
+    COMPAT="commoncpp"
+    AC_MSG_RESULT(yes)
+fi
+
+AC_ARG_WITH(sslstack,
+    AC_HELP_STRING([--with-sslstack=lib],[specify which ssl stack to build]),[
+    if test x$with_sslstack != x ; then
+        ssl="${with_sslstack}" ; fi
+])
+
+AC_ARG_WITH(libc,
+    AC_HELP_STRING([--with-libc=path],[specify path to alternate libc]),[
+    if test x$with_libc != x ; then
+        clib=`echo ${with_libc} | sed s/[-]l//`
+        UCOMMON_LIBC=-l${clib} ; fi
+])
+
+AC_ARG_ENABLE(debug,
+    AC_HELP_STRING([--enable-debug],[compile for debugging]))
+if test -z "$enable_debug" ; then
+    enable_debug="no"
+elif test $enable_debug = "yes" ; then
+    CXXFLAGS="${CXXFLAGS} -g -DDEBUG"
+fi
+
+AH_BOTTOM([
+#include <ucommon/platform.h>
+])
+
+threading="none"
+clib=`echo ${UCOMMON_LIBC} | sed s/[-]l//`
+tlib=""
+
+AC_CHECK_HEADERS(stdint.h poll.h sys/mman.h sys/shm.h sys/poll.h sys/timeb.h endian.h sys/filio.h dirent.h sys/resource.h wchar.h netinet/in.h net/if.h)
+AC_CHECK_HEADERS(mach/clock.h mach-o/dyld.h linux/version.h sys/inotify.h sys/event.h syslog.h sys/wait.h termios.h termio.h fcntl.h unistd.h)
+AC_CHECK_HEADERS(sys/param.h sys/lockf.h sys/file.h dlfcn.h)
+
+AC_CHECK_HEADER(regex.h, [
+    AC_DEFINE(HAVE_REGEX_H, [1], [have regex header])
+    AC_CHECK_LIB(regex, regfree, [
+        UCOMMON_LIBS="$UCOMMON_LIBS -lregex"
+    ])
+])
+
+AC_CHECK_LIB(msvcrt, fopen, [
+    threading="msw"
+    clib="msvcrt"
+    UCOMMON_VISIBILITY="0"
+    UCOMMON_LIBS="--enable-stdcall-fixup $UCOMMON_LIBS -lmingwex -lmingw32 -lcrypt32 -ladvapi32 -luser32 -lws2_32 -lwsock32 -lkernel32"
+    UCOMMON_LIBC="-lmsvcrt -lgcc"
+    OPENSSL_LINK="-lgdi32"
+    AC_DEFINE(HAVE_INET_NTOP, [1], [have inet_ntop])
+    AC_DEFINE(HAVE_GETADDRINFO, [1], [have getaddrinfo])
+],[
+    AC_CHECK_LIB(gcc, __modsi3, [
+        UCOMMON_LIBC="$UCOMMON_LIBC -lgcc"
+    ])
+    AC_CHECK_LIB($clib, socketpair, [
+        AC_DEFINE(HAVE_SOCKETPAIR, [1], [have socketpair])
+    ],[
+            AC_CHECK_LIB(socket, socketpair, [AC_DEFINE(HAVE_SOCKETPAIR, [1], [have socketpair])])
+    ])
+    AC_CHECK_LIB($clib, getaddrinfo, [
+        AC_DEFINE(HAVE_GETADDRINFO, [1], [have getaddrinfo])
+    ],[
+            AC_CHECK_LIB(socket, getaddrinfo, [AC_DEFINE(HAVE_GETADDRINFO, [1], [have getaddrinfo])])
+    ])
+    AC_CHECK_LIB($clib, gethostbyname2, [
+        AC_DEFINE(HAVE_GETHOSTBYNAME2, [1], [have gethostbyname2])
+    ],[
+            AC_CHECK_LIB(socket, gethostbyname2, [AC_DEFINE(HAVE_GETHOSTBYNAME2, [1], [have gethostbyname2])])
+    ])
+
+    AC_CHECK_LIB($clib, inet_ntop, [
+        AC_DEFINE(HAVE_INET_NTOP, [1], [have inet ntop])
+    ],[
+        AC_CHECK_LIB(socket, inet_ntop, [
+            AC_DEFINE(HAVE_INET_NTOP, [1], [have inet ntop])
+        ],[
+            AC_CHECK_LIB(nsl, inet_ntop, [
+                AC_DEFINE(HAVE_INET_NTOP, [1], [have inet_ntop])
+                socket_lib="$socket_lib -lnsl"
+            ])
+        ])
+    ])
+
+    AC_CHECK_LIB(socket, socket,[
+        AC_CHECK_LIB(socket, socketpair,[
+            AC_DEFINE(HAVE_SOCKETPAIR, [1], [have socketpair in libsocket])
+        ])
+        socket_lib="-lsocket"
+    ])
+])
+
+AC_ARG_ENABLE(socks,
+    AC_HELP_STRING([--enable-socks],
+        [compile with socks proxy support]))
+
+if test "x$enable_socks" = "xyes" ; then
+    enable_socks="no"
+    AC_CHECK_HEADERS(socks.h, [
+        enable_socks="yes"
+    ])
+else
+    enable_socks="no"
+fi
+
+AC_MSG_CHECKING([for socks proxy support])
+
+if test "x$enable_socks" = "xyes" ; then
+    socket_lib="-lsocksd $socket_lib"
+    AC_DEFINE(HAVE_SOCKS, [1], "Socks proxy support")
+    AC_MSG_RESULT(yes)
+else
+    AC_MSG_RESULT(no)
+fi
+
+AC_CHECK_LIB($clib, lstat, [
+    AC_DEFINE(HAVE_LSTAT, [1], [have lstat])
+])
+
+AC_CHECK_LIB($clib, strcoll, [
+    AC_DEFINE(HAVE_STRCOLL, [1], [string collation])
+])
+
+AC_CHECK_LIB($clib, stricmp, [
+    AC_DEFINE(HAVE_STRICMP, [1], [string icmp])
+])
+
+AC_CHECK_LIB($clib, stristr, [
+    AC_DEFINE(HAVE_STRISTR, [1], [string istr])
+])
+
+AC_CHECK_LIB($clib, sysconf, [
+    AC_DEFINE(HAVE_SYSCONF, [1], [system config])
+])
+
+AC_CHECK_LIB($clib, posix_memalign, [
+    AC_DEFINE(HAVE_POSIX_MEMALIGN, [1], [posix memory alignment])
+])
+
+AC_CHECK_LIB($clib, dlopen,,[
+    AC_CHECK_LIB(dl, dlopen, [UCOMMON_LIBS="$UCOMMON_LIBS -ldl"],[
+        AC_CHECK_LIB(compat, dlopen, [UCOMMON_LIBS="$UCOMMON_LIBS -lcompat"])
+        AC_CHECK_LIB(dld, shl_load,[
+            AC_DEFINE(HAVE_SHL_LOAD, [1], [alternate dyn loader])
+            UCOMMON_LIBS="$UCOMMON_LIBS -ldld"
+        ])
+    ])
+])
+
+PTHREAD_FLAGS=""
+
+if test "$enable_shared" = "no" ; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -DUCOMMON_STATIC" ; fi
+
+AC_ARG_ENABLE(atomics, [
+    AC_HELP_STRING([--enable-atomics],[enable gcc atomic support])], [
+    AC_DEFINE(HAVE_GCC_ATOMICS, [1], ["cannot test in autoconf safely"])
+])
+
+AC_ARG_ENABLE(pth, [
+    AC_HELP_STRING([--enable-pth],[always use GNU pth for threading])
+])
+
+if test "$threading" = "none" ; then
+    if test "$enable_pth" != "yes" ; then
+        AC_CHECK_HEADER(pthread.h, [
+            PTHREAD_FLAGS="-mt -pthread -pthreads"
+            AC_CHECK_LIB(pthread,pthread_create,[
+                tlib="pthread"
+                UCOMMON_LIBS="$UCOMMON_LIBS -lpthread"
+            ])
+            if test -z "$tlib" ; then
+                AC_CHECK_LIB($clib, pthread_create, [tlib="$clib"])
+            fi
+            if test -z "$tlib" ; then
+                AC_CHECK_LIB(c_r, pthread_create, [
+                    tlib="c_r"
+                    if test "$clib" = "c" ; then
+                        AC_CHECK_LIB(c_r, malloc, [clib="c_r"])
+                    fi
+                ])
+            fi
+            if test ! -z "$tlib" ; then
+                AC_CHECK_LIB($tlib,pthread_condattr_setclock,[
+                    AC_DEFINE(HAVE_PTHREAD_CONDATTR_SETCLOCK, [1], ["pthread clocking"])
+                ])
+                AC_CHECK_LIB($tlib,pthread_setconcurrency,[
+                    AC_DEFINE(HAVE_PTHREAD_SETCONCURRENCY, [1], ["pthread concurrency"])
+                ])
+
+                AC_CHECK_LIB($tlib,pthread_yield,[
+                    AC_DEFINE(HAVE_PTHREAD_YIELD, [1], ["pthread yield"],[
+                        AC_CHECK_LIB($tlib,pthread_yield_np,[
+                            AC_DEFINE(HAVE_PTHREAD_YIELD_NP, [1], ["pthread yield np"])
+                        ])
+                    ])
+                ])
+
+                AC_CHECK_LIB($tlib,pthread_delay,[
+                    AC_DEFINE(HAVE_PTHREAD_DELAY, [1], ["pthread delay"])
+                ])
+                AC_CHECK_LIB($tlib,pthread_delay_np,[
+                    AC_DEFINE(HAVE_PTHREAD_DELAY_NP, [1], ["pthread delay np"])
+                ])
+                AC_CHECK_LIB($tlib,pthread_setschedprio,[
+                    AC_DEFINE(HAVE_PTHREAD_SETSCHEDPRIO, [1], ["pthread scheduling"])
+                ])
+            fi
+        ],[
+            AC_CHECK_HEADER(windows.h,, [
+                AC_CHECK_HEADER(pth.h,[
+                    UCOMMON_LIBS="$UCOMMON_LIBS -lpth"
+                    UCOMMON_FLAGS="$UCOMMON_FLAGS -D__PTH__"
+                ],[
+                    AC_MSG_ERROR("pthread or GNU pth support required")
+                ])
+            ])
+        ])
+    else
+        AC_CHECK_HEADER(pth.h,[
+            UCOMMON_LIBS="$UCOMMON_LIBS -lpth"
+            UCOMMON_FLAGS="$UCOMMON_FLAGS -D__PTH__"
+        ],[
+            AC_MSG_ERROR("GNU pth required")
+        ])
+    fi
+fi
+
+for func in ftok shm_open nanosleep clock_nanosleep clock_gettime strerror_r localtime_r gmtime_r posix_fadvise ftruncate pwrite setpgrp setlocale gettext execvp atexit realpath symlink readlink waitpid wait4 ; do
+    found="no"
+    AC_CHECK_FUNC($func,[
+        found=$func
+    ],[
+        AC_CHECK_LIB(posix4, $func, [
+            found=$func
+            posix4_lib="-lposix4"
+        ],[
+            AC_CHECK_LIB(rt, $func, [
+                found=$func
+                rt_lib="-lrt"
+            ],[
+                if test ! -z "$tlib" ; then
+                    AC_CHECK_LIB($tlib, $func, [
+                        found=$func
+                    ])
+                fi
+            ])
+        ])
+    ])
+    case $found in
+    shm_open)
+        AC_DEFINE(HAVE_SHM_OPEN, [1], [shared memory open])
+        ;;
+    setpgrp)
+        AC_DEFINE(HAVE_SETPGRP, [1], [process group control])
+        ;;
+    realpath)
+        AC_DEFINE(HAVE_REALPATH, [1], [realpath support])
+        ;;
+    ftok)
+        AC_DEFINE(HAVE_FTOK, [1], [has ftok])
+        ;;
+    gmtime_r)
+        AC_DEFINE(HAVE_GMTIME_R, [1], [has localtime_r])
+        ;;
+    localtime_r)
+        AC_DEFINE(HAVE_LOCALTIME_R, [1], [has localtime_r])
+        ;;
+    strerror_r)
+        AC_DEFINE(HAVE_STRERROR_R, [1], [has strerror_r])
+        ;;
+    nanosleep)
+        AC_DEFINE(HAVE_NANOSLEEP, [1], [has nanosleep])
+        ;;
+    clock_nanosleep)
+        AC_DEFINE(HAVE_CLOCK_NANOSLEEP, [1], [has clocked nanosleep])
+        ;;
+    clock_gettime)
+        AC_DEFINE(HAVE_CLOCK_GETTIME, [1], [has posix clock functions])
+        ;;
+    posix_fadvise)
+        AC_DEFINE(HAVE_POSIX_FADVISE, [1], [can specify access options])
+        ;;
+    ftruncate)
+        AC_DEFINE(HAVE_FTRUNCATE, [1], [can truncate files])
+        ;;
+    pwrite)
+        AC_DEFINE(HAVE_PWRITE, [1], [can do atomic write with offset])
+        ;;
+    setlocale)
+        AC_DEFINE(HAVE_SETLOCALE, [1], [can set localization])
+        ;;
+    gettext)
+        AC_DEFINE(HAVE_GETTEXT, [1], [has gettext in libc])
+        have_gettext="yes"
+        ;;
+    execvp)
+        AC_DEFINE(HAVE_EXECVP, [1], [has execvp in libc])
+        ;;
+    symlink)
+        AC_DEFINE(HAVE_SYMLINK, [1], [has symlink in libc])
+        ;;
+    readlink)
+        AC_DEFINE(HAVE_READLINK, [1], [has readlink in libc])
+        ;;
+    waitpid)
+        AC_DEFINE(HAVE_WAITPID, [1], [has waitpid in libc])
+        ;;
+    wait4)
+        AC_DEFINE(HAVE_WAIT4, [1], [has wait4 in libc])
+        ;;
+    esac
+done
+
+UCOMMON_LINKED="$socket_lib $posix4_lib $rt_lib $UCOMMON_LIBS"
+UCOMMON_LIBS="$socket_lib $posix4_lib $rt_lib $UCOMMON_LIBS $UCOMMON_LIBC"
+
+if test "$UCOMMON_MODEL" = "CC" ; then
+    AC_CHECK_LIB(Systemstubs, printf, [
+        UCOMMON_CLINK="$UCOMMON_CLINK -lSystemstubs"
+        UCOMMON_LIBC="$UCOMMON_LIBC -lgcc"
+    ])
+fi
+
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+COMPILER_FLAGS=""
+
+if test "x$GCC" = "xyes" ; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -Wno-long-long" ; fi
+
+for flag in $CXXFLAGS ; do
+    case "$flag" in
+    -f*exceptions|-f*rtti|-f*check-new|-f*enforce-eh-specs|-finline|-f*except)
+        if test "$UCOMMON_MODEL" = "CXX" ; then
+            UCOMMON_FLAGS="$UCOMMON_FLAGS $flag" ; fi
+        ;;
+    -fvisibility=*)
+        VISIBLE_FLAGS=""
+        COMPILER_FLAGS="$COMPILER_FLAGS $flag"
+        ;;
+    *)
+        COMPILER_FLAGS="$COMPILER_FLAGS $flag"
+        ;;
+    esac
+done
+export CXXFLAGS="$COMPILER_FLAGS"
+
+if test "$UCOMMON_MODEL" = "CC" ; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS"
+
+    if test x"$GCC" = "xyes" ; then
+        ucflags="-fno-exceptions -fno-rtti -fno-enforce-eh-specs"
+        lcflags="-nodefaultlibs -nostdinc++"
+    else
+        ucflags="-library=no%Cstd -features=no%except -features=namespace -features=no%rtti"
+        lcflags=""
+    fi
+
+    for flag in $ucflags ; do
+        AC_MSG_CHECKING([whether ${CXX} supports $flag])
+        echo 'void f(){}' >conftest.cpp
+        if test -z "`${CXX} $flag -c conftest.cpp 2>&1`"; then
+            UCOMMON_FLAGS="$UCOMMON_FLAGS $flag"
+            AC_MSG_RESULT(yes)
+            if test "$flag" = "-library=no%Cstd" ; then
+                UCOMMON_MODEL="CXX" ; fi
+        else
+            AC_MSG_RESULT(no)
+        fi
+        rm -f conftest*
+    done
+
+    for flag in $lcflags ; do
+        AC_MSG_CHECKING([whether ${CXX} supports $flag])
+        echo 'void f(){}' >conftest.cpp
+        if test -z "`${CXX} $flag -c conftest.cpp 2>&1`"; then
+            UCOMMON_CLINK="$UCOMMON_CLINK $flag"
+            AC_MSG_RESULT(yes)
+        else
+            AC_MSG_RESULT(no)
+        fi
+        rm -f conftest*
+    done
+else
+    ac_save_CXXFLAGS="$CXXFLAGS"
+    CXXFLAGS=""
+    AC_LANG_SAVE
+    AC_LANG_CPLUSPLUS
+    AC_CHECK_HEADERS(stdexcept)
+    AC_MSG_CHECKING(for old style iostream)
+    AC_TRY_COMPILE([
+        #include <iostream>
+        using namespace std;
+
+        class mystr : public streambuf, public iostream
+        {
+            mystr();
+        };
+
+        mystr::mystr() : streambuf(), iostream((streambuf *)this)
+        {
+        }
+    ],[return 0;],[
+        AC_MSG_RESULT(no)
+        UCOMMON_FLAGS="$UCOMMON_FLAGS -DNEW_STDCPP"
+    ],[
+        AC_MSG_RESULT(yes)
+        UCOMMON_FLAGS="$UCOMMON_FLAGS -DOLD_STDCPP"
+    ])
+    AC_LANG_RESTORE
+    CXXFLAGS="$ac_save_CXXFLAGS"
+fi
+
+if test ! -z "$PTHREAD_FLAGS" ; then
+    for flag in $PTHREAD_FLAGS ; do
+        AC_MSG_CHECKING([whether ${CXX} supports $flag])
+        echo 'void f(){}' >conftest.cpp
+        if test -z "`${CXX} $flag -c conftest.cpp 2>&1`"; then
+            AC_MSG_RESULT(yes)
+            UCOMMON_FLAGS="$UCOMMON_FLAGS $flag"
+            break
+        else
+            AC_MSG_RESULT(no)
+        fi
+    done
+fi
+
+export CXXFLAGS
+
+# libstdc++ on some targets broken badly if inlines hidden.  Might be
+# deeper issue with ansi c++ library model...
+flags="-fno-check-new -finline"
+if test "$UCOMMON_MODEL" = "CC" ; then
+    if test "$enable_shared" != "no" ; then
+        flags="$flags -fvisibility-inlines-hidden"
+    fi
+fi
+
+for flag in $flags ; do
+    AC_MSG_CHECKING([whether ${CXX} supports $flag])
+    echo 'void f(){}' >conftest.cpp
+    if test -z "`${CXX} $flag -c conftest.cpp 2>&1`"; then
+        UCOMMON_FLAGS="$UCOMMON_FLAGS $flag"
+        AC_MSG_RESULT(yes)
+    else
+        AC_MSG_RESULT(no)
+    fi
+    rm -f conftest*
+done
+
+AC_MSG_CHECKING([whether ${CXX} supports visibility])
+echo 'void f(){}' >conftest.cpp
+if test -z "`${CXX} -fvisibility=hidden -c conftest.cpp 2>&1`"; then
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -fvisibility=hidden -DUCOMMON_VISIBILITY=1"
+    AC_MSG_RESULT(yes)
+    UCOMMON_VISIBILITY="1"
+else
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -DUCOMMON_VISIBILITY=0"
+    AC_MSG_RESULT(no)
+fi
+rm -f conftest*
+
+AC_LANG_RESTORE
+
+AC_SUBST_DIR(includes, includedir)
+AC_SUBST_DIR(libs, libdir)
+
+case "$libs" in
+/usr/*)
+    ;;
+*)
+    UCOMMON_LINKED="-L$libs $UCOMMON_LINKED"
+    ;;
+esac
+
+case "$includes" in
+/usr/*)
+    ;;
+*)
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -I$includes"
+    ;;
+esac
+
+case "$target_os" in
+*bsd*)
+    if test "$UCOMMON_MODEL" = "CC" ; then
+        if test "$GCC" = "yes" -a "$UCOMMON_LIBC" = "-lc" ; then
+            UCOMMON_LIBC="-Wl,-lc"
+        elif test "$GCC" = "yes" -a "$UCOMMON_LIBC" = "-lc_r" ; then
+            UCOMMON_LIBC="-Wl,-lc_r"
+        fi
+    fi
+    ;;
+osf*)
+    UCOMMON_FLAGS="$UCOMMON_FLAGS -D_POSIX_C_SOURCE=1 -D_OSF_SOURCE=1 -D__USE_STD_IOSTREAM"
+    ;;
+cygwin*|mingw*)
+    UCOMMON_LINKED="$UCOMMON_LINKED -no-undefined"
+    UCOMMON_LIBS="$UCOMMON_LIBS -no-undefined"
+    ;;
+esac
+
+UCOMMON_CLINK="$UCOMMON_CLINK $UCOMMON_LIBC"
+
+if test -z "$UCOMMON_SSLSTACK" ; then
+    UCOMMON_SSLSTACK="$sslstack" ; fi
+
+OPENSSL_LIBS=""
+GNUTLS_LIBS=""
+
+AC_ARG_WITH(pkg-config,
+    AC_HELP_STRING([--with-pkg-config],[enable support for pkg-config]),[
+    PKG_CHECK_MODULES(OPENSSL, [openssl >= $OPENSSL_REQUIRES], [], [
+        OPENSSL_LIBS=""
+        AC_CHECK_HEADERS(openssl/ssl.h, [
+            OPENSSL_LIBS="-lssl -lcrypto -lz $OPENSSL_LINK"
+        ])
+        AC_CHECK_HEADERS(openssl/fips.h)
+    ])
+    PKG_CHECK_MODULES(GNUTLS, [gnutls >= 2.8.0], [], [GNUTLS_LIBS=""])
+],[
+    AC_CHECK_HEADERS(openssl/ssl.h, [
+        OPENSSL_LIBS="-lssl -lcrypto -lz $OPENSSL_LINK"
+    ])
+    AC_CHECK_HEADERS(openssl/fips.h)
+    AC_CHECK_LIB(gnutls, gnutls_init, [
+        GNUTLS_LIBS="-lgnutls"
+    ])
+])
+
+
+SECURE=""
+case "$ssl" in
+secure|any|detect)
+    if test ! -z "$GNUTLS_LIBS" ; then
+        SECURE_LIBS="$GNUTLS_LIBS"
+        SECURE="gnutls"
+    fi
+    if test -z "$SECURE" ; then
+        if test ! -z "$OPENSSL_LIBS" ; then
+            SECURE_LIBS="$OPENSSL_LIBS"
+            SECURE="openssl"
+        fi
+    fi
+    ;;
+gnutls|gnu)
+    if test ! -z "$GNUTLS_LIBS" ; then
+        SECURE_LIBS="$GNUTLS_LIBS"
+        SECURE="gnutls"
+    fi
+    ;;
+openssl|ssl)
+    if test ! -z "$OPENSSL_LIBS" ; then
+        SECURE_LIBS="$OPENSSL_LIBS"
+        SECURE="openssl"
+    fi
+    ;;
+esac
+
+if test -z "$SECURE" ; then
+    SECURE_LIBS=""
+    SECURE="nossl"
+fi
+
+AC_MSG_CHECKING([secure library mode])
+AC_MSG_RESULT([$SECURE])
+
+SECURE_LOCAL="../$SECURE/libusecure.la $SECURE_LIBS"
+
+LT_GENERIC="${LIBTOOL}"
+if test "$UCOMMON_MODEL" = "CC" ; then
+    LIBTOOL='$(SHELL) $(top_srcdir)/cmodel.sh'" ${LIBTOOL}" ; fi
+
+includes='${includedir}/ucommon'
+
+if test "$sysconfdir" = '${prefix}/etc' ; then
+    sysconfdir="/etc" ; fi
+
+if test "$localstatedir" = '${prefix}/var' ; then
+    localstatedir="/var" ; fi
+
+AC_CHECK_HEADER(libintl.h, [
+    AC_DEFINE(HAVE_LIBINTL_H, [1], [international headers])
+    if test "$have_gettext" = "no" ; then
+        AC_CHECK_LIB(intl, gettext, [
+            AC_DEFINE(HAVE_GETTEXT, [1], [has gettext in glibc])
+            UCOMMON_LIBS="$UCOMMON_LIBS -lintl"
+        ])
+    fi
+])
+
+if test "$prefix" = "NONE" ; then
+    prefixdir="$ac_default_prefix"
+else
+    prefixdir="$prefix" ; fi
+
+AC_SUBST_DIR(UCOMMON_INCLUDES, includes)
+AC_SUBST_DIR(UCOMMON_LOCALE, localedir)
+AC_SUBST_DIR(UCOMMON_CFGPATH, sysconfdir)
+AC_SUBST_DIR(UCOMMON_VARPATH, localstatedir)
+AC_SUBST_DIR(UCOMMON_PREFIX, prefixdir)
+AC_DEFINE_UNQUOTED(UCOMMON_PREFIX, "$UCOMMON_PREFIX", [config path])
+AC_DEFINE_UNQUOTED(UCOMMON_CFGPATH, "$UCOMMON_CFGPATH", [config path])
+AC_DEFINE_UNQUOTED(UCOMMON_VARPATH, "$UCOMMON_VARPATH", [config path])
+AC_DEFINE_UNQUOTED(UCOMMON_LOCALE, "$UCOMMON_LOCALE", [locale path])
+
+AC_PATH_PROG(DOXYGEN, doxygen, doxygen)
+AC_SUBST(DOXYGEN)
+AC_SUBST(CHECKFLAGS)
+AC_SUBST(CXXFLAGS)
+AC_SUBST(UCOMMON_VISIBILITY)
+AC_SUBST(UCOMMON_INCLUDES)
+AC_SUBST(UCOMMON_LOCALE)
+AC_SUBST(UCOMMON_LINKED)
+AC_SUBST(UCOMMON_MODEL)
+AC_SUBST(UCOMMON_FLAGS)
+AC_SUBST(UCOMMON_CLINK)
+AC_SUBST(UCOMMON_LIBC)
+AC_SUBST(UCOMMON_LIBS)
+AC_SUBST(SECURE_LOCAL)
+AC_SUBST(SECURE_LIBS)
+AC_SUBST(SECURE)
+AC_SUBST(COMPAT)
+AC_SUBST(OPENSSL_LIBS)
+AC_SUBST(GNUTLS_LIBS)
+AC_SUBST(LT_VERSION)
+AC_SUBST(LT_GENERIC)
+AC_SUBST(localedir)
+
+AC_OUTPUT(Makefile corelib/Makefile commoncpp/Makefile
+openssl/Makefile gnutls/Makefile nossl/Makefile utils/Makefile
+inc/Makefile inc/ucommon/Makefile inc/commoncpp/Makefile test/Makefile
+directive commoncpp.pc ucommon.pc ucommon.spec ucommon-config commoncpp-config)
+
diff --git a/jni/libucommon/sources/corelib/.deps/access.Plo b/jni/libucommon/sources/corelib/.deps/access.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/access.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/atomic.Plo b/jni/libucommon/sources/corelib/.deps/atomic.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/atomic.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/bitmap.Plo b/jni/libucommon/sources/corelib/.deps/bitmap.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/bitmap.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/containers.Plo b/jni/libucommon/sources/corelib/.deps/containers.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/containers.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/counter.Plo b/jni/libucommon/sources/corelib/.deps/counter.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/counter.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/cpr.Plo b/jni/libucommon/sources/corelib/.deps/cpr.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/cpr.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/datetime.Plo b/jni/libucommon/sources/corelib/.deps/datetime.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/datetime.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/file.Plo b/jni/libucommon/sources/corelib/.deps/file.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/file.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/fsys.Plo b/jni/libucommon/sources/corelib/.deps/fsys.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/fsys.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/keydata.Plo b/jni/libucommon/sources/corelib/.deps/keydata.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/keydata.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/linked.Plo b/jni/libucommon/sources/corelib/.deps/linked.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/linked.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/mapped.Plo b/jni/libucommon/sources/corelib/.deps/mapped.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/mapped.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/memory.Plo b/jni/libucommon/sources/corelib/.deps/memory.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/memory.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/numbers.Plo b/jni/libucommon/sources/corelib/.deps/numbers.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/numbers.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/object.Plo b/jni/libucommon/sources/corelib/.deps/object.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/object.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/persist.Plo b/jni/libucommon/sources/corelib/.deps/persist.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/persist.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/protocols.Plo b/jni/libucommon/sources/corelib/.deps/protocols.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/protocols.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/regex.Plo b/jni/libucommon/sources/corelib/.deps/regex.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/regex.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/shell.Plo b/jni/libucommon/sources/corelib/.deps/shell.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/shell.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/socket.Plo b/jni/libucommon/sources/corelib/.deps/socket.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/socket.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/stream.Plo b/jni/libucommon/sources/corelib/.deps/stream.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/stream.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/string.Plo b/jni/libucommon/sources/corelib/.deps/string.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/string.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/tcpbuffer.Plo b/jni/libucommon/sources/corelib/.deps/tcpbuffer.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/tcpbuffer.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/thread.Plo b/jni/libucommon/sources/corelib/.deps/thread.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/thread.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/timer.Plo b/jni/libucommon/sources/corelib/.deps/timer.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/timer.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/unicode.Plo b/jni/libucommon/sources/corelib/.deps/unicode.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/unicode.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/vector.Plo b/jni/libucommon/sources/corelib/.deps/vector.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/vector.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/.deps/xml.Plo b/jni/libucommon/sources/corelib/.deps/xml.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/corelib/.deps/xml.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/corelib/Makefile b/jni/libucommon/sources/corelib/Makefile
new file mode 100644
index 0000000..c57b677
--- /dev/null
+++ b/jni/libucommon/sources/corelib/Makefile
@@ -0,0 +1,717 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# corelib/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2013 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.
+
+
+
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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)/ucommon
+pkgincludedir = $(includedir)/ucommon
+pkglibdir = $(libdir)/ucommon
+pkglibexecdir = $(libexecdir)/ucommon
+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 = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+target_triplet = x86_64-unknown-linux-gnu
+subdir = corelib
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/autoconf/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+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)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libucommon_la_LIBADD =
+am_libucommon_la_OBJECTS = object.lo linked.lo string.lo mapped.lo \
+	counter.lo bitmap.lo timer.lo memory.lo socket.lo access.lo \
+	thread.lo fsys.lo cpr.lo vector.lo xml.lo stream.lo persist.lo \
+	keydata.lo numbers.lo datetime.lo unicode.lo atomic.lo file.lo \
+	regex.lo protocols.lo containers.lo tcpbuffer.lo shell.lo
+libucommon_la_OBJECTS = $(am_libucommon_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libucommon_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(libucommon_la_LDFLAGS) $(LDFLAGS) \
+	-o $@
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = -I. -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+SOURCES = $(libucommon_la_SOURCES)
+DIST_SOURCES = $(libucommon_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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing aclocal-1.13
+AMTAR = $${TAR-tar}
+AM_DEFAULT_VERBOSITY = 1
+AR = ar
+AS = as
+AUTOCONF = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoconf
+AUTOHEADER = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoheader
+AUTOMAKE = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing automake-1.13
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CHECKFLAGS = 
+COMPAT = commoncpp
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS =  -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DLLTOOL = dlltool
+DOXYGEN = /usr/bin/doxygen
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /usr/bin/grep -E
+EXEEXT = 
+FGREP = /usr/bin/grep -F
+GNUTLS_CFLAGS = 
+GNUTLS_LIBS = -lgnutls
+GREP = /usr/bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+LT_GENERIC = $(SHELL) $(top_builddir)/libtool
+LT_VERSION = 6:3:0
+MAKEINFO = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing makeinfo
+MANIFEST_TOOL = :
+MKDIR_P = /usr/bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_CFLAGS = 
+OPENSSL_LIBS = -lssl -lcrypto -lz 
+OTOOL = 
+OTOOL64 = 
+PACKAGE = ucommon
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = ucommon
+PACKAGE_STRING = ucommon 6.0.7
+PACKAGE_TARNAME = ucommon
+PACKAGE_URL = 
+PACKAGE_VERSION = 6.0.7
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PKG_CONFIG_LIBDIR = 
+PKG_CONFIG_PATH = 
+RANLIB = ranlib
+SECURE = gnutls
+SECURE_LIBS = -lgnutls
+SECURE_LOCAL = ../gnutls/libusecure.la -lgnutls
+SED = /usr/bin/sed
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = strip
+UCOMMON_CFGPATH = /etc
+UCOMMON_CLINK =  -lc
+UCOMMON_FLAGS =  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+UCOMMON_INCLUDES = /usr/local/include/ucommon
+UCOMMON_LIBC = -lc
+UCOMMON_LIBS =   -lrt  -ldl -lpthread -lc
+UCOMMON_LINKED =   -lrt  -ldl -lpthread
+UCOMMON_LOCALE = /usr/local/share/locale
+UCOMMON_MODEL = CXX
+UCOMMON_PREFIX = /usr/local
+UCOMMON_VARPATH = /var
+UCOMMON_VISIBILITY = 1
+VERSION = 6.0.7
+abs_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources/corelib
+abs_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources/corelib
+abs_top_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+abs_top_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+includes = ${includedir}/ucommon
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+libs = /usr/local/lib
+localedir = ${datarootdir}/locale
+localstatedir = /var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = /etc
+target = x86_64-unknown-linux-gnu
+target_alias = 
+target_cpu = x86_64
+target_os = linux-gnu
+target_vendor = unknown
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = ..
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = -version-info $(LT_VERSION) 
+AM_CXXFLAGS = -I$(top_srcdir)/inc $(UCOMMON_FLAGS)
+lib_LTLIBRARIES = libucommon.la 
+libucommon_la_LDFLAGS =   -lrt  -ldl -lpthread -lc  -lc $(RELEASE) 
+libucommon_la_SOURCES = object.cpp linked.cpp string.cpp mapped.cpp \
+	counter.cpp bitmap.cpp timer.cpp memory.cpp socket.cpp access.cpp \
+	thread.cpp fsys.cpp cpr.cpp vector.cpp xml.cpp stream.cpp persist.cpp \
+	keydata.cpp numbers.cpp datetime.cpp unicode.cpp atomic.cpp file.cpp \
+	regex.cpp protocols.cpp containers.cpp tcpbuffer.cpp shell.cpp
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(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) --gnu corelib/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu corelib/Makefile
+.PRECIOUS: 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):
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	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)'; 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)'; \
+	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}; \
+	}
+
+libucommon.la: $(libucommon_la_OBJECTS) $(libucommon_la_DEPENDENCIES) $(EXTRA_libucommon_la_DEPENDENCIES) 
+	$(AM_V_CXXLD)$(libucommon_la_LINK) -rpath $(libdir) $(libucommon_la_OBJECTS) $(libucommon_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/access.Plo
+include ./$(DEPDIR)/atomic.Plo
+include ./$(DEPDIR)/bitmap.Plo
+include ./$(DEPDIR)/containers.Plo
+include ./$(DEPDIR)/counter.Plo
+include ./$(DEPDIR)/cpr.Plo
+include ./$(DEPDIR)/datetime.Plo
+include ./$(DEPDIR)/file.Plo
+include ./$(DEPDIR)/fsys.Plo
+include ./$(DEPDIR)/keydata.Plo
+include ./$(DEPDIR)/linked.Plo
+include ./$(DEPDIR)/mapped.Plo
+include ./$(DEPDIR)/memory.Plo
+include ./$(DEPDIR)/numbers.Plo
+include ./$(DEPDIR)/object.Plo
+include ./$(DEPDIR)/persist.Plo
+include ./$(DEPDIR)/protocols.Plo
+include ./$(DEPDIR)/regex.Plo
+include ./$(DEPDIR)/shell.Plo
+include ./$(DEPDIR)/socket.Plo
+include ./$(DEPDIR)/stream.Plo
+include ./$(DEPDIR)/string.Plo
+include ./$(DEPDIR)/tcpbuffer.Plo
+include ./$(DEPDIR)/thread.Plo
+include ./$(DEPDIR)/timer.Plo
+include ./$(DEPDIR)/unicode.Plo
+include ./$(DEPDIR)/vector.Plo
+include ./$(DEPDIR)/xml.Plo
+
+.cpp.o:
+	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	$(AM_V_CXX)source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	$(AM_V_CXX)source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+#	$(AM_V_CXX)source='$<' object='$@' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+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`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(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
+
+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
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)"; 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:
+
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+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
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool 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-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 tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+
+
+# 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/jni/libucommon/sources/corelib/Makefile.am b/jni/libucommon/sources/corelib/Makefile.am
new file mode 100644
index 0000000..eb262c4
--- /dev/null
+++ b/jni/libucommon/sources/corelib/Makefile.am
@@ -0,0 +1,23 @@
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = -version-info $(LT_VERSION) 
+AM_CXXFLAGS = -I$(top_srcdir)/inc $(UCOMMON_FLAGS)
+
+lib_LTLIBRARIES = libucommon.la 
+
+libucommon_la_LDFLAGS = @UCOMMON_LIBS@ @UCOMMON_CLINK@ $(RELEASE) 
+libucommon_la_SOURCES = object.cpp linked.cpp string.cpp mapped.cpp \
+	counter.cpp bitmap.cpp timer.cpp memory.cpp socket.cpp access.cpp \
+	thread.cpp fsys.cpp cpr.cpp vector.cpp xml.cpp stream.cpp persist.cpp \
+	keydata.cpp numbers.cpp datetime.cpp unicode.cpp atomic.cpp file.cpp \
+	regex.cpp protocols.cpp containers.cpp tcpbuffer.cpp shell.cpp
+
diff --git a/jni/libucommon/sources/corelib/Makefile.in b/jni/libucommon/sources/corelib/Makefile.in
new file mode 100644
index 0000000..f6e4197
--- /dev/null
+++ b/jni/libucommon/sources/corelib/Makefile.in
@@ -0,0 +1,717 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 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@
+
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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@
+target_triplet = @target@
+subdir = corelib
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/autoconf/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+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)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libucommon_la_LIBADD =
+am_libucommon_la_OBJECTS = object.lo linked.lo string.lo mapped.lo \
+	counter.lo bitmap.lo timer.lo memory.lo socket.lo access.lo \
+	thread.lo fsys.lo cpr.lo vector.lo xml.lo stream.lo persist.lo \
+	keydata.lo numbers.lo datetime.lo unicode.lo atomic.lo file.lo \
+	regex.lo protocols.lo containers.lo tcpbuffer.lo shell.lo
+libucommon_la_OBJECTS = $(am_libucommon_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libucommon_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(libucommon_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)/autoconf/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+SOURCES = $(libucommon_la_SOURCES)
+DIST_SOURCES = $(libucommon_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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECKFLAGS = @CHECKFLAGS@
+COMPAT = @COMPAT@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_GENERIC = @LT_GENERIC@
+LT_VERSION = @LT_VERSION@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+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@
+RANLIB = @RANLIB@
+SECURE = @SECURE@
+SECURE_LIBS = @SECURE_LIBS@
+SECURE_LOCAL = @SECURE_LOCAL@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UCOMMON_CFGPATH = @UCOMMON_CFGPATH@
+UCOMMON_CLINK = @UCOMMON_CLINK@
+UCOMMON_FLAGS = @UCOMMON_FLAGS@
+UCOMMON_INCLUDES = @UCOMMON_INCLUDES@
+UCOMMON_LIBC = @UCOMMON_LIBC@
+UCOMMON_LIBS = @UCOMMON_LIBS@
+UCOMMON_LINKED = @UCOMMON_LINKED@
+UCOMMON_LOCALE = @UCOMMON_LOCALE@
+UCOMMON_MODEL = @UCOMMON_MODEL@
+UCOMMON_PREFIX = @UCOMMON_PREFIX@
+UCOMMON_VARPATH = @UCOMMON_VARPATH@
+UCOMMON_VISIBILITY = @UCOMMON_VISIBILITY@
+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_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+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@
+includes = @includes@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libs = @libs@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = -version-info $(LT_VERSION) 
+AM_CXXFLAGS = -I$(top_srcdir)/inc $(UCOMMON_FLAGS)
+lib_LTLIBRARIES = libucommon.la 
+libucommon_la_LDFLAGS = @UCOMMON_LIBS@ @UCOMMON_CLINK@ $(RELEASE) 
+libucommon_la_SOURCES = object.cpp linked.cpp string.cpp mapped.cpp \
+	counter.cpp bitmap.cpp timer.cpp memory.cpp socket.cpp access.cpp \
+	thread.cpp fsys.cpp cpr.cpp vector.cpp xml.cpp stream.cpp persist.cpp \
+	keydata.cpp numbers.cpp datetime.cpp unicode.cpp atomic.cpp file.cpp \
+	regex.cpp protocols.cpp containers.cpp tcpbuffer.cpp shell.cpp
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(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) --gnu corelib/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu corelib/Makefile
+.PRECIOUS: 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):
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	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)'; 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)'; \
+	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}; \
+	}
+
+libucommon.la: $(libucommon_la_OBJECTS) $(libucommon_la_DEPENDENCIES) $(EXTRA_libucommon_la_DEPENDENCIES) 
+	$(AM_V_CXXLD)$(libucommon_la_LINK) -rpath $(libdir) $(libucommon_la_OBJECTS) $(libucommon_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/access.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitmap.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/containers.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/counter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datetime.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fsys.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keydata.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linked.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mapped.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numbers.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/persist.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocols.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shell.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/string.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tcpbuffer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thread.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicode.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+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`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(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
+
+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
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)"; 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:
+
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+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
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool 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-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 tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+
+
+# 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/jni/libucommon/sources/corelib/access.cpp b/jni/libucommon/sources/corelib/access.cpp
new file mode 100644
index 0000000..c82eff3
--- /dev/null
+++ b/jni/libucommon/sources/corelib/access.cpp
@@ -0,0 +1,112 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/access.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+UnlockAccess::~UnlockAccess()
+{
+}
+
+SharedAccess::~SharedAccess()
+{
+}
+
+ExclusiveAccess::~ExclusiveAccess()
+{
+}
+
+void SharedAccess::exclusive(void)
+{
+}
+
+void SharedAccess::share(void)
+{
+}
+
+shared_access::shared_access(SharedAccess *obj)
+{
+    assert(obj != NULL);
+    lock = obj;
+    modify = false;
+    lock->shared_lock();
+}
+
+exclusive_access::exclusive_access(ExclusiveAccess *obj)
+{
+    assert(obj != NULL);
+    lock = obj;
+    lock->exclusive_lock();
+}
+
+shared_access::~shared_access()
+{
+    if(lock) {
+        if(modify)
+            lock->share();
+        lock->release_share();
+        lock = NULL;
+        modify = false;
+    }
+}
+
+exclusive_access::~exclusive_access()
+{
+    if(lock) {
+        lock->release_exclusive();
+        lock = NULL;
+    }
+}
+
+void shared_access::release()
+{
+    if(lock) {
+        if(modify)
+            lock->share();
+        lock->release_share();
+        lock = NULL;
+        modify = false;
+    }
+}
+
+void exclusive_access::release()
+{
+    if(lock) {
+        lock->release_exclusive();
+        lock = NULL;
+    }
+}
+
+void shared_access::exclusive(void)
+{
+    if(lock && !modify) {
+        lock->exclusive();
+        modify = true;
+    }
+}
+
+void shared_access::share(void)
+{
+    if(lock && modify) {
+        lock->share();
+        modify = false;
+    }
+}
+
diff --git a/jni/libucommon/sources/corelib/atomic.cpp b/jni/libucommon/sources/corelib/atomic.cpp
new file mode 100644
index 0000000..8ee2501
--- /dev/null
+++ b/jni/libucommon/sources/corelib/atomic.cpp
@@ -0,0 +1,134 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/atomic.h>
+#include <ucommon/thread.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+atomic::counter::counter(long init)
+{
+    value = init;
+}
+
+atomic::spinlock::spinlock()
+{
+    value = 0;
+}
+
+#ifdef HAVE_GCC_ATOMICS
+
+long atomic::counter::operator++()
+{
+    return __sync_add_and_fetch(&value, 1);
+}
+
+long atomic::counter::operator--()
+{
+    return __sync_sub_and_fetch(&value, 1);
+}
+
+long atomic::counter::operator+=(long change)
+{
+    return __sync_add_and_fetch(&value, change);
+}
+
+long atomic::counter::operator-=(long change)
+{
+    return __sync_sub_and_fetch(&value, change);
+}
+
+bool atomic::spinlock::acquire(void)
+{
+    // if not locked by another already, then we acquired it...
+    return (__sync_lock_test_and_set(&value, 1) == 0);
+}
+
+void atomic::spinlock::release(void)
+{
+    __sync_lock_release(&value);
+}
+
+#else
+
+#define SIMULATED true
+
+long atomic::counter::operator++()
+{
+    long rval;
+    Mutex::protect((void *)&value);
+    rval = (long)(++value);
+    Mutex::release((void *)&value);
+    return rval;
+}
+
+long atomic::counter::operator--()
+{
+    long rval;
+    Mutex::protect((void *)&value);
+    rval = (long)(--value);
+    Mutex::release((void *)&value);
+    return rval;
+}
+
+long atomic::counter::operator+=(long change)
+{
+    long rval;
+    Mutex::protect((void *)&value);
+    rval = (long)(value += change);
+    Mutex::release((void *)&value);
+    return rval;
+}
+
+long atomic::counter::operator-=(long change)
+{
+    long rval;
+    Mutex::protect((void *)&value);
+    rval = (long)(value -= change);
+    Mutex::release((void *)&value);
+    return rval;
+}
+
+bool atomic::spinlock::acquire(void)
+{
+    bool rtn = true;
+
+    Mutex::protect((void *)&value);
+    if(value == 1)
+        rtn = false;
+    else
+        value = 1;
+    Mutex::release((void *)&value);
+    return rtn;
+}
+
+void atomic::spinlock::release(void)
+{
+    Mutex::protect((void *)&value);
+    value = 0;
+    Mutex::release((void *)&value);
+}
+
+#endif
+
+#ifdef SIMULATED
+const bool atomic::simulated = true;
+#else
+const bool atomic::simulated = false;
+#endif
diff --git a/jni/libucommon/sources/corelib/bitmap.cpp b/jni/libucommon/sources/corelib/bitmap.cpp
new file mode 100644
index 0000000..2c7e7c9
--- /dev/null
+++ b/jni/libucommon/sources/corelib/bitmap.cpp
@@ -0,0 +1,162 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU C++ uCommon.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/bitmap.h>
+#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+using namespace UCOMMON_NAMESPACE;
+
+bitmap::bitmap(size_t count)
+{
+    size_t mem = count / 8;
+    size = count;
+    bus = BMALLOC;
+
+    if(count % 8)
+        ++mem;
+
+    addr.a = ::malloc(mem);
+    clear();
+}
+
+bitmap::bitmap(void *ptr, size_t count, bus_t access)
+{
+    assert(ptr != NULL);
+    assert(access >= BMIN && access <= BMAX);
+    addr.a = ptr;
+    bus = access;
+}
+
+bitmap::~bitmap()
+{
+    if(bus == BMALLOC && addr.b)
+        ::free(addr.b);
+    addr.b = NULL;
+}
+
+unsigned bitmap::memsize(void) const
+{
+    switch(bus) {
+    case B64:
+        return 64;
+    case B32:
+        return 32;
+    case B16:
+        return 16;
+    default:
+        return 8;
+    }
+}
+
+void bitmap::set(size_t offset, bool bit)
+{
+    unsigned bs = memsize();
+    size_t pos = offset / bs;
+    unsigned rem = offset % bs;
+    uint64_t b64;
+    uint32_t b32;
+    uint16_t b16;
+    uint8_t b8;
+
+    if(offset >= size)
+        return;
+
+    switch(bus) {
+    case B64:
+        b64 = ((uint64_t)(1))<<rem;
+        if(bit)
+            addr.d[pos] |= b64;
+        else
+            addr.d[pos] &= ~b64;
+        break;
+    case B32:
+        b32 = 1<<rem;
+        if(bit)
+            addr.l[pos] |= b32;
+        else
+            addr.l[pos] &= ~b32;
+        break;
+    case B16:
+        b16 = 1<<rem;
+        if(bit)
+            addr.w[pos] |= b16;
+        else
+            addr.w[pos] &= ~b16;
+        break;
+    default:
+        b8 = 1<<rem;
+        if(bit)
+            addr.b[pos] |= b8;
+        else
+            addr.b[pos] &= ~b8;
+        break;
+    }
+}
+
+bool bitmap::get(size_t offset) const
+{
+    unsigned bs = memsize();
+    size_t pos = offset / bs;
+    unsigned rem = offset % bs;
+
+    if(offset >= size)
+        return false;
+
+    switch(bus) {
+#if !defined(_MSC_VER) || _MSC_VER >= 1400
+    case B64:
+        return (addr.d[pos] & 1ll<<rem) > 0;
+#endif
+    case B32:
+        return (addr.l[pos] & 1l<<rem) > 0;
+    case B16:
+        return (addr.w[pos] & 1<<rem) > 0;
+    default:
+        return (addr.b[pos] & 1<<rem) > 0;
+    }
+}
+
+void bitmap::clear(void)
+{
+    unsigned bs = memsize();
+
+    if(size % bs)
+        ++size;
+
+    while(size--) {
+        switch(bus) {
+#if !defined(_MSC_VER) || _MSC_VER >= 1400
+        case B64:
+            *(addr.d++) = 0ll;
+            break;
+#endif
+        case B32:
+            *(addr.l++) = 0l;
+            break;
+        case B16:
+            *(addr.w++) = 0;
+            break;
+        default:
+            *(addr.b++) = 0;
+        }
+    }
+}
diff --git a/jni/libucommon/sources/corelib/containers.cpp b/jni/libucommon/sources/corelib/containers.cpp
new file mode 100644
index 0000000..7cd0785
--- /dev/null
+++ b/jni/libucommon/sources/corelib/containers.cpp
@@ -0,0 +1,739 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/protocols.h>
+#include <ucommon/object.h>
+#include <ucommon/memory.h>
+#include <ucommon/thread.h>
+#include <ucommon/containers.h>
+#include <string.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+LinkedAllocator::LinkedAllocator() : Conditional()
+{
+    freelist = NULL;
+}
+
+LinkedObject *LinkedAllocator::get(void)
+{
+    LinkedObject *node;
+    lock();
+    node = freelist;
+    if(node)
+        freelist = freelist->getNext();
+    unlock();
+    return node;
+}
+
+LinkedObject *LinkedAllocator::get(timeout_t timeout)
+{
+    struct timespec ts;
+    bool rtn = true;
+    LinkedObject *node = NULL;
+
+    if(timeout && timeout != Timer::inf)
+        set(&ts, timeout);
+
+    lock();
+    while(!freelist && rtn) {
+        if(timeout == Timer::inf)
+            Conditional::wait();
+        else if(timeout)
+            rtn = Conditional::wait(&ts);
+        else
+            rtn = false;
+    }
+    if(rtn && freelist) {
+        node = freelist;
+        if(node)
+            freelist = freelist->getNext();
+    }
+    unlock();
+    return node;
+}
+
+void LinkedAllocator::release(LinkedObject *node)
+{
+    lock();
+    node->enlist(&freelist);
+    signal();
+    unlock();
+}
+
+LinkedAllocator::operator bool()
+{
+    bool rtn = false;
+
+    lock();
+    if(freelist)
+        rtn = true;
+    unlock();
+    return rtn;
+}
+
+bool LinkedAllocator::operator!()
+{
+    bool rtn = false;
+
+    lock();
+    if(!freelist)
+        rtn = true;
+    unlock();
+    return rtn;
+}
+
+Buffer::Buffer(size_t osize, size_t c) :
+Conditional()
+{
+    assert(osize > 0 && c > 0);
+
+    bufsize = osize * c;
+    objsize = osize;
+    objcount = 0;
+    limit = c;
+
+    if(osize) {
+        buf = (char *)malloc(bufsize);
+        crit(buf != NULL, "buffer alloc failed");
+    }
+    else
+        buf = NULL;
+
+    head = tail = buf;
+}
+
+Buffer::~Buffer()
+{
+    if(buf)
+        free(buf);
+    buf = NULL;
+}
+
+unsigned Buffer::count(void)
+{
+    unsigned bcount = 0;
+
+    lock();
+    if(tail > head)
+        bcount = (unsigned)((size_t)(tail - head) / objsize);
+    else if(head > tail)
+        bcount = (unsigned)((((buf + bufsize) - head) + (tail - buf)) / objsize);
+    unlock();
+    return bcount;
+}
+
+unsigned Buffer::size(void)
+{
+    return bufsize / objsize;
+}
+
+void *Buffer::get(void)
+{
+    caddr_t dbuf;
+
+    lock();
+    while(!objcount)
+        wait();
+    dbuf = head;
+    unlock();
+    return dbuf;
+}
+
+void *Buffer::invalid(void) const
+{
+    return NULL;
+}
+
+void *Buffer::peek(unsigned offset)
+{
+    caddr_t dbuf;
+
+    lock();
+    if(offset >= objcount) {
+        unlock();
+        return invalid();
+    }
+
+    dbuf = head + (objsize * offset);
+    if(dbuf >= buf + bufsize)
+        dbuf -= bufsize;
+    unlock();
+    return dbuf;
+}
+
+void Buffer::copy(void *data)
+{
+    assert(data != NULL);
+
+    void *ptr = get();
+    memcpy(data, ptr, objsize);
+    release();
+}
+
+bool Buffer::copy(void *data, timeout_t timeout)
+{
+    assert(data != NULL);
+
+    void *ptr = get(timeout);
+    if(!ptr)
+        return false;
+
+    memcpy(data, ptr, objsize);
+    release();
+    return true;
+}
+
+void *Buffer::get(timeout_t timeout)
+{
+    caddr_t dbuf = NULL;
+    struct timespec ts;
+    bool rtn = true;
+
+    if(timeout && timeout != Timer::inf)
+        set(&ts, timeout);
+
+    lock();
+    while(!objcount && rtn) {
+        if(timeout == Timer::inf)
+            wait();
+        else if(timeout)
+            rtn = wait(&ts);
+        else
+            rtn = false;
+    }
+    if(objcount && rtn)
+        dbuf = head;
+    unlock();
+    return dbuf;
+}
+
+void Buffer::release(void)
+{
+    lock();
+    head += objsize;
+    if(head >= buf + bufsize)
+        head = buf;
+    --objcount;
+    signal();
+    unlock();
+}
+
+void Buffer::put(void *dbuf)
+{
+    assert(dbuf != NULL);
+
+    lock();
+    while(objcount == limit)
+        wait();
+    memcpy(tail, dbuf, objsize);
+    tail += objsize;
+    if(tail >= (buf + bufsize))
+        tail = buf;
+    ++objcount;
+    signal();
+    unlock();
+}
+
+bool Buffer::put(void *dbuf, timeout_t timeout)
+{
+    assert(dbuf != NULL);
+
+    bool rtn = true;
+    struct timespec ts;
+
+    if(timeout && timeout != Timer::inf)
+        set(&ts, timeout);
+
+    lock();
+    while(objcount == limit && rtn) {
+        if(timeout == Timer::inf)
+            wait();
+        else if(timeout)
+            rtn = wait(&ts);
+        else
+            rtn = false;
+    }
+    if(rtn && objcount < limit) {
+        memcpy(tail, dbuf, objsize);
+        tail += objsize;
+        if(tail >= (buf + bufsize))
+            tail = 0;
+        ++objcount;
+        signal();
+    }
+    unlock();
+    return rtn;
+}
+
+
+Buffer::operator bool()
+{
+    bool rtn = false;
+
+    lock();
+    if(buf && head != tail)
+        rtn = true;
+    unlock();
+    return rtn;
+}
+
+bool Buffer::operator!()
+{
+    bool rtn = false;
+
+    lock();
+    if(!buf || head == tail)
+        rtn = true;
+    unlock();
+    return rtn;
+}
+
+Queue::member::member(Queue *q, ObjectProtocol *o) :
+OrderedObject(q)
+{
+    assert(o != NULL);
+
+    o->retain();
+    object = o;
+}
+
+Queue::Queue(mempager *p, size_t size) :
+OrderedIndex(), Conditional()
+{
+    assert(size > 0);
+
+    pager = p;
+    freelist = NULL;
+    used = 0;
+    limit = size;
+}
+
+Queue::~Queue()
+{
+    linked_pointer<member> mp;
+    OrderedObject *next;
+
+    if(pager)
+        return;
+
+    mp = freelist;
+    while(is(mp)) {
+        next = mp->getNext();
+        delete *mp;
+        mp = next;
+    }
+
+    mp = head;
+    while(is(mp)) {
+        next = mp->getNext();
+        delete *mp;
+        mp = next;
+    }
+}
+
+bool Queue::remove(ObjectProtocol *o)
+{
+    assert(o != NULL);
+
+    bool rtn = false;
+    linked_pointer<member> node;
+    lock();
+    node = begin();
+    while(node) {
+        if(node->object == o)
+            break;
+        node.next();
+    }
+    if(node) {
+        --used;
+        rtn = true;
+        node->object->release();
+        node->delist(this);
+        node->LinkedObject::enlist(&freelist);
+    }
+    unlock();
+    return rtn;
+}
+
+ObjectProtocol *Queue::lifo(timeout_t timeout)
+{
+    struct timespec ts;
+    bool rtn = true;
+    member *member;
+    ObjectProtocol *obj = NULL;
+
+    if(timeout && timeout != Timer::inf)
+        set(&ts, timeout);
+
+    lock();
+    while(!tail && rtn) {
+        if(timeout == Timer::inf)
+            Conditional::wait();
+        else if(timeout)
+            rtn = Conditional::wait(&ts);
+        else
+            rtn = false;
+    }
+    if(rtn && tail) {
+        --used;
+        member = static_cast<Queue::member *>(tail);
+        obj = member->object;
+        member->delist(this);
+        member->LinkedObject::enlist(&freelist);
+    }
+    if(rtn)
+        signal();
+    unlock();
+    return obj;
+}
+
+ObjectProtocol *Queue::fifo(timeout_t timeout)
+{
+    bool rtn = true;
+    struct timespec ts;
+    linked_pointer<member> node;
+    ObjectProtocol *obj = NULL;
+
+    if(timeout && timeout != Timer::inf)
+        set(&ts, timeout);
+
+    lock();
+    while(rtn && !head) {
+        if(timeout == Timer::inf)
+            Conditional::wait();
+        else if(timeout)
+            rtn = Conditional::wait(&ts);
+        else
+            rtn = false;
+    }
+
+    if(rtn && head) {
+        --used;
+        node = begin();
+        obj = node->object;
+        head = head->getNext();
+        if(!head)
+            tail = NULL;
+        node->LinkedObject::enlist(&freelist);
+    }
+    if(rtn)
+        signal();
+    unlock();
+    return obj;
+}
+
+ObjectProtocol *Queue::invalid(void) const
+{
+    return NULL;
+}
+
+ObjectProtocol *Queue::get(unsigned back)
+{
+    linked_pointer<member> node;
+    ObjectProtocol *obj;
+
+    lock();
+
+    node = begin();
+
+    do {
+        if(!is(node)) {
+            obj = invalid();
+            break;
+        }
+        obj = node->object;
+        node.next();
+
+    } while(back-- > 0);
+
+    unlock();
+    return obj;
+}
+
+bool Queue::post(ObjectProtocol *object, timeout_t timeout)
+{
+    assert(object != NULL);
+
+    bool rtn = true;
+    struct timespec ts;
+    LinkedObject *mem;
+
+    if(timeout && timeout != Timer::inf)
+        set(&ts, timeout);
+
+    lock();
+    while(rtn && limit && used == limit) {
+        if(timeout == Timer::inf)
+            Conditional::wait();
+        else if(timeout)
+            rtn = Conditional::wait(&ts);
+        else
+            rtn = false;
+    }
+
+    if(!rtn) {
+        unlock();
+        return false;
+    }
+
+    ++used;
+    if(freelist) {
+        mem = freelist;
+        freelist = freelist->getNext();
+        new((caddr_t)mem) member(this, object);
+    }
+    else {
+        if(pager)
+            new((caddr_t)(pager->alloc(sizeof(member)))) member(this, object);
+        else
+            new member(this, object);
+    }
+    signal();
+    unlock();
+    return true;
+}
+
+size_t Queue::count(void)
+{
+    size_t qcount;
+    lock();
+    qcount = used;
+    unlock();
+    return qcount;
+}
+
+
+Stack::member::member(Stack *S, ObjectProtocol *o) :
+LinkedObject((&S->usedlist))
+{
+    assert(o != NULL);
+
+    o->retain();
+    object = o;
+}
+
+Stack::Stack(mempager *p, size_t size) :
+Conditional()
+{
+    assert(size > 0);
+
+    pager = p;
+    freelist = usedlist = NULL;
+    limit = size;
+    used = 0;
+}
+
+Stack::~Stack()
+{
+    linked_pointer<member> mp;
+    LinkedObject *next;
+
+    if(pager)
+        return;
+
+    mp = freelist;
+    while(is(mp)) {
+        next = mp->getNext();
+        delete *mp;
+        mp = next;
+    }
+
+    mp = usedlist;
+    while(is(mp)) {
+        next = mp->getNext();
+        delete *mp;
+        mp = next;
+    }
+}
+
+bool Stack::remove(ObjectProtocol *o)
+{
+    assert(o != NULL);
+
+    bool rtn = false;
+    linked_pointer<member> node;
+    lock();
+    node = static_cast<member*>(usedlist);
+    while(node) {
+        if(node->object == o)
+            break;
+        node.next();
+    }
+    if(node) {
+        --used;
+        rtn = true;
+        node->object->release();
+        node->delist(&usedlist);
+        node->enlist(&freelist);
+    }
+    unlock();
+    return rtn;
+}
+
+ObjectProtocol *Stack::invalid(void) const
+{
+    return NULL;
+}
+
+ObjectProtocol *Stack::get(unsigned back)
+{
+    linked_pointer<member> node;
+    ObjectProtocol *obj;
+
+    lock();
+    node = usedlist;
+
+    do {
+        if(!is(node)) {
+            obj = invalid();
+            break;
+        }
+        obj = node->object;
+        node.next();
+
+    } while(back-- > 0);
+
+    unlock();
+    return obj;
+}
+
+const ObjectProtocol *Stack::peek(timeout_t timeout)
+{
+    bool rtn = true;
+    struct timespec ts;
+    member *member;
+    ObjectProtocol *obj = NULL;
+
+    if(timeout && timeout != Timer::inf)
+        set(&ts, timeout);
+
+    lock();
+    while(rtn && !usedlist) {
+        if(timeout == Timer::inf)
+            Conditional::wait();
+        else if(timeout)
+            rtn = Conditional::wait(&ts);
+        else
+            rtn = false;
+    }
+    if(!rtn) {
+        unlock();
+        return NULL;
+    }
+    if(usedlist) {
+        member = static_cast<Stack::member *>(usedlist);
+        obj = member->object;
+    }
+    if(rtn)
+        signal();
+    unlock();
+    return obj;
+}
+
+ObjectProtocol *Stack::pull(timeout_t timeout)
+{
+    bool rtn = true;
+    struct timespec ts;
+    member *member;
+    ObjectProtocol *obj = NULL;
+
+    if(timeout && timeout != Timer::inf)
+        set(&ts, timeout);
+
+    lock();
+    while(rtn && !usedlist) {
+        if(timeout == Timer::inf)
+            Conditional::wait();
+        else if(timeout)
+            rtn = Conditional::wait(&ts);
+        else
+            rtn = false;
+    }
+    if(!rtn) {
+        unlock();
+        return NULL;
+    }
+    if(usedlist) {
+        member = static_cast<Stack::member *>(usedlist);
+        obj = member->object;
+        usedlist = member->getNext();
+        member->enlist(&freelist);
+    }
+    if(rtn)
+        signal();
+    unlock();
+    return obj;
+}
+
+bool Stack::push(ObjectProtocol *object, timeout_t timeout)
+{
+    assert(object != NULL);
+
+    bool rtn = true;
+    struct timespec ts;
+    LinkedObject *mem;
+
+    if(timeout && timeout != Timer::inf)
+        set(&ts, timeout);
+
+    lock();
+    while(rtn && limit && used == limit) {
+        if(timeout == Timer::inf)
+            Conditional::wait();
+        else if(timeout)
+            rtn = Conditional::wait(&ts);
+        else
+            rtn = false;
+    }
+
+    if(!rtn) {
+        unlock();
+        return false;
+    }
+
+    ++used;
+    if(freelist) {
+        mem = freelist;
+        freelist = freelist->getNext();
+        new((caddr_t)mem) member(this, object);
+    }
+    else {
+        if(pager) {
+            caddr_t ptr = (caddr_t)pager->alloc(sizeof(member));
+            new(ptr) member(this, object);
+        }
+        else
+            new member(this, object);
+    }
+    signal();
+    unlock();
+    return true;
+}
+
+size_t Stack::count(void)
+{
+    size_t scount;
+    lock();
+    scount = used;
+    unlock();
+    return scount;
+}
+
+
diff --git a/jni/libucommon/sources/corelib/counter.cpp b/jni/libucommon/sources/corelib/counter.cpp
new file mode 100644
index 0000000..965b04c
--- /dev/null
+++ b/jni/libucommon/sources/corelib/counter.cpp
@@ -0,0 +1,89 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/counter.h>
+#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+using namespace UCOMMON_NAMESPACE;
+
+counter::counter()
+{
+    cycle = value = 0;
+}
+
+counter::counter(unsigned max)
+{
+    assert(max > 0);
+    cycle = max;
+    value = 0;
+}
+
+void counter::operator=(unsigned v)
+{
+    if(!cycle || v < cycle)
+        value = v;
+}
+
+unsigned counter::get(void)
+{
+    unsigned v = value++;
+    if(cycle && value >= cycle)
+        value = 0;
+    return v;
+}
+
+SeqCounter::SeqCounter(void *base, size_t size, unsigned limit) :
+counter(limit)
+{
+    assert(base != NULL);
+    assert(size > 0);
+    assert(limit > 0);
+    item = base;
+    offset = size;
+}
+
+void *SeqCounter::get(void)
+{
+    unsigned pos = counter::get();
+    return (caddr_t)item + (pos * offset);
+}
+
+void *SeqCounter::get(unsigned pos)
+{
+    if(pos >= range())
+        return NULL;
+
+    return (caddr_t)item + (pos * offset);
+}
+
+bool toggle::get(void)
+{
+    bool v = value;
+    if(value)
+        value = false;
+    else
+        value = true;
+
+    return v;
+}
+
+
diff --git a/jni/libucommon/sources/corelib/cpr.cpp b/jni/libucommon/sources/corelib/cpr.cpp
new file mode 100644
index 0000000..2734735
--- /dev/null
+++ b/jni/libucommon/sources/corelib/cpr.cpp
@@ -0,0 +1,185 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/cpr.h>
+
+#if !defined(NEW_STDCPP) && !defined(OLD_STDCPP)
+#undef  HAVE_STDEXCEPT
+#endif
+
+#ifdef  HAVE_STDEXCEPT
+#include <stdexcept>
+#endif
+
+#include <ucommon/export.h>
+#include <ucommon/string.h>
+#include <ucommon/socket.h>
+#include <errno.h>
+#include <stdarg.h>
+
+#include <ctype.h>
+#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <limits.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+#ifdef  _MSWINDOWS_
+int cpr_setenv(const char *sym, const char *val, int flag)
+{
+    char buf[128];
+
+    if(!flag) {
+        if(GetEnvironmentVariable(sym, buf, sizeof(buf)) > 0)
+            return 0;
+        if(GetLastError() != ERROR_ENVVAR_NOT_FOUND)
+            return -1;
+    }
+    if(SetEnvironmentVariable(sym, val) == 0)
+        return -1;
+    return 0;
+}
+
+#endif
+
+void cpr_runtime_error(const char *str)
+{
+    assert(str != NULL);
+
+#ifdef  HAVE_STDEXCEPT
+    throw std::runtime_error(str);
+#endif
+    abort();
+}
+
+// just become we need to get binary types in a specific binary endian order.
+
+extern "C" uint16_t lsb_getshort(uint8_t *b)
+{
+    assert(b != NULL);
+    return (b[1] * 256) + b[0];
+}
+
+extern "C" uint32_t lsb_getlong(uint8_t *b)
+{
+    assert(b != NULL);
+    return (b[3] * 16777216l) + (b[2] * 65536l) + (b[1] * 256) + b[0];
+}
+
+extern "C" uint16_t msb_getshort(uint8_t *b)
+{
+    assert(b != NULL);
+    return (b[0] * 256) + b[1];
+}
+
+extern "C" uint32_t msb_getlong(uint8_t *b)
+{
+    assert(b != NULL);
+    return (b[0] * 16777216l) + (b[1] * 65536l) + (b[2] * 256) + b[3];
+}
+
+extern "C" void lsb_setshort(uint8_t *b, uint16_t v)
+{
+    assert(b != NULL);
+    b[0] = v & 0x0ff;
+    b[1] = (v / 256) & 0xff;
+}
+
+extern "C" void msb_setshort(uint8_t *b, uint16_t v)
+{
+    assert(b != NULL);
+    b[1] = v & 0x0ff;
+    b[0] = (v / 256) & 0xff;
+}
+
+// oh, and we have to be able to set them in order too...
+
+extern "C" void lsb_setlong(uint8_t *b, uint32_t v)
+{
+    assert(b != NULL);
+    b[0] = (uint8_t)(v & 0x0ff);
+    b[1] = (uint8_t)((v / 256) & 0xff);
+    b[2] = (uint8_t)((v / 65536l) & 0xff);
+    b[3] = (uint8_t)((v / 16777216l) & 0xff);
+}
+
+extern "C" void msb_setlong(uint8_t *b, uint32_t v)
+{
+    assert(b != NULL);
+    b[3] = (uint8_t)(v & 0x0ff);
+    b[2] = (uint8_t)((v / 256) & 0xff);
+    b[1] = (uint8_t)((v / 65536l) & 0xff);
+    b[0] = (uint8_t)((v / 16777216l) & 0xff);
+}
+
+extern "C" void cpr_memswap(void *s1, void *s2, size_t size)
+{
+    assert(s1 != NULL);
+    assert(s2 != NULL);
+    assert(size > 0);
+
+    char *buf = new char[size];
+    memcpy(buf, s1, size);
+    memcpy(s1, s2, size);
+    memcpy(s2, buf, size);
+    delete[] buf;
+}
+
+// if malloc ever fails, we probably should consider that a critical error and
+// kill the leaky dingy, which this does for us here..
+
+extern "C" void *cpr_memalloc(size_t size)
+{
+    void *mem;
+
+    if(!size)
+        ++size;
+
+    mem = malloc(size);
+    crit(mem != NULL, "memory alloc failed");
+    return mem;
+}
+
+extern "C" void *cpr_memassign(size_t size, caddr_t addr, size_t max)
+{
+    assert(addr);
+    crit((size <= max), "memory assign failed");
+    return addr;
+}
+
+#ifdef  __GNUC__
+
+// here we have one of those magic things in gcc, and what to do when
+// we have an unimplemented virtual function if we build ucommon without
+// a stdc++ runtime library.
+
+extern "C" void __cxa_pure_virtual(void)
+{
+    abort();
+}
+
+#endif
+
+// vim: set ts=4 sw=4:
+// Local Variables:
+// c-basic-offset: 4
+// tab-width: 4
+// End:
diff --git a/jni/libucommon/sources/corelib/datetime.cpp b/jni/libucommon/sources/corelib/datetime.cpp
new file mode 100644
index 0000000..f93ed91
--- /dev/null
+++ b/jni/libucommon/sources/corelib/datetime.cpp
@@ -0,0 +1,1117 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/numbers.h>
+#include <ucommon/string.h>
+#include <ucommon/datetime.h>
+#include <ucommon/thread.h>
+#include <ucommon/timers.h>
+#include <stdlib.h>
+#include <ctype.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+using namespace UCOMMON_NAMESPACE;
+
+#ifdef __BORLANDC__
+using std::time_t;
+using std::tm;
+using std::localtime;
+#endif
+
+const long Time::c_day = 86400l;
+const long Time::c_hour = 3600l;
+const long Time::c_week = 604800l;
+
+const size_t Date::sz_string = 11;
+const size_t Time::sz_string = 9;
+const size_t DateTime::sz_string = 20;
+
+#ifdef  HAVE_LOCALTIME_R
+
+tm_t *DateTime::local(time_t *now)
+{
+    tm_t *result, *dt = new tm_t;
+    time_t tmp;
+
+    if(!now) {
+        now = &tmp;
+        time(&tmp);
+    }
+
+    result = localtime_r(now, dt);
+    if(result)
+        return result;
+    delete dt;
+    return NULL;
+}
+
+tm_t *DateTime::gmt(time_t *now)
+{
+    tm_t *result, *dt = new tm_t;
+    time_t tmp;
+
+    if(!now) {
+        now = &tmp;
+        time(&tmp);
+    }
+
+    result = gmtime_r(now, dt);
+    if(result)
+        return result;
+    delete dt;
+    return NULL;
+}
+
+void DateTime::release(tm_t *dt)
+{
+    if(dt)
+        delete dt;
+}
+
+#else
+static mutex_t lockflag;
+
+tm_t *DateTime::local(time_t *now)
+{
+    tm_t *dt;
+    time_t tmp;
+
+    if(!now) {
+        now = &tmp;
+        time(&tmp);
+    }
+
+    lockflag.acquire();
+    dt = localtime(now);
+    if(dt)
+        return dt;
+    lockflag.release();
+    return NULL;
+}
+
+tm_t *DateTime::gmt(time_t *now)
+{
+    tm_t *dt;
+    time_t tmp;
+
+    if(!now) {
+        now = &tmp;
+        time(&tmp);
+    }
+
+    lockflag.acquire();
+    dt = gmtime(now);
+    if(dt)
+        return dt;
+    lockflag.release();
+    return NULL;
+}
+
+void DateTime::release(tm_t *dt)
+{
+    if(dt)
+        lockflag.release();
+}
+
+#endif
+
+Date::Date()
+{
+    set();
+}
+
+Date::Date(const Date& copy)
+{
+    julian = copy.julian;
+}
+
+Date::Date(tm_t *dt)
+{
+    set(dt->tm_year + 1900, dt->tm_mon + 1, dt->tm_mday);
+}
+
+Date::Date(time_t tm)
+{
+    tm_t *dt = DateTime::local(&tm);
+    set(dt->tm_year + 1900, dt->tm_mon + 1, dt->tm_mday);
+    DateTime::release(dt);
+}
+
+Date::Date(const char *str, size_t size)
+{
+    set(str, size);
+}
+
+Date::~Date()
+{
+}
+
+void Date::set()
+{
+    tm_t *dt = DateTime::local();
+
+    set(dt->tm_year + 1900, dt->tm_mon + 1, dt->tm_mday);
+    DateTime::release(dt);
+}
+
+void Date::set(const char *str, size_t size)
+{
+    tm_t *dt = DateTime::local();
+    int nyear = 0;
+    const char *mstr = str;
+    const char *dstr = str;
+
+    if(!size)
+        size = strlen(str);
+//0000
+    if(size == 4) {
+        nyear = dt->tm_year + 1900;
+        mstr = str;
+        dstr = str + 2;
+    }
+//00/00
+    else if(size == 5) {
+        nyear = dt->tm_year + 1900;
+        mstr = str;
+        dstr = str + 3;
+    }
+//000000
+    else if(size == 6) {
+        ZNumber zyear((char*)str, 2);
+        nyear = ((dt->tm_year + 1900) / 100) * 100 + zyear();
+        mstr = str + 2;
+        dstr = str + 4;
+    }
+//00000000
+    else if(size == 8 && str[2] >= '0' && str[2] <= '9' && str[5] >= '0' && str[5] <= '9') {
+        ZNumber zyear((char*)str, 4);
+        nyear = zyear();
+        mstr = str + 4;
+        dstr = str + 6;
+    }
+//00/00/00
+    else if(size == 8) {
+        ZNumber zyear((char*)str, 2);
+        nyear = ((dt->tm_year + 1900) / 100) * 100 + zyear();
+        mstr = str + 3;
+        dstr = str + 6;
+    }
+//0000/00/00
+    else if(size == 10) {
+        ZNumber zyear((char*)str, 4);
+        nyear = zyear();
+        mstr = str + 5;
+        dstr = str + 8;
+    }
+    else {
+        julian = 0x7fffffffl;
+        DateTime::release(dt);
+        return;
+    }
+
+    DateTime::release(dt);
+    ZNumber nmonth((char*)mstr, 2);
+    ZNumber nday((char*)dstr, 2);
+    set(nyear, nmonth(), nday());
+}
+
+Date::Date(int nyear, unsigned nmonth, unsigned nday)
+{
+    set(nyear, nmonth, nday);
+}
+
+void Date::update(void)
+{
+}
+
+bool Date::is_valid(void) const
+{
+    if(julian == 0x7fffffffl)
+        return false;
+    return true;
+}
+
+time_t Date::timeref(void) const
+{
+    char buf[11];
+    tm_t dt;
+    memset(&dt, 0, sizeof(tm_t));
+    put(buf);
+    Number nyear(buf, 4);
+    Number nmonth(buf + 5, 2);
+    Number nday(buf + 8, 2);
+
+    dt.tm_year = nyear() - 1900;
+    dt.tm_mon = nmonth() - 1;
+    dt.tm_mday = nday();
+
+    return mktime(&dt); // to fill in day of week etc.
+}
+
+int Date::year(void) const
+{
+    char buf[11];
+    put(buf);
+    Number num(buf, 4);
+    return num();
+}
+
+unsigned Date::month(void) const
+{
+    char buf[11];
+    put(buf);
+    Number num(buf + 5, 2);
+    return num();
+}
+
+unsigned Date::day(void) const
+{
+    char buf[11];
+    put(buf);
+    Number num(buf + 8, 2);
+    return num();
+}
+
+unsigned Date::dow(void) const
+{
+    return (unsigned)((julian + 1l) % 7l);
+}
+
+String Date::operator()() const
+{
+    char buf[11];
+
+    put(buf);
+    String date(buf);
+
+    return date;
+}
+
+long Date::get(void) const
+{
+    char buf[11];
+    put(buf);
+    return atol(buf) * 10000 + atol(buf + 5) * 100 + atol(buf + 8);
+}
+
+Date& Date::operator++()
+{
+    ++julian;
+    update();
+    return *this;
+}
+
+Date& Date::operator--()
+{
+    --julian;
+    update();
+    return *this;
+}
+
+Date Date::operator+(long val)
+{
+    Date result = *this;
+    result += val;
+    return result;
+}
+
+Date Date::operator-(long val)
+{
+    Date result = *this;
+    result -= val;
+    return result;
+}
+
+Date& Date::operator+=(long val)
+{
+    julian += val;
+    update();
+    return *this;
+}
+
+Date& Date::operator-=(long val)
+{
+    julian -= val;
+    update();
+    return *this;
+}
+
+bool Date::operator==(const Date &d) const
+{
+    return julian == d.julian;
+}
+
+bool Date::operator!=(const Date &d) const
+{
+    return julian != d.julian;
+}
+
+bool Date::operator<(const Date &d) const
+{
+    return julian < d.julian;
+}
+
+bool Date::operator<=(const Date &d) const
+{
+    return julian <= d.julian;
+}
+
+bool Date::operator>(const Date &d) const
+{
+    return julian > d.julian;
+}
+
+bool Date::operator>=(const Date &d) const
+{
+    return julian >= d.julian;
+}
+
+void Date::set(long nyear, long nmonth, long nday)
+{
+    julian = 0x7fffffffl;
+
+    if(nmonth < 1 || nmonth > 12 || nday < 1 || nday > 31 || nyear == 0)
+        return;
+
+    if(nyear < 0)
+        nyear--;
+
+    julian = nday - 32075l +
+        1461l * (nyear + 4800l + ( nmonth - 14l) / 12l) / 4l +
+        367l * (nmonth - 2l - (nmonth - 14l) / 12l * 12l) / 12l -
+        3l * ((nyear + 4900l + (nmonth - 14l) / 12l) / 100l) / 4l;
+}
+
+Date& Date::operator=(const Date& date)
+{
+    julian = date.julian;
+    return *this;
+}
+
+const char *Date::put(char *buffer) const
+{
+// The following conversion algorithm is due to
+// Henry F. Fliegel and Thomas C. Van Flandern:
+
+    ZNumber nyear(buffer, 4);
+    buffer[4] = '-';
+    ZNumber nmonth(buffer + 5, 2);
+    buffer[7] = '-';
+    ZNumber nday(buffer + 8, 2);
+
+    double i, j, k, l, n;
+
+    l = julian + 68569.0;
+    n = int( 4 * l / 146097.0);
+    l = l - int( (146097.0 * n + 3)/ 4 );
+    i = int( 4000.0 * (l+1)/1461001.0);
+    l = l - int(1461.0*i/4.0) + 31.0;
+    j = int( 80 * l/2447.0);
+    k = l - int( 2447.0 * j / 80.0);
+    l = int(j/11);
+    j = j+2-12*l;
+    i = 100*(n - 49) + i + l;
+    nyear = int(i);
+    nmonth = int(j);
+    nday = int(k);
+
+    buffer[10] = '\0';
+    return buffer;
+}
+
+Time::Time()
+{
+    set();
+}
+
+Time::Time(const Time& copy)
+{
+    seconds = copy.seconds;
+}
+
+Time::Time(tm_t *dt)
+{
+    set(dt->tm_hour, dt->tm_min, dt->tm_sec);
+}
+
+Time::Time(time_t tm)
+{
+    tm_t *dt = DateTime::local(&tm);
+    set(dt->tm_hour, dt->tm_min, dt->tm_sec);
+    DateTime::release(dt);
+}
+
+Time::Time(const char *str, size_t size)
+{
+    set(str, size);
+}
+
+Time::Time(int nhour, int nminute, int nsecond)
+{
+    set(nhour, nminute, nsecond);
+}
+
+Time::~Time()
+{
+}
+
+void Time::set(void)
+{
+    tm_t *dt = DateTime::local();
+    set(dt->tm_hour, dt->tm_min, dt->tm_sec);
+    DateTime::release(dt);
+}
+
+bool Time::is_valid(void) const
+{
+    if(seconds == -1)
+        return false;
+    return true;
+}
+
+int Time::hour(void) const
+{
+    if(seconds == -1)
+        return -1;
+
+    return (int)(seconds / 3600l);
+}
+
+int Time::minute(void) const
+{
+    if(seconds == -1)
+        return -1;
+
+    return (int)((seconds / 60l) % 60l);
+}
+
+int Time::second(void) const
+{
+    if(seconds == -1)
+        return -1;
+
+    return (int)(seconds % 60l);
+}
+
+void Time::update(void)
+{
+    seconds = abs(seconds % DateTime::c_day);
+}
+
+void Time::set(const char *str, size_t size)
+{
+    int sec = 00;
+
+    if(!size)
+        size = strlen(str);
+
+//00:00
+    if (size == 5) {
+        sec = 00;
+    }
+//00:00:00
+    else if (size == 8) {
+        ZNumber nsecond((char *)(str + 6), 2);
+        sec = nsecond();
+    }
+    else {
+        seconds = -1;
+        return;
+    }
+
+    ZNumber nhour((char *)str, 2);
+    ZNumber nminute((char *)(str + 3), 2);
+    set(nhour(), nminute(), sec);
+}
+
+String Time::operator()() const
+{
+    char buf[7];
+
+    put(buf);
+    String strTime(buf);
+
+    return strTime;
+}
+
+long Time::get(void) const
+{
+    return seconds;
+}
+
+Time& Time::operator++()
+{
+    ++seconds;
+    update();
+    return *this;
+}
+
+Time& Time::operator--()
+{
+    --seconds;
+    update();
+    return *this;
+}
+
+Time& Time::operator+=(long val)
+{
+    seconds += val;
+    update();
+    return *this;
+}
+
+Time& Time::operator-=(long val)
+{
+    seconds -= val;
+    update();
+    return *this;
+}
+
+Time Time::operator+(long val)
+{
+    Time result = *this;
+    result += val;
+    return result;
+}
+
+Time Time::operator-(long val)
+{
+    Time result = *this;
+    result -= val;
+    return result;
+}
+
+bool Time::operator==(const Time &t) const
+{
+    return seconds == t.seconds;
+}
+
+bool Time::operator!=(const Time &t) const
+{
+    return seconds != t.seconds;
+}
+
+bool Time::operator<(const Time &t) const
+{
+    return seconds < t.seconds;
+}
+
+bool Time::operator<=(const Time &t) const
+{
+    return seconds <= t.seconds;
+}
+
+bool Time::operator>(const Time &t) const
+{
+    return seconds > t.seconds;
+}
+
+bool Time::operator>=(const Time &t) const
+{
+    return seconds >= t.seconds;
+}
+
+long Time::operator-(const Time &t)
+{
+    if(seconds < t.seconds)
+        return (seconds + DateTime::c_day) - t.seconds;
+    else
+        return seconds - t.seconds;
+}
+
+void Time::set(int nhour, int nminute, int nsecond)
+{
+    seconds = -1;
+
+    if (nminute > 59 || nsecond > 59 || nhour > 23)
+        return;
+
+    seconds = 3600 * nhour + 60 * nminute + nsecond;
+}
+
+const char *Time::put(char *buffer) const
+{
+    ZNumber zhour(buffer, 2);
+    buffer[2] = ':';
+    ZNumber zminute(buffer + 3, 2);
+    buffer[5] = ':';
+    ZNumber zsecond(buffer + 6, 2);
+
+    zhour = (seconds / 3600l) % 24l;
+    zminute = (seconds - (3600l * zhour())) / 60l;
+    zsecond = seconds - (3600l * zhour()) - (60l * zminute());
+    buffer[8] = '\0';
+    return buffer;
+}
+
+Time& Time::operator=(const Time& time)
+{
+    seconds = time.seconds;
+    return *this;
+}
+
+DateTime::DateTime(time_t tm)
+{
+    tm_t *dt = DateTime::local();
+    Date::set(dt->tm_year + 1900, dt->tm_mon + 1, dt->tm_mday);
+    Time::set(dt->tm_hour, dt->tm_min, dt->tm_sec);
+    DateTime::release(dt);
+}
+
+DateTime::DateTime(tm_t *dt) :
+Date(dt), Time(dt)
+{}
+
+DateTime::DateTime(const DateTime& copy)
+{
+    julian = copy.julian;
+    seconds = copy.seconds;
+}
+
+DateTime::DateTime(const char *a_str, size_t size)
+{
+    char *timestr;
+
+    if (!size)
+        size = strlen(a_str);
+
+    char *str = new char[size+1];
+    strncpy(str, a_str, size);
+    str[size]=0;
+
+// 00/00 00:00
+    if (size ==  11) {
+        timestr = str + 6;
+        Date::set(str, 5);
+        Time::set(timestr, 5);
+    }
+// 00/00/00 00:00
+    else if (size == 14) {
+        timestr = str + 9;
+        Date::set(str, 8);
+        Time::set(timestr,5);
+    }
+// 00/00/00 00:00:00
+    else if (size == 17) {
+        timestr = str + 9;
+        Date::set(str, 8);
+        Time::set(timestr,8);
+    }
+// 0000/00/00 00:00:00
+    else if (size == 19) {
+        timestr = str + 11;
+        Date::set(str, 10);
+        Time::set(timestr,8);
+    }
+    delete str;
+}
+
+
+DateTime::DateTime(int year, unsigned month, unsigned day,
+           int hour, int minute, int second) :
+    Date(year, month, day), Time(hour, minute, second)
+{}
+
+DateTime::DateTime() : Date(), Time()
+{
+    tm_t *dt = DateTime::local();
+    Time::set(dt->tm_hour, dt->tm_min, dt->tm_sec);
+    Date::set(dt->tm_year + 1900, dt->tm_mon + 1, dt->tm_mday);
+    DateTime::release(dt);
+}
+
+DateTime::~DateTime()
+{
+}
+
+void DateTime::set()
+{
+    Date::set();
+    Time::set();
+}
+
+bool DateTime::is_valid(void) const
+{
+    return Date::is_valid() && Time::is_valid();
+}
+
+const char *DateTime::put(char *buf) const
+{
+    Date::put(buf);
+    buf[10] = ' ';
+    Time::put(buf+11);
+    return buf;
+}
+
+time_t DateTime::get(void) const
+{
+    char buf[11];
+    tm_t dt;
+    memset(&dt, 0, sizeof(dt));
+
+    Date::put(buf);
+    ZNumber nyear(buf, 4);
+    ZNumber nmonth(buf + 5, 2);
+    ZNumber nday(buf + 8, 2);
+    dt.tm_year = nyear() - 1900;
+    dt.tm_mon = nmonth() - 1;
+    dt.tm_mday = nday();
+
+    Time::put(buf);
+    ZNumber nhour(buf, 2);
+    ZNumber nminute(buf + 2, 2);
+    ZNumber nsecond(buf + 4, 2);
+    dt.tm_hour = nhour();
+    dt.tm_min = nminute();
+    dt.tm_sec = nsecond();
+    dt.tm_isdst = -1;
+
+    return mktime(&dt);
+}
+
+DateTime& DateTime::operator=(const DateTime& datetime)
+{
+    julian = datetime.julian;
+    seconds = datetime.seconds;
+
+    return *this;
+}
+
+DateTime& DateTime::operator+=(long value)
+{
+    seconds += value;
+    update();
+    return *this;
+}
+
+DateTime& DateTime::operator-=(long value)
+{
+    seconds -= value;
+    update();
+    return *this;
+}
+
+void DateTime::update(void)
+{
+    julian += (seconds / c_day);
+    Time::update();
+}
+
+bool DateTime::operator==(const DateTime &d) const
+{
+    return (julian == d.julian) && (seconds == d.seconds);
+}
+
+bool DateTime::operator!=(const DateTime &d) const
+{
+    return (julian != d.julian) || (seconds != d.seconds);
+}
+
+bool DateTime::operator<(const DateTime &d) const
+{
+    if (julian != d.julian) {
+        return (julian < d.julian);
+    }
+    else {
+        return (seconds < d.seconds);
+    }
+}
+
+bool DateTime::operator<=(const DateTime &d) const
+{
+    if (julian != d.julian) {
+        return (julian < d.julian);
+    }
+    else {
+        return (seconds <= d.seconds);
+    }
+}
+
+bool DateTime::operator>(const DateTime &d) const
+{
+    if (julian != d.julian) {
+        return (julian > d.julian);
+    }
+    else {
+        return (seconds > d.seconds);
+    }
+}
+
+bool DateTime::operator>=(const DateTime &d) const
+{
+    if (julian != d.julian) {
+        return (julian > d.julian);
+    }
+    else {
+        return (seconds >= d.seconds);
+    }
+}
+
+bool DateTime::operator!() const
+{
+    return !(Date::is_valid() && Time::is_valid());
+}
+
+
+String DateTime::format(const char *text) const
+{
+    char buffer[64];
+    size_t last;
+    time_t t;
+    tm_t *tbp;
+    String retval;
+
+    t = get();
+    tbp = local(&t);
+    last = ::strftime(buffer, 64, text, tbp);
+    release(tbp);
+
+    buffer[last] = '\0';
+    retval = buffer;
+    return retval;
+}
+
+long DateTime::operator-(const DateTime &dt)
+{
+    long secs = (julian - dt.julian) * c_day;
+    secs += (seconds - dt.seconds);
+    return secs;
+}
+
+DateTime DateTime::operator+(long value)
+{
+    DateTime result = *this;
+    result += value;
+    return result;
+}
+
+DateTime DateTime::operator-(long value)
+{
+    DateTime result = *this;
+    result -= value;
+    return result;
+}
+
+DateTime& DateTime::operator++()
+{
+    ++julian;
+    update();
+    return *this;
+}
+
+
+DateTime& DateTime::operator--()
+{
+    --julian;
+    update();
+    return *this;
+}
+
+DateTime::operator double() const
+{
+    return (double)julian + ((double)seconds/86400.0);
+}
+
+DateNumber::DateNumber(char *str) :
+Number(str, 10), Date(str, 10)
+{}
+
+DateNumber::~DateNumber()
+{}
+
+void DateNumber::update(void)
+{
+    Date::put(buffer);
+}
+
+void DateNumber::set(void)
+{
+    Date::set();
+    update();
+}
+
+DateTimeString::DateTimeString(time_t t) :
+DateTime(t)
+{
+    mode = BOTH;
+    DateTimeString::update();
+}
+
+DateTimeString::~DateTimeString()
+{
+}
+
+DateTimeString::DateTimeString(tm_t *dt) :
+DateTime(dt)
+{
+    mode = BOTH;
+    DateTimeString::update();
+}
+
+
+DateTimeString::DateTimeString(const DateTimeString& copy) :
+DateTime(copy)
+{
+    mode = copy.mode;
+    DateTimeString::update();
+}
+
+DateTimeString::DateTimeString(const char *a_str, size_t size) :
+DateTime(a_str, size)
+{
+    mode = BOTH;
+    DateTimeString::update();
+}
+
+
+DateTimeString::DateTimeString(int year, unsigned month, unsigned day,
+           int hour, int minute, int second) :
+DateTime(year, month, day, hour, minute, second)
+{
+    mode = BOTH;
+    DateTimeString::update();
+}
+
+DateTimeString::DateTimeString(mode_t m) :
+DateTime()
+{
+    mode = m;
+    DateTimeString::update();
+}
+
+void DateTimeString::update(void)
+{
+    DateTime::update();
+    switch(mode) {
+    case BOTH:
+        DateTime::put(buffer);
+        break;
+    case DATE:
+        Date::put(buffer);
+        break;
+    case TIME:
+        Time::put(buffer);
+    }
+}
+
+void DateTimeString::set(mode_t newmode)
+{
+    mode = newmode;
+    update();
+}
+
+void DateTimeString::set(void)
+{
+    DateTime::set();
+    update();
+}
+
+isotime::isotime(Time& time)
+{
+    t = &time;
+    pos = 0;
+    mode = TIME;
+    time.put(buf);
+}
+
+isotime::isotime(Date& date)
+{
+    d = &date;
+    pos = 0;
+    mode = DATE;
+    date.put(buf);
+}
+
+isotime::isotime(Date& date, Time& time)
+{
+    d = &date;
+    t = &time;
+    pos = 0;
+    mode = DATETIME;
+    date.put(buf);
+    buf[10] = ' ';
+    time.put(buf + 11);
+}
+
+const char *isotime::_print(void) const
+{
+    return buf;
+}
+
+int isotime::_input(int code)
+{
+    if(isdigit(buf[pos]) && isdigit(code)) {
+        buf[pos++] = code;
+        if(buf[pos] == 0) {
+            code = EOF;
+            goto final;
+        }
+        return 0;
+    }
+
+    if(code == buf[pos]) {
+        ++pos;
+        return 0;
+    }
+
+final:
+    buf[pos] = 0;
+
+    switch(mode) {
+    case DATE:
+        d->set(buf);
+        break;
+    case TIME:
+        t->set(buf);
+        break;
+    case DATETIME:
+        buf[10] = 0;
+        d->set(buf);
+        t->set(buf + 11);
+        break;
+    };
+
+    return code;
+}
+
+extern "C" {
+    long tzoffset(struct timezone *tz)
+    {
+        struct timeval now;
+        time_t t1, t2 = 0;
+        struct tm t;
+        
+        gettimeofday(&now, tz);
+        t1 = now.tv_sec;
+
+#ifdef  HAVE_GMTIME_R
+        gmtime_r(&t1, &t);
+#else
+        t = *gmtime(&t1);
+#endif
+
+        t.tm_isdst = 0;
+        t2 = mktime(&t);
+        return (time_t)difftime(t1, t2);
+    } 
+}
+
diff --git a/jni/libucommon/sources/corelib/file.cpp b/jni/libucommon/sources/corelib/file.cpp
new file mode 100644
index 0000000..d8642ac
--- /dev/null
+++ b/jni/libucommon/sources/corelib/file.cpp
@@ -0,0 +1,348 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef _MSC_VER
+#include <sys/stat.h>
+#endif
+
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 600
+#endif
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/thread.h>
+#include <ucommon/fsys.h>
+#include <ucommon/file.h>
+#include <ucommon/string.h>
+#include <ucommon/memory.h>
+#include <ucommon/shell.h>
+
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <string.h>
+#include <ctype.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+file file::cin(stdin);
+file file::cout(stdout);
+file file::cerr(stderr);
+
+file::file(const char *file, const char *mode, size_t size) :
+CharacterProtocol()
+{
+    fp = NULL;
+    pid = INVALID_PID_VALUE;
+    tmp = NULL;
+    open(file, mode, size);
+}
+
+file::file(const char *file, char **argv, const char *mode, char **envp) :
+CharacterProtocol()
+{
+    fp = NULL;
+    pid = INVALID_PID_VALUE;
+    tmp = NULL;
+    open(file, argv, mode, envp);
+}
+
+file::file() :
+CharacterProtocol()
+{
+    fp = NULL;
+    tmp = NULL;
+    pid = INVALID_PID_VALUE;
+}
+
+file::file(FILE *file) :
+CharacterProtocol()
+{
+    fp = file;
+    tmp = NULL;
+    pid = INVALID_PID_VALUE;
+}
+
+file::~file()
+{
+    close();
+}
+
+bool file::is_tty(void) const
+{
+#ifdef  _MSWINDOWS_
+    if(_isatty(_fileno(fp)))
+        return true;
+#else
+    if(isatty(fileno(fp)))
+        return true;
+#endif
+    return false;
+}
+
+void file::open(const char *path, char **argv, const char *mode, char **envp)
+{
+    close();
+    fd_t fd;
+    fd_t stdio[3] = {INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE};
+
+#ifdef  _MSWINDOWS_
+    int _fmode = 0;
+#endif
+
+    if(strchr(mode, '+')) {
+#if defined(HAVE_SOCKETPAIR)
+        int pair[2];
+        if(socketpair(AF_LOCAL, SOCK_STREAM, 0, pair))
+            return;
+
+        fd = pair[0];
+        stdio[0] = stdio[1] = pair[1];
+        fsys::inherit(fd, false);
+        pid = shell::spawn(path, argv, envp, stdio);
+        if(pid == INVALID_PID_VALUE) {
+            fsys::release(pair[1]);
+            fsys::release(fd);
+            return;
+        }
+        fsys::release(pair[1]);
+#elif defined(_MSWINDOWS_)
+        static int count;
+        char buf[96];
+
+        snprintf(buf, sizeof(buf), "\\\\.\\pipe\\pair-%ld-%d",
+            GetCurrentProcessId(), count++);
+        fd = CreateNamedPipe(buf, PIPE_ACCESS_DUPLEX,
+            PIPE_TYPE_BYTE | PIPE_NOWAIT,
+            PIPE_UNLIMITED_INSTANCES, 1024, 1024, 0, NULL);
+        if(fd == INVALID_HANDLE_VALUE)
+            return;
+        fd_t child = CreateFile(buf, GENERIC_READ|GENERIC_WRITE, 0, NULL,
+            OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+        if(child == INVALID_HANDLE_VALUE) {
+            CloseHandle(fd);
+            ::remove(buf);
+            return;
+        }
+
+        fsys::inherit(child, true);
+        fsys::inherit(fd, false);
+
+        DWORD pmode = PIPE_NOWAIT;
+
+        SetNamedPipeHandleState(fd, &pmode, NULL, NULL);
+        stdio[0] = child;
+        stdio[1] = child;
+        pid = shell::spawn(path, argv, envp, stdio);
+        if(pid == INVALID_PID_VALUE) {
+            CloseHandle(child);
+            CloseHandle(fd);
+            ::remove(buf);
+            return;
+        }
+        CloseHandle(child);
+        tmp = strdup(buf);
+#endif
+    }
+    else if(strchr(mode, 'w')) {
+        if(fsys::pipe(fd, stdio[0]))
+            return;
+        fsys::inherit(fd, false);
+        pid = shell::spawn(path, argv, envp, stdio);
+        if(pid == INVALID_PID_VALUE) {
+            fsys::release(stdio[0]);
+            fsys::release(fd);
+            return;
+        }
+        fsys::release(stdio[0]);
+#ifdef  _MSWINDOWS_
+        _fmode = _O_WRONLY;
+#endif
+    }
+    else if(strchr(mode, 'r')) {
+        if(fsys::pipe(stdio[1], fd))
+            return;
+        fsys::inherit(fd, false);
+        pid = shell::spawn(path, argv, envp, stdio);
+        if(pid == INVALID_PID_VALUE) {
+            fsys::release(stdio[1]);
+            fsys::release(fd);
+            return;
+        }
+        fsys::release(stdio[1]);
+#ifdef  _MSWINDOWS_
+        _fmode = _O_RDONLY;
+#endif
+    }
+    else
+        return;
+
+    if(strchr(mode, 't'))
+        eol = "\r\n";
+    else
+        eol = "\n";
+
+#ifdef  _MSWINDOWS_
+    int fdd = _open_osfhandle((intptr_t)fd, _fmode);
+    fp = _fdopen(fdd, mode);
+#else
+    fp = fdopen(fd, mode);
+#endif
+    if(!fp)
+        fsys::release(fd);
+}
+
+void file::open(const char *path, const char *mode, size_t size)
+{
+    if(fp)
+        fclose(fp);
+
+    if(strchr(mode, 't'))
+        eol = "\r\n";
+    else
+        eol = "\n";
+
+    fp = fopen(path, mode);
+    if(!fp)
+        return;
+
+    switch(size)
+    {
+    case 2:
+        break;
+    case 0:
+        setvbuf(fp, NULL, _IONBF, 0);
+        break;
+    case 1:
+        setvbuf(fp, NULL, _IOLBF, 0);
+        break;
+    default:
+        setvbuf(fp, NULL, _IOFBF, size);
+    }
+}
+
+int file::cancel(void)
+{
+    int result = 0;
+    if(pid != INVALID_PID_VALUE)
+        result = shell::cancel(pid);
+    pid = INVALID_PID_VALUE;
+    close();
+    return result;
+}
+
+int file::close(void)
+{
+    int error = 0;
+    if(pid != INVALID_PID_VALUE)
+        error = shell::wait(pid);
+
+    if(tmp) {
+        ::remove(tmp);
+        free(tmp);
+        tmp = NULL;
+    }
+
+    if(fp)
+        fclose(fp);
+    fp = NULL;
+    pid = INVALID_PID_VALUE;
+    return error;
+}
+
+size_t file::scanf(const char *format, ...)
+{
+    if(!fp)
+        return 0;
+
+    va_list args;
+    va_start(args, format);
+    size_t result = vfscanf(fp, format, args);
+    va_end(args);
+    if(result == (size_t)EOF)
+        result = 0;
+    return result;
+}
+
+size_t file::printf(const char *format, ...)
+{
+    if(!fp)
+        return 0;
+
+    va_list args;
+    va_start(args, format);
+    size_t result = vfprintf(fp, format, args);
+    va_end(args);
+    if(result == (size_t)EOF)
+        result = 0;
+    return result;
+}
+
+bool file::eof(void) const
+{
+    if(!fp)
+        return false;
+
+    return feof(fp) != 0;
+}
+
+int file::err(void) const
+{
+    if(!fp)
+        return EBADF;
+
+    return ferror(fp);
+}
+
+int file::_getch(void)
+{
+    if(!fp)
+        return EOF;
+
+    return fgetc(fp);
+}
+
+int file::_putch(int code)
+{
+    if(!fp)
+        return EOF;
+
+    // pushing end of string through char protocol as nl/flush operation
+    if(code == 0) {
+        fputs(eol, fp);
+        flush();
+        return 0;
+    }
+
+    return fputc(code, fp);
+}
+
+bool file::good(void)
+{
+    if(!fp)
+        return false;
+
+    if(ferror(fp))
+        return false;
+
+    if(feof(fp))
+        return false;
+
+    return true;
+}
+
diff --git a/jni/libucommon/sources/corelib/fsys.cpp b/jni/libucommon/sources/corelib/fsys.cpp
new file mode 100644
index 0000000..57b708c
--- /dev/null
+++ b/jni/libucommon/sources/corelib/fsys.cpp
@@ -0,0 +1,1793 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef _MSC_VER
+#include <sys/stat.h>
+#endif
+
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 600
+#endif
+
+#include <ucommon-config.h>
+
+// broken BSD; XOPEN should not imply _POSIX_C_SOURCE,
+//  _POSIX_C_SOURCE should not stop __BSD_VISIBLE
+
+#define u_int unsigned int
+#define u_short unsigned short
+#define u_long unsigned long
+#define u_char unsigned char
+
+#include <ucommon/export.h>
+#include <ucommon/thread.h>
+#include <ucommon/fsys.h>
+#include <ucommon/string.h>
+#include <ucommon/memory.h>
+#include <ucommon/shell.h>
+
+#ifdef  HAVE_SYSLOG_H
+#include <syslog.h>
+#endif
+
+#ifdef HAVE_LINUX_VERSION_H
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8)
+#ifdef  HAVE_POSIX_FADVISE
+#undef  HAVE_POSIX_FADVISE
+#endif
+#endif
+#endif
+
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <string.h>
+#include <ctype.h>
+
+#ifdef  HAVE_POSIX_FADVISE
+#ifndef POSIX_FADV_RANDOM
+#undef  HAVE_POSIX_FADVISE
+#endif
+#endif
+
+#ifdef  HAVE_DIRENT_H
+#include <dirent.h>
+#endif
+
+#ifdef _MSWINDOWS_
+#include <direct.h>
+#include <winioctl.h>
+#include <io.h>
+#endif
+
+#ifdef  HAVE_SYS_INOTIFY_H
+#include <sys/inotify.h>
+#endif
+
+#ifdef  HAVE_SYS_EVENT_H
+#include <sys/event.h>
+#endif
+
+using namespace UCOMMON_NAMESPACE;
+
+const fsys::offset_t fsys::end = (offset_t)(-1);
+
+#ifdef  _MSWINDOWS_
+
+// removed from some sdk versions...
+struct LOCAL_REPARSE_DATA_BUFFER
+{
+    DWORD  ReparseTag;
+    WORD   ReparseDataLength;
+    WORD   Reserved;
+
+    // IO_REPARSE_TAG_MOUNT_POINT specifics follow
+    WORD   SubstituteNameOffset;
+    WORD   SubstituteNameLength;
+    WORD   PrintNameOffset;
+    WORD   PrintNameLength;
+    WCHAR  PathBuffer[1];
+};
+
+int fsys::remapError(void)
+{
+    DWORD err = GetLastError();
+
+    switch(err)
+    {
+    case ERROR_FILE_NOT_FOUND:
+    case ERROR_PATH_NOT_FOUND:
+    case ERROR_INVALID_NAME:
+    case ERROR_BAD_PATHNAME:
+        return ENOENT;
+    case ERROR_TOO_MANY_OPEN_FILES:
+        return EMFILE;
+    case ERROR_ACCESS_DENIED:
+    case ERROR_WRITE_PROTECT:
+    case ERROR_SHARING_VIOLATION:
+    case ERROR_LOCK_VIOLATION:
+        return EACCES;
+    case ERROR_INVALID_HANDLE:
+        return EBADF;
+    case ERROR_NOT_ENOUGH_MEMORY:
+    case ERROR_OUTOFMEMORY:
+        return ENOMEM;
+    case ERROR_INVALID_DRIVE:
+    case ERROR_BAD_UNIT:
+    case ERROR_BAD_DEVICE:
+        return ENODEV;
+    case ERROR_NOT_SAME_DEVICE:
+        return EXDEV;
+    case ERROR_NOT_SUPPORTED:
+    case ERROR_CALL_NOT_IMPLEMENTED:
+        return ENOSYS;
+    case ERROR_END_OF_MEDIA:
+    case ERROR_EOM_OVERFLOW:
+    case ERROR_HANDLE_DISK_FULL:
+    case ERROR_DISK_FULL:
+        return ENOSPC;
+    case ERROR_BAD_NETPATH:
+    case ERROR_BAD_NET_NAME:
+        return EACCES;
+    case ERROR_FILE_EXISTS:
+    case ERROR_ALREADY_EXISTS:
+        return EEXIST;
+    case ERROR_CANNOT_MAKE:
+    case ERROR_NOT_OWNER:
+        return EPERM;
+    case ERROR_NO_PROC_SLOTS:
+        return EAGAIN;
+    case ERROR_BROKEN_PIPE:
+    case ERROR_NO_DATA:
+        return EPIPE;
+    case ERROR_OPEN_FAILED:
+        return EIO;
+    case ERROR_NOACCESS:
+        return EFAULT;
+    case ERROR_IO_DEVICE:
+    case ERROR_CRC:
+    case ERROR_NO_SIGNAL_SENT:
+        return EIO;
+    case ERROR_CHILD_NOT_COMPLETE:
+    case ERROR_SIGNAL_PENDING:
+    case ERROR_BUSY:
+        return EBUSY;
+    case ERROR_DIR_NOT_EMPTY:
+        return ENOTEMPTY;
+    case ERROR_DIRECTORY:
+        return ENOTDIR;
+    default:
+        return EINVAL;
+    }
+}
+
+int dir::create(const char *path, unsigned perms)
+{
+    if(!CreateDirectory(path, NULL))
+        return remapError();
+
+    if(perms & 06)
+        perms |= 01;
+    if(perms & 060)
+        perms |= 010;
+    if(perms & 0600)
+        perms |= 0100;
+
+    return mode(path, perms);
+}
+
+fd_t fsys::null(void)
+{
+    SECURITY_ATTRIBUTES sattr;
+
+    sattr.nLength = sizeof(SECURITY_ATTRIBUTES);
+    sattr.bInheritHandle = TRUE;
+    sattr.lpSecurityDescriptor = NULL;
+
+    return CreateFile("nul", GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, &sattr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+}
+
+int fsys::pipe(fd_t& input, fd_t& output, size_t size)
+{
+    input = output = NULL;
+    SECURITY_ATTRIBUTES sattr;
+
+    sattr.nLength = sizeof(SECURITY_ATTRIBUTES);
+    sattr.bInheritHandle = TRUE;
+    sattr.lpSecurityDescriptor = NULL;
+
+    if(!CreatePipe(&input, &output, &sattr, size))
+        return remapError();
+
+    return 0;
+}
+
+int fsys::info(const char *path, struct stat *buf)
+{
+    if(_stat(path, (struct _stat *)(buf)))
+        return remapError();
+    return 0;
+}
+
+int fsys::trunc(offset_t offset)
+{
+    if(fsys::seek(offset) != 0)
+        return remapError();
+
+    if(SetEndOfFile(fd))
+        return 0;
+
+    return remapError();
+}
+
+int fsys::info(struct stat *buf)
+{
+    int fn = _open_osfhandle((intptr_t)(fd), O_RDONLY);
+
+    int rtn = _fstat(fn, (struct _stat *)(buf));
+    _close(fn);
+    if(rtn)
+        error = remapError();
+    return rtn;
+}
+
+int fsys::prefix(const char *path)
+{
+    if (_chdir(path))
+        return remapError();
+    return 0;
+}
+
+int fsys::prefix(char *path, size_t len)
+{
+    if (_getcwd(path, len))
+        return remapError();
+    return 0;
+}
+
+int fsys::mode(const char *path, unsigned value)
+{
+    if(_chmod(path, value))
+        return remapError();
+    return 0;
+}
+
+bool fsys::is_exists(const char *path)
+{
+    if(_access(path, F_OK))
+        return false;
+    return true;
+}
+
+bool fsys::is_readable(const char *path)
+{
+    if(_access(path, R_OK))
+        return false;
+    return true;
+}
+
+bool fsys::is_writable(const char *path)
+{
+    if(_access(path, W_OK))
+        return false;
+    return true;
+}
+
+bool fsys::is_executable(const char *path)
+{
+    path = strrchr(path, '.');
+
+    if(!path)
+        return false;
+
+    if(eq_case(path, ".exe"))
+        return true;
+
+    if(eq_case(path, ".bat"))
+        return true;
+
+    if(eq_case(path, ".com"))
+        return true;
+
+    if(eq_case(path, ".cmd"))
+        return true;
+
+    if(eq_case(path, ".ps1"))
+        return true;
+
+    return false;
+}
+
+bool fsys::is_tty(fd_t fd)
+{
+    if(fd == INVALID_HANDLE_VALUE)
+        return false;
+    DWORD type = GetFileType(fd);
+    if(type == FILE_TYPE_CHAR)
+        return true;
+    return false;
+}
+
+bool fsys::is_tty(void)
+{
+    error = 0;
+    if(fd == INVALID_HANDLE_VALUE)
+        return false;
+    DWORD type = GetFileType(fd);
+    if(!type)
+        error = remapError();
+    if(type == FILE_TYPE_CHAR)
+        return true;
+    return false;
+}
+
+void dir::close(void)
+{
+    error = 0;
+
+    if(ptr) {
+        if(::FindClose(fd)) {
+            delete ptr;
+            ptr = NULL;
+            fd = INVALID_HANDLE_VALUE;
+        }
+        else
+            error = remapError();
+    }
+    else
+        error = EBADF;
+}
+
+int fsys::close(void)
+{
+    error = 0;
+
+    if(fd == INVALID_HANDLE_VALUE)
+        return EBADF;
+
+    if(::CloseHandle(fd))
+        fd = INVALID_HANDLE_VALUE;
+    else
+        error = remapError();
+    return error;
+}
+
+ssize_t dir::read(char *buf, size_t len)
+{
+    ssize_t rtn = -1;
+    if(ptr) {
+        snprintf((char *)buf, len, ptr->cFileName);
+        rtn = strlen(ptr->cFileName);
+        if(!FindNextFile(fd, ptr))
+            close();
+        return rtn;
+    }
+    return -1;
+}
+
+ssize_t fsys::read(void *buf, size_t len)
+{
+    ssize_t rtn = -1;
+    DWORD count;
+
+    if(ReadFile(fd, (LPVOID) buf, (DWORD)len, &count, NULL))
+        rtn = count;
+    else
+        error = remapError();
+
+    return rtn;
+}
+
+ssize_t fsys::write(const void *buf, size_t len)
+{
+    ssize_t rtn = -1;
+    DWORD count;
+
+    if(WriteFile(fd, (LPVOID) buf, (DWORD)len, &count, NULL))
+        rtn = count;
+    else
+        error = remapError();
+
+    return rtn;
+}
+
+int fsys::sync(void)
+{
+    return 0;
+}
+
+fd_t fsys::input(const char *path)
+{
+    SECURITY_ATTRIBUTES sattr;
+
+    sattr.nLength = sizeof(SECURITY_ATTRIBUTES);
+    sattr.bInheritHandle = TRUE;
+    sattr.lpSecurityDescriptor = NULL;
+
+    return CreateFile(path, GENERIC_READ, FILE_SHARE_READ, &sattr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+}
+
+fd_t fsys::output(const char *path)
+{
+    SECURITY_ATTRIBUTES sattr;
+
+    sattr.nLength = sizeof(SECURITY_ATTRIBUTES);
+    sattr.bInheritHandle = TRUE;
+    sattr.lpSecurityDescriptor = NULL;
+
+    return CreateFile(path, GENERIC_WRITE, 0, &sattr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+}
+
+fd_t fsys::append(const char *path)
+{
+    SECURITY_ATTRIBUTES sattr;
+
+    sattr.nLength = sizeof(SECURITY_ATTRIBUTES);
+    sattr.bInheritHandle = TRUE;
+    sattr.lpSecurityDescriptor = NULL;
+
+    fd_t fd = CreateFile(path, GENERIC_WRITE, 0, &sattr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
+
+    if(fd != INVALID_HANDLE_VALUE)
+        SetFilePointer(fd, 0, NULL, FILE_END);
+
+    return fd;
+}
+
+void fsys::release(fd_t fd)
+{
+    CloseHandle(fd);
+}
+
+void dir::open(const char *path)
+{
+    close();
+    error = 0;
+
+    char tpath[256];
+    DWORD attr = GetFileAttributes(path);
+
+    if((attr == (DWORD)~0l) || !(attr & FILE_ATTRIBUTE_DIRECTORY)) {
+        error = ENOTDIR;
+        return;
+    }
+
+    snprintf(tpath, sizeof(tpath), "%s%s", path, "\\*");
+    ptr = new WIN32_FIND_DATA;
+    fd = FindFirstFile(tpath, ptr);
+    if(fd == INVALID_HANDLE_VALUE) {
+        delete ptr;
+        ptr = NULL;
+        error = remapError();
+    }
+    return;
+}
+
+void fsys::open(const char *path, access_t access)
+{
+    bool append = false;
+    DWORD amode = 0;
+    DWORD smode = 0;
+    DWORD attr = FILE_ATTRIBUTE_NORMAL;
+    char buf[128];
+
+    close();
+    error = 0;
+
+    if(access == DEVICE) {
+#ifdef  _MSWINDOWS_
+        if(isalpha(path[0]) && path[1] == ':') {
+            if(!QueryDosDevice(path, buf, sizeof(buf))) {
+                error = ENODEV;
+                return;
+            }
+            path = buf;
+        }
+#else
+        if(!strchr(path, '/')) {
+            if(path[0] == 'S' && isdigit(path[1]))
+                snprintf(buf, sizeof(buf) "/dev/tty%s", path);
+            else if(strncmp(path, "USB", 3))
+                snprintf(buf, sizeof(buf), "/dev/tty%s", path);
+            else
+                snprintf(buf, sizeof(buf), "/dev/%s", path);
+
+            char *cp = strchr(buf, ':');
+            if(cp)
+                *cp = 0;
+            path = buf;
+        }
+#endif
+        if(!is_device(buf)) {
+            error = ENODEV;
+            return;
+        }
+    }
+
+    switch(access)
+    {
+    case STREAM:
+#ifdef  FILE_FLAG_SEQUENTIAL_SCAN
+        attr |= FILE_FLAG_SEQUENTIAL_SCAN;
+#endif
+    case RDONLY:
+        amode = GENERIC_READ;
+        smode = FILE_SHARE_READ;
+        break;
+    case WRONLY:
+        amode = GENERIC_WRITE;
+        break;
+    case DEVICE:
+        smode = FILE_SHARE_READ;
+        attr |= FILE_FLAG_WRITE_THROUGH | FILE_FLAG_NO_BUFFERING;
+    case EXCLUSIVE:
+        amode = GENERIC_READ | GENERIC_WRITE;
+        break;
+    case RANDOM:
+        attr |= FILE_FLAG_RANDOM_ACCESS;
+    case REWRITE:
+        amode = GENERIC_READ | GENERIC_WRITE;
+        smode = FILE_SHARE_READ;
+        break;
+    case APPEND:
+        amode = GENERIC_WRITE;
+        append = true;
+        break;
+    case SHARED:
+        amode = GENERIC_READ | GENERIC_WRITE;
+        smode = FILE_SHARE_READ | FILE_SHARE_WRITE;
+        break;
+    }
+
+    fd = CreateFile(path, amode, smode, NULL, OPEN_EXISTING, attr, NULL);
+    if(fd != INVALID_HANDLE_VALUE && append)
+        seek(end);
+    else if(fd == INVALID_HANDLE_VALUE)
+        error = remapError();
+}
+
+void fsys::open(const char *path, unsigned fmode, access_t access)
+{
+    bool append = false;
+    DWORD amode = 0;
+    DWORD cmode = 0;
+    DWORD smode = 0;
+    DWORD attr = FILE_ATTRIBUTE_NORMAL;
+
+    fmode &= 0666;
+
+    close();
+    error = 0;
+
+    const char *cp = strrchr(path, '\\');
+    const char *cp2 = strrchr(path, '/');
+    if(cp2 > cp)
+        cp = cp2;
+
+    if(!cp)
+        cp = path;
+    else
+        ++cp;
+
+    if(*cp == '.')
+        attr = FILE_ATTRIBUTE_HIDDEN;
+
+    switch(access)
+    {
+    case DEVICE:
+        error = ENOSYS;
+        return;
+
+    case RDONLY:
+        amode = GENERIC_READ;
+        cmode = OPEN_ALWAYS;
+        smode = FILE_SHARE_READ;
+        break;
+    case STREAM:
+    case WRONLY:
+        amode = GENERIC_WRITE;
+        cmode = CREATE_ALWAYS;
+        break;
+    case EXCLUSIVE:
+        amode = GENERIC_READ | GENERIC_WRITE;
+        cmode = OPEN_ALWAYS;
+        break;
+    case RANDOM:
+        attr |= FILE_FLAG_RANDOM_ACCESS;
+    case REWRITE:
+        amode = GENERIC_READ | GENERIC_WRITE;
+        cmode = OPEN_ALWAYS;
+        smode = FILE_SHARE_READ;
+        break;
+    case APPEND:
+        amode = GENERIC_WRITE;
+        cmode = OPEN_ALWAYS;
+        append = true;
+        break;
+    case SHARED:
+        amode = GENERIC_READ | GENERIC_WRITE;
+        cmode = OPEN_ALWAYS;
+        smode = FILE_SHARE_READ | FILE_SHARE_WRITE;
+        break;
+    }
+    fd = CreateFile(path, amode, smode, NULL, cmode, attr, NULL);
+    if(fd != INVALID_HANDLE_VALUE && append)
+        seek(end);
+    else if(fd == INVALID_HANDLE_VALUE)
+        error = remapError();
+    if(fd != INVALID_HANDLE_VALUE)
+        mode(path, fmode);
+}
+
+fsys::fsys(const fsys& copy)
+{
+    error = 0;
+    fd = INVALID_HANDLE_VALUE;
+
+    if(copy.fd == INVALID_HANDLE_VALUE)
+        return;
+
+    HANDLE pHandle = GetCurrentProcess();
+    if(!DuplicateHandle(pHandle, copy.fd, pHandle, &fd, 0, FALSE, DUPLICATE_SAME_ACCESS)) {
+        fd = INVALID_HANDLE_VALUE;
+        error = remapError();
+    }
+}
+
+int fsys::inherit(fd_t& from, bool enable)
+{
+    HANDLE pHandle = GetCurrentProcess();
+
+    if(!enable) {
+        if(!SetHandleInformation(from, HANDLE_FLAG_INHERIT, 0))
+            return remapError();
+        return 0;
+    }
+
+    fd_t fd;
+    if(DuplicateHandle(pHandle, from, pHandle, &fd, 0, TRUE, DUPLICATE_SAME_ACCESS)) {
+        release(from);
+        from = fd;
+        return 0;
+    }
+
+    return remapError();
+}
+
+void fsys::operator=(fd_t from)
+{
+    HANDLE pHandle = GetCurrentProcess();
+
+    if(fd != INVALID_HANDLE_VALUE) {
+        if(!CloseHandle(fd)) {
+            error = remapError();
+            return;
+        }
+    }
+    if(DuplicateHandle(pHandle, from, pHandle, &fd, 0, FALSE, DUPLICATE_SAME_ACCESS))
+        error = 0;
+    else {
+        fd = INVALID_HANDLE_VALUE;
+        error = remapError();
+    }
+}
+
+void fsys::operator=(const fsys& from)
+{
+    HANDLE pHandle = GetCurrentProcess();
+
+    if(fd != INVALID_HANDLE_VALUE) {
+        if(!CloseHandle(fd)) {
+            error = remapError();
+            return;
+        }
+    }
+    if(DuplicateHandle(pHandle, from.fd, pHandle, &fd, 0, FALSE, DUPLICATE_SAME_ACCESS))
+        error = 0;
+    else {
+        fd = INVALID_HANDLE_VALUE;
+        error = remapError();
+    }
+}
+
+int fsys::drop(offset_t size)
+{
+    error = ENOSYS;
+    return ENOSYS;
+}
+
+int fsys::seek(offset_t pos)
+{
+    DWORD rpos = pos;
+    int mode = FILE_BEGIN;
+
+    if(rpos == (DWORD)end) {
+        rpos = 0;
+        mode = FILE_END;
+    }
+    if(SetFilePointer(fd, rpos, NULL, mode) == INVALID_SET_FILE_POINTER) {
+        error = remapError();
+        return error;
+    }
+    return 0;
+}
+
+#else
+
+ssize_t dir::read(char *buf, size_t len)
+{
+    if(ptr) {
+        dirent *entry = ::readdir((DIR *)ptr);
+
+        if(!entry)
+            return 0;
+
+        String::set((char *)buf, len, entry->d_name);
+        return strlen(entry->d_name);
+    }
+    return -1;
+}
+
+ssize_t fsys::read(void *buf, size_t len)
+{
+#ifdef  __PTH__
+    int rtn = ::pth_read(fd, buf, len);
+#else
+    int rtn = ::read(fd, buf, len);
+#endif
+
+    if(rtn < 0)
+        error = remapError();
+    return rtn;
+}
+
+int fsys::sync(void)
+{
+    int rtn = ::fsync(fd);
+    if(rtn < 0)
+        error = remapError();
+    else
+        return 0;
+    return error;
+}
+
+ssize_t fsys::write(const void *buf, size_t len)
+{
+#ifdef  __PTH__
+    int rtn = pth_write(fd, buf, len);
+#else
+    int rtn = ::write(fd, buf, len);
+#endif
+
+    if(rtn < 0)
+        error = remapError();
+    return rtn;
+}
+
+fd_t fsys::null(void)
+{
+    return ::open("/dev/null", O_RDWR);
+}
+
+int fsys::pipe(fd_t& input, fd_t& output, size_t size)
+{
+    input = output = -1;
+    int pfd[2];
+    if(::pipe(pfd))
+        return remapError();
+    input = pfd[0];
+    output = pfd[1];
+    return 0;
+}
+
+bool fsys::is_tty(fd_t fd)
+{
+    if(isatty(fd))
+        return true;
+    return false;
+}
+
+bool fsys::is_tty(void)
+{
+    if(isatty(fd))
+        return true;
+    return false;
+}
+
+void dir::close(void)
+{
+    error = 0;
+    if(ptr) {
+        if(::closedir((DIR *)ptr))
+            error = remapError();
+        ptr = NULL;
+    }
+    else
+        error = EBADF;
+}
+
+int fsys::close(void)
+{
+    error = 0;
+    if(fd != INVALID_HANDLE_VALUE) {
+        if(::close(fd) == 0)
+            fd = INVALID_HANDLE_VALUE;
+        else
+            error = remapError();
+    }
+    else
+        return EBADF;   // not opened, but state still error free
+    return error;
+}
+
+fd_t fsys::input(const char *path)
+{
+    return ::open(path, O_RDONLY);
+}
+
+fd_t fsys::output(const char *path)
+{
+    return ::open(path, O_WRONLY | O_CREAT | O_TRUNC, EVERYONE);
+}
+
+fd_t fsys::append(const char *path)
+{
+    return ::open(path, O_WRONLY | O_CREAT | O_APPEND, EVERYONE);
+}
+
+void fsys::release(fd_t fd)
+{
+    ::close(fd);
+}
+
+void fsys::open(const char *path, unsigned fmode, access_t access)
+{
+    unsigned flags = 0;
+
+    close();
+    error = 0;
+
+    switch(access)
+    {
+    case DEVICE:
+        error = ENOSYS;
+        return;
+
+    case RDONLY:
+        flags = O_RDONLY | O_CREAT;
+        break;
+    case STREAM:
+    case WRONLY:
+        flags = O_WRONLY | O_CREAT | O_TRUNC;
+        break;
+    case RANDOM:
+    case SHARED:
+    case REWRITE:
+    case EXCLUSIVE:
+        flags = O_RDWR | O_CREAT;
+        break;
+    case APPEND:
+        flags = O_RDWR | O_APPEND | O_CREAT;
+        break;
+    }
+    fd = ::open(path, flags, fmode);
+    if(fd == INVALID_HANDLE_VALUE)
+        error = remapError();
+#ifdef HAVE_POSIX_FADVISE
+    else {
+        if(access == RANDOM)
+            posix_fadvise(fd, (off_t)0, (off_t)0, POSIX_FADV_RANDOM);
+    }
+#endif
+}
+
+int dir::create(const char *path, unsigned perms)
+{
+    if(perms & 06)
+        perms |= 01;
+    if(perms & 060)
+        perms |= 010;
+    if(perms & 0600)
+        perms |= 0100;
+
+    if(::mkdir(path, perms))
+        return remapError();
+    return 0;
+}
+
+void dir::open(const char *path)
+{
+    close();
+    error = 0;
+
+    ptr = opendir(path);
+    if(!ptr)
+        error = remapError();
+}
+
+void fsys::open(const char *path, access_t access)
+{
+    unsigned flags = 0;
+
+    close();
+    error = 0;
+
+    switch(access)
+    {
+    case STREAM:
+#if defined(O_STREAMING)
+        flags = O_RDONLY | O_STREAMING;
+        break;
+#endif
+    case RDONLY:
+        flags = O_RDONLY;
+        break;
+    case WRONLY:
+        flags = O_WRONLY;
+        break;
+    case EXCLUSIVE:
+    case RANDOM:
+    case SHARED:
+    case REWRITE:
+    case DEVICE:
+        flags = O_RDWR | O_NONBLOCK;
+        break;
+    case APPEND:
+        flags = O_RDWR | O_APPEND;
+        break;
+    }
+    fd = ::open(path, flags);
+    if(fd == INVALID_HANDLE_VALUE) {
+        error = remapError();
+        return;
+    }
+#ifdef HAVE_POSIX_FADVISE
+    // Linux kernel bug prevents use of POSIX_FADV_NOREUSE in streaming...
+    if(access == STREAM)
+        posix_fadvise(fd, (off_t)0, (off_t)0, POSIX_FADV_SEQUENTIAL);
+    else if(access == RANDOM)
+        posix_fadvise(fd, (off_t)0, (off_t)0, POSIX_FADV_RANDOM);
+#endif
+    if(access == DEVICE) {
+        flags = fcntl(fd, F_GETFL);
+        flags &= ~O_NONBLOCK;
+        fcntl(fd, F_SETFL, flags);
+    }
+}
+
+int fsys::info(const char *path, struct stat *ino)
+{
+    if(::stat(path, ino))
+        return remapError();
+    return 0;
+}
+
+#ifdef  HAVE_FTRUNCATE
+int fsys::trunc(offset_t offset)
+{
+    if(fsys::seek(offset) != 0)
+        return remapError();
+
+    if(::ftruncate(fd, offset) == 0)
+        return 0;
+    return remapError();
+}
+#else
+int fsys::trunc(offset_t offset)
+{
+    if(fsys::seek(offset) != 0)
+        return remapError();
+
+    return ENOSYS;
+}
+#endif
+
+int fsys::info(struct stat *ino)
+{
+    if(::fstat(fd, ino)) {
+        error = remapError();
+        return error;
+    }
+    return 0;
+}
+
+int fsys::prefix(const char *path)
+{
+    if(::chdir(path))
+        return remapError();
+    return 0;
+}
+
+int fsys::prefix(char *path, size_t len)
+{
+    if(::getcwd(path, len))
+        return remapError();
+    return 0;
+}
+
+int fsys::mode(const char *path, unsigned value)
+{
+    if(::chmod(path, value))
+        return remapError();
+    return 0;
+}
+
+bool fsys::is_exists(const char *path)
+{
+    if(::access(path, F_OK))
+        return false;
+
+    return true;
+}
+
+bool fsys::is_readable(const char *path)
+{
+    if(::access(path, R_OK))
+        return false;
+
+    return true;
+}
+
+bool fsys::is_writable(const char *path)
+{
+    if(::access(path, W_OK))
+        return false;
+
+    return true;
+}
+
+bool fsys::is_executable(const char *path)
+{
+    if(is_dir(path))
+        return false;
+
+    if(::access(path, X_OK))
+        return false;
+
+    return true;
+}
+
+fsys::fsys(const fsys& copy)
+{
+    fd = INVALID_HANDLE_VALUE;
+    error = 0;
+
+    if(copy.fd != INVALID_HANDLE_VALUE) {
+        fd = ::dup(copy.fd);
+    }
+    else
+        fd = INVALID_HANDLE_VALUE;
+}
+
+int fsys::inherit(fd_t& fd, bool enable)
+{
+    unsigned long flags;
+    if(fd > -1) {
+        flags = fcntl(fd, F_GETFL);
+        if(enable)
+            flags &= ~FD_CLOEXEC;
+        else
+            flags |= FD_CLOEXEC;
+        if(fcntl(fd, F_SETFL, flags))
+            return remapError();
+    }
+    return 0;
+}
+
+void fsys::operator=(fd_t from)
+{
+    close();
+    if(fd == INVALID_HANDLE_VALUE && from != INVALID_HANDLE_VALUE) {
+        fd = ::dup(from);
+        if(fd == INVALID_HANDLE_VALUE)
+            error = remapError();
+    }
+}
+
+void fsys::operator=(const fsys& from)
+{
+    close();
+    if(fd == INVALID_HANDLE_VALUE && from.fd != INVALID_HANDLE_VALUE) {
+        fd = ::dup(from.fd);
+        if(fd == INVALID_HANDLE_VALUE)
+            error = remapError();
+    }
+}
+
+int fsys::drop(offset_t size)
+{
+#ifdef  HAVE_POSIX_FADVISE
+    if(posix_fadvise(fd, (off_t)0, size, POSIX_FADV_DONTNEED)) {
+        error = remapError();
+        return error;
+    }
+    return 0;
+#else
+    error = ENOSYS;
+    return ENOSYS;
+#endif
+}
+
+int fsys::seek(offset_t pos)
+{
+    unsigned long rpos = pos;
+    int mode = SEEK_SET;
+
+    if(rpos == (unsigned long)end) {
+        rpos = 0;
+        mode = SEEK_END;
+    }
+    if(lseek(fd, rpos, mode) == ~0l) {
+        error = remapError();
+        return error;
+    }
+    return 0;
+}
+
+#endif
+
+dso::dso()
+{
+    ptr = 0;
+    error = 0;
+}
+
+dso::dso(const char *path)
+{
+    ptr = 0;
+    error = 0;
+    map(path);
+}
+
+dso::~dso()
+{
+    release();
+}
+
+dir::dir() :
+fsys()
+{
+    ptr = NULL;
+}
+
+dir::~dir()
+{
+    close();
+}
+
+fsys::fsys()
+{
+    fd = INVALID_HANDLE_VALUE;
+    error = 0;
+}
+
+dir::dir(const char *path) :
+fsys()
+{
+    ptr = NULL;
+    open(path);
+}
+
+fsys::fsys(const char *path, access_t access)
+{
+    fd = INVALID_HANDLE_VALUE;
+    open(path, access);
+}
+
+fsys::fsys(const char *path, unsigned fmode, access_t access)
+{
+    fd = INVALID_HANDLE_VALUE;
+    open(path, fmode, access);
+}
+
+fsys::~fsys()
+{
+    close();
+}
+
+void fsys::operator*=(fd_t& from)
+{
+    if(fd != INVALID_HANDLE_VALUE)
+        close();
+    fd = from;
+    from = INVALID_HANDLE_VALUE;
+}
+
+int fsys::linkinfo(const char *path, char *buffer, size_t size)
+{
+#if defined(_MSWINDOWS_)
+    HANDLE h;
+    char reparse[MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
+    DWORD rsize;
+
+    if(!fsys::is_link(path))
+        return EINVAL;
+
+    h = CreateFile(path, GENERIC_READ, 0, 0, OPEN_EXISTING,
+        FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0);
+
+    if(!h || h == INVALID_HANDLE_VALUE)
+        return EINVAL;
+
+    memset(reparse, 0, sizeof(reparse));
+    LOCAL_REPARSE_DATA_BUFFER *rb = (LOCAL_REPARSE_DATA_BUFFER*)&reparse;
+
+    if(!DeviceIoControl(h, FSCTL_GET_REPARSE_POINT, NULL, 0, (LPVOID *)rb, MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &rsize, 0)) {
+        CloseHandle(h);
+        return remapError();
+    }
+
+#ifdef  UNICODE
+    String::set(buffer, size, rb.PathBuffer);
+#else
+    WideCharToMultiByte(CP_THREAD_ACP, 0, rb->PathBuffer, rb->SubstituteNameLength / sizeof(WCHAR) + 1, buffer, size, "", FALSE);
+#endif
+    CloseHandle(h);
+    return 0;
+#elif defined(HAVE_READLINK)
+    if(::readlink(path, buffer, size))
+        return remapError();
+    return 0;
+#else
+    return EINVAL;
+#endif
+}
+
+int fsys::hardlink(const char *path, const char *target)
+{
+#ifdef _MSWINDOWS_
+    if(!CreateHardLink(target, path, NULL))
+        return remapError();
+    return 0;
+#else
+    if(::link(path, target))
+        return remapError();
+    return 0;
+#endif
+}
+
+int fsys::link(const char *path, const char *target)
+{
+#if defined(_MSWINDOWS_)
+    TCHAR dest[512];
+    HANDLE h;
+    char reparse[MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
+    char *part;
+    DWORD size;
+    WORD len;
+
+    lstrcpy(dest, "\\??\\");
+    if(!GetFullPathName(path, sizeof(dest) - (4 * sizeof(TCHAR)), &dest[4], &part) || GetFileAttributes(&dest[4]) == INVALID_FILE_ATTRIBUTES)
+        return remapError();
+
+    memset(reparse, 0, sizeof(reparse));
+    LOCAL_REPARSE_DATA_BUFFER *rb = (LOCAL_REPARSE_DATA_BUFFER*)&reparse;
+
+    if(!MultiByteToWideChar(CP_THREAD_ACP, MB_PRECOMPOSED, dest, lstrlenA(dest) + 1, rb->PathBuffer, lstrlenA(dest) + 1))
+        return remapError();
+
+    len = lstrlenW(rb->PathBuffer) * 2;
+    rb->ReparseTag = IO_REPARSE_TAG_MOUNT_POINT;
+    rb->ReparseDataLength = len + 12;
+    rb->SubstituteNameLength = len;
+    rb->PrintNameOffset = len + 2;
+    h = CreateFile(target, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING,
+        FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0);
+    if(!h || h == INVALID_HANDLE_VALUE)
+        return hardlink(path, target);
+    if(!DeviceIoControl(h, FSCTL_SET_REPARSE_POINT, (LPVOID)rb, rb->ReparseDataLength + FIELD_OFFSET(LOCAL_REPARSE_DATA_BUFFER, SubstituteNameOffset), NULL, 0, &size, 0)) {
+        CloseHandle(h);
+        return hardlink(path, target);
+    }
+    CloseHandle(h);
+    return 0;
+#elif defined(HAVE_SYMLINK)
+    if(::symlink(path, target))
+        return remapError();
+    return 0;
+#else
+    if(::link(path, target))
+        return remapError();
+    return 0;
+#endif
+}
+
+int fsys::unlink(const char *path)
+{
+#ifdef  _MSWINDOWS_
+    HANDLE h = INVALID_HANDLE_VALUE;
+    if(is_link(path))
+        h = CreateFile(path, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING,
+            FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0);
+    if(!h || h != INVALID_HANDLE_VALUE) {
+        REPARSE_GUID_DATA_BUFFER rb;
+        memset(&rb, 0, sizeof(rb));
+        DWORD size;
+        rb.ReparseTag = IO_REPARSE_TAG_MOUNT_POINT;
+        if(!DeviceIoControl(h, FSCTL_DELETE_REPARSE_POINT, &rb,
+            REPARSE_GUID_DATA_BUFFER_HEADER_SIZE, NULL, 0, &size, 0)) {
+            CloseHandle(h);
+            return remapError();
+        }
+        CloseHandle(h);
+        ::remove(path);
+        return 0;
+    }
+#endif
+    if(::remove(path))
+        return remapError();
+    return 0;
+}
+
+int fsys::erase(const char *path)
+{
+    if(is_device(path))
+        return ENOSYS;
+
+    if(::remove(path))
+        return remapError();
+    return 0;
+}
+
+int dir::remove(const char *path)
+{
+    if(is_device(path))
+        return ENOSYS;
+
+#ifdef  _MSWINDOWS_
+    if(RemoveDirectory(path))
+        return 0;
+    int error = remapError();
+    if(error == ENOTEMPTY)
+        return ENOTEMPTY;
+#else
+    if(!::rmdir(path))
+        return 0;
+    if(errno != ENOTDIR)
+        return errno;
+#endif
+
+    if(::remove(path))
+        return remapError();
+    return 0;
+}
+
+int fsys::copy(const char *oldpath, const char *newpath, size_t size)
+{
+    int result = 0;
+    char *buffer = new char[size];
+    fsys src, dest;
+    ssize_t count = size;
+
+    if(!buffer) {
+        result = ENOMEM;
+        goto end;
+    }
+
+    remove(newpath);
+
+    src.open(oldpath, fsys::STREAM);
+    if(!is(src))
+        goto end;
+
+    dest.open(newpath, GROUP_PUBLIC, fsys::STREAM);
+    if(!is(dest))
+        goto end;
+
+    while(count > 0) {
+        count = src.read(buffer, size);
+        if(count < 0) {
+            result = src.err();
+            goto end;
+        }
+        if(count > 0)
+            count = dest.write(buffer, size);
+        if(count < 0) {
+            result = dest.err();
+            goto end;
+        }
+    }
+
+end:
+    if(is(src))
+        src.close();
+
+    if(is(dest))
+        dest.close();
+
+    if(buffer)
+        delete[] buffer;
+
+    if(result != 0)
+        remove(newpath);
+
+    return result;
+}
+
+int fsys::rename(const char *oldpath, const char *newpath)
+{
+    if(::rename(oldpath, newpath))
+        return remapError();
+    return 0;
+}
+
+int fsys::load(const char *path)
+{
+    dso module;
+
+    module.map(path);
+#ifdef  _MSWINDOWS_
+    if(module.ptr) {
+        module.ptr = 0;
+        return 0;
+    }
+    return remapError();
+#else
+    if(module.ptr) {
+        module.ptr = 0;
+        return 0;
+    }
+    return module.error;
+#endif
+}
+
+bool fsys::is_file(const char *path)
+{
+#ifdef _MSWINDOWS_
+    DWORD attr = GetFileAttributes(path);
+    if(attr == (DWORD)~0l)
+        return false;
+
+    if(attr & FILE_ATTRIBUTE_DIRECTORY)
+        return false;
+
+    return true;
+
+#else
+    struct stat ino;
+
+    if(::stat(path, &ino))
+        return false;
+
+    if(S_ISREG(ino.st_mode))
+        return true;
+
+    return false;
+#endif
+}
+
+bool fsys::is_link(const char *path)
+{
+#if defined(_MSWINDOWS_)
+    DWORD attr = GetFileAttributes(path);
+    if (attr == 0xffffffff || !(attr & FILE_ATTRIBUTE_REPARSE_POINT))
+        return false;
+    return true;
+#elif defined(HAVE_LSTAT)
+    struct stat ino;
+
+    if(::lstat(path, &ino))
+        return false;
+
+    if(S_ISLNK(ino.st_mode))
+        return true;
+
+    return false;
+#else
+    return false;
+#endif
+}
+
+bool fsys::is_dir(const char *path)
+{
+#ifdef _MSWINDOWS_
+    DWORD attr = GetFileAttributes(path);
+    if(attr == (DWORD)~0l)
+        return false;
+
+    if(attr & FILE_ATTRIBUTE_DIRECTORY)
+        return true;
+
+    return false;
+
+#else
+    struct stat ino;
+
+    if(::stat(path, &ino))
+        return false;
+
+    if(S_ISDIR(ino.st_mode))
+        return true;
+
+    return false;
+#endif
+}
+
+#ifdef  _MSWINDOWS_
+
+void dso::map(const char *path)
+{
+    error = 0;
+    ptr = LoadLibrary(path);
+    if(!ptr)
+        error = ENOEXEC;
+}
+
+void dso::release(void)
+{
+    if(ptr)
+        FreeLibrary(ptr);
+    ptr = 0;
+}
+
+dso::addr_t dso::find(const char *sym) const
+{
+    if(ptr == 0)
+        return (dso::addr_t)NULL;
+
+    return (addr_t)GetProcAddress(ptr, sym);
+}
+
+#elif defined(HAVE_DLFCN_H)
+#include <dlfcn.h>
+
+#ifndef RTLD_GLOBAL
+#define RTLD_GLOBAL 0
+#endif
+
+void dso::map(const char *path)
+{
+    error = 0;
+    ptr = dlopen(path, RTLD_NOW | RTLD_GLOBAL);
+    if(ptr == NULL)
+        error = ENOEXEC;
+}
+
+void dso::release(void)
+{
+    if(ptr)
+        dlclose(ptr);
+    ptr = NULL;
+}
+
+dso::addr_t dso::find(const char *sym) const
+{
+    if(!ptr)
+        return (dso::addr_t)NULL;
+
+    return (dso::addr_t)dlsym(ptr, (char *)sym);
+}
+
+#elif HAVE_MACH_O_DYLD_H
+#include <mach-o/dyld.h>
+
+void dso::map(const char *path)
+{
+    NSObjectFileImage oImage;
+    NSSymbol sym = NULL;
+    NSModule mod;
+    void (*init)(void);
+
+    ptr = NULL;
+    error = 0;
+
+    if(NSCreateObjectFileImageFromFile(path, &oImage) != NSObjectFileImageSuccess) {
+        error = ENOEXEC;
+        return;
+    }
+
+    mod = NSLinkModule(oImage, path, NSLINKMODULE_OPTION_BINDNOW | NSLINKMODULE_OPTION_RETURN_ON_ERROR);
+    NSDestroyObjectFileImage(oImage);
+    if(mod == NULL) {
+        error = ENOEXEC;
+        return;
+    }
+
+    sym = NSLookupSymbolInModule(mod, "__init");
+    if(sym) {
+        init = (void (*)(void))NSAddressOfSymbol(sym);
+        init();
+    }
+    ptr = (void *)mod;
+}
+
+void dso::release(void)
+{
+    if(!ptr)
+        return;
+
+    NSModule mod = (NSModule)ptr;
+    NSSymbol sym;
+    void (*fini)(void);
+    ptr = NULL;
+
+    sym = NSLookupSymbolInModule(mod, "__fini");
+    if(sym != NULL) {
+        fini = (void (*)(void))NSAddressOfSymbol(sym);
+        fini();
+    }
+    NSUnlinkModule(mod, NSUNLINKMODULE_OPTION_NONE);
+}
+
+dso::addr_t dso::find(const char *sym) const
+{
+    if(!ptr)
+        return NULL;
+
+    NSModule mod = (NSModule)ptr;
+    NSSymbol sym;
+
+    sym = NSLookupSymbolInModule(mod, sym);
+    if(sym != NULL) {
+        return (dso::addr_t)NSAddressOfSymbol(sym);
+
+    return (dso::addr_t)NULL;
+}
+
+#elif HAVE_SHL_LOAD
+#include <dl.h>
+
+void dso::map(const char *path)
+{
+    error = 0;
+    ptr = (void *)shl_load(path, BIND_IMMEDIATE, 0l);
+    if(!ptr)
+        error = ENOEXEC;
+}
+
+dso::addr_t dso::find(const char *sym) const
+{
+    if(!ptr)
+        return (dso::addr_t)NULL;
+
+    shl_t image = (shl_t)ptr;
+
+    if(shl_findsym(&image, sym, 0, &value) == 0)
+        return (dso::addr_t)value;
+
+    return (dso::addr_t)NULL;
+}
+
+void dso::release(void)
+{
+    shl_t image = (shl_t)ptr;
+    if(ptr)
+        shl_unload(image);
+    ptr = NULL;
+}
+
+#else
+
+void fsys::map(const char *path)
+{
+    error = ENOEXEC;
+    ptr = NULL;
+}
+
+void dso::release(void)
+{
+}
+
+dso::addr_t dso::find(const char *sym) const
+{
+    return (dso::addr_t)NULL;
+}
+
+#endif
+
+bool fsys::is_device(const char *path)
+{
+    if(!path)
+        return false;
+
+#ifndef _MSWINDOWS_
+    if(is_dir(path))
+        return false;
+
+    if(!strncmp(path, "/dev/", 5))
+        return true;
+
+    return false;
+#else
+    if(path[1] == ':' && !path[2] && isalpha(*path))
+        return true;
+
+    if(!strncmp(path, "com", 3) || !strncmp(path, "lpt", 3)) {
+        path += 3;
+        while(isdigit(*path))
+            ++path;
+        if(!path || *path == ':')
+            return true;
+        return false;
+    }
+
+    if(!strcmp(path, "aux") || !strcmp(path, "prn")) {
+        if(!path[3] || path[3] == ':')
+            return true;
+        return false;
+    }
+
+    if(!strncmp(path, "\\\\.\\", 4))
+        return true;
+
+    if(!strnicmp(path, "\\\\?\\Device\\", 12))
+        return true;
+
+    return false;
+
+#endif
+}
+
+bool fsys::is_hidden(const char *path)
+{
+#ifdef  _MSWINDOWS_
+    DWORD attr = GetFileAttributes(path);
+    if(attr == (DWORD)~0l)
+        return false;
+
+    return ((attr & FILE_ATTRIBUTE_HIDDEN) != 0);
+#else
+    const char *cp = strrchr(path, '/');
+    if(cp)
+        ++cp;
+    else
+        cp = path;
+
+    if(*cp == '.')
+        return true;
+
+    return false;
+#endif
+}
+
+fsys::fsys(fd_t handle)
+{
+    fd = handle;
+    error = 0;
+}
+
+void fsys::set(fd_t handle)
+{
+    close();
+    fd = handle;
+    error = 0;
+}
+
+fd_t fsys::release(void)
+{
+    fd_t save = fd;
+
+    fd = INVALID_HANDLE_VALUE;
+    error = 0;
+    return save;
+}
+
+int fsys::exec(const char *path, char **argv, char **envp)
+{
+    shell::pid_t pid = shell::spawn(path, argv, envp);
+    return shell::wait(pid);
+}
+
+string_t fsys::prefix(void)
+{
+    char buf[256];
+
+    prefix(buf, sizeof(buf));
+    string_t s = buf;
+    return s;
+}
diff --git a/jni/libucommon/sources/corelib/keydata.cpp b/jni/libucommon/sources/corelib/keydata.cpp
new file mode 100644
index 0000000..d65b022
--- /dev/null
+++ b/jni/libucommon/sources/corelib/keydata.cpp
@@ -0,0 +1,437 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/linked.h>
+#include <ucommon/memory.h>
+#include <ucommon/keydata.h>
+#include <ucommon/string.h>
+#include <ctype.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+keydata::keyvalue::keyvalue(keyfile *allocator, keydata *section, const char *kv, const char *dv) :
+OrderedObject(&section->index)
+{
+    assert(allocator != NULL);
+    assert(section != NULL);
+    assert(kv != NULL);
+
+    id = allocator->dup(kv);
+
+    if(dv)
+        value = allocator->dup(dv);
+    else
+        value = "";
+}
+
+keydata::keydata(keyfile *file, const char *id) :
+OrderedObject(&file->index), index()
+{
+    assert(file != NULL);
+    assert(id != NULL);
+
+    name = file->dup(id);
+    root = file;
+}
+
+keydata::keydata(keyfile *file) :
+OrderedObject(), index()
+{
+    root = file;
+    name = "-";
+}
+
+const char *keydata::get(const char *key) const
+{
+    assert(key != NULL);
+
+    iterator keys = begin();
+
+    while(is(keys)) {
+        if(eq_case(key, keys->id))
+            return keys->value;
+        keys.next();
+    }
+    return NULL;
+}
+
+void keydata::clear(const char *key)
+{
+    assert(key != NULL);
+
+    iterator keys = begin();
+
+    while(is(keys)) {
+        if(eq_case(key, keys->id)) {
+            keys->delist(&index);
+            return;
+        }
+        keys.next();
+    }
+}
+
+void keydata::set(const char *key, const char *value)
+{
+    assert(key != NULL);
+
+    caddr_t mem = (caddr_t)root->alloc(sizeof(keydata::keyvalue));
+    keydata::iterator keys = begin();
+
+    while(is(keys)) {
+        if(eq_case(key, keys->id)) {
+            keys->delist(&index);
+            break;
+        }
+        keys.next();
+    }
+    new(mem) keydata::keyvalue(root, this, key, value);
+}
+
+
+keyfile::keyfile(size_t pagesize) :
+memalloc(pagesize), index()
+{
+    errcode = 0;
+    defaults = NULL;
+}
+
+keyfile::keyfile(const char *path, size_t pagesize) :
+memalloc(pagesize), index()
+{
+    errcode = 0;
+    defaults = NULL;
+    load(path);
+}
+
+keyfile::keyfile(const keyfile& copy, size_t pagesize) :
+memalloc(pagesize), index()
+{
+    errcode = 0;
+    defaults = NULL;
+    load(&copy);
+}
+
+void keyfile::release(void)
+{
+    defaults = NULL;
+    index.reset();
+    memalloc::purge();
+}
+
+keydata *keyfile::get(const char *key) const
+{
+    assert(key != NULL);
+
+    iterator keys = begin();
+
+    while(is(keys)) {
+        if(eq_case(key, keys->name))
+            return *keys;
+        keys.next();
+    }
+    return NULL;
+}
+
+keydata *keyfile::create(const char *id)
+{
+    assert(id != NULL);
+
+    caddr_t mem = (caddr_t)alloc(sizeof(keydata));
+    keydata *old = get(id);
+
+    if(old)
+        old->delist(&index);
+
+    return new(mem) keydata(this, id);
+}
+
+#ifdef _MSWINDOWS_
+
+bool keyfile::save(HKEY keys, keydata *section, const char *path)
+{
+    HKEY subkey;
+
+    if(path) {
+        if(RegCreateKeyEx(keys, path, 0L, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &subkey, NULL) == ERROR_SUCCESS) {
+            save(subkey, section);
+            RegCloseKey(subkey);
+        }
+        else
+            errcode = EBADF;
+        return false;
+    }
+
+    if(!section) {
+        if(defaults)
+            save(keys, defaults);
+        linked_pointer<keydata> kp = begin();
+        while(is(kp)) {
+            if(RegCreateKeyEx(keys, kp->get(), 0L, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &subkey, NULL) == ERROR_SUCCESS) {
+                save(subkey, *kp);
+                RegCloseKey(subkey);
+            }
+            kp.next();
+        }
+    } else {
+        linked_pointer<keydata::keyvalue> kv = section->begin();
+        while(is(kv)) {
+            const char *value = kv->value;
+            RegSetValueEx(keys, kv->id, 0L, REG_SZ, (const BYTE *)value, strlen(value) + 1);
+        }
+    }
+    return true;
+}
+
+void keyfile::load(HKEY keys, keydata *section, const char *path)
+{
+    DWORD index = 0;
+    TCHAR keyvalue[256];
+    TCHAR keyname[4096];
+    DWORD ksize = sizeof(keyname);
+    DWORD vsize, vtype;
+    FILETIME fTime;
+    HKEY subkey;
+
+    if(path) {
+        if(RegOpenKeyEx(keys, path, 0, KEY_READ, &subkey) == ERROR_SUCCESS) {
+            load(subkey, section);
+            RegCloseKey(subkey);
+        }
+        else
+            errcode = EBADF;
+        return;
+    }
+
+    while(!section && RegEnumKeyEx(keys, index++, keyname, &ksize, NULL, NULL, NULL, &fTime) == ERROR_SUCCESS) {
+        if(RegOpenKeyEx(keys, keyname, 0, KEY_READ, &subkey) == ERROR_SUCCESS) {
+            section = create(keyname);
+            load(subkey, section);
+            RegCloseKey(subkey);
+        }
+        ksize = sizeof(keyname);
+    }
+    index = 0;
+    vsize = sizeof(keyvalue);
+    if(vsize > size() - 64)
+        vsize = size() - 64;
+    while((RegEnumValue(keys, index++, keyname, &ksize, NULL, &vtype, (BYTE *)keyvalue, &vsize) == ERROR_SUCCESS) && (vtype == REG_SZ) && (keyname[0] != 0)) {
+        if(section)
+            section->set(keyname, keyvalue);
+        else
+            defaults->set(keyname, keyvalue);
+        ksize = sizeof(keyname);
+        vsize = sizeof(keyvalue);
+        if(vsize > size() - 64)
+            vsize = size() - 64;
+    }
+}
+
+#endif
+
+void keyfile::load(const keydata *copy)
+{
+    keydata *section = get(copy->get());
+    if(!section)
+        section = create(copy->get());
+
+    linked_pointer<keydata::keyvalue> vp = copy->begin();
+    while(is(vp)) {
+        section->set(vp->id, vp->value);
+        vp.next();
+    }
+}
+
+void keyfile::load(const keyfile *copy)
+{
+    linked_pointer<keydata::keyvalue> vp = (keydata::keyvalue*)NULL;
+
+    if(copy->defaults)
+        vp = copy->defaults->begin();
+
+    if(copy->defaults && !defaults) {
+        caddr_t mem = (caddr_t)alloc(sizeof(keydata));
+        defaults = new(mem) keydata(this);
+    }
+
+    while(is(vp)) {
+        defaults->set(vp->id, vp->value);
+        vp.next();
+    }
+
+    keydata *section;
+    linked_pointer<keydata> kp = copy->begin();
+    while(is(kp)) {
+        vp = kp->begin();
+        section = get(kp->get());
+        if(!section)
+            section = create(kp->get());
+        while(section && is(vp)) {
+            section->set(vp->id, vp->value);
+            vp.next();
+        }
+        kp.next();
+    }
+}
+
+bool keyfile::save(const char *path)
+{
+    assert(path != NULL);
+
+    if(!path[0])
+        return false;
+
+#ifdef  _MSWINDOWS_
+    if(eq(path, "~\\", 2))
+        return save(HKEY_CURRENT_USER, NULL, path);
+    else if(eq(path, "-\\", 2))
+        return save(HKEY_LOCAL_MACHINE, NULL, path);
+#endif
+
+    FILE *fp = fopen(path, "w");
+    if(!fp) {
+        errcode = EBADF;
+        return false;
+    }
+
+    linked_pointer<keydata::keyvalue> vp = (keydata::keyvalue*)NULL;
+
+    if(defaults)
+        vp = defaults->begin();
+
+    while(is(vp)) {
+        if(strchr(vp->value, '\"'))
+            fprintf(fp, "%s=%s\n", vp->id, vp->value);
+        else
+            fprintf(fp, "%s=\"%s\"\n", vp->id, vp->value);
+        vp.next();
+    }
+    fprintf(fp, "\n");
+
+    linked_pointer<keydata> kp = begin();
+    while(is(kp)) {
+        fprintf(fp, "[%s]\n", kp->get());
+        vp = kp->begin();
+        while(is(vp)) {
+            if(strchr(vp->value, '\"'))
+                fprintf(fp, "%s=%s\n", vp->id, vp->value);
+            else
+                fprintf(fp, "%s=\"%s\"\n", vp->id, vp->value);
+            vp.next();
+        }
+        fprintf(fp, "\n");
+        kp.next();
+    }
+
+    fclose(fp);
+    return true;
+}
+
+void keyfile::load(const char *path)
+{
+    assert(path != NULL);
+
+    if(!path[0])
+        return;
+
+#ifdef  _MSWINDOWS_
+    if(eq(path, "~\\", 2)) {
+        load(HKEY_CURRENT_USER, NULL, path);
+        return;
+    }
+    else if(eq(path, "-\\", 2)) {
+        load(HKEY_LOCAL_MACHINE, NULL, path);
+        return;
+    }
+#endif
+
+    char linebuf[1024];
+    char *lp = linebuf;
+    char *ep;
+    unsigned size = sizeof(linebuf);
+    FILE *fp = fopen(path, "r");
+    keydata *section = NULL;
+    const char *key;
+    char *value;
+
+    errcode = 0;
+
+    if(!fp) {
+        errcode = EBADF;
+        return;
+    }
+
+    if(!defaults) {
+        caddr_t mem = (caddr_t)alloc(sizeof(keydata));
+        defaults = new(mem) keydata(this);
+    }
+
+    for(;;) {
+        *lp = 0;
+        if(NULL == fgets(lp, size, fp)) {
+            errcode = ferror(fp);
+            lp[0] = 0;
+        }
+        else
+            String::chop(lp, "\r\n\t ");
+        ep = lp + strlen(lp);
+        if(ep != lp) {
+            --ep;
+            if(*ep == '\\') {
+                lp = ep;
+                size = (linebuf + sizeof(linebuf) - ep);
+                continue;
+            }
+        }
+        if(!linebuf[0] && feof(fp))
+            break;
+
+        lp = linebuf;
+        while(isspace(*lp))
+            ++lp;
+
+        if(!*lp)
+            goto next;
+
+        if(*lp == '[') {
+            ep = strchr(lp, ']');
+            if(!ep)
+                goto next;
+            *ep = 0;
+            section = create(String::strip(++lp, " \t"));
+            goto next;
+        }
+        else if(!isalnum(*lp) || !strchr(lp, '='))
+            goto next;
+
+        ep = strchr(lp, '=');
+        *ep = 0;
+        key = String::strip(lp, " \t");
+        value = String::strip(++ep, " \t\r\n");
+        value = String::unquote(value, "\"\"\'\'{}()");
+        if(section)
+            section->set(key, value);
+        else
+            defaults->set(key, value);
+next:
+        lp = linebuf;
+        size = sizeof(linebuf);
+    }
+    fclose(fp);
+}
+
diff --git a/jni/libucommon/sources/corelib/linked.cpp b/jni/libucommon/sources/corelib/linked.cpp
new file mode 100644
index 0000000..c7b2b87
--- /dev/null
+++ b/jni/libucommon/sources/corelib/linked.cpp
@@ -0,0 +1,1196 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/linked.h>
+#include <ucommon/string.h>
+#include <ucommon/thread.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+// I am not sure if we ever use these...seemed like a good idea at the time
+const LinkedObject *LinkedObject::nil = (LinkedObject *)NULL;
+const LinkedObject *LinkedObject::inv = (LinkedObject *)-1;
+
+MultiMap::MultiMap(unsigned count) : ReusableObject()
+{
+    assert(count > 0);
+
+    paths = count;
+    links = new link_t[count];
+    // just a cheap way to initially set the links to all NULL...
+    memset(links, 0, sizeof(link_t) * count);
+}
+
+MultiMap::~MultiMap()
+{
+    unsigned path = 0;
+
+    while(path < paths)
+        delist(path++);
+
+    delete[] links;
+}
+
+MultiMap *MultiMap::next(unsigned path) const
+{
+    assert(path < paths);
+
+    return links[path].next;
+}
+
+void MultiMap::delist(unsigned path)
+{
+    assert(path < paths);
+
+    if(!links[path].root)
+        return;
+
+    while(links[path].root) {
+        if(*links[path].root == this) {
+            *links[path].root = next(path);
+            break;
+        }
+        links[path].root = &((*links[path].root)->links[path].next);
+    }
+    links[path].root = NULL;
+    links[path].next = NULL;
+}
+
+void MultiMap::enlist(unsigned path, MultiMap **root)
+{
+    assert(path < paths);
+    assert(root != NULL);
+
+    delist(path);
+    links[path].next = *root;
+    links[path].root = root;
+    links[path].key = NULL;
+    links[path].keysize = 0;
+    *root = this;
+}
+
+void MultiMap::enlist(unsigned path, MultiMap **root, caddr_t key, unsigned max, size_t keysize)
+{
+    assert(path < paths);
+    assert(root != NULL);
+    assert(key != NULL);
+    assert(max > 0);
+
+    unsigned value = 0;
+
+    delist(path);
+    while(keysize && !key[0]) {
+        ++key;
+        --keysize;
+    }
+
+    while(keysize--)
+        value = (value << 1) ^ (*key++);
+
+    enlist(path, &root[keyindex(key, max, keysize)]);
+
+    if(!keysize)
+        keysize = strlen(key);
+
+    links[path].keysize = keysize;
+    links[path].key = key;
+}
+
+bool MultiMap::equal(unsigned path, caddr_t key, size_t keysize) const
+{
+    assert(path < paths);
+    assert(key != NULL);
+
+    if(!keysize)
+        keysize = strlen(key);
+
+    if(links[path].keysize != keysize)
+        return false;
+
+    if(memcmp(key, links[path].key, links[path].keysize) == 0)
+        return true;
+
+    return false;
+}
+
+// this transforms either strings or binary fields (such as addresses)
+// into a hash index.
+unsigned MultiMap::keyindex(caddr_t key, unsigned max, size_t keysize)
+{
+    assert(key != NULL);
+    assert(max > 0);
+
+    unsigned value = 0;
+
+    // if we are a string, we can just used our generic text hasher
+    if(!keysize)
+        return NamedObject::keyindex(key, max);
+
+    // strip off lead 0's...just saves time for data that is not changing,
+    // especially when little endian 64 bit wide...
+    while(keysize && !key[0]) {
+        ++key;
+        --keysize;
+    }
+
+    while(keysize--)
+        value = (value << 1) ^ (*key++);
+
+    return value % max;
+}
+
+MultiMap *MultiMap::find(unsigned path, MultiMap **root, caddr_t key, unsigned max, size_t keysize)
+{
+    assert(key != NULL);
+    assert(max > 0);
+
+    MultiMap *node = root[keyindex(key, max, keysize)];
+
+    while(node) {
+        if(node->equal(path, key, keysize))
+            break;
+        node = node->next(path);
+    }
+
+    return node;
+}
+
+LinkedObject::LinkedObject(LinkedObject **root)
+{
+    assert(root != NULL);
+    enlist(root);
+}
+
+LinkedObject::~LinkedObject()
+{
+}
+
+void LinkedObject::purge(LinkedObject *root)
+{
+    LinkedObject *after;
+
+    assert(root != NULL);
+
+    while(root) {
+        after = root->Next;
+        root->release();
+        root = after;
+    }
+}
+
+bool LinkedObject::is_member(LinkedObject *list) const
+{
+    assert(list != NULL);
+
+    while(list) {
+        if(list == this)
+            return true;
+        list = list->Next;
+    }
+    return false;
+}
+
+void LinkedObject::enlist(LinkedObject **root)
+{
+    assert(root != NULL);
+
+    Next = *root;
+    *root = this;
+}
+
+void LinkedObject::delist(LinkedObject **root)
+{
+    assert(root != NULL);
+
+    LinkedObject *prior = NULL, *node = *root;
+
+    while(node && node != this) {
+        prior = node;
+        node = node->Next;
+    }
+
+    if(!node)
+        return;
+
+    if(!prior)
+        *root = Next;
+    else
+        prior->Next = Next;
+}
+
+void ReusableObject::release(void)
+{
+    Next = (LinkedObject *)nil;
+}
+
+NamedObject::NamedObject() :
+OrderedObject()
+{
+    Id = NULL;
+}
+
+NamedObject::NamedObject(OrderedIndex *root, char *nid) :
+OrderedObject()
+{
+    assert(root != NULL);
+    assert(nid != NULL && *nid != 0);
+
+    NamedObject *node = static_cast<NamedObject*>(root->head), *prior = NULL;
+
+    while(node) {
+        if(node->equal(nid)) {
+            if(prior)
+                prior->Next = node->getNext();
+            else
+                root->head = node->getNext();
+            node->release();
+            break;
+        }
+        prior = node;
+        node = node->getNext();
+    }
+    Next = NULL;
+    Id = nid;
+    if(!root->head)
+        root->head = this;
+    if(!root->tail)
+        root->tail = this;
+    else
+        root->tail->Next = this;
+}
+
+// One thing to watch out for is that the id is freed in the destructor.
+// This means that you should use a dup'd string for your nid.  Otherwise
+// you will need to set it to NULL before destroying the object.
+
+NamedObject::NamedObject(NamedObject **root, char *nid, unsigned max) :
+OrderedObject()
+{
+    assert(root != NULL);
+    assert(nid != NULL && *nid != 0);
+    assert(max > 0);
+
+    Id = NULL;
+    add(root, nid, max);
+}
+
+void NamedObject::add(NamedObject **root, char *nid, unsigned max)
+{
+    assert(root != NULL);
+    assert(nid != NULL && *nid != 0);
+    assert(max > 0);
+
+    clearId();
+
+    NamedObject *node, *prior = NULL;
+
+    if(max < 2)
+        max = 0;
+    else
+        max = keyindex(nid, max);
+
+    node = root[max];
+    while(node) {
+        if(node && node->equal(nid)) {
+            if(prior) {
+                prior->Next = this;
+                Next = node->Next;
+            }
+            else
+                root[max] = node->getNext();
+            node->release();
+            break;
+        }
+        prior = node;
+        node = node->getNext();
+    }
+
+    if(!node) {
+        Next = root[max];
+        root[max] = this;
+    }
+    Id = nid;
+}
+
+void NamedObject::clearId(void)
+{
+    if(Id) {
+        free(Id);
+        Id = NULL;
+    }
+}
+
+NamedObject::~NamedObject()
+{
+    // this assumes the id is a malloc'd or strdup'd string.
+    // maybe overridden if virtual...
+
+    clearId();
+}
+
+// Linked objects are assumed to be freeable if they are released.  The retain
+// simply marks it into a self reference state which can never otherwise happen
+// naturally.  This is used to mark avoid freeing during release.
+
+void LinkedObject::retain(void)
+{
+    Next = this;
+}
+
+
+void LinkedObject::release(void)
+{
+    if(Next != this) {
+        Next = this;
+        delete this;
+    }
+}
+
+LinkedObject *LinkedObject::getIndexed(LinkedObject *root, unsigned index)
+{
+    while(index-- && root != NULL)
+        root = root->Next;
+
+    return root;
+}
+
+unsigned LinkedObject::count(const LinkedObject *root)
+{
+    assert(root != NULL);
+
+    unsigned c = 0;
+    while(root) {
+        ++c;
+        root = root->Next;
+    }
+    return c;
+}
+
+unsigned NamedObject::keyindex(const char *id, unsigned max)
+{
+    assert(id != NULL && *id != 0);
+    assert(max > 1);
+
+    unsigned val = 0;
+
+    while(*id)
+        val = (val << 1) ^ (*(id++) & 0x1f);
+
+    return val % max;
+}
+
+int NamedObject::compare(const char *cid) const
+{
+    assert(cid != NULL && *cid != 0);
+
+#ifdef  HAVE_STRCOLL
+    return strcoll(Id, cid);
+#else
+    return strcmp(Id, cid);
+#endif
+}
+
+extern "C" {
+
+    static int ncompare(const void *o1, const void *o2)
+    {
+        assert(o1 != NULL);
+        assert(o2 != NULL);
+        const NamedObject * const *n1 = static_cast<const NamedObject * const*>(o1);
+        const NamedObject * const*n2 = static_cast<const NamedObject * const*>(o2);
+        return ((*n1)->compare((*n2)->getId()));
+    }
+}
+
+NamedObject **NamedObject::sort(NamedObject **list, size_t size)
+{
+    assert(list != NULL);
+
+    if(!size) {
+        while(list[size])
+            ++size;
+    }
+
+    qsort(static_cast<void *>(list), size, sizeof(NamedObject *), &ncompare);
+    return list;
+}
+
+NamedObject **NamedObject::index(NamedObject **idx, unsigned max)
+{
+    assert(idx != NULL);
+    assert(max > 0);
+    NamedObject **op = new NamedObject *[count(idx, max) + 1];
+    unsigned pos = 0;
+    NamedObject *node = skip(idx, NULL, max);
+
+    while(node) {
+        op[pos++] = node;
+        node = skip(idx, node, max);
+    }
+    op[pos] = NULL;
+    return op;
+}
+
+NamedObject *NamedObject::skip(NamedObject **idx, NamedObject *rec, unsigned max)
+{
+    assert(idx != NULL);
+    assert(max > 0);
+
+    unsigned key = 0;
+    if(rec && !rec->Next)
+        key = keyindex(rec->Id, max) + 1;
+
+    if(!rec || !rec->Next) {
+        while(key < max && !idx[key])
+            ++key;
+        if(key >= max)
+            return NULL;
+        return idx[key];
+    }
+
+    return rec->getNext();
+}
+
+void NamedObject::purge(NamedObject **idx, unsigned max)
+{
+    assert(idx != NULL);
+    assert(max > 0);
+
+    LinkedObject *root;
+
+    if(max < 2)
+        max = 0;
+
+    while(max--) {
+        root = idx[max];
+        LinkedObject::purge(root);
+    }
+}
+
+unsigned NamedObject::count(NamedObject **idx, unsigned max)
+{
+    assert(idx != NULL);
+    assert(max > 0);
+
+    unsigned count = 0;
+    LinkedObject *node;
+
+    if(max < 2)
+        max = 1;
+
+    while(max--) {
+        node = idx[max];
+        while(node) {
+            ++count;
+            node = node->Next;
+        }
+    }
+    return count;
+}
+
+NamedObject *NamedObject::remove(NamedObject **idx, const char *id, unsigned max)
+{
+    assert(idx != NULL);
+    assert(id != NULL && *id != 0);
+    assert(max > 0);
+
+    if(max < 2)
+        return remove(idx, id);
+
+    return remove(&idx[keyindex(id, max)], id);
+}
+
+NamedObject *NamedObject::map(NamedObject **idx, const char *id, unsigned max)
+{
+    assert(idx != NULL);
+    assert(id != NULL && *id != 0);
+    assert(max > 0);
+
+    if(max < 2)
+        return find(*idx, id);
+
+    return find(idx[keyindex(id, max)], id);
+}
+
+NamedObject *NamedObject::find(NamedObject *root, const char *id)
+{
+    assert(id != NULL && *id != 0);
+
+    while(root) {
+        if(root->equal(id))
+            break;
+        root = root->getNext();
+    }
+    return root;
+}
+
+NamedObject *NamedObject::remove(NamedObject **root, const char *id)
+{
+    assert(id != NULL && *id != 0);
+    assert(root != NULL);
+
+    NamedObject *prior = NULL;
+    NamedObject *node = *root;
+
+    while(node) {
+        if(node->equal(id))
+            break;
+        prior = node;
+        node = node->getNext();
+    }
+
+    if(!node)
+        return NULL;
+
+    if(prior == NULL)
+        *root = node->getNext();
+    else
+        prior->Next = node->getNext();
+
+    return node;
+}
+
+// Like in NamedObject, the nid that is used will be deleted by the
+// destructor through calling purge.  Hence it should be passed from
+// a malloc'd or strdup'd string.
+
+NamedTree::NamedTree(char *nid) :
+NamedObject(), Child()
+{
+    Id = nid;
+    Parent = NULL;
+}
+
+NamedTree::NamedTree(const NamedTree& source)
+{
+    Id = source.Id;
+    Parent = NULL;
+    Child = source.Child;
+}
+
+NamedTree::NamedTree(NamedTree *p, char *nid) :
+NamedObject(), Child()
+{
+    assert(p != NULL);
+    assert(nid != NULL && *nid != 0);
+
+    enlistTail(&p->Child);
+    Id = nid;
+    Parent = p;
+}
+
+NamedTree::~NamedTree()
+{
+    Id = NULL;
+    purge();
+}
+
+NamedTree *NamedTree::getChild(const char *tid) const
+{
+    assert(tid != NULL && *tid != 0);
+
+    linked_pointer<NamedTree> node = Child.begin();
+
+    while(node) {
+        if(eq(node->Id, tid))
+            return *node;
+        node.next();
+    }
+    return NULL;
+}
+
+void NamedTree::relistTail(NamedTree *trunk)
+{
+    // if moving to same place, just return...
+    if(Parent == trunk)
+        return;
+
+    if(Parent)
+        delist(&Parent->Child);
+    Parent = trunk;
+    if(Parent)
+        enlistTail(&Parent->Child);
+}
+
+void NamedTree::relistHead(NamedTree *trunk)
+{
+    if(Parent == trunk)
+        return;
+
+    if(Parent)
+        delist(&Parent->Child);
+    Parent = trunk;
+    if(Parent)
+        enlistHead(&Parent->Child);
+}
+
+NamedTree *NamedTree::path(const char *tid) const
+{
+    assert(tid != NULL && *tid != 0);
+
+    const char *np;
+    char buf[65];
+    char *ep;
+    NamedTree *node = const_cast<NamedTree*>(this);
+
+    if(!tid || !*tid)
+        return const_cast<NamedTree*>(this);
+
+    while(*tid == '.') {
+        if(!node->Parent)
+            return NULL;
+        node = node->Parent;
+
+        ++tid;
+    }
+
+    while(tid && *tid && node) {
+        String::set(buf, sizeof(buf), tid);
+        ep = strchr(buf, '.');
+        if(ep)
+            *ep = 0;
+        np = strchr(tid, '.');
+        if(np)
+            tid = ++np;
+        else
+            tid = NULL;
+        node = node->getChild(buf);
+    }
+    return node;
+}
+
+NamedTree *NamedTree::getLeaf(const char *tid) const
+{
+    assert(tid != NULL && *tid != 0);
+
+    linked_pointer<NamedTree> node = Child.begin();
+
+    while(node) {
+        if(node->is_leaf() && eq(node->Id, tid))
+            return *node;
+        node.next();
+    }
+    return NULL;
+}
+
+NamedTree *NamedTree::leaf(const char *tid) const
+{
+    assert(tid != NULL && *tid != 0);
+
+    linked_pointer<NamedTree> node = Child.begin();
+    NamedTree *obj;
+
+    while(node) {
+        if(node->is_leaf() && eq(node->Id, tid))
+            return *node;
+        obj = NULL;
+        if(!node->is_leaf())
+            obj = node->leaf(tid);
+        if(obj)
+            return obj;
+        node.next();
+    }
+    return NULL;
+}
+
+NamedTree *NamedTree::find(const char *tid) const
+{
+    assert(tid != NULL && *tid != 0);
+
+    linked_pointer<NamedTree> node = Child.begin();
+    NamedTree *obj;
+
+    while(node) {
+        if(!node->is_leaf()) {
+            if(eq(node->Id, tid))
+                return *node;
+            obj = node->find(tid);
+            if(obj)
+                return obj;
+        }
+        node.next();
+    }
+    return NULL;
+}
+
+void NamedTree::setId(char *nid)
+{
+    assert(nid != NULL && *nid != 0);
+
+    Id = nid;
+}
+
+// If you remove the tree node, the id is NULL'd also.  This keeps the
+// destructor from freeing it.
+
+void NamedTree::remove(void)
+{
+    if(Parent)
+        delist(&Parent->Child);
+
+    Id = NULL;
+}
+
+void NamedTree::purge(void)
+{
+    linked_pointer<NamedTree> node = Child.begin();
+    NamedTree *obj;
+
+    if(Parent)
+        delist(&Parent->Child);
+
+    while(node) {
+        obj = *node;
+        obj->Parent = NULL; // save processing
+        node = obj->getNext();
+        delete obj;
+    }
+
+    // this assumes the object id is a malloc'd/strdup string.
+    // may be overridden if virtual...
+    clearId();
+}
+
+LinkedObject::LinkedObject()
+{
+    Next = 0;
+}
+
+OrderedObject::OrderedObject() : LinkedObject()
+{
+}
+
+OrderedObject::OrderedObject(OrderedIndex *root) :
+LinkedObject()
+{
+    assert(root != NULL);
+    Next = NULL;
+    enlistTail(root);
+}
+
+void OrderedObject::delist(OrderedIndex *root)
+{
+    assert(root != NULL);
+
+    OrderedObject *prior = NULL, *node;
+
+    node = root->head;
+
+    while(node && node != this) {
+        prior = node;
+        node = node->getNext();
+    }
+
+    if(!node)
+        return;
+
+    if(!prior)
+        root->head = getNext();
+    else
+        prior->Next = Next;
+
+    if(this == root->tail)
+        root->tail = prior;
+}
+
+void OrderedObject::enlist(OrderedIndex *root)
+{
+    assert(root != NULL);
+
+    Next = NULL;
+    enlistTail(root);
+}
+
+void OrderedObject::enlistTail(OrderedIndex *root)
+{
+    assert(root != NULL);
+
+    if(root->head == NULL)
+        root->head = this;
+    else if(root->tail)
+        root->tail->Next = this;
+
+    root->tail = this;
+}
+
+void OrderedObject::enlistHead(OrderedIndex *root)
+{
+    assert(root != NULL);
+
+    Next = NULL;
+    if(root->tail == NULL)
+        root->tail = this;
+    else if(root->head)
+        Next = root->head;
+
+    root->head = this;
+}
+
+LinkedList::LinkedList()
+{
+    Root = 0;
+    Prev = 0;
+    Next = 0;
+}
+
+LinkedList::LinkedList(OrderedIndex *r)
+{
+    Root = NULL;
+    Next = Prev = 0;
+    if(r)
+        enlist(r);
+}
+
+void LinkedList::enlist(OrderedIndex *r)
+{
+    assert(r != NULL);
+
+    enlistTail(r);
+}
+
+void LinkedList::insert(LinkedList *o)
+{
+    assert(o != NULL);
+
+    insertTail(o);
+}
+
+void LinkedList::insertHead(LinkedList *o)
+{
+    assert(o != NULL);
+
+    if(o->Root)
+        o->delist();
+
+    if(Prev) {
+        o->Next = this;
+        o->Prev = Prev;
+    }
+    else {
+        Root->head = o;
+        o->Prev = NULL;
+    }
+    o->Root = Root;
+    o->Next = this;
+    Prev = o;
+}
+
+void LinkedList::insertTail(LinkedList *o)
+{
+    assert(o != NULL);
+
+    if(o->Root)
+        o->delist();
+
+    if(Next) {
+        o->Prev = this;
+        o->Next = Next;
+    }
+    else {
+        Root->tail = o;
+        o->Next = NULL;
+    }
+    o->Root = Root;
+    o->Prev = this;
+    Next = o;
+}
+
+void LinkedList::enlistHead(OrderedIndex *r)
+{
+    assert(r != NULL);
+
+    if(Root)
+        delist();
+
+    Root = r;
+    Prev = 0;
+    Next = 0;
+
+    if(!Root->tail) {
+        Root->tail = Root->head = static_cast<OrderedObject *>(this);
+        return;
+    }
+
+    Next = static_cast<LinkedList *>(Root->head);
+    ((LinkedList*)Next)->Prev = this;
+    Root->head = static_cast<OrderedObject *>(this);
+}
+
+
+void LinkedList::enlistTail(OrderedIndex *r)
+{
+    assert(r != NULL);
+
+    if(Root)
+        delist();
+
+    Root = r;
+    Prev = 0;
+    Next = 0;
+
+    if(!Root->head) {
+        Root->head = Root->tail = static_cast<OrderedObject *>(this);
+        return;
+    }
+
+    Prev = static_cast<LinkedList *>(Root->tail);
+    Prev->Next = this;
+    Root->tail = static_cast<OrderedObject *>(this);
+}
+
+void LinkedList::delist(void)
+{
+    if(!Root)
+        return;
+
+    if(Prev)
+        Prev->Next = Next;
+    else if(Root->head == static_cast<OrderedObject *>(this))
+        Root->head = static_cast<OrderedObject *>(Next);
+
+    if(Next)
+        (static_cast<LinkedList *>(Next))->Prev = Prev;
+    else if(Root->tail == static_cast<OrderedObject *>(this))
+        Root->tail = static_cast<OrderedObject *>(Prev);
+
+    Root = 0;
+    Next = Prev = 0;
+}
+
+LinkedList::~LinkedList()
+{
+    delist();
+}
+
+OrderedIndex::OrderedIndex()
+{
+    head = tail = NULL;
+}
+
+OrderedIndex::~OrderedIndex()
+{
+    head = tail = NULL;
+}
+
+void OrderedIndex::copy(const OrderedIndex& source)
+{
+    head = source.head;
+    tail = source.tail;
+}
+
+void OrderedIndex::operator*=(OrderedObject *object)
+{
+    assert(object != NULL);
+
+    object->enlist(this);
+}
+
+void OrderedIndex::add(OrderedObject *object)
+{
+    assert(object != NULL);
+
+    object->enlist(this);
+}
+
+LinkedObject *OrderedIndex::get(void)
+{
+    LinkedObject *node;
+
+    if(!head)
+        return NULL;
+
+    node = head;
+    head = static_cast<OrderedObject *>(node->getNext());
+    if(!head)
+        tail = NULL;
+
+    return static_cast<LinkedObject *>(node);
+}
+
+void OrderedIndex::purge(void)
+{
+    if(head) {
+        LinkedObject::purge((LinkedObject *)head);
+        head = tail = NULL;
+    }
+}
+
+void OrderedIndex::reset(void)
+{
+    head = tail = NULL;
+}
+
+void OrderedIndex::lock_index(void)
+{
+}
+
+void OrderedIndex::unlock_index(void)
+{
+}
+
+DLinkedObject::DLinkedObject() : OrderedObject()
+{
+    Prev = NULL;
+}
+
+void DLinkedObject::delist(void)
+{
+    if(Prev)
+        Prev->Next = Next;
+
+    if(Next)
+        ((DLinkedObject *)Next)->Prev = Prev;
+
+    Next = Prev = NULL;
+}
+
+ObjectQueue::ObjectQueue() :
+OrderedIndex() {}
+
+void ObjectQueue::add(DLinkedObject *object)
+{
+    assert(object);
+
+    if(tail) {
+        ((DLinkedObject *)tail)->Next = object;
+        object->Prev = (DLinkedObject *)tail;
+    }
+
+    object->Next = NULL;
+    tail = object;
+    if(!head)
+        head = tail;
+}
+
+void ObjectQueue::push(DLinkedObject *object)
+{
+    assert(object);
+
+    if(head) {
+        ((DLinkedObject *)head)->Prev = object;
+        object->Next = (DLinkedObject *)head;
+    }
+    object->Prev = NULL;
+    head = object;
+    if(!tail)
+        tail = head;
+}
+
+DLinkedObject *ObjectQueue::pull(void)
+{
+    DLinkedObject *obj = (DLinkedObject *)head;
+
+    if(!obj)
+        return NULL;
+
+    head = (OrderedObject *)(obj->Next);
+    if(!head)
+        tail = NULL;
+    obj->delist();
+    return obj;
+}
+
+DLinkedObject *ObjectQueue::pop(void)
+{
+    DLinkedObject *obj = (DLinkedObject *)tail;
+
+    if(!obj)
+        return NULL;
+
+    tail = (OrderedObject *)(obj->Prev);
+    if(!tail)
+        head = NULL;
+    obj->delist();
+    return obj;
+}
+
+LinkedObject **OrderedIndex::index(void) const
+{
+    LinkedObject **op = new LinkedObject *[count() + 1];
+    LinkedObject *node;
+    unsigned idx = 0;
+
+    node = head;
+    while(node) {
+        op[idx++] = node;
+        node = node->Next;
+    }
+    op[idx] = NULL;
+    return op;
+}
+
+LinkedObject *OrderedIndex::find(unsigned index) const
+{
+    unsigned count = 0;
+    LinkedObject *node;
+
+    node = head;
+
+    while(node && ++count < index)
+        node = node->Next;
+
+    return node;
+}
+
+unsigned OrderedIndex::count(void) const
+{
+    unsigned count = 0;
+    LinkedObject *node;
+
+    node = head;
+
+    while(node) {
+        node = node->Next;
+        ++count;
+    }
+    return count;
+}
+
+ObjectStack::ObjectStack()
+{
+    root = NULL;
+}
+
+ObjectStack::ObjectStack(LinkedObject *list)
+{
+    root = list;
+}
+
+void ObjectStack::push(LinkedObject *list)
+{
+    assert(list != NULL);
+
+    list->Next = root;
+    root = list;
+}
+
+LinkedObject *ObjectStack::pull(void)
+{
+    LinkedObject *obj;
+
+    obj = root;
+
+    if(obj) {
+        root = obj->Next;
+        obj->Next = NULL;
+    }
+
+    return obj;
+}
+
diff --git a/jni/libucommon/sources/corelib/mapped.cpp b/jni/libucommon/sources/corelib/mapped.cpp
new file mode 100644
index 0000000..f72e952
--- /dev/null
+++ b/jni/libucommon/sources/corelib/mapped.cpp
@@ -0,0 +1,587 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/linked.h>
+#include <ucommon/string.h>
+#include <ucommon/timers.h>
+#include <ucommon/mapped.h>
+#include <ucommon/fsys.h>
+
+#ifdef  HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#include <ctype.h>
+#include <stdarg.h>
+#include <errno.h>
+#ifdef  HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef HAVE_SYS_MMAN_H
+#undef  __EXTENSIONS__
+#define __EXTENSIONS__
+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200112L
+#include <sys/mman.h>
+#undef  _POSIX_C_SOURCE
+#else
+#include <sys/mman.h>
+#endif
+#include <sys/types.h>
+#endif
+
+#ifdef HAVE_FTOK
+#include <sys/ipc.h>
+#ifdef defined(HAVE_SYS_SHM_H) && !defined(ANDROID)
+#include <sys/shm.h>
+#endif
+#endif
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <limits.h>
+
+#if _POSIX_PRIORITY_SCHEDULING > 0
+#include <sched.h>
+#endif
+
+#if defined(__APPLE__) && defined(__MACH__)
+#define INSERT_OFFSET   16
+#endif
+
+#ifndef INSERT_OFFSET
+#define INSERT_OFFSET   0
+#endif
+
+#if defined(__FreeBSD__)
+#undef  HAVE_SHM_OPEN
+#endif
+
+#if defined(HAVE_FTOK) && !defined(HAVE_SHM_OPEN)
+
+static void ftok_name(const char *name, char *buf, size_t max)
+{
+    assert(name != NULL && *name != 0);
+    assert(buf != NULL);
+    assert(max > 0);
+
+    struct stat ino;
+    if(*name == '/')
+        ++name;
+
+    if(!stat("/var/run/ipc", &ino) && S_ISDIR(ino.st_mode))
+        snprintf(buf, max, "/var/run/ipc/%s", name);
+    else
+        snprintf(buf, max, "/tmp/.%s.ipc", name);
+}
+
+static key_t createipc(const char *name, char mode)
+{
+    assert(name != NULL && *name != 0);
+
+    char buf[65];
+    int fd;
+
+    ftok_name(name, buf, sizeof(buf));
+    fd = ::open(buf, O_CREAT | O_EXCL | O_WRONLY, 0664);
+    if(fd > -1)
+        ::close(fd);
+    return ftok(buf, mode);
+}
+
+static key_t accessipc(const char *name, char mode)
+{
+    assert(name != NULL && *name != 0);
+
+    char buf[65];
+
+    ftok_name(name, buf, sizeof(buf));
+    return ftok(buf, mode);
+}
+
+#endif
+
+static  bool use_mapping = true;
+
+using namespace UCOMMON_NAMESPACE;
+
+void MappedMemory::disable(void)
+{
+    use_mapping = false;
+}
+
+MappedMemory::MappedMemory(const char *fn, size_t len)
+{
+    assert(fn != NULL && *fn != 0);
+    assert(len > 0);
+
+    erase = true;
+    String::set(idname, sizeof(idname), fn);
+    create(fn, size);
+}
+
+MappedMemory::MappedMemory(const char *fn)
+{
+    erase = false;
+    assert(fn != NULL && *fn != 0);
+    create(fn, 0);
+}
+
+MappedMemory::MappedMemory()
+{
+    erase = false;
+    size = 0;
+    used = 0;
+    map = NULL;
+}
+
+#if defined(_MSWINDOWS_)
+
+void MappedMemory::create(const char *fn, size_t len)
+{
+    assert(fn != NULL && *fn != 0);
+
+    int share = FILE_SHARE_READ;
+//  int prot = FILE_MAP_READ;
+    int mode = GENERIC_READ;
+
+    size = 0;
+    used = 0;
+    map = NULL;
+
+    if(!use_mapping) {
+        assert(len > 0);    // cannot use dummy for r/o...
+        map = (caddr_t)malloc(len);
+        if(!map)
+            fault();
+        size = len;
+        return;
+    }
+
+    if(*fn == '/')
+        ++fn;
+
+    if(len) {
+//      prot = FILE_MAP_WRITE;
+        mode |= GENERIC_WRITE;
+        share |= FILE_SHARE_WRITE;
+        fd = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, len, fn);
+    }
+    else
+        fd = OpenFileMapping(FILE_MAP_ALL_ACCESS, FALSE, fn);
+
+    if(fd == INVALID_HANDLE_VALUE || fd == NULL)
+        return;
+
+    map = (caddr_t)MapViewOfFile(fd, FILE_MAP_ALL_ACCESS, 0, 0, len);
+    if(map) {
+        size = len;
+        VirtualLock(map, size);
+    }
+    else
+        fault();
+}
+
+MappedMemory::~MappedMemory()
+{
+    release();
+}
+
+void MappedMemory::remove(const char *id)
+{
+    assert(id != NULL && *id != 0);
+}
+
+void MappedMemory::release(void)
+{
+    if(map) {
+        if(use_mapping) {
+            VirtualUnlock(map, size);
+            UnmapViewOfFile(fd);
+            CloseHandle(fd);
+            map = NULL;
+            fd = INVALID_HANDLE_VALUE;
+        }
+        else {
+            free(map);
+            map = NULL;
+        }
+    }
+    if(erase) {
+        remove(idname);
+        erase = false;
+    }
+}
+
+#elif defined(HAVE_SHM_OPEN)
+
+void MappedMemory::create(const char *fn, size_t len)
+{
+    assert(fn != NULL && *fn != 0);
+
+    int prot = PROT_READ;
+    struct stat ino;
+    char fbuf[80];
+
+    size = 0;
+    used = 0;
+
+    if(!use_mapping) {
+        assert(len > 0);
+        map = (caddr_t)malloc(size);
+        if(!map)
+            fault();
+        size = mapsize = len;
+        return;
+    }
+
+    if(*fn != '/') {
+        snprintf(fbuf, sizeof(fbuf), "/%s", fn);
+        fn = fbuf;
+    }
+
+    if(len) {
+        len += INSERT_OFFSET;
+        prot |= PROT_WRITE;
+        fd = shm_open(fn, O_RDWR | O_CREAT, 0664);
+        if(fd > -1) {
+            if(ftruncate(fd, len)) {
+                ::close(fd);
+                fd = -1;
+            }
+        }
+    }
+    else {
+        fd = shm_open(fn, O_RDONLY, 0664);
+        if(fd > -1) {
+            fstat(fd, &ino);
+            len = ino.st_size;
+        }
+    }
+
+    if(fd < 0)
+        return;
+
+
+    map = (caddr_t)mmap(NULL, len, prot, MAP_SHARED, fd, 0);
+    if(!map)
+        fault();
+    ::close(fd);
+    if(map != (caddr_t)MAP_FAILED) {
+        size = mapsize = len;
+        mlock(map, mapsize);
+#if INSERT_OFFSET > 0
+        if(prot & PROT_WRITE) {
+            size -= INSERT_OFFSET;
+            snprintf(map, INSERT_OFFSET, "%ld", size);
+        }
+        else
+            size = atol(map);
+        map += INSERT_OFFSET;
+#endif
+    }
+}
+
+MappedMemory::~MappedMemory()
+{
+    release();
+}
+
+void MappedMemory::release()
+{
+    if(size) {
+        if(use_mapping) {
+            map -= INSERT_OFFSET;
+            munlock(map, mapsize);
+            munmap(map, mapsize);
+        }
+        else
+            free(map);
+        size = 0;
+    }
+    if(erase) {
+        remove(idname);
+        erase = false;
+    }
+}
+
+void MappedMemory::remove(const char *fn)
+{
+    assert(fn != NULL && *fn != 0);
+
+    char fbuf[80];
+
+    if(!use_mapping)
+        return;
+
+    if(*fn != '/') {
+        snprintf(fbuf, sizeof(fbuf), "/%s", fn);
+        fn = fbuf;
+    }
+
+    shm_unlink(fn);
+}
+
+#else
+
+void MappedMemory::remove(const char *name)
+{
+    assert(name != NULL && *name != 0);
+
+    key_t key;
+    fd_t fd;
+
+    if(!use_mapping)
+        return;
+
+    key = accessipc(name, 'S');
+    if(key) {
+        fd = shmget(key, 0, 0);
+        if(fd > -1)
+            shmctl(fd, IPC_RMID, NULL);
+    }
+}
+
+void MappedMemory::create(const char *name, size_t len)
+{
+    assert(name != NULL && *name != 0);
+
+    struct shmid_ds stat;
+    size = 0;
+    used = 0;
+    key_t key;
+
+    if(!use_mapping) {
+        assert(len > 0);
+        map = (caddr_t)malloc(len);
+        if(!map)
+            fault();
+        size = len;
+        return;
+    }
+
+    if(len) {
+        key = createipc(name, 'S');
+remake:
+        fd = shmget(key, len, IPC_CREAT | IPC_EXCL | 0664);
+        if(fd == -1 && errno == EEXIST) {
+            fd = shmget(key, 0, 0);
+            if(fd > -1) {
+                shmctl(fd, IPC_RMID, NULL);
+                goto remake;
+            }
+        }
+    }
+    else {
+        key = accessipc(name, 'S');
+        fd = shmget(key, 0, 0);
+    }
+
+    if(fd > -1) {
+        if(len)
+            size = len;
+        else if(shmctl(fd, IPC_STAT, &stat) == 0)
+            size = stat.shm_segsz;
+        else
+            fd = -1;
+    }
+    map = (caddr_t)shmat(fd, NULL, 0);
+    if(!map)
+        fault();
+#ifdef  SHM_LOCK
+    if(fd > -1)
+        shmctl(fd, SHM_LOCK, NULL);
+#endif
+}
+
+MappedMemory::~MappedMemory()
+{
+    release();
+}
+
+void MappedMemory::release(void)
+{
+    if(size > 0) {
+        if(use_mapping) {
+#ifdef  SHM_UNLOCK
+            shmctl(fd, SHM_UNLOCK, NULL);
+#endif
+            shmdt(map);
+            fd = -1;
+        }
+        else
+            free(map);
+        size = 0;
+    }
+    if(erase) {
+        remove(idname);
+        erase = false;
+    }
+}
+
+#endif
+
+void *MappedMemory::invalid(void) const
+{
+    abort();
+}
+
+void MappedMemory::fault(void) const
+{
+    abort();
+}
+
+void *MappedMemory::sbrk(size_t len)
+{
+    assert(len > 0);
+    void *mp = (void *)(map + used);
+    if(used + len > size)
+        fault();
+    used += len;
+    return mp;
+}
+
+bool MappedMemory::copy(size_t offset, void *buffer, size_t bufsize) const
+{
+    if(!map || (offset + bufsize > size)) {
+        fault();
+        return false;
+    }
+
+    const void *member = (const void *)(map + offset);
+
+    do {
+        memcpy(buffer, member, bufsize);
+    } while(memcmp(buffer, member, bufsize));
+
+    return true;
+}
+
+void *MappedMemory::offset(size_t offset) const
+{
+    if(offset >= size)
+        return invalid();
+    return (void *)(map + offset);
+}
+
+MappedReuse::MappedReuse(const char *name, size_t osize, unsigned count) :
+ReusableAllocator(), MappedMemory(name,  osize * count)
+{
+    assert(name != NULL && *name != 0);
+    assert(osize > 0 && count > 0);
+
+    objsize = osize;
+    reading = 0;
+}
+
+MappedReuse::MappedReuse(size_t osize) :
+ReusableAllocator(), MappedMemory()
+{
+    assert(osize > 0);
+
+    objsize = osize;
+    reading = 0;
+}
+
+bool MappedReuse::avail(void)
+{
+    bool rtn = false;
+    lock();
+    if(freelist || used < size)
+        rtn = true;
+    unlock();
+    return rtn;
+}
+
+ReusableObject *MappedReuse::request(void)
+{
+    ReusableObject *obj = NULL;
+
+    lock();
+    if(freelist) {
+        obj = freelist;
+        freelist = next(obj);
+    }
+    else if(used + objsize <= size)
+        obj = (ReusableObject *)sbrk(objsize);
+    unlock();
+    return obj;
+}
+
+ReusableObject *MappedReuse::get(void)
+{
+    return getTimed(Timer::inf);
+}
+
+void MappedReuse::removeLocked(ReusableObject *obj)
+{
+    assert(obj != NULL);
+
+    obj->retain();
+    obj->enlist((LinkedObject **)&freelist);
+}
+
+ReusableObject *MappedReuse::getLocked(void)
+{
+    ReusableObject *obj = NULL;
+
+    if(freelist) {
+        obj = freelist;
+        freelist = next(obj);
+    }
+    else if(used + objsize <= size)
+        obj = (ReusableObject *)sbrk(objsize);
+
+    return obj;
+}
+
+ReusableObject *MappedReuse::getTimed(timeout_t timeout)
+{
+    bool rtn = true;
+    struct timespec ts;
+    ReusableObject *obj = NULL;
+
+    if(timeout && timeout != Timer::inf)
+        set(&ts, timeout);
+
+    lock();
+    while(rtn && (!freelist || (freelist && reading)) && used >= size) {
+        ++waiting;
+        if(timeout == Timer::inf)
+            wait();
+        else if(timeout)
+            rtn = wait(&ts);
+        else
+            rtn = false;
+        --waiting;
+    }
+    if(!rtn) {
+        unlock();
+        return NULL;
+    }
+    if(freelist) {
+        obj = freelist;
+        freelist = next(obj);
+    }
+    else if(used + objsize <= size)
+        obj = (ReusableObject *)sbrk(objsize);
+    unlock();
+    return obj;
+}
+
diff --git a/jni/libucommon/sources/corelib/memory.cpp b/jni/libucommon/sources/corelib/memory.cpp
new file mode 100644
index 0000000..a0e3075
--- /dev/null
+++ b/jni/libucommon/sources/corelib/memory.cpp
@@ -0,0 +1,1532 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/object.h>
+#include <ucommon/memory.h>
+#include <ucommon/thread.h>
+#include <ucommon/string.h>
+#include <ucommon/fsys.h>
+#ifdef  HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <limits.h>
+#include <string.h>
+#include <stdio.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+extern "C" {
+
+    static int ncompare(const void *o1, const void *o2)
+    {
+        assert(o1 != NULL);
+        assert(o2 != NULL);
+        const StringPager::member * const *n1 = static_cast<const StringPager::member * const*>(o1);
+        const StringPager::member * const *n2 = static_cast<const StringPager::member * const*>(o2);
+        return String::collate((*n1)->get(), (*n2)->get());
+    }
+}
+
+memalloc::memalloc(size_t ps)
+{
+#ifdef  HAVE_SYSCONF
+    size_t paging = sysconf(_SC_PAGESIZE);
+#elif defined(PAGESIZE)
+    size_t paging = PAGESIZE;
+#elif defined(PAGE_SIZE)
+    size_t paging = PAGE_SIZE;
+#else
+    size_t paging = 1024;
+#endif
+    if(!ps)
+        ps = paging;
+    else if(ps > paging)
+        ps = (((ps + paging - 1) / paging)) * paging;
+
+#ifdef  HAVE_POSIX_MEMALIGN
+    if(ps >= paging)
+        align = sizeof(void *);
+    else
+        align = 0;
+
+    switch(align)
+    {
+    case 2:
+    case 4:
+    case 8:
+    case 16:
+        break;
+    default:
+        align = 0;
+    }
+#endif
+    pagesize = ps;
+    count = 0;
+    limit = 0;
+    page = NULL;
+}
+
+memalloc::~memalloc()
+{
+    memalloc::purge();
+}
+
+unsigned memalloc::utilization(void) const
+{
+    unsigned long used = 0, alloc = 0;
+    page_t *mp = page;
+
+    while(mp) {
+        alloc += pagesize;
+        used += mp->used;
+        mp = mp->next;
+    }
+
+    if(!used)
+        return 0;
+
+    alloc /= 100;
+    used /= alloc;
+    return used;
+}
+
+void memalloc::purge(void)
+{
+    page_t *next;
+    while(page) {
+        next = page->next;
+        free(page);
+        page = next;
+    }
+    count = 0;
+}
+
+void memalloc::fault(void) const
+{
+    cpr_runtime_error("mempager exhausted");
+}
+
+memalloc::page_t *memalloc::pager(void)
+{
+    page_t *npage = NULL;
+#ifdef  HAVE_POSIX_MEMALIGN
+    void *addr;
+#endif
+
+    if(limit && count >= limit)
+        fault();
+
+#ifdef  HAVE_POSIX_MEMALIGN
+    if(align && !posix_memalign(&addr, align, pagesize)) {
+        npage = (page_t *)addr;
+        goto use;
+    }
+#endif
+    npage = (page_t *)malloc(pagesize);
+
+#ifdef  HAVE_POSIX_MEMALIGN
+use:
+#endif
+    if(!npage)
+        fault();
+
+    ++count;
+    npage->used = sizeof(page_t);
+    npage->next = page;
+    page = npage;
+    if((size_t)(npage) % sizeof(void *))
+        npage->used += sizeof(void *) - ((size_t)(npage) % sizeof(void
+*));
+    return npage;
+}
+
+void *memalloc::_alloc(size_t size)
+{
+    assert(size > 0);
+
+    caddr_t mem;
+    page_t *p = page;
+
+    if(size > (pagesize - sizeof(page_t))) {
+        fault();
+        return NULL;
+    }
+
+    while(size % sizeof(void *))
+        ++size;
+
+    while(p) {
+        if(size <= pagesize - p->used)
+            break;
+        p = p->next;
+    }
+    if(!p)
+        p = pager();
+
+    mem = ((caddr_t)(p)) + p->used;
+    p->used += size;
+    return mem;
+}
+
+mempager::mempager(size_t ps) :
+memalloc(ps)
+{
+    pthread_mutex_init(&mutex, NULL);
+}
+
+mempager::~mempager()
+{
+    memalloc::purge();
+    pthread_mutex_destroy(&mutex);
+}
+
+void mempager::_lock(void)
+{
+    pthread_mutex_lock(&mutex);
+}
+
+void mempager::_unlock(void)
+{
+    pthread_mutex_unlock(&mutex);
+}
+
+unsigned mempager::utilization(void)
+{
+    unsigned long used;
+
+    pthread_mutex_lock(&mutex);
+    used = memalloc::utilization();
+    pthread_mutex_unlock(&mutex);
+    return used;
+}
+
+void mempager::purge(void)
+{
+    pthread_mutex_lock(&mutex);
+    memalloc::purge();
+    pthread_mutex_unlock(&mutex);
+}
+
+void mempager::dealloc(void *mem)
+{
+}
+
+void *mempager::_alloc(size_t size)
+{
+    assert(size > 0);
+
+    void *mem;
+    pthread_mutex_lock(&mutex);
+    mem = memalloc::_alloc(size);
+    pthread_mutex_unlock(&mutex);
+    return mem;
+}
+
+ObjectPager::member::member(LinkedObject **root) :
+LinkedObject(root)
+{
+    mem = NULL;
+}
+
+ObjectPager::member::member() :
+LinkedObject()
+{
+    mem = NULL;
+}
+
+ObjectPager::ObjectPager(size_t objsize, size_t size) :
+memalloc(size)
+{
+    members = 0;
+    root = NULL;
+    last = NULL;
+    index = NULL;
+    typesize = objsize;
+}
+
+void *ObjectPager::get(unsigned ind) const
+{
+    linked_pointer<member> list = root;
+
+    if(ind >= members)
+        return invalid();
+
+    while(ind--)
+        list.next();
+
+    return list->mem;
+}
+
+void ObjectPager::clear(void)
+{
+    memalloc::purge();
+    members = 0;
+    root = NULL;
+    last = NULL;
+    index = NULL;
+}
+
+void *ObjectPager::pull(void)
+{
+    if(!members)
+        return invalid();
+
+    member *mem = (member *)root;
+    void *result = mem->mem;
+    --members;
+    if(!members) {
+        root = NULL;
+        last = NULL;
+    }
+    else
+        root = mem->Next;
+    index = NULL;
+    return result;
+}
+
+void *ObjectPager::push(void)
+{
+    caddr_t mem = (caddr_t)memalloc::_alloc(sizeof(member));
+
+    member *node;
+
+    node = new(mem) member(&root);
+    if(!last)
+        last = node;
+    ++members;
+    node->mem = memalloc::_alloc(typesize);
+    index = NULL;
+    return node->mem;
+}
+
+void *ObjectPager::pop(void)
+{
+    void *out = NULL;
+
+    if(!root)
+        return invalid();
+
+    index = NULL;
+
+    if(root == last) {
+        out = last->mem;
+        root = last = NULL;
+        members = 0;
+        return out;
+    }
+
+    linked_pointer<member> np = root;
+    while(is(np)) {
+        if(np->Next == last) {
+            out = last->mem;
+            last = *np;
+            np->Next = NULL;
+            --members;
+            break;
+        }
+        np.next();
+    }
+    return out;
+}
+
+void *ObjectPager::invalid(void) const
+{
+    return NULL;
+}
+
+void *ObjectPager::add(void)
+{
+    caddr_t mem = (caddr_t)memalloc::_alloc(sizeof(member));
+    member *node;
+
+    index = NULL;
+    if(members++) {
+        node = new(mem) member();
+        last->set(node);
+    }
+    else
+        node = new(mem) member(&root);
+    last = node;
+    node->mem = memalloc::_alloc(typesize);
+    return node->mem;
+}
+
+void **ObjectPager::list(void)
+{
+    void **dp = index;
+    if(dp)
+        return dp;
+
+    unsigned pos = 0;
+    index = (void **)memalloc::_alloc(sizeof(void *) * (members + 1));
+    linked_pointer<member> mp = root;
+    while(is(mp)) {
+        index[pos++] = mp->mem;
+        mp.next();
+    }
+    index[pos] = NULL;
+    dp = index;
+    return index;
+}
+
+StringPager::member::member(LinkedObject **root, const char *data) :
+LinkedObject(root)
+{
+    text = data;
+}
+
+StringPager::member::member(const char *data) :
+LinkedObject()
+{
+    text = data;
+}
+
+StringPager::StringPager(size_t size) :
+memalloc(size)
+{
+    members = 0;
+    root = NULL;
+    last = NULL;
+    index = NULL;
+}
+
+StringPager::StringPager(char **list, size_t size) :
+memalloc(size)
+{
+    members = 0;
+    root = NULL;
+    last = NULL;
+    add(list);
+}
+
+bool StringPager::filter(char *buffer, size_t size)
+{
+    add(buffer);
+    return true;
+}
+
+unsigned StringPager::token(const char *text, const char *list, const char *quote, const char *end)
+{
+    unsigned count = 0;
+    const char *result;
+    char *lastp = NULL;
+
+    if(!text || !*text)
+        return 0;
+
+    strdup_t tmp = strdup(text);
+    while(NULL != (result = String::token(tmp, &lastp, list, quote, end))) {
+        ++count;
+        add(result);
+    }
+    return count;
+}
+
+String StringPager::join(const char *prefix, const char *middle, const char *suffix)
+{
+    string_t tmp;
+
+    if(!members)
+        return tmp;
+
+    if(prefix && *prefix)
+        tmp += prefix;
+
+    linked_pointer<member> mp = root;
+    while(is(mp)) {
+        tmp += mp->text;
+        if(mp->Next && middle && *middle)
+            tmp += middle;
+        else if(mp->Next == NULL && suffix && *suffix)
+            tmp += suffix;
+        mp.next();
+    }
+
+    return tmp;
+}
+
+unsigned StringPager::split(const char *text, const char *string, unsigned flags)
+{
+    strdup_t tmp = String::dup(string);
+    char *match = tmp;
+    char *prior = tmp;
+    size_t tcl = strlen(text);
+    unsigned count = 0;
+    bool found = false;
+
+    // until end of string or end of matches...
+    while(prior && *prior && match) {
+#if defined(_MSWINDOWS_)
+        if((flags & 0x01) == String::INSENSITIVE)
+            match = strstr(prior, text);
+#elif  defined(HAVE_STRICMP)
+        if((flags & 0x01) == String::INSENSITIVE)
+            match = stristr(prior, text);
+#else
+        if((flags & 0x01) == String::INSENSITIVE)
+            match = strcasestr(prior, text);
+#endif
+        else
+            match = strstr(prior, text);
+
+        if(match)
+            found = true;
+
+        // we must have at least one match to add trailing data...
+        if(match == NULL && prior != NULL && found) {
+            ++count;
+            add(prior);
+        }
+        // if we have a current match see if anything to add in front of it
+        else if(match) {
+            *match = 0;
+            if(match > prior) {
+                ++count;
+                add(prior);
+            }
+
+            prior = match + tcl;
+        }
+    }
+    return count;
+}
+
+void StringPager::set(unsigned ind, const char *text)
+{
+    linked_pointer<member> list = root;
+
+    if(ind >= members)
+
+    while(ind--)
+        list.next();
+
+    size_t size = strlen(text) + 1;
+    char *str = (char *)memalloc::_alloc(size);
+    strcpy(str, text);
+    list->text = str;
+}
+
+const char *StringPager::invalid(void) const
+{
+    return NULL;
+}
+
+const char *StringPager::get(unsigned ind) const
+{
+    linked_pointer<member> list = root;
+
+    if(ind >= members)
+        return invalid();
+
+    while(ind--)
+        list.next();
+
+    return list->get();
+}
+
+void StringPager::clear(void)
+{
+    memalloc::purge();
+    members = 0;
+    root = NULL;
+    last = NULL;
+    index = NULL;
+}
+
+const char *StringPager::pull(void)
+{
+    if(!members)
+        return invalid();
+
+
+    member *mem = (member *)root;
+    const char *result = mem->text;
+    --members;
+    if(!members) {
+        root = NULL;
+        last = NULL;
+    }
+    else
+        root = mem->Next;
+    index = NULL;
+    return result;
+}
+
+void StringPager::push(const char *text)
+{
+    if(!text)
+        text = "";
+
+    size_t size = strlen(text) + 1;
+    caddr_t mem = (caddr_t)memalloc::_alloc(sizeof(member));
+    char *str = (char *)memalloc::_alloc(size);
+
+    strcpy(str, text);
+    member *node;
+
+    node = new(mem) member(&root, str);
+    if(!last)
+        last = node;
+    ++members;
+    index = NULL;
+}
+
+const char *StringPager::pop(void)
+{
+    const char *out = NULL;
+
+    if(!root)
+        return invalid();
+
+    index = NULL;
+
+    if(root == last) {
+        out = last->text;
+        root = last = NULL;
+        members = 0;
+        return out;
+    }
+
+    linked_pointer<member> np = root;
+    while(is(np)) {
+        if(np->Next == last) {
+            out = last->text;
+            last = *np;
+            np->Next = NULL;
+            --members;
+            break;
+        }
+        np.next();
+    }
+    return out;
+}
+
+void StringPager::add(const char *text)
+{
+    if(!text)
+        text = "";
+
+    size_t size = strlen(text) + 1;
+    caddr_t mem = (caddr_t)memalloc::_alloc(sizeof(member));
+    char *str = (char *)memalloc::_alloc(size);
+
+    strcpy(str, text);
+    member *node;
+
+    index = NULL;
+    if(members++) {
+        node = new(mem) member(str);
+        last->set(node);
+    }
+    else
+        node = new(mem) member(&root, str);
+    last = node;
+}
+
+void StringPager::set(char **list)
+{
+    clear();
+    add(list);
+}
+
+void StringPager::push(char **list)
+{
+    const char *cp;
+    unsigned ind = 0;
+
+    if(!list)
+        return;
+
+    while(NULL != (cp = list[ind++]))
+        push(cp);
+}
+
+void StringPager::add(char **list)
+{
+    const char *cp;
+    unsigned ind = 0;
+
+    if(!list)
+        return;
+
+    while(NULL != (cp = list[ind++]))
+        add(cp);
+}
+
+void StringPager::sort(void)
+{
+    if(!members)
+        return;
+
+    member **list = new member*[members];
+    unsigned pos = 0;
+    linked_pointer<member> mp = root;
+
+    while(is(mp)) {
+        list[pos++] = *mp;
+        mp.next();
+    }
+
+    qsort(static_cast<void *>(list), members, sizeof(member *), &ncompare);
+    root = NULL;
+    while(pos)
+        list[--pos]->enlist(&root);
+
+    delete list;
+    index = NULL;
+}
+
+char **StringPager::list(void)
+{
+    if(index)
+        return index;
+
+    unsigned pos = 0;
+    index = (char **)memalloc::_alloc(sizeof(char *) * (members + 1));
+    linked_pointer<member> mp = root;
+    while(is(mp)) {
+        index[pos++] = (char *)mp->text;
+        mp.next();
+    }
+    index[pos] = NULL;
+    return index;
+}
+
+DirPager::DirPager() :
+StringPager()
+{
+    dir = NULL;
+}
+
+DirPager::DirPager(const char *path) :
+StringPager()
+{
+    dir = NULL;
+    load(path);
+}
+
+bool DirPager::filter(char *fname, size_t size)
+{
+    if(*fname != '.')
+        add(fname);
+    return true;
+}
+
+void DirPager::operator=(const char *path)
+{
+    dir = NULL;
+    clear();
+    load(path);
+}
+
+bool DirPager::load(const char *path)
+{
+    dir_t ds;
+    char buffer[128];
+
+    if(!fsys::is_dir(path))
+        return false;
+
+    dir = dup(path);
+    ds.open(path);
+    if(!ds)
+        return false;
+
+    while(ds.read(buffer, sizeof(buffer)) > 0) {
+        if(!filter(buffer, sizeof(buffer)))
+            break;
+    }
+
+    ds.close();
+    sort();
+    return true;
+}
+
+autorelease::autorelease()
+{
+    pool = NULL;
+}
+
+autorelease::~autorelease()
+{
+    release();
+}
+
+void autorelease::release()
+{
+    LinkedObject *obj;
+
+    while(pool) {
+        obj = pool;
+        pool = obj->getNext();
+        obj->release();
+    }
+}
+
+void autorelease::operator+=(LinkedObject *obj)
+{
+    assert(obj != NULL);
+
+    obj->enlist(&pool);
+}
+
+PagerObject::PagerObject() :
+LinkedObject(NULL), CountedObject()
+{
+}
+
+void PagerObject::reset(void)
+{
+    CountedObject::reset();
+    LinkedObject::Next = NULL;
+}
+
+void PagerObject::dealloc(void)
+{
+    pager->put(this);
+}
+
+void PagerObject::release(void)
+{
+    CountedObject::release();
+}
+
+PagerPool::PagerPool()
+{
+    freelist = NULL;
+    pthread_mutex_init(&mutex, NULL);
+}
+
+PagerPool::~PagerPool()
+{
+    pthread_mutex_destroy(&mutex);
+}
+
+void PagerPool::put(PagerObject *ptr)
+{
+    assert(ptr != NULL);
+
+    pthread_mutex_lock(&mutex);
+    ptr->enlist(&freelist);
+    pthread_mutex_unlock(&mutex);
+}
+
+PagerObject *PagerPool::get(size_t size)
+{
+    assert(size > 0);
+
+    PagerObject *ptr;
+    pthread_mutex_lock(&mutex);
+    ptr = static_cast<PagerObject *>(freelist);
+    if(ptr)
+        freelist = ptr->Next;
+
+    pthread_mutex_unlock(&mutex);
+
+    if(!ptr)
+        ptr = new((caddr_t)(_alloc(size))) PagerObject;
+    else
+        ptr->reset();
+    ptr->pager = this;
+    return ptr;
+}
+
+keyassoc::keydata::keydata(keyassoc *assoc, const char *kid, unsigned max, unsigned bufsize) :
+NamedObject(assoc->root, strdup(kid), max)
+{
+    assert(assoc != NULL);
+    assert(kid != NULL && *kid != 0);
+    assert(max > 1);
+
+    String::set(text, bufsize, kid);
+    data = NULL;
+    Id = text;
+}
+
+keyassoc::keyassoc(unsigned pathmax, size_t strmax, size_t ps) :
+mempager(ps)
+{
+    assert(pathmax > 1);
+    assert(strmax > 1);
+    assert(ps > 1);
+
+    paths = pathmax;
+    keysize = strmax;
+    keycount = 0;
+
+    root = (NamedObject **)_alloc(sizeof(NamedObject *) * pathmax);
+    memset(root, 0, sizeof(NamedObject *) * pathmax);
+    if(keysize) {
+        list = (LinkedObject **)_alloc(sizeof(LinkedObject *) * (keysize / 8));
+        memset(list, 0, sizeof(LinkedObject *) * (keysize / 8));
+    }
+    else
+        list = NULL;
+}
+
+keyassoc::~keyassoc()
+{
+    purge();
+}
+
+void keyassoc::purge(void)
+{
+    mempager::purge();
+    list = NULL;
+    root = NULL;
+}
+
+void *keyassoc::locate(const char *id)
+{
+    assert(id != NULL && *id != 0);
+
+    keydata *kd;
+
+    _lock();
+    kd = static_cast<keydata *>(NamedObject::map(root, id, paths));
+    _unlock();
+    if(!kd)
+        return NULL;
+
+    return kd->data;
+}
+
+void *keyassoc::remove(const char *id)
+{
+    assert(id != NULL && *id != 0);
+
+    keydata *kd;
+    LinkedObject *obj;
+    void *data;
+    unsigned path = NamedObject::keyindex(id, paths);
+    unsigned size = strlen(id);
+
+    if(!keysize || size >= keysize || !list)
+        return NULL;
+
+    _lock();
+    kd = static_cast<keydata *>(NamedObject::map(root, id, paths));
+    if(!kd) {
+        _unlock();
+        return NULL;
+    }
+    data = kd->data;
+    obj = static_cast<LinkedObject*>(kd);
+    obj->delist((LinkedObject**)(&root[path]));
+    obj->enlist(&list[size / 8]);
+    --keycount;
+    _unlock();
+    return data;
+}
+
+void *keyassoc::allocate(const char *id, size_t dsize)
+{
+    assert(id != NULL && *id != 0);
+    assert(dsize != 0);
+
+    void *dp = NULL;
+    keydata *kd;
+    LinkedObject *obj;
+    unsigned size = strlen(id);
+
+    if(keysize && size >= keysize)
+        return NULL;
+
+    _lock();
+    kd = static_cast<keydata *>(NamedObject::map(root, id, paths));
+    if(kd) {
+        _unlock();
+        return NULL;
+    }
+    caddr_t ptr = NULL;
+    size /= 8;
+    if(list && list[size]) {
+        obj = list[size];
+        list[size] = obj->getNext();
+        ptr = (caddr_t)obj;
+    }
+    if(ptr == NULL) {
+        ptr = (caddr_t)memalloc::_alloc(sizeof(keydata) + size * 8);
+        dp = memalloc::_alloc(dsize);
+    }
+    else
+        dp = ((keydata *)(ptr))->data;
+    kd = new(ptr) keydata(this, id, paths, 8 + size * 8);
+    kd->data = dp;
+    ++keycount;
+    _unlock();
+    return dp;
+}
+
+bool keyassoc::create(const char *id, void *data)
+{
+    assert(id != NULL && *id != 0);
+    assert(data != NULL);
+
+    keydata *kd;
+    LinkedObject *obj;
+    unsigned size = strlen(id);
+
+    if(keysize && size >= keysize)
+        return false;
+
+    _lock();
+    kd = static_cast<keydata *>(NamedObject::map(root, id, paths));
+    if(kd) {
+        _unlock();
+        return false;
+    }
+    caddr_t ptr = NULL;
+    size /= 8;
+    if(list && list[size]) {
+        obj = list[size];
+        list[size] = obj->getNext();
+        ptr = (caddr_t)obj;
+    }
+    if(ptr == NULL)
+        ptr = (caddr_t)memalloc::_alloc(sizeof(keydata) + size * 8);
+    kd = new(ptr) keydata(this, id, paths, 8 + size * 8);
+    kd->data = data;
+    ++keycount;
+    _unlock();
+    return true;
+}
+
+bool keyassoc::assign(const char *id, void *data)
+{
+    assert(id != NULL && *id != 0);
+    assert(data != NULL);
+
+    keydata *kd;
+    LinkedObject *obj;
+    unsigned size = strlen(id);
+
+    if(keysize && size >= keysize)
+        return false;
+
+    _lock();
+    kd = static_cast<keydata *>(NamedObject::map(root, id, paths));
+    if(!kd) {
+        caddr_t ptr = NULL;
+        size /= 8;
+        if(list && list[size]) {
+            obj = list[size];
+            list[size] = obj->getNext();
+            ptr = (caddr_t)obj;
+        }
+        if(ptr == NULL)
+            ptr = (caddr_t)memalloc::_alloc(sizeof(keydata) + size * 8);
+        kd = new(ptr) keydata(this, id, paths, 8 + size * 8);
+        ++keycount;
+    }
+    kd->data = data;
+    _unlock();
+    return true;
+}
+
+chartext::chartext() :
+CharacterProtocol()
+{
+    pos = NULL;
+    max = 0;
+}
+
+chartext::chartext(char *buf) :
+CharacterProtocol()
+{
+    pos = buf;
+    max = 0;
+}
+
+chartext::chartext(char *buf, size_t size) :
+CharacterProtocol()
+{
+    pos = buf;
+    max = size;
+}
+
+chartext::~chartext()
+{
+}
+
+int chartext::_getch(void)
+{
+    if(!pos || !*pos || max)
+        return EOF;
+
+    return *(pos++);
+}
+
+int chartext::_putch(int code)
+{
+    if(!pos || !max)
+        return EOF;
+
+    if(code == 0) {
+        *(pos++) = 0;
+        max = 0;
+        return EOF;
+    }
+
+    *(pos++) = code;
+    *pos = 0;
+    --max;
+    return code;
+}
+
+bufpager::bufpager(size_t ps) :
+memalloc(ps), CharacterProtocol()
+{
+    first = last = current = freelist = NULL;
+    ccount = 0;
+    cpos = 0;
+    eom = false;
+}
+
+void bufpager::set(const char *text)
+{
+    reset();
+    add(text);
+}
+
+void bufpager::put(const char *text, size_t iosize)
+{
+    if(eom)
+        return;
+
+    while(text && (iosize--)) {
+        if(!last || last->used == last->size) {
+            cpage_t *next;
+
+            if(freelist) {
+                next = freelist;
+                freelist = next->next;
+            }
+            else {
+                next = (cpage_t *)memalloc::_alloc(sizeof(cpage_t));
+                if(!next) {
+                    return;
+                }
+
+                page_t *p = page;
+                unsigned size = 0;
+
+                while(p) {
+                    size = pagesize - p->used;
+                    if(size)
+                        break;
+                    p = p->next;
+                }
+                if(!p)
+                    p = pager();
+
+                if(!p)
+                    return;
+
+                next->text = ((char *)(p)) + p->used;
+                next->used = 0;
+                next->size = size;
+                p->used = pagesize;
+            }
+
+            if(last)
+                last->next = next;
+
+            if(!first)
+                first = next;
+            last = next;
+        }
+
+        ++ccount;
+        last->text[last->used++] = *(text++);
+    }
+}
+
+char *bufpager::copy(size_t *iosize)
+{
+    *iosize = 0;
+    if(!current || (current->next == NULL && cpos >= current->used))
+        return NULL;
+
+    if(cpos >= current->used) {
+        current = current->next;
+        cpos = 0l;
+    }
+
+    char *result = current->text + cpos;
+    *iosize = current->used - cpos;
+    cpos = 0l;
+    current = current->next;
+    return result;
+}
+
+char *bufpager::request(size_t *iosize)
+{
+    if(eom)
+        return NULL;
+
+    *iosize = 0;
+    if(!last || last->used >= last->size) {
+        cpage_t *next;
+        if(freelist) {
+            next = freelist;
+            freelist = next->next;
+        }
+        else {
+            next = (cpage_t *)memalloc::_alloc(sizeof(cpage_t));
+            if(!next) {
+                eom = true;
+                return NULL;
+            }
+
+            page_t *p = page;
+            unsigned size = 0;
+
+            while(p) {
+                size = pagesize - p->used;
+                if(size)
+                    break;
+                p = p->next;
+            }
+            if(!p)
+                p = pager();
+
+            if(!p) {
+                eom = true;
+                return NULL;
+            }
+
+            next->text = ((char *)(p)) + p->used;
+            next->used = 0;
+            next->size = size;
+            p->used = pagesize;
+        }
+
+        if(last)
+            last->next = next;
+
+        if(!first)
+            first = next;
+        last = next;
+    }
+    *iosize = last->size - last->used;
+    return last->text + last->used;
+}
+
+void bufpager::update(size_t iosize)
+{
+    last->used += iosize;
+}
+
+size_t bufpager::get(char *text, size_t iosize)
+{
+    if(!ccount)
+        return 0;
+
+    unsigned long index = 0;
+
+    while(index < iosize && current) {
+        if(cpos >= current->used) {
+            if(!current->next)
+                break;
+            current = current->next;
+            cpos = 0l;
+        }
+        text[index++] = current->text[cpos++];
+    }
+    if(index < iosize)
+        text[index] = 0;
+    return index;
+}
+
+void bufpager::add(const char *text)
+{
+    if(eom)
+        return;
+
+    while(text && *text) {
+        if(!last || last->used == last->size) {
+            cpage_t *next;
+
+            if(freelist) {
+                next = freelist;
+                freelist = next->next;
+            }
+            else {
+                next = (cpage_t *)memalloc::_alloc(sizeof(cpage_t));
+                if(!next) {
+                    eom = true;
+                    return;
+                }
+
+                page_t *p = page;
+                unsigned size = 0;
+
+                while(p) {
+                    size = pagesize - p->used;
+                    if(size)
+                        break;
+                    p = p->next;
+                }
+                if(!p)
+                    p = pager();
+
+                if(!p) {
+                    eom = true;
+                    return;
+                }
+
+                next->text = ((char *)(p)) + p->used;
+                next->used = 0;
+                next->size = size;
+                p->used = pagesize;
+            }
+
+            if(last)
+                last->next = next;
+
+            if(!first)
+                first = next;
+            last = next;
+        }
+
+        ++ccount;
+        last->text[last->used++] = *(text++);
+    }
+}
+
+char *bufpager::dup(void)
+{
+    if(!ccount)
+        return NULL;
+
+    char *text = (char *)malloc(ccount + 1l);
+    if(!text)
+        return NULL;
+
+    unsigned long index = 0, pos = 0;
+    cpage_t *cpage = first;
+
+    while(index < ccount && cpage) {
+        if(pos >= cpage->used) {
+            if(!cpage->next)
+                break;
+            cpage = cpage->next;
+            pos = 0l;
+        }
+        text[index++] = cpage->text[pos++];
+    }
+    text[index] = 0;
+    return text;
+}
+
+int bufpager::_getch(void)
+{
+
+    if(!current)
+        current = first;
+
+    if(!current)
+        return EOF;
+
+    if(cpos >= current->used) {
+        if(!current->next)
+            return EOF;
+
+        current = current->next;
+        cpos = 0;
+    }
+
+    if(cpos >= current->used)
+        return EOF;
+
+    char ch = current->text[cpos++];
+    return ch;
+}
+
+int bufpager::_putch(int code)
+{
+    if(eom)
+        return EOF;
+
+    if(!last || last->used == last->size) {
+        cpage_t *next;
+
+        if(freelist) {
+            next = freelist;
+            freelist = next->next;
+        }
+        else {
+            next = (cpage_t *)memalloc::_alloc(sizeof(cpage_t));
+            if(!next) {
+                eom = true;
+                return EOF;
+            }
+
+            page_t *p = page;
+            unsigned size = 0;
+
+            while(p) {
+                size = pagesize - p->used;
+                if(size)
+                    break;
+                p = p->next;
+            }
+            if(!p)
+                p = pager();
+
+            if(!p) {
+                eom = true;
+                return EOF;
+            }
+
+            next->text = ((char *)(p)) + p->used;
+            next->used = 0;
+            next->size = size;
+            p->used = pagesize;
+        }
+
+        if(last)
+            last->next = next;
+
+        if(!first)
+            first = next;
+        last = next;
+    }
+
+    ++ccount;
+    last->text[last->used++] = code;
+    if(code == 0) {
+        eom = true;
+        return EOF;
+    }
+    return code;
+}
+
+void *bufpager::_alloc(size_t size)
+{
+    void *ptr = memalloc::_alloc(size);
+    return ptr;
+}
+
+void bufpager::rewind(void)
+{
+    cpos = 0;
+    current = first;
+}
+
+void bufpager::reset(void)
+{
+    eom = false;
+    cpos = 0;
+    ccount = 0;
+    current = first;
+    while(current) {
+        current->used = 0;
+        current = current->next;
+    }
+    freelist = first;
+    first = last = current = NULL;
+}
+
+charmem::charmem(char *memaddr, size_t memsize) :
+CharacterProtocol()
+{
+    dynamic = false;
+    buffer = NULL;
+    set(memaddr, memsize);
+}
+
+charmem::charmem(size_t memsize)
+{
+    buffer = NULL;
+    set(size);
+}
+
+charmem::charmem()
+{
+    buffer = NULL;
+    dynamic = false;
+    inp = out = size = 0;
+}
+
+charmem::~charmem()
+{
+    release();
+}
+
+void charmem::set(size_t total)
+{
+    release();
+    buffer = (char *)malloc(total);
+    size = total;
+    inp = out = 0;
+    buffer[0] = 0;
+}
+
+void charmem::set(char *mem, size_t total)
+{
+    release();
+
+    if(!mem) {
+        buffer = NULL;
+        inp = out = size = 0;
+        return;
+    }
+
+    buffer = mem;
+    size = total;
+    inp = 0;
+    out = strlen(mem);
+}
+
+void charmem::release(void)
+{
+    if(buffer && dynamic)
+        free(buffer);
+
+    buffer = NULL;
+    dynamic = false;
+}
+
+int charmem::_getch(void)
+{
+    if(!buffer || inp == size || buffer[inp] == 0)
+        return EOF;
+
+    return buffer[inp++];
+}
+
+int charmem::_putch(int code)
+{
+    if(!buffer || out > size - 1)
+        return EOF;
+
+    buffer[out++] = code;
+
+    if(code == 0) {
+        out = size;
+        return EOF;
+    }
+
+    buffer[out] = 0;
+    return code;
+}
+
+
diff --git a/jni/libucommon/sources/corelib/numbers.cpp b/jni/libucommon/sources/corelib/numbers.cpp
new file mode 100644
index 0000000..c9d1cfb
--- /dev/null
+++ b/jni/libucommon/sources/corelib/numbers.cpp
@@ -0,0 +1,174 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/numbers.h>
+#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+using namespace UCOMMON_NAMESPACE;
+
+Number::Number(char *buf, unsigned width)
+{
+    if(width > 10)
+        width = 10;
+    if(width < 1)
+        width = 1;
+    size = width;
+
+    buffer = buf;
+}
+
+long Number::get(void) const
+{
+    int count = size;
+    bool sign = false;
+    long ret = 0;
+    char *bp = buffer;
+
+    if(*bp == '-') {
+        --count;
+        ++bp;
+        sign = true;
+    }
+    else if(*bp == '+') {
+        --count;
+        ++bp;
+    }
+    while(count && *bp >='0' && *bp <='9') {
+        ret = ret * 10l + (*bp - '0');
+        --count;
+        ++bp;
+    }
+
+    if(sign)
+        ret = -ret;
+    return ret;
+}
+
+void Number::set(long value)
+{
+    int count = size;
+    char *bp = buffer;
+    long max = 1;
+    int exp;
+    bool z = false;
+
+    if(value < 0) {
+        value = -value;
+        --count;
+        *(bp++) = '-';
+    }
+
+    exp = count;
+    while(--exp)
+        max *= 10;
+
+    while(max) {
+        if(value >= max || z) {
+            --count;
+            *(bp++) = '0' + ((char)(value / max));
+        }
+        if(value >= max) {
+            z = true;
+            value -= (value / max) * max;
+        }
+        max /= 10;
+    }
+    while(count-- && *bp >= '0' && *bp <='9')
+        *(bp++) = ' ';
+}
+
+long Number::operator=(long value)
+{
+    set(value);
+    return value;
+}
+
+long Number::operator=(const Number& num)
+{
+    set(num.get());
+    return get();
+}
+
+long Number::operator+=(long value)
+{
+    long value1 = get() + value;
+    set(value1);
+    return value1;
+}
+
+long Number::operator-=(long value)
+{
+    long value1 = get() - value;
+    set(value1);
+    return value1;
+}
+
+long Number::operator--()
+{
+    long val = get();
+    set(--val);
+    return val;
+}
+
+long Number::operator++()
+{
+    long val = get();
+    set(++val);
+    return val;
+}
+
+ZNumber::ZNumber(char *buf, unsigned chars) :
+Number(buf, chars)
+{}
+
+void ZNumber::set(long value)
+{
+    int count = size;
+    char *bp = buffer;
+    long max = 1;
+    int exp;
+
+    if(value < 0) {
+        value = -value;
+        --count;
+        *(bp++) = '-';
+    }
+
+    exp = count;
+    while(--exp)
+        max *= 10;
+
+    while(max) {
+        --count;
+        *(bp++) = '0' + (char)(value / max);
+        value -= (value / max) * max;
+        max /= 10;
+    }
+}
+
+long ZNumber::operator=(long value)
+{
+    set(value);
+    return value;
+}
+
diff --git a/jni/libucommon/sources/corelib/object.cpp b/jni/libucommon/sources/corelib/object.cpp
new file mode 100644
index 0000000..63ecbd4
--- /dev/null
+++ b/jni/libucommon/sources/corelib/object.cpp
@@ -0,0 +1,180 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/protocols.h>
+#include <ucommon/object.h>
+#include <stdlib.h>
+#include <string.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+CountedObject::CountedObject()
+{
+    count = 0;
+}
+
+CountedObject::CountedObject(const ObjectProtocol &source)
+{
+    count = 0;
+}
+
+void CountedObject::dealloc(void)
+{
+    delete this;
+}
+
+void CountedObject::retain(void)
+{
+    ++count;
+}
+
+void CountedObject::release(void)
+{
+    if(count > 1) {
+        --count;
+        return;
+    }
+    dealloc();
+}
+
+auto_object::auto_object(ObjectProtocol *o)
+{
+    if(o)
+        o->retain();
+
+    object = o;
+}
+
+auto_object::auto_object()
+{
+    object = 0;
+}
+
+void auto_object::release(void)
+{
+    if(object)
+        object->release();
+    object = 0;
+}
+
+auto_object::~auto_object()
+{
+    release();
+}
+
+auto_object::auto_object(const auto_object &from)
+{
+    object = from.object;
+    if(object)
+        object->retain();
+}
+
+bool auto_object::operator!() const
+{
+    return (object == 0);
+}
+
+auto_object::operator bool() const
+{
+    return (object != 0);
+}
+
+bool auto_object::operator==(ObjectProtocol *o) const
+{
+    assert(o != NULL);
+    return object == o;
+}
+
+bool auto_object::operator!=(ObjectProtocol *o) const
+{
+    assert(o != NULL);
+    return object != o;
+}
+
+void auto_object::operator=(ObjectProtocol *o)
+{
+    if(object == o)
+        return;
+
+    if(o)
+        o->retain();
+    if(object)
+        object->release();
+    object = o;
+}
+
+SparseObjects::SparseObjects(unsigned m)
+{
+    assert(m > 0);
+    max = m;
+    vector = new ObjectProtocol *[m];
+    memset(vector, 0, sizeof(ObjectProtocol *) * m);
+}
+
+SparseObjects::~SparseObjects()
+{
+    purge();
+}
+
+void SparseObjects::purge(void)
+{
+    if(!vector)
+        return;
+
+    for(unsigned pos = 0; pos < max; ++ pos) {
+        if(vector[pos])
+            vector[pos]->release();
+    }
+    delete[] vector;
+    vector = NULL;
+}
+
+unsigned SparseObjects::count(void)
+{
+    unsigned c = 0;
+    for(unsigned pos = 0; pos < max; ++pos) {
+        if(vector[pos])
+            ++c;
+    }
+    return c;
+}
+
+ObjectProtocol *SparseObjects::invalid(void) const
+{
+    return NULL;
+}
+
+ObjectProtocol *SparseObjects::get(unsigned pos)
+{
+    ObjectProtocol *obj;
+
+    if(pos >= max)
+        return invalid();
+
+    if(!vector[pos]) {
+        obj = create();
+        if(!obj)
+            return invalid();
+        obj->retain();
+        vector[pos] = obj;
+    }
+    return vector[pos];
+}
+
+
diff --git a/jni/libucommon/sources/corelib/persist.cpp b/jni/libucommon/sources/corelib/persist.cpp
new file mode 100644
index 0000000..4ae50d0
--- /dev/null
+++ b/jni/libucommon/sources/corelib/persist.cpp
@@ -0,0 +1,289 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#if defined(OLD_STDCPP) || defined(NEW_STDCPP)
+#if !defined(_MSC_VER) || _MSC_VER >= 1400
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/persist.h>
+
+using namespace UCOMMON_NAMESPACE;
+using namespace std;
+
+const uint32_t NullObject = 0xffffffff;
+
+PersistException::PersistException(const std::string& reason) :
+_what(reason)
+{
+}
+
+const std::string& PersistException::getString() const
+{
+    return _what;
+}
+
+PersistException::~PersistException() throw()
+{
+}
+
+const char* PersistObject::getPersistenceID() const
+{
+  return "PersistObject";
+}
+
+PersistObject::PersistObject()
+{
+  // Do nothing
+}
+
+PersistObject::~PersistObject()
+{
+  // Do nothing
+}
+
+bool PersistObject::write(PersistEngine& archive) const
+{
+  // Do nothing
+  return true; // Successfully
+}
+
+bool PersistObject::read(PersistEngine& archive)
+{
+  // Do nothing
+  return true; // Successfully
+}
+
+static TypeManager::StringFunctionMap* theInstantiationFunctions = 0;
+static int refCount = 0;
+
+TypeManager::StringFunctionMap& _internal_GetMap()
+{
+    return *theInstantiationFunctions;
+}
+void TypeManager::add(const char* name, NewPersistObjectFunction construction)
+{
+  if (refCount++ == 0) {
+    theInstantiationFunctions = new StringFunctionMap;
+  }
+  assert(_internal_GetMap().find(std::string(name)) == _internal_GetMap().end());
+  _internal_GetMap()[std::string(name)] = construction;
+}
+
+void TypeManager::remove(const char* name)
+{
+  assert(_internal_GetMap().find(std::string(name)) != _internal_GetMap().end());
+  _internal_GetMap().erase(_internal_GetMap().find(std::string(name)));
+  if (--refCount == 0) {
+    delete theInstantiationFunctions;
+    theInstantiationFunctions = 0;
+  }
+}
+
+PersistObject* TypeManager::createInstanceOf(const char* name)
+{
+  assert(refCount);
+  assert(_internal_GetMap().find(std::string(name)) != _internal_GetMap().end());
+  return (_internal_GetMap()[std::string(name)])();
+}
+
+TypeManager::registration::registration(const char *name, NewPersistObjectFunction func) :
+myName(name)
+{
+    TypeManager::add(name, func);
+}
+
+TypeManager::registration::~registration()
+{
+    TypeManager::remove(myName.c_str());
+}
+
+PersistEngine::PersistEngine(std::iostream& stream, EngineMode mode) throw(PersistException) :
+myUnderlyingStream(stream), myOperationalMode(mode)
+{
+}
+
+PersistEngine::~PersistEngine()
+{
+    if (myUnderlyingStream.good())
+        myUnderlyingStream.sync();
+}
+
+void PersistEngine::writeBinary(const uint8_t* data, const uint32_t size) throw(PersistException)
+{
+  if(myOperationalMode != modeWrite)
+    throw("Cannot write to an input Engine");
+  myUnderlyingStream.write((const char *)data,size);
+}
+
+
+void PersistEngine::readBinary(uint8_t* data, uint32_t size) throw(PersistException)
+{
+  if(myOperationalMode != modeRead)
+    throw("Cannot read from an output Engine");
+  myUnderlyingStream.read((char *)data,size);
+}
+
+void PersistEngine::write(const PersistObject *object) throw(PersistException)
+{
+  // Pre-step, if object is NULL, then don't serialize it - serialize a
+  // marker to say that it is null.
+  // as ID's are uint32's, NullObject will do nicely for the task
+  if (object == NULL) {
+    uint32_t id = NullObject;
+    write(id);
+    return;
+  }
+
+  // First off - has this Object been serialized already?
+  ArchiveMap::const_iterator itor = myArchiveMap.find(object);
+  if (itor == myArchiveMap.end()) {
+    // Unfortunately we need to serialize it - here we go ....
+    uint32_t id = (uint32_t)myArchiveMap.size();
+    myArchiveMap[object] = id; // bumps id automatically for next one
+    write(id);
+    ClassMap::const_iterator classItor = myClassMap.find(object->getPersistenceID());
+    if (classItor == myClassMap.end()) {
+      uint32_t classId = (uint32_t)myClassMap.size();
+      myClassMap[object->getPersistenceID()] = classId;
+      write(classId);
+      write(static_cast<std::string>(object->getPersistenceID()));
+        }
+    else {
+      write(classItor->second);
+        }
+    std::string majik;
+    majik = "OBST";
+    write(majik);
+    object->write(*this);
+    majik = "OBEN";
+    write(majik);
+  }
+  else {
+    // This object has been serialized, so just pop its ID out
+    write(itor->second);
+  }
+}
+
+void PersistEngine::read(PersistObject &object) throw(PersistException)
+{
+  uint32_t id = 0;
+  read(id);
+  if (id == NullObject)
+    throw("Object Id should not be NULL when un-persisting to a reference");
+
+  // Do we already have this object in memory?
+  if (id < myArchiveVector.size()) {
+    object = *(myArchiveVector[id]);
+    return;
+  }
+
+  // Okay - read the identifier for the class in...
+  // we won't need it later since this object is already allocated
+  readClass();
+
+  // Okay then - we can read data straight into this object
+  readObject(&object);
+}
+
+void PersistEngine::read(PersistObject *&object) throw(PersistException)
+{
+  uint32_t id = 0;
+  read(id);
+  // Is the ID a NULL object?
+  if (id == NullObject) {
+    object = NULL;
+    return;
+  }
+
+  // Do we already have this object in memory?
+  if (id < myArchiveVector.size()) {
+    object = myArchiveVector[id];
+    return;
+  }
+
+  // Okay - read the identifier for the class in...
+  std::string className = readClass();
+
+  // is the pointer already initialized? if so then no need to reallocate
+  if (object != NULL) {
+    readObject(object);
+    return;
+  }
+
+  // Create the object (of the relevant type)
+  object = TypeManager::createInstanceOf(className.c_str());
+  if (object) {
+    // Okay then - we can make this object
+    readObject(object);
+  }
+  else
+    throw(PersistException(std::string("Unable to instantiate object of class ")+className));
+}
+
+void PersistEngine::readObject(PersistObject* object) throw(PersistException)
+{
+  // Okay then - we can make this object
+  myArchiveVector.push_back(object);
+  std::string majik;
+  read(majik);
+  if(majik != std::string("OBST"))
+    throw( PersistException("Missing Start-of-Object marker"));
+  object->read(*this);
+  read(majik);
+  if(majik != std::string("OBEN"))
+    throw( PersistException("Missing End-of-Object marker"));
+}
+
+const std::string PersistEngine::readClass() throw(PersistException)
+{
+  // Okay - read the identifier for the class in...
+  uint32_t classId = 0;
+  read(classId);
+  std::string className;
+  if (classId < myClassVector.size()) {
+    className = myClassVector[classId];
+  }
+  else {
+    // Okay the class wasn't known yet - save its name
+    read(className);
+    myClassVector.push_back(className);
+  }
+
+  return className;
+}
+
+void PersistEngine::write(const std::string& str) throw(PersistException)
+{
+  uint32_t len = (uint32_t)str.length();
+  write(len);
+  writeBinary((uint8_t*)str.c_str(),len);
+}
+
+void PersistEngine::read(std::string& str) throw(PersistException)
+{
+  uint32_t len = 0;
+  read(len);
+  uint8_t *buffer = new uint8_t[len+1];
+  readBinary(buffer,len);
+  buffer[len] = 0;
+  str = (char*)buffer;
+  delete[] buffer;
+}
+
+#endif
+#endif
diff --git a/jni/libucommon/sources/corelib/protocols.cpp b/jni/libucommon/sources/corelib/protocols.cpp
new file mode 100644
index 0000000..f9c4490
--- /dev/null
+++ b/jni/libucommon/sources/corelib/protocols.cpp
@@ -0,0 +1,741 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/protocols.h>
+#include <ucommon/string.h>
+#include <ucommon/memory.h>
+#include <stdlib.h>
+#include <ctype.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#undef  getc
+#undef  putc
+#undef  puts
+#undef  gets
+
+using namespace UCOMMON_NAMESPACE;
+
+void MemoryProtocol::fault(void) const
+{
+}
+
+char *MemoryProtocol::dup(const char *str)
+{
+    if(!str)
+        return NULL;
+    size_t len = strlen(str) + 1;
+    char *mem = static_cast<char *>(alloc(len));
+    if(mem)
+        String::set(mem, len, str);
+    else
+        fault();
+    return mem;
+}
+
+void *MemoryProtocol::dup(void *obj, size_t size)
+{
+    assert(obj != NULL);
+    assert(size > 0);
+
+    char *mem = static_cast<char *>(alloc(size));
+    if(mem)
+        memcpy(mem, obj, size);
+    else
+        fault();
+    return mem;
+}
+
+void *MemoryProtocol::zalloc(size_t size)
+{
+    void *mem = alloc(size);
+
+    if(mem)
+        memset(mem, 0, size);
+    else
+        fault();
+
+    return mem;
+}
+
+MemoryProtocol::~MemoryProtocol()
+{
+}
+
+MemoryRedirect::MemoryRedirect(MemoryProtocol *protocol)
+{
+    target = protocol;
+}
+
+void *MemoryRedirect::_alloc(size_t size)
+{
+    // a null redirect uses the heap...
+    if(!target)
+        return malloc(size);
+
+    return target->_alloc(size);
+}
+
+BufferProtocol::BufferProtocol() : CharacterProtocol()
+{
+    end = true;
+    eol = "\r\n";
+    input = output = buffer = NULL;
+}
+
+BufferProtocol::BufferProtocol(size_t size, mode_t mode)
+{
+    end = true;
+    eol = "\r\n";
+    input = output = buffer = NULL;
+    allocate(size, mode);
+}
+
+BufferProtocol::~BufferProtocol()
+{
+    release();
+}
+
+void BufferProtocol::fault(void) const
+{
+}
+
+void BufferProtocol::release(void)
+{
+    if(buffer) {
+        flush();
+        free(buffer);
+        input = output = buffer = NULL;
+        end = true;
+    }
+}
+
+void BufferProtocol::allocate(size_t size, mode_t mode)
+{
+    release();
+    _clear();
+
+    if(!size)
+        return;
+
+    back = 0;
+    switch(mode) {
+    case RDWR:
+        input = buffer = (char *)malloc(size * 2);
+        if(buffer)
+            output = buffer + size;
+        else
+            fault();
+        break;
+    case RDONLY:
+        input = buffer = (char *)malloc(size);
+        if(!buffer)
+            fault();
+        break;
+    case WRONLY:
+        output = buffer = (char *)malloc(size);
+        if(!buffer)
+            fault();
+        break;
+    }
+
+    bufpos = insize = outsize = 0;
+    bufsize = size;
+
+    if(buffer)
+        end = false;
+}
+
+bool BufferProtocol::_blocking(void)
+{
+    return false;
+}
+
+size_t BufferProtocol::put(const void *address, size_t size)
+{
+    size_t count = 0;
+
+    if(!output || !address || !size)
+        return 0;
+
+    const char *cp = (const char *)address;
+
+    while(count < size) {
+        if(outsize == bufsize) {
+            outsize = 0;
+            if(_push(output, bufsize) < bufsize) {
+                output = NULL;
+                end = true;     // marks a disconnection...
+                return count;
+            }
+        }
+        output[outsize++] = cp[count++];
+    }
+    return count;
+}
+
+size_t BufferProtocol::get(void *address, size_t size)
+{
+    size_t count = 0;
+
+    if(!input || !address || !size)
+        return 0;
+
+    char *cp = (char *)address;
+
+    while(count < size) {
+        if(bufpos == insize) {
+            if(end)
+                return count;
+
+            insize = _pull(input, bufsize);
+            bufpos = 0;
+            if(insize == 0)
+                end = true;
+            else if(insize < bufsize && !_blocking())
+                end = true;
+
+            if(!insize)
+                return count;
+        }
+        cp[count++] = input[bufpos++];
+    }
+    return count;
+}
+
+int BufferProtocol::_getch(void)
+{
+    if(!input)
+        return EOF;
+
+    if(back) {
+        back = 0;
+        return back;
+    }
+
+    if(bufpos == insize) {
+        if(end)
+            return EOF;
+
+        insize = _pull(input, bufsize);
+        bufpos = 0;
+        if(insize == 0)
+            end = true;
+        else if(insize < bufsize && !_blocking())
+            end = true;
+
+        if(!insize)
+            return EOF;
+    }
+
+    return input[bufpos++];
+}
+
+size_t CharacterProtocol::putchars(const char *address, size_t size)
+{
+    size_t count = 0;
+
+    if(!address)
+        return 0;
+
+    if(!size)
+        size = strlen(address);
+
+    while(count < size) {
+        if(_putch(*address) == EOF)
+            break;
+        ++count;
+        ++address;
+    }
+
+    return count;
+}
+
+int BufferProtocol::_putch(int ch)
+{
+    if(!output)
+        return EOF;
+
+    if(ch == 0) {
+        puts(eol);
+        flush();
+        return 0;
+    }
+
+    if(outsize == bufsize) {
+        outsize = 0;
+        if(_push(output, bufsize) < bufsize) {
+            output = NULL;
+            end = true;     // marks a disconnection...
+            return EOF;
+        }
+    }
+
+    output[outsize++] = ch;
+    return ch;
+}
+
+size_t BufferProtocol::printf(const char *pformat, ...)
+{
+    va_list args;
+    int result;
+    size_t count;
+
+    if(!flush() || !output || !pformat)
+        return 0;
+
+    va_start(args, pformat);
+    result = vsnprintf(output, bufsize, pformat, args);
+    va_end(args);
+    if(result < 1)
+        return 0;
+
+    if((size_t)result > bufsize)
+        result = bufsize;
+
+    count = _push(output, result);
+    if(count < (size_t)result) {
+        output = NULL;
+        end = true;
+    }
+
+    return count;
+}
+
+void BufferProtocol::purge(void)
+{
+    outsize = insize = bufpos = 0;
+}
+
+bool BufferProtocol::_flush(void)
+{
+    if(!output)
+        return false;
+
+    if(!outsize)
+        return true;
+
+    if(_push(output, outsize) == outsize) {
+        outsize = 0;
+        return true;
+    }
+    output = NULL;
+    end = true;
+    return false;
+}
+
+char *BufferProtocol::gather(size_t size)
+{
+    if(!input || size > bufsize)
+        return NULL;
+
+    if(size + bufpos > insize) {
+        if(end)
+            return NULL;
+
+        size_t adjust = outsize - bufpos;
+        memmove(input, input + bufpos, adjust);
+        insize = adjust +  _pull(input, bufsize - adjust);
+        bufpos = 0;
+
+        if(insize < bufsize)
+            end = true;
+    }
+
+    if(size + bufpos <= insize) {
+        char *bp = input + bufpos;
+        bufpos += size;
+        return bp;
+    }
+
+    return NULL;
+}
+
+char *BufferProtocol::request(size_t size)
+{
+    if(!output || size > bufsize)
+        return NULL;
+
+    if(size + outsize > bufsize)
+        flush();
+
+    size_t offset = outsize;
+    outsize += size;
+    return output + offset;
+}
+
+size_t CharacterProtocol::putline(const char *string)
+{
+    size_t count = 0;
+
+    while(string && *string && (EOF != _putch(*string)))
+        ++count;
+
+    string = eol;
+    while(string && *string && (EOF != _putch(*string)))
+        ++count;
+
+    return count;
+}
+
+size_t CharacterProtocol::getline(String& s)
+{
+    size_t result = getline(s.c_mem(), s.size() + 1);
+    String::fix(s);
+    return result;
+}
+
+size_t CharacterProtocol::getline(char *string, size_t size)
+{
+    size_t count = 0;
+    unsigned eolp = 0;
+    const char *eols = eol;
+    bool eof = false;
+
+    if(!eols)
+        eols = "\0";
+
+    if(string)
+        string[0] = 0;
+
+    while(count < size - 1) {
+        int ch = _getch();
+        if(ch == EOF) {
+            eolp = 0;
+            eof = true;
+            break;
+        }
+
+        string[count++] = ch;
+
+        if(ch == eols[eolp]) {
+            ++eolp;
+            if(eols[eolp] == 0)
+                break;
+        }
+        else
+            eolp = 0;
+
+        // special case for \r\n can also be just eol as \n
+        if(eq(eol, "\r\n") && ch == '\n') {
+            ++eolp;
+            break;
+        }
+    }
+    count -= eolp;
+    string[count] = 0;
+    if(!eof)
+        ++count;
+    return count;
+}
+
+size_t CharacterProtocol::print(const PrintProtocol& f)
+{
+    const char *cp = f._print();
+
+    if(cp == NULL)
+        return putchar(0);
+
+    return putchars(cp);
+}
+
+size_t CharacterProtocol::input(InputProtocol& f)
+{
+    int c;
+    size_t count = 0;
+
+    for(;;) {
+        if(back) {
+            c = back;
+            back = 0;
+        }
+        else
+            c = _getch();
+
+        c = f._input(c);
+        if(c) {
+            if(c != EOF)
+                back = c;
+            else
+                ++count;
+            break;
+        }
+        ++count;
+    }
+    return count;
+}
+
+size_t CharacterProtocol::load(StringPager *list)
+{
+    if(!list)
+        return 0;
+
+    size_t used = 0;
+    size_t size = list->size() - 64;
+
+    char *tmp = (char *)malloc(size);
+    while(getline(tmp, size)) {
+        if(!list->filter(tmp, size))
+            break;
+
+        ++used;
+    }
+    free(tmp);
+    return used;
+}
+
+size_t CharacterProtocol::save(const StringPager *list)
+{
+    size_t used = 0;
+    if(!list)
+        return 0;
+
+    StringPager::iterator sp = list->begin();
+    while(is(sp) && putline(sp->get())) {
+        ++used;
+        sp.next();
+    }
+    return used;
+}
+
+void BufferProtocol::reset(void)
+{
+    insize = bufpos = 0;
+}
+
+bool BufferProtocol::eof(void)
+{
+    if(!input)
+        return true;
+
+    if(end && bufpos == insize)
+        return true;
+
+    return false;
+}
+
+bool BufferProtocol::_pending(void)
+{
+    if(!input)
+        return false;
+
+    if(!bufpos)
+        return false;
+
+    return true;
+}
+
+void LockingProtocol::_lock(void)
+{
+}
+
+void LockingProtocol::_unlock(void)
+{
+}
+
+LockingProtocol::~LockingProtocol()
+{
+}
+
+CharacterProtocol::CharacterProtocol()
+{
+    back = 0;
+    eol = "\n";
+}
+
+CharacterProtocol::~CharacterProtocol()
+{
+}
+
+ObjectProtocol::~ObjectProtocol()
+{
+}
+
+ObjectProtocol *ObjectProtocol::copy(void)
+{
+    retain();
+    return this;
+}
+
+CharacterProtocol& _character_operators::print(CharacterProtocol& p, const char& c)
+{
+    p.putchar((int)c);
+    return p;
+}
+
+CharacterProtocol& _character_operators::input(CharacterProtocol& p, char& c)
+{
+    int code = p.getchar();
+    if(code == EOF)
+        code = 0;
+    c = code;
+    return p;
+}
+
+CharacterProtocol& _character_operators::print(CharacterProtocol& p, const char *str)
+{
+    if(!str)
+        p.putline("");
+    else
+        p.putchars(str);
+    return p;
+}
+
+CharacterProtocol& _character_operators::input(CharacterProtocol& p, String& str)
+{
+    if(str.c_mem()) {
+        p.getline(str.c_mem(), str.size());
+        String::fix(str);
+    }
+    return p;
+}
+
+CharacterProtocol& _character_operators::print(CharacterProtocol& p, const long& v)
+{
+    char buf[40];
+    snprintf(buf, sizeof(buf), "%ld", v);
+    p.putchars(buf);
+    return p;
+}
+
+CharacterProtocol& _character_operators::print(CharacterProtocol& p, const double& v)
+{
+    char buf[40];
+    snprintf(buf, sizeof(buf), "%f", v);
+    p.putchars(buf);
+    return p;
+}
+
+
+class __LOCAL _input_long : public InputProtocol
+{
+public:
+    long* ref;
+    size_t pos;
+    char buf[32];
+
+    _input_long(long& v);
+
+    int _input(int code);
+};
+
+class __LOCAL _input_double : public InputProtocol
+{
+public:
+    double* ref;
+    bool dot;
+    bool e;
+    size_t pos;
+    char buf[60];
+
+    _input_double(double& v);
+
+    int _input(int code);
+};
+
+_input_long::_input_long(long& v)
+{
+    ref = &v;
+    v = 0l;
+    pos = 0;
+}
+
+_input_double::_input_double(double& v)
+{
+    dot = e = false;
+    v = 0.0;
+    pos = 0;
+    ref = &v;
+}
+
+int _input_long::_input(int code)
+{
+    if(code == '-' && !pos)
+        goto valid;
+
+    if(isdigit(code) && pos < sizeof(buf) - 1)
+        goto valid;
+
+    buf[pos] = 0;
+    if(pos)
+        sscanf(buf, "%ld", ref);
+
+    return code;
+
+valid:
+    buf[pos++] = code;
+    return 0;
+}
+
+int _input_double::_input(int code)
+{
+    if(code == '-' && !pos)
+        goto valid;
+
+    if(code == '-' && buf[pos] == 'e')
+        goto valid;
+
+    if(tolower(code) == 'e' && !e) {
+        e = true;
+        code = 'e';
+        goto valid;
+    }
+
+    if(code == '.' && !dot) {
+        dot = true;
+        goto valid;
+    }
+
+    if(isdigit(code) && pos < sizeof(buf) - 1)
+        goto valid;
+
+    buf[pos] = 0;
+    if(pos)
+        sscanf(buf, "%lf", ref);
+
+    return code;
+
+valid:
+    buf[pos++] = code;
+    return 0;
+}
+
+CharacterProtocol& _character_operators::input(CharacterProtocol& p, long& v)
+{
+    _input_long lv(v);
+    p.input(lv);
+    return p;
+}
+
+CharacterProtocol& _character_operators::input(CharacterProtocol& p, double& v)
+{
+    _input_double lv(v);
+    p.input(lv);
+    return p;
+}
+
+PrintProtocol::~PrintProtocol()
+{
+}
+
+InputProtocol::~InputProtocol()
+{
+}
diff --git a/jni/libucommon/sources/corelib/regex.cpp b/jni/libucommon/sources/corelib/regex.cpp
new file mode 100644
index 0000000..b320e87
--- /dev/null
+++ b/jni/libucommon/sources/corelib/regex.cpp
@@ -0,0 +1,249 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/string.h>
+#include <ucommon/memory.h>
+#include <stdarg.h>
+#include <ctype.h>
+#include <stdio.h>
+#ifdef  HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#include <limits.h>
+#ifdef  HAVE_REGEX_H
+#include <regex.h>
+#endif
+
+using namespace UCOMMON_NAMESPACE;
+
+String::regex::regex(const char *pattern, size_t slots)
+{
+#ifdef  HAVE_REGEX_H
+    regex_t *r = (regex_t *)malloc(sizeof(regex_t));
+    if(regcomp(r, pattern, 0)) {
+        regfree(r);
+        free(r);
+        r = NULL;
+    }
+    object = r;
+    count = slots;
+    results = (regmatch_t *)malloc(sizeof(regmatch_t) * slots);
+#else
+    object = results = NULL;
+    count = 0;
+#endif
+}
+
+String::regex::regex(size_t slots)
+{
+#ifdef  HAVE_REGEX_H
+    count = slots;
+    results = (regmatch_t *)malloc(sizeof(regmatch_t) * slots);
+    object = NULL;
+#else
+    object = results = NULL;
+    count = 0;
+#endif
+}
+
+String::regex& String::regex::operator=(const char *pattern)
+{
+#ifdef  HAVE_REGEX_H
+    if(object) {
+        regfree((regex_t *)object);
+        free(object);
+    }
+    regex_t *r = (regex_t *)malloc(sizeof(regex_t));
+    if(regcomp(r, pattern, 0)) {
+        regfree(r);
+        free(r);
+        r = NULL;
+    }
+    object = r;
+#endif
+    return *this;
+}
+
+bool String::regex::operator*=(const char *text)
+{
+    return match(text);
+}
+
+String::regex::~regex()
+{
+#ifdef  HAVE_REGEX_H
+    if(object) {
+        regfree((regex_t *)object);
+        free(object);
+    }
+    if(results)
+        free(results);
+    object = results = NULL;
+#endif
+}
+
+size_t String::regex::offset(unsigned member)
+{
+#ifdef  HAVE_REGEX_H
+    if(!results)
+        return (size_t)-1;
+
+    regmatch_t *r = (regmatch_t *)results;
+
+    if(member >= count)
+        return (size_t)-1;
+    return (size_t)r[member].rm_so;
+#else
+    return (size_t)-1;
+#endif
+}
+
+size_t String::regex::size(unsigned member)
+{
+#ifdef  HAVE_REGEX_H
+    if(!results)
+        return 0;
+
+    regmatch_t *r = (regmatch_t *)results;
+
+    if(member >= count)
+        return (size_t)-1;
+
+    if(r[member].rm_so == -1)
+        return 0;
+
+    return (size_t)(r[member].rm_eo - r[member].rm_so);
+#else
+    return (size_t)0;
+#endif
+}
+
+bool String::regex::match(const char *text, unsigned mode)
+{
+#ifdef  HAVE_REGEX_H
+    int flags = 0;
+
+    if((mode & 0x01) == INSENSITIVE)
+        flags |= REG_ICASE;
+
+    if(!text || !object || !results)
+        return false;
+
+    if(regexec((regex_t *)object, text, count, (regmatch_t *)results, flags))
+        return false;
+
+    return true;
+#else
+    return false;
+#endif
+}
+
+const char *String::search(regex& expr, unsigned member, unsigned flags) const
+{
+    if(!str)
+        return NULL;
+
+#ifdef  HAVE_REGEX_H
+    if(expr.match(str->text, flags))
+        return NULL;
+
+    if(member >= expr.members())
+        return NULL;
+
+    if(expr.size(member) == 0)
+        return NULL;
+
+    return str->text + expr.offset(member);
+#else
+    return NULL;
+#endif
+}
+
+unsigned String::replace(regex& expr, const char *cp, unsigned flags)
+{
+#ifdef  HAVE_REGEX_H
+    size_t cpl = 0;
+
+    if(cp)
+        cpl = strlen(cp);
+
+    if(!str || str->len == 0)
+        return 0;
+
+    if(expr.match(str->text, flags))
+        return 0;
+
+    ssize_t adjust = 0;
+    unsigned member = 0;
+
+    while(member < expr.members()) {
+        ssize_t tcl = expr.size(member);
+        ssize_t offset = (expr.offset(member) + adjust);
+        if(!tcl)
+            break;
+
+        ++member;
+        cut(offset, tcl);
+        if(cpl) {
+            paste(offset, cp);
+            adjust += (cpl - tcl);
+        }
+    }
+    return member;
+#else
+    return 0;
+#endif
+}
+
+bool String::operator*=(regex& expr)
+{
+    if(search(expr))
+        return true;
+
+    return false;
+}
+
+unsigned StringPager::split(stringex_t& expr, const char *string, unsigned flags)
+{
+    strdup_t tmp = String::dup(string);
+    int prior = 0, match = 0;
+    size_t tcl = strlen(string);
+    unsigned count = 0, member = 0;
+
+    if(!expr.match(string, flags))
+        return 0;
+
+    while(member < expr.members()) {
+        if(!expr.size(member))
+            break;
+        match = expr.offset(member++);
+        if(match > prior) {
+            tmp[match] = 0;
+            add(tmp + (size_t)prior);
+            ++count;
+        }
+        prior = match + tcl;
+    }
+    if(tmp[prior]) {
+        add(tmp + (size_t)prior);
+        ++count;
+    }
+    return count;
+}
+
diff --git a/jni/libucommon/sources/corelib/shell.cpp b/jni/libucommon/sources/corelib/shell.cpp
new file mode 100644
index 0000000..0b9c448
--- /dev/null
+++ b/jni/libucommon/sources/corelib/shell.cpp
@@ -0,0 +1,2536 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/protocols.h>
+#include <ucommon/string.h>
+#include <ucommon/memory.h>
+#include <ucommon/thread.h>
+#include <ucommon/fsys.h>
+#include <ucommon/shell.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#ifdef  HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <ctype.h>
+
+#ifdef  _MSWINDOWS_
+#include <process.h>
+#include <winreg.h>
+#include <conio.h>
+#else
+#include <sys/wait.h>
+#include <sys/ioctl.h>
+#ifdef  HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef  HAVE_TERMIOS_H
+#include <termios.h>
+#endif
+#ifdef  HAVE_TERMIO_H
+#include <termio.h>
+#endif
+#endif
+
+#ifdef  HAVE_SYS_RESOURCE_H
+#include <sys/time.h>
+#include <sys/resource.h>
+#endif
+
+#ifdef  HAVE_SETLOCALE
+#include <locale.h>
+#else
+#define setlocale(s, t)
+#endif
+
+#ifndef HAVE_LIBINTL_H
+#undef  HAVE_GETTEXT
+#endif
+
+#ifdef  HAVE_GETTEXT
+#include <libintl.h>
+#else
+#define dgettext(d, s) s
+#define gettext(s)  s
+#define bindtextdomain(s, t)
+#define textdomain(s)
+#endif
+
+#ifdef  HAVE_SYSLOG_H
+#include <syslog.h>
+#endif
+
+#ifndef OPEN_MAX
+#define OPEN_MAX 20
+#endif
+
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(status) ((unsigned)(status) >> 8)
+#endif
+
+#ifndef _PATH_TTY
+#define _PATH_TTY   "/dev/tty"
+#endif
+
+using namespace UCOMMON_NAMESPACE;
+
+static shell::loglevel_t errlevel = shell::WARN;
+static shell::logmode_t errmode = shell::NONE;
+static const char *errname = NULL;
+static shell::logproc_t errproc = (shell::logproc_t)NULL;
+static mutex_t symlock;
+static char **_orig = NULL;
+static shell::Option *ofirst = NULL, *olast = NULL;
+static const char *_domain = NULL;
+static shell::exitproc_t _exitproc = NULL;
+static shell::numeric_t numeric_mode = shell::NO_NUMERIC;
+static long numeric_value = 0l;
+
+shell::Option::Option(char shortopt, const char *longopt, const char *value, const char *help) :
+LinkedObject()
+{
+    if(olast) {
+        olast->Next = this;
+        olast = this;
+    }
+    else
+        ofirst = olast = this;
+
+    while(longopt && *longopt == '-')
+        ++longopt;
+
+    short_option = shortopt;
+    long_option = longopt;
+    uses_option = value;
+    help_string = help;
+    trigger_option = false;
+}
+
+shell::Option::~Option()
+{
+}
+
+void shell::Option::reset(void)
+{
+    ofirst = olast = NULL;
+}
+
+LinkedObject *shell::Option::first(void)
+{
+    return ofirst;
+}
+
+void shell::Option::disable(void)
+{
+    short_option = 0;
+    long_option = NULL;
+    help_string = NULL;
+    uses_option = NULL;
+}
+
+shell::flagopt::flagopt(char short_option, const char *long_option, const char *help_string, bool single_use) :
+shell::Option(short_option, long_option, NULL, help_string)
+{
+    single = single_use;
+    counter = 0;
+}
+
+const char *shell::flagopt::assign(const char *value)
+{
+    if(single && counter)
+        return shell::errmsg(shell::OPTION_USED);
+
+    ++counter;
+    return NULL;
+}
+
+shell::numericopt::numericopt(char short_option, const char *long_option, const char *help_string, const char *type, long def_value) :
+shell::Option(short_option, long_option, type, help_string)
+{
+    used = false;
+    number = def_value;
+}
+
+const char *shell::numericopt::assign(const char *value)
+{
+    char *endptr = NULL;
+
+    if(used)
+        return errmsg(shell::OPTION_USED);
+
+    used = true;
+    number = strtol(value, &endptr, 0);
+    if(!endptr || *endptr != 0)
+        return errmsg(shell::BAD_VALUE);
+
+    return NULL;
+}
+
+shell::counteropt::counteropt(char short_option, const char *long_option, const char *help_string, const char *type, long def_value) :
+shell::Option(short_option, long_option, type, help_string)
+{
+    used = false;
+    number = def_value;
+    trigger_option = true;
+}
+
+const char *shell::counteropt::assign(const char *value)
+{
+    char *endptr = NULL;
+
+    // trigger option mode received...
+    if(value == NULL) {
+        ++number;
+        used = true;
+        return NULL;
+    }
+
+    if(used)
+        return errmsg(shell::OPTION_USED);
+
+    used = true;
+    number = strtol(value, &endptr, 0);
+    if(!endptr || *endptr != 0)
+        return errmsg(shell::BAD_VALUE);
+
+    return NULL;
+}
+
+shell::groupopt::groupopt(const char *help_string) :
+shell::Option(0, NULL, NULL, help_string)
+{
+}
+
+const char *shell::groupopt::assign(const char *value)
+{
+    return NULL;
+}
+
+shell::stringopt::stringopt(char short_option, const char *long_option, const char *help_string, const char *type, const char *def_value) :
+shell::Option(short_option, long_option, type, help_string)
+{
+    used = false;
+    text = def_value;
+}
+
+const char *shell::stringopt::assign(const char *value)
+{
+    if(used)
+        return shell::errmsg(shell::OPTION_USED);
+
+    text = value;
+    used = true;
+    return NULL;
+}
+
+shell::charopt::charopt(char short_option, const char *long_option, const char *help_string, const char *type, char def_value) :
+shell::Option(short_option, long_option, type, help_string)
+{
+    used = false;
+    code = def_value;
+}
+
+const char *shell::charopt::assign(const char *value)
+{
+    long number;
+    char *endptr = NULL;
+
+    if(used)
+        return shell::errmsg(shell::OPTION_USED);
+
+    used = true;
+    if(value[1] == 0) {
+        code = value[0];
+        return NULL;
+    }
+
+    number = strtol(value, &endptr, 0);
+    if(!endptr || *endptr != 0)
+        return errmsg(shell::BAD_VALUE);
+
+    if(number < 0 || number > 255)
+        return errmsg(shell::BAD_VALUE);
+
+    code = (char)(number);
+    return NULL;
+}
+
+void shell::collapse(LinkedObject *first)
+{
+    char **argv = _argv = (char **)mempager::_alloc(sizeof(char **) * (_argc + 1));
+    linked_pointer<args> ap = first;
+    while(is(ap)) {
+        *(argv++) = ap->item;
+        ap.next();
+    }
+    *argv = NULL;
+}
+
+void shell::set0(char *argv0)
+{
+    char prefix[256];
+
+    if(_argv0)
+        return;
+
+    if(*argv0 != '/' && *argv0 != '\\' && argv0[1] != ':') {
+        fsys::prefix(prefix, sizeof(prefix));
+        String::add(prefix, sizeof(prefix), "/");
+        String::add(prefix, sizeof(prefix), argv0);
+    }
+    else
+        String::set(prefix, sizeof(prefix), argv0);
+
+    argv0 = _exedir = dup(prefix);
+
+    _argv0 = strrchr(argv0, '/');
+#ifdef  _MSWINDOWS_
+    if(!_argv0)
+        _argv0 = strrchr(argv0, '\\');
+    if(!_argv0)
+        _argv0 = strchr(argv0, ':');
+#endif
+    if(!_argv0)
+        _argv0 = argv0;
+    else
+        (*_argv0++) = 0;
+
+    if(eq(_argv0, "lt-", 3))
+        _argv0 += 3;
+
+//  _argv0 = dup(_argv0);
+
+#ifdef  _MSWINDOWS_
+    char *ext = strrchr(_argv0, '.');
+    if(eq_case(ext, ".exe") || eq_case(ext, ".com"))
+        *ext = 0;
+#endif
+
+    if(!_domain)
+        bind(_argv0);
+}
+
+shell::shell(size_t pagesize) :
+mempager(pagesize)
+{
+    _exedir = NULL;
+    _argv0 = NULL;
+    _argv = NULL;
+    _argc = 0;
+    _syms = NULL;
+}
+
+shell::shell(const char *string, size_t pagesize) :
+mempager(pagesize)
+{
+    _argv0 = NULL;
+    _argv = NULL;
+    _argc = 0;
+    _syms = NULL;
+
+    parse(string);
+}
+
+shell::shell(int argc, char **argv, size_t pagesize) :
+mempager(pagesize)
+{
+    _argv0 = NULL;
+    _argv = NULL;
+    _argc = 0;
+    _syms = NULL;
+
+    parse(argc, argv);
+}
+
+static const char *msgs[] = {
+    _TEXT("missing command line arguments"),
+    _TEXT("missing argument for option"),
+    _TEXT("option does not have argument"),
+    _TEXT("unknown command option"),
+    _TEXT("option already used"),
+    _TEXT("invalid argument used"),
+    _TEXT("numeric value already set"),
+    NULL};
+
+const char *shell::errmsg(errmsg_t id)
+{
+    return dgettext("ucommon", msgs[id]);
+}
+
+void shell::errmsg(errmsg_t id, const char *text)
+{
+    msgs[id] = shell::text(text);
+}
+
+void shell::setNumeric(numeric_t mode)
+{
+    numeric_mode = mode;
+    numeric_value = 0l;
+}
+
+long shell::getNumeric(void)
+{
+    return numeric_value;
+}
+
+unsigned shell::count(char **argv)
+{
+    unsigned count = 0;
+
+    while(argv && argv[count])
+        ++count;
+
+    return count;
+}
+
+void shell::help(void)
+{
+    linked_pointer<Option> op = Option::first();
+    unsigned hp = 0, count = 0;
+    while(is(op)) {
+        if(!op->help_string) {
+            ++op;
+            continue;
+        }
+        if(op->short_option && op->long_option && op->uses_option && !op->trigger_option) {
+            printf("  -%c .., ", op->short_option);
+            hp = 9;
+        }
+        else if(op->short_option && op->long_option) {
+            printf("  -%c, ", op->short_option);
+            hp = 6;
+        }
+        else if(op->long_option) {
+            printf("  ");
+            hp = 2;
+        }
+        else if(op->uses_option) {
+            printf("  -%c %s", op->short_option, op->uses_option);
+            hp = 5 + strlen(op->uses_option);
+        }
+        else if(op->short_option) {
+            printf("  -%c ", op->short_option);
+            hp = 5;
+        }
+        else {      // grouping separator
+            if(count)
+                printf("\n%s:\n", op->help_string);
+            else
+                printf("%s:\n", op->help_string);
+            ++op;
+            continue;
+        }
+
+        ++count;
+
+        if(op->long_option && op->uses_option) {
+            printf("--%s=%s", op->long_option, op->uses_option);
+            hp += strlen(op->long_option) + strlen(op->uses_option) + 3;
+        }
+        else if(op->long_option) {
+            printf("--%s", op->long_option);
+            hp += strlen(op->long_option) + 2;
+        }
+        if(hp > 29) {
+            printf("\n");
+            hp = 0;
+        }
+        while(hp < 30) {
+            putchar(' ');
+            ++hp;
+        }
+        const char *hs = shell::text(op->help_string);
+        while(*hs) {
+            if(*hs == '\n' || (((*hs == ' ' || *hs == '\t')) && (hp > 75))) {
+                printf("\n                              ");
+                hp = 30;
+            }
+            else if(*hs == '\t') {
+                if(!(hp % 8)) {
+                    putchar(' ');
+                    ++hp;
+                }
+                while(hp % 8) {
+                    putchar(' ');
+                    ++hp;
+                }
+            }
+            else
+                putchar(*hs);
+            ++hs;
+        }
+        printf("\n");
+        ++op;
+    }
+}
+
+char **shell::parse(const char *string)
+{
+    assert(string != NULL);
+
+    args *arg;
+    char quote = 0;
+    char *cp = mempager::dup(string);
+    bool active = false;
+    OrderedIndex arglist;
+
+    _argc = 0;
+
+    while(*cp) {
+        if(isspace(*cp) && active && !quote) {
+inactive:
+            active = false;
+            *(cp++) = 0;
+            continue;
+        }
+        if(*cp == '\'' && !active) {
+            quote = *cp;
+            goto argument;
+        }
+        if(*cp == '\"' && !active) {
+            quote = *(cp++);
+            goto argument;
+        }
+        if(*cp == quote && active) {
+            if(quote == '\"')
+                goto inactive;
+            if(isspace(cp[1])) {
+                ++cp;
+                goto inactive;
+            }
+        }
+        if(!isspace(*cp) && !active) {
+argument:
+            ++_argc;
+            active = true;
+            arg = init<args>((args *)mempager::_alloc(sizeof(args)));
+            arg->item = (cp++);
+            arg->enlist(&arglist);
+            continue;
+        }
+        ++cp;
+    }
+    collapse(arglist.begin());
+    set0(*_argv);
+    return _argv;
+}
+
+int shell::systemf(const char *format, ...)
+{
+    va_list args;
+    char buffer[1024];
+
+    va_start(args, format);
+    vsnprintf(buffer, sizeof(buffer), format, args);
+    va_end(args);
+
+    return system(buffer);
+}
+
+void shell::parse(int argc, char **argv)
+{
+    if(!_orig)
+        _orig = argv;
+
+    getargv0(argv);
+    getargv(++argv);
+}
+
+char *shell::getargv0(char **argv)
+{
+    if(!argv || !argv[0])
+        errexit(-1, "*** %s\n", errmsg(shell::NOARGS));
+
+    set0(argv[0]);
+    return _argv0;
+}
+
+char **shell::getargv(char **argv)
+{
+    char *arg, *opt;
+    unsigned len;
+    const char *value;
+    const char *err;
+    unsigned argp = 0;
+    bool skip;
+
+    while(argv[argp]) {
+        skip = false;
+        if(eq(argv[argp], "--")) {
+            ++argp;
+            break;
+        }
+        arg = opt = argv[argp];
+
+        switch(numeric_mode) {
+        case shell::NUMERIC_DASH:
+        case shell::NUMERIC_ALL:
+            if(opt[0] == '-' && opt[1] >= '0' && opt[1] <= '9') {
+                if(numeric_value)
+                    shell::errexit(1, "*** %s: %s: %s\n",
+                        _argv0, opt, errmsg(shell::NUMERIC_SET));
+                numeric_value = atol(opt);
+                skip = true;
+            }
+            break;
+        default:
+            break;
+        }
+
+        switch(numeric_mode) {
+        case shell::NUMERIC_PLUS:
+        case shell::NUMERIC_ALL:
+            if(opt[0] == '+' && opt[1] >= '0' && opt[1] <= '9') {
+                if(numeric_value)
+                    shell::errexit(1, "*** %s: %s: %s\n",
+                        _argv0, opt, errmsg(shell::NUMERIC_SET));
+                numeric_value = atol(++opt);
+                skip = true;
+            }
+            break;
+        default:
+            break;
+        }
+
+        if(skip) {
+            ++argp;
+            continue;
+        }
+
+        if(*arg != '-')
+            break;
+
+        ++argp;
+
+        linked_pointer<Option> op = Option::first();
+        err = NULL;
+        value = NULL;
+
+        ++opt;
+        if(*opt == '-')
+            ++opt;
+
+        // long option parsing...
+
+        while(is(op)) {
+            if(!op->long_option) {
+                op.next();
+                continue;
+            }
+            len = strlen(op->long_option);
+            value = NULL;
+            if(op->long_option && eq(op->long_option, opt, len)) {
+                if(opt[len] == '=' && !op->uses_option)
+                    errexit(1, "*** %s: --%s: %s\n", _argv0, op->long_option, errmsg(shell::INVARGUMENT));
+                if(opt[len] == '=') {
+                    value = opt + len + 1;
+                    break;
+                }
+                if(opt[len] == 0) {
+                    if(op->uses_option)
+                        value = argv[argp++];
+                    break;
+                }
+            }
+            op.next();
+        }
+
+        // if we have long option, try to assign it...
+        if(is(op)) {
+            if(op->uses_option && value == NULL)
+                errexit(1, "*** %s: --%s: %s\n", _argv0, op->long_option, errmsg(shell::NOARGUMENT));
+            err = op->assign(value);
+            if(err)
+                errexit(1, "*** %s: --%s: %s\n", _argv0, op->long_option, shell::text(err));
+            continue;
+        }
+
+        // if unknown long option was used...
+        if(eq(arg, "--", 2)) {
+            char *cp = strchr(arg, '=');
+            if(cp)
+                *cp = 0;
+            errexit(1, "*** %s: %s: %s\n", _argv0, arg, errmsg(shell::BADOPTION));
+        }
+
+        // short form -xyz flags parsing...
+
+        while(*(++arg) != 0) {
+            value = NULL;
+
+            op = Option::first();
+            while(is(op)) {
+                if(op->short_option == *arg)
+                    break;
+                op.next();
+            }
+
+            if(!is(op))
+                errexit(1, "*** %s: -%c: %s\n", _argv0, *arg, errmsg(shell::BADOPTION));
+
+            value = NULL;
+            if(op->trigger_option)
+                goto trigger;
+
+            if(op->uses_option && arg[1] == 0)
+                value = argv[argp++];
+            else if(op->uses_option)
+                value = ++arg;
+
+            if(op->uses_option && value == NULL)
+                errexit(1, "*** %s: -%c: %s\n", _argv0, op->short_option, errmsg(shell::NOARGUMENT));
+trigger:
+            err = op->assign(value);
+            if(err)
+                errexit(1, "*** %s: -%c: %s\n", _argv0, op->short_option, shell::text(err));
+            if(value)
+                break;
+        }
+    }
+    _argv = &argv[argp];
+
+    _argc = 0;
+    argv = _argv;
+    while(argv[_argc])
+        ++_argc;
+
+#if defined(_MSWINDOWS_) && defined(_MSC_VER)
+    const char *fn;
+    char dirname[128];
+    WIN32_FIND_DATA entry;
+    args *argitem;
+    fd_t dir;
+    OrderedIndex arglist;
+    _argc = 0;
+
+    while(_argv != NULL && *_argv != NULL) {
+        fn = strrchr(*_argv, '/');
+        arg = *_argv;
+        if(!fn)
+            fn = strrchr(*_argv, '\\');
+        if(!fn && arg[1] == ':')
+            fn = strrchr(*_argv, ':');
+        if(fn)
+            ++fn;
+        else
+            fn = *_argv;
+        if(!*fn)
+            goto skip;
+        // url type things do not get expanded...
+        if(strchr(fn, ':'))
+            goto skip;
+        if(*fn != '*' && fn[strlen(fn) - 1] != '*' && !strchr(fn, '?'))
+            goto skip;
+        if(eq(fn, "*"))
+            fn = "*.*";
+        len = fn - *_argv;
+        if(len >= sizeof(dirname))
+            len = sizeof(dirname) - 1;
+        if(len == 0)
+            dirname[0] = 0;
+        else
+            String::set(dirname, ++len, *_argv);
+        len = strlen(dirname);
+        if(len)
+            String::set(dirname + len, sizeof(dirname) - len, fn);
+        else
+            String::set(dirname, sizeof(dirname), fn);
+        dir = FindFirstFile(dirname, &entry);
+        if(dir == INVALID_HANDLE_VALUE)
+            goto skip;
+        do {
+            if(len)
+                String::set(dirname + len, sizeof(dirname) - len, fn);
+            else
+                String::set(dirname, sizeof(dirname), fn);
+            argitem = init<args>((args *)mempager::_alloc(sizeof(args)));
+            argitem->item = mempager::dup(dirname);
+            argitem->enlist(&arglist);
+            ++_argc;
+        } while(FindNextFile(dir, &entry));
+        CloseHandle(dir);
+        ++*_argv;
+        continue;
+skip:
+        argitem = init<args>((args *)mempager::_alloc(sizeof(args)));
+        argitem->item = *(_argv++);
+        argitem->enlist(&arglist);
+        ++_argc;
+    }
+    collapse(arglist.begin());
+#endif
+    return _argv;
+}
+
+void shell::error(const char *format, ...)
+{
+    va_list args;
+    char buf[256];
+
+    String::set(buf, sizeof(buf) - 1, format);
+    size_t len = strlen(buf);
+
+    if(buf[len - 1] != '\n') {
+        buf[len] = '\n';
+        buf[len + 1] = 0;
+    }
+    else
+        --len;
+
+    format = buf;
+
+    va_start(args, format);
+    if(!eq("*** ", format, 4))
+        fputs("*** ", stderr);
+    vfprintf(stderr, format, args);
+    fflush(stderr);
+
+    buf[len] = 0;
+
+#ifdef  HAVE_SYSLOG_H
+    if(errname && errmode != NONE && (ERR <= errlevel)) {
+        if(eq("*** ", format, 4)) {
+            format += 4;
+            const char *cp = format;
+            while(isalnum(*cp) || *cp == '-' || *cp == '.')
+                ++cp;
+            if(*cp == ':' && cp[1] == ' ')
+                format = cp + 2;
+        }
+        vsyslog(LOG_ERR, format, args);
+    }
+#endif
+    va_end(args);
+}
+
+void shell::errexit(int exitcode, const char *format, ...)
+{
+    if(!exitcode)
+        return;
+
+    va_list args;
+    char buf[256];
+
+    String::set(buf, sizeof(buf) - 1, format);
+    size_t len = strlen(buf);
+
+    if(buf[len - 1] != '\n') {
+        buf[len] = '\n';
+        buf[len + 1] = 0;
+    }
+    else
+        --len;
+
+    format = buf;
+
+    va_start(args, format);
+    if(!eq("*** ", format, 4))
+        fputs("*** ", stderr);
+    vfprintf(stderr, format, args);
+    fflush(stderr);
+
+    buf[len] = 0;
+
+#ifdef  HAVE_SYSLOG_H
+    if(errname && errmode != NONE && (FAIL <= errlevel)) {
+        if(eq("*** ", format, 4)) {
+            format += 4;
+            const char *cp = format;
+            while(isalnum(*cp) || *cp == '-' || *cp == '.')
+                ++cp;
+            if(*cp == ':' && cp[1] == ' ')
+                format = cp + 2;
+        }
+        vsyslog(LOG_CRIT, format, args);
+    }
+#endif
+
+    va_end(args);
+    ::exit(exitcode);
+}
+
+size_t shell::printf(const char *format, ...)
+{
+    va_list args;
+    va_start(args, format);
+    size_t result = vprintf(format, args);
+    va_end(args);
+    if(result == (size_t)EOF)
+        result = 0;
+    fflush(stdout);
+    return result;
+}
+
+size_t shell::readln(char *address, size_t size)
+{
+    address[0] = 0;
+
+    if(!fgets(address, size, stdin))
+        return 0;
+
+    if(address[size - 1] == '\n') {
+        --size;
+        if(address[size - 1] == '\r')
+            --size;
+    }
+    address[size] = 0;
+    return size;
+}
+
+size_t shell::read(String& string)
+{
+    char *cp = string.c_mem();
+    size_t size = string.size();
+    size = readln(cp, size);
+    String::fix(string);
+    return size;
+}
+
+size_t shell::writes(const char *string)
+{
+    size_t result = fputs(string, stdout);
+    if(result == ((size_t)(EOF)))
+        return 0;
+    return result;
+}
+
+#ifdef _MSWINDOWS_
+
+static void pathfinder(const char *name, char *buf, size_t size)
+{
+    char path[512];
+    char *tokbuf = NULL;
+    char *element;
+    char *ext;
+
+    String::set(buf, size, name);
+
+    if(!GetEnvironmentVariable("PATH", path, sizeof(path)))
+        goto tail;
+
+    if(strchr(name, '/') || strchr(name, '\\') || strchr(name, ':'))
+        goto tail;
+
+    while(NULL != (element = String::token(path, &tokbuf, ";"))) {
+        snprintf(buf, sizeof(buf), "%s\\%s", element, name);
+        ext = strrchr(buf, '.');
+        if(!ext || (!eq_case(ext, ".exe") && !eq_case(ext, ".com")))
+            String::add(buf, size, ".exe");
+        if(fsys::is_file(buf))
+            return;
+    }
+
+    String::set(buf, size, name);
+
+tail:
+    ext = strrchr(buf, '.');
+    if(!ext || (!eq_case(ext, ".exe") && !eq_case(ext, ".com")))
+        String::add(buf, size, ".exe");
+}
+
+void shell::relocate(const char *argv0)
+{
+}
+
+String shell::userid(void)
+{
+    char buf[128];
+    DWORD size = sizeof(buf);
+
+    String::set(buf, sizeof(buf), "nobody");
+    GetUserName(buf, &size);
+    return str(buf);
+}
+
+String shell::path(path_t id)
+{
+    char buf[512];
+
+    string_t result = "";
+
+    if(!_domain)
+        return result;
+
+    switch(id) {
+    case SERVICE_CONTROL:
+        result = str("~\\SOFTWARE\\Services\\Control");
+        break;
+    case PROGRAM_CONFIG:
+        result = str("~\\Software\\Applications\\") + _domain;
+        break;
+    case SERVICE_CONFIG:
+        result = str("-\\SOFTWARE\\Services\\") + _domain;
+        break;
+    case USER_DEFAULTS:
+        if(GetEnvironmentVariable("SystemRoot", buf, sizeof(buf)))
+            result = str(buf) + "\\" + _domain + ".ini";
+        break;
+    case USER_HOME:
+        if(GetEnvironmentVariable("USERPROFILE", buf, sizeof(buf)))
+            result = str(buf);
+        break;
+    case SERVICE_DATA:
+    case USER_DATA:
+        if(GetEnvironmentVariable("APPDATA", buf, sizeof(buf))) {
+            result = str(buf) + "\\" + _domain;
+            dir::create(*result, fsys::OWNER_PRIVATE);
+        }
+        break;
+    case USER_CONFIG:
+        if(GetEnvironmentVariable("USERPROFILE", buf, sizeof(buf))) {
+            result = str(buf) + "\\Local Settings\\" + _domain;
+            dir::create(*result, fsys::OWNER_PRIVATE);
+        }
+        break;
+    case USER_CACHE:
+    case SERVICE_CACHE:
+        if(GetEnvironmentVariable("TEMP", buf, sizeof(buf))) {
+            result = str(buf) + "\\" + _domain;
+            dir::create(*result, fsys::OWNER_PRIVATE);
+            break;
+        }
+        if(GetEnvironmentVariable("APPDATA", buf, sizeof(buf))) {
+            result = str(buf) + "\\" + _domain;
+            dir::create(*result, fsys::OWNER_PRIVATE);
+        }
+        break;
+    case SYSTEM_TEMP:
+        dir::create("c:\\temp", fsys::DIR_TEMPORARY);
+        result ^= "c:\\temp";
+        break;
+    case PROGRAM_TEMP:
+        snprintf(buf, sizeof(buf), "$$%ld$$.tmp", (long)GetCurrentProcessId());
+        result = str("c:\\temp\\") + str(buf);
+        break;
+    case SYSTEM_ETC:
+        if(GetEnvironmentVariable("SystemRoot", buf, sizeof(buf)))
+            result = str(buf) + "\\etc";
+        break;
+    case SYSTEM_CFG:
+        result = path(SYSTEM_PREFIX, UCOMMON_CFGPATH);
+        break;
+    case SYSTEM_VAR:
+        result = path(SYSTEM_PREFIX, UCOMMON_VARPATH);
+        break;
+    case SYSTEM_PREFIX:
+        result ^= UCOMMON_PREFIX;
+        break;
+    case SYSTEM_SHARE:
+        result ^= UCOMMON_PREFIX;
+        break;
+    case PROGRAM_PLUGINS:
+        result = str(UCOMMON_PREFIX) + "\\plugins\\" + _domain;
+        break;
+    }
+
+    return result;
+}
+
+const char *shell::env(const char *id, const char *value)
+{
+    char buf[512];
+    char path[255];
+    const char *keyid = NULL;
+
+    if(GetEnvironmentVariable(id, buf, sizeof(buf)))
+        return dup(buf);
+
+    if(errname)
+        keyid = errname;
+    else if(_domain)
+        keyid = _domain;
+    else if(_argv0)
+        keyid = _argv0;
+
+    if(keyid) {
+        snprintf(path, sizeof(path), "Default Environment\\%s", keyid);
+        HKEY key;
+        if(RegOpenKey(HKEY_CLASSES_ROOT, path, &key) == ERROR_SUCCESS) {
+            LONG dlen = sizeof(buf);
+            buf[0] = 0;
+            RegQueryValueA(key, id, (LPTSTR)buf, &dlen);
+            RegCloseKey(key);
+            if(buf[0])
+                return dup(buf);
+        }
+    }
+
+    return value;
+}
+
+int shell::system(const char *cmd, const char **envp)
+{
+    char cmdspec[128];
+    PROCESS_INFORMATION pi;
+    char *ep = NULL;
+    unsigned len = 0;
+
+    if(envp)
+        ep = new char[4096];
+
+    while(envp && *envp && len < 4090) {
+        String::set(ep + len, 4094 - len, *envp);
+        len += strlen(*(envp++)) + 1;
+    }
+
+    if(ep)
+        ep[len] = 0;
+
+    if(!GetEnvironmentVariable("SHELL", cmdspec, sizeof(cmdspec)))
+        GetEnvironmentVariable("ComSpec", cmdspec, sizeof(cmdspec));
+
+    if(!CreateProcess((CHAR *)cmdspec, (CHAR *)cmd, NULL, NULL, TRUE, CREATE_NEW_CONSOLE, ep, NULL, NULL, &pi)) {
+        if(ep)
+            delete[] ep;
+        return -1;
+    }
+    if(ep)
+        delete[] ep;
+
+    CloseHandle(pi.hThread);
+    int status = wait(pi.hProcess);
+    return status;
+}
+
+int shell::wait(shell::pid_t pid)
+{
+    DWORD code;
+
+    if(WaitForSingleObject(pid, INFINITE) == WAIT_FAILED) {
+        return -1;
+    }
+
+    GetExitCodeProcess(pid, &code);
+    CloseHandle(pid);
+    return (int)code;
+}
+
+shell::pid_t shell::spawn(const char *path, char **argv, char **envp, fd_t *stdio)
+{
+    STARTUPINFO si;
+    PROCESS_INFORMATION pi;
+    char filename[128];
+    int pos;
+    pid_t pid = INVALID_PID_VALUE;
+    fd_t stdfd;
+    fd_t dups[3] =
+        {INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE};
+
+    char *ep = NULL;
+    unsigned len = 0;
+
+    memset(&si, 0, sizeof(STARTUPINFO));
+    si.cb = sizeof(STARTUPINFO);
+
+    if(envp)
+        ep = new char[4096];
+
+    while(envp && *envp && len < 4090) {
+        String::set(ep + len, 4094 - len, *envp);
+        len += strlen(*(envp++)) + 1;
+    }
+
+    if(ep)
+        ep[len] = 0;
+
+    pathfinder(path, filename, sizeof(filename));
+    char *args = new char[32768];
+
+    args[0] = 0;
+    unsigned argc = 0;
+    while(argv && argv[argc]) {
+        if(!argc)
+            String::add(args, 32768, " ");
+        String::add(args, 32768, argv[argc++]);
+    }
+
+    if(stdio) {
+        for(pos = 0; pos < 3; ++pos) {
+            stdfd = INVALID_HANDLE_VALUE;
+            switch(pos) {
+            case 0:
+                if(stdio[pos] == INVALID_HANDLE_VALUE)
+                    stdfd = GetStdHandle(STD_INPUT_HANDLE);
+                break;
+            case 1:
+                if(stdio[pos] == INVALID_HANDLE_VALUE)
+                    stdfd = GetStdHandle(STD_OUTPUT_HANDLE);
+                break;
+            case 2:
+                if(stdio[pos] == INVALID_HANDLE_VALUE)
+                    stdfd = GetStdHandle(STD_ERROR_HANDLE);
+                break;
+            }
+            if(stdfd != INVALID_HANDLE_VALUE) {
+                DuplicateHandle(GetCurrentProcess(), stdfd,
+                    GetCurrentProcess(), &dups[pos], 0,
+                    TRUE, DUPLICATE_SAME_ACCESS);
+                stdfd = dups[pos];
+            }
+            else
+                stdfd = stdio[pos];
+            switch(pos) {
+            case 0:
+                si.hStdInput = stdfd;
+                break;
+            case 1:
+                si.hStdOutput = stdfd;
+                break;
+            case 2:
+                si.hStdError = stdfd;
+                break;
+            }
+        }
+        si.dwFlags = STARTF_USESTDHANDLES;
+    }
+
+    if(!CreateProcess((CHAR *)filename, (CHAR *)args, NULL, NULL, TRUE, 0, ep, NULL, &si, &pi))
+        goto exit;
+
+    pid = pi.hProcess;
+    CloseHandle(pi.hThread);
+
+exit:
+    if(ep)
+        delete ep;
+    delete args;
+    for(pos = 0; pos < 3; ++pos) {
+        if(dups[pos] != INVALID_HANDLE_VALUE)
+            CloseHandle(dups[pos]);
+    }
+    return pid;
+}
+
+static void exit_handler(void)
+{
+    if(_exitproc) {
+        (*_exitproc)();
+        _exitproc = NULL;
+    }
+}
+
+static BOOL WINAPI _stop(DWORD code)
+{
+    exit_handler();
+    return true;
+}
+
+void shell::exiting(exitproc_t handler)
+{
+    if(!_exitproc && handler) {
+        _exitproc = handler;
+        if(_domain)
+            SetConsoleTitle(_domain);
+        SetConsoleCtrlHandler((PHANDLER_ROUTINE)_stop, TRUE);
+        atexit(exit_handler);
+    }
+    else
+        _exitproc = handler;
+}
+
+void shell::release(int exit_code)
+{
+}
+
+void shell::detach(mainproc_t entry)
+{
+    const char *name = _argv0;
+
+    if(_domain)
+        name = _domain;
+
+    name = strdup(name);
+
+    if(entry == NULL)
+        return;
+
+    SERVICE_TABLE_ENTRY servicetable[] = {
+        {(LPSTR)name, (LPSERVICE_MAIN_FUNCTION)entry},
+        {NULL, NULL}
+    };
+
+    if(!StartServiceCtrlDispatcher(servicetable))
+        errexit(1, "*** %s: %s\n", name, _TEXT("failed service start"));
+}
+
+void shell::restart(void)
+{
+}
+
+int shell::detach(const char *path, char **argv, char **envp, fd_t *stdio)
+{
+    STARTUPINFO si;
+    PROCESS_INFORMATION pi;
+    char filename[128];
+    int err;
+    int pos;
+    pid_t pid = INVALID_PID_VALUE;
+    fd_t stdfd;
+    fd_t dups[3] =
+        {INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE};
+
+    char *ep = NULL;
+    unsigned len = 0;
+
+    memset(&si, 0, sizeof(STARTUPINFO));
+    si.cb = sizeof(STARTUPINFO);
+
+    if(envp)
+        ep = new char[4096];
+
+    while(envp && *envp && len < 4090) {
+        String::set(ep + len, 4094 - len, *envp);
+        len += strlen(*(envp++)) + 1;
+    }
+
+    if(ep)
+        ep[len] = 0;
+
+    pathfinder(path, filename, sizeof(filename));
+    char *args = new char[32768];
+
+    args[0] = 0;
+    unsigned argc = 0;
+    while(argv && argv[argc]) {
+        if(!argc)
+            String::add(args, 32768, " ");
+        String::add(args, 32768, argv[argc++]);
+    }
+
+    if(stdio) {
+        for(pos = 0; pos < 3; ++pos) {
+            stdfd = INVALID_HANDLE_VALUE;
+            switch(pos) {
+            case 0:
+                if(stdio[pos] == INVALID_HANDLE_VALUE)
+                    stdfd = GetStdHandle(STD_INPUT_HANDLE);
+                break;
+            case 1:
+                if(stdio[pos] == INVALID_HANDLE_VALUE)
+                    stdfd = GetStdHandle(STD_OUTPUT_HANDLE);
+                break;
+            case 2:
+                if(stdio[pos] == INVALID_HANDLE_VALUE)
+                    stdfd = GetStdHandle(STD_ERROR_HANDLE);
+                break;
+            }
+            if(stdfd != INVALID_HANDLE_VALUE) {
+                DuplicateHandle(GetCurrentProcess(), stdfd,
+                    GetCurrentProcess(), &dups[pos], 0,
+                    TRUE, DUPLICATE_SAME_ACCESS);
+                stdfd = dups[pos];
+            }
+            else
+                stdfd = stdio[pos];
+            switch(pos) {
+            case 0:
+                si.hStdInput = stdfd;
+                break;
+            case 1:
+                si.hStdOutput = stdfd;
+                break;
+            case 2:
+                si.hStdError = stdfd;
+                break;
+            }
+        }
+        si.dwFlags = STARTF_USESTDHANDLES;
+    }
+
+    if(!CreateProcess((CHAR *)filename, (CHAR *)args, NULL, NULL, TRUE, DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP, ep, NULL, &si, &pi)) {
+        err = fsys::remapError();
+        goto exit;
+    }
+
+    pid = pi.hProcess;
+    CloseHandle(pi.hThread);
+    err = 0;
+
+exit:
+    if(ep)
+        delete ep;
+    delete args;
+    for(pos = 0; pos < 3; ++pos) {
+        if(dups[pos] != INVALID_HANDLE_VALUE)
+            CloseHandle(dups[pos]);
+    }
+    if(pid == INVALID_PID_VALUE)
+        return err;
+
+    return 0;
+}
+
+char *shell::getpass(const char *prompt, char *buffer, size_t size)
+{
+    size_t pos = 0;
+    fputs(prompt, stderr);
+
+    while(pos < size - 1) {
+        buffer[pos] = (char)getch();
+        if(buffer[pos] == '\r' || buffer[pos] == '\n')
+            break;
+        else if(buffer[pos] == '\b' && pos)
+            --pos;
+        else
+            ++pos;
+    }
+    buffer[pos] = 0;
+    return buffer;
+}
+
+int shell::inkey(const char *prompt)
+{
+    if(prompt && fsys::is_tty(shell::input()))
+        fputs(prompt, stdout);
+    else
+        return 0;
+
+    return (char)getch();
+}
+
+int shell::cancel(shell::pid_t pid)
+{
+    if(!TerminateProcess(pid, 255))
+        return -1;
+    return 0;
+}
+
+char *shell::getline(const char *prompt, char *buffer, size_t size)
+{
+    unsigned pos = 0;
+
+    if(!fsys::is_tty(shell::input()))
+        return fgets(buffer, size, stdin);
+
+    fputs(prompt, stdout);
+
+    while(pos < size - 1) {
+        buffer[pos] = (char)getch();
+        if(buffer[pos] == '\r' || buffer[pos] == '\n')
+            break;
+        else if(buffer[pos] == '\b' && pos) {
+            fputs("\b \b", stdout);
+            --pos;
+        }
+        else {
+            fputc(buffer[pos], stdout);
+            ++pos;
+        }
+        fflush(stdout);
+    }
+    printf("\n");
+    buffer[pos] = 0;
+    return buffer;
+}
+
+#else
+
+static const char *system_prefix = UCOMMON_PREFIX;
+
+#if defined(HAVE_TERMIOS_H)
+static struct termios io_prior, io_current;
+#elif defined(HAVE_TERMIO_H)
+static struct termio io_prior, io_current;
+#endif
+
+static void noecho(int fd)
+{
+#if defined(HAVE_TERMIOS_H)
+    tcgetattr(fd, &io_prior);
+    tcgetattr(fd, &io_current);
+    io_current.c_lflag &= ~ECHO;
+    tcsetattr(fd, TCSAFLUSH, &io_current);
+#elif defined(HAVE_TERMIO_H)
+    ioctl(fd, TCGETA, &io_prior);
+    ioctl(fd, TCGETA, &io_current);
+    io_current.c_lflag &= ~ECHO;
+    ioctl(fd, TCSETA, &io_current);
+#endif
+}
+
+static void echo(int fd)
+{
+#if defined(HAVE_TERMIOS_H)
+    tcsetattr(fd, TCSAFLUSH, &io_prior);
+#elif defined(HAVE_TERMIO_H)
+    ioctl(fd, TCSETA, &io_prior);
+#endif
+}
+
+char *shell::getline(const char *prompt, char *buffer, size_t size)
+{
+    size_t pos = 0;
+
+    if(!fsys::is_tty(input()))
+        return fgets(buffer, size, stdin);
+
+    noecho(1);
+    fputs(prompt, stdout);
+
+    while(pos < size - 1) {
+        buffer[pos] = getc(stdin);
+        if(buffer[pos] == '\r' || buffer[pos] == '\n')
+            break;
+        else if(buffer[pos] == '\b' && pos) {
+            fputs("\b \b", stdout);
+            --pos;
+        }
+        else {
+            fputc(buffer[pos], stdout);
+            ++pos;
+        }
+        fflush(stdout);
+    }
+    printf("\n");
+    buffer[pos] = 0;
+    echo(1);
+    return buffer;
+}
+
+
+
+char *shell::getpass(const char *prompt, char *buffer, size_t size)
+{
+    size_t count;
+    int fd = ::open("/dev/tty", O_RDONLY);
+    if(-1 == fd)
+        fd = 1;
+
+    noecho(fd);
+    fputs(prompt, stderr);
+    count = ::read(fd, buffer, size);
+    if(count)
+        --count;
+    buffer[count] = 0;
+
+#if defined(HAVE_TERMIOS_H) || defined(HAVE_TERMIO_H)
+    fputs("\n", stderr);
+#endif
+    echo(fd);
+    if(fd != 1)
+        ::close(fd);
+    return buffer;
+}
+
+int shell::inkey(const char *prompt)
+{
+    if(!fsys::is_tty(1))
+        return 0;
+
+    noecho(1);
+    if(prompt)
+        fputs(prompt, stdout);
+    int ch = getc(stdin);
+    echo(1);
+
+    return ch;
+}
+
+void shell::relocate(const char *argv0)
+{
+#ifdef  HAVE_REALPATH
+    char *path0 = realpath(argv0, NULL);
+    if(!path0)
+        return;
+
+    // strip out exe name...
+    char *cp = strrchr(path0, '/');
+    if(cp) {
+        *cp = 0;
+        // strip out bin subdir...
+        cp = strrchr(path0, '/');
+        if(cp && (eq(cp, "/bin") || eq(cp, "/sbin"))) {
+            *cp = 0;
+            system_prefix = path0;
+        }
+    }
+#endif
+}
+
+String shell::userid(void)
+{
+    const char *id = ::getenv("LOGNAME");
+
+    if(!id)
+        id = "nobody";
+
+    return str(id);
+}
+
+String shell::path(path_t id)
+{
+    string_t result = "";
+    const char *home = NULL;
+    char buf[65];
+
+    if(!_domain)
+        return result;
+
+    switch(id) {
+    case USER_DEFAULTS:
+        home = ::getenv("HOME");
+        if(!home)
+            break;
+        result = str(home) + "/." + _domain + "rc";
+        break;
+    case USER_HOME:
+        home = ::getenv("HOME");
+        if(!home)
+            break;
+        result = str(home);
+        break;
+    case SERVICE_DATA:
+        result = path(SYSTEM_PREFIX, UCOMMON_VARPATH "/lib/") + _domain;
+        break;
+    case USER_DATA:
+        home = ::getenv("HOME");
+        if(!home)
+            break;
+#ifdef  __APPLE__
+        result = str(home) + "/Library/Application Support/" + _domain;
+#else
+        result = str(home) + "/.local/share/" + _domain;
+#endif
+        break;
+    case USER_CONFIG:
+        home = ::getenv("HOME");
+        if(!home)
+            break;
+#ifdef  __APPLE__
+        result = str(home) + "/Library/Preferences/" + _domain;
+#else
+        result = str(home) + "/.config/" + _domain;
+#endif
+        dir::create(*result, fsys::OWNER_PRIVATE);
+        break;
+    case USER_CACHE:
+        home = ::getenv("HOME");
+        if(!home)
+            break;
+#ifdef  __APPLE__
+        result = str(home) + "/Library/Caches/" + _domain;
+#else
+        result = str(home) + "/.cache/" + _domain;
+#endif
+        break;
+    case SERVICE_CACHE:
+        result = path(SYSTEM_PREFIX, UCOMMON_VARPATH "/cache/") + _domain;
+        break;
+    case SERVICE_CONTROL:
+#ifdef  __APPLE__
+        result = str(home) + "/Library/Caches";
+#else
+        result = str(home) + "/.cache";
+#endif
+        break;
+    case PROGRAM_CONFIG:
+        home = ::getenv("HOME");
+        if(!home)
+            break;
+#ifdef  __APPLE__
+        result = str(home) + "/Library/Preferences/" + _domain;
+#else
+        result = str(home) + "/.config/" + _domain;
+#endif
+        dir::create(*result, fsys::OWNER_PRIVATE);
+
+#ifdef  __APPLE__
+        result = result + "/" + _domain + ".conf";
+#else
+        result = result + "/" + _domain + "rc";
+#endif
+        break;
+    case SERVICE_CONFIG:
+        result = path(SYSTEM_PREFIX, UCOMMON_CFGPATH "/") + _domain + ".conf";
+        break;
+    case SYSTEM_TEMP:
+        result ^= "/tmp";
+        break;
+    case PROGRAM_TEMP:
+        snprintf(buf, sizeof(buf), ".$$%ld$$.tmp", (long)getpid());
+        result = str("/tmp/") + str(buf);
+        break;
+    case SYSTEM_ETC:
+    case SYSTEM_CFG:
+        result = path(SYSTEM_PREFIX, UCOMMON_CFGPATH);
+        break;
+    case SYSTEM_VAR:
+        result = path(SYSTEM_PREFIX, UCOMMON_VARPATH);
+        break;
+    case SYSTEM_PREFIX:
+        result ^= system_prefix;
+        break;
+    case SYSTEM_SHARE:
+        result = str(system_prefix) + "/share";
+        break;
+    case PROGRAM_PLUGINS:
+        result = str(system_prefix) + "/lib/" + _domain;
+        break;
+    }
+
+    return result;
+}
+
+const char *shell::env(const char *id, const char *value)
+{
+    const char *v = ::getenv(id);
+    if(v)
+        return dup(v);
+
+    return value;
+}
+
+int shell::system(const char *cmd, const char **envp)
+{
+    assert(cmd != NULL);
+
+    char symname[129];
+    const char *cp;
+    char *ep;
+    int status;
+    int max = sizeof(fd_set) * 8;
+
+#ifdef  RLIMIT_NOFILE
+    struct rlimit rlim;
+
+    if(!getrlimit(RLIMIT_NOFILE, &rlim))
+        max = rlim.rlim_max;
+#endif
+
+    pid_t pid = fork();
+    if(pid < 0)
+        return -1;
+
+    if(pid > 0) {
+        if(::waitpid(pid, &status, 0) != pid)
+            status = -1;
+        return status;
+    }
+
+    for(int fd = 3; fd < max; ++fd)
+        ::close(fd);
+
+    while(envp && *envp) {
+        String::set(symname, sizeof(symname), *envp);
+        ep = strchr(symname, '=');
+        if(ep)
+            *ep = 0;
+        cp = strchr(*envp, '=');
+        if(cp)
+            ++cp;
+        ::setenv(symname, cp, 1);
+        ++envp;
+    }
+
+    ::signal(SIGHUP, SIG_DFL);
+    ::signal(SIGABRT, SIG_DFL);
+    ::signal(SIGQUIT, SIG_DFL);
+    ::signal(SIGINT, SIG_DFL);
+    ::signal(SIGCHLD, SIG_DFL);
+    ::signal(SIGPIPE, SIG_DFL);
+    ::signal(SIGUSR1, SIG_DFL);
+    ::execlp("/bin/sh", "sh", "-c", cmd, NULL);
+    ::exit(-1);
+}
+
+void shell::restart(void)
+{
+    pid_t pid;
+    int status;
+
+restart:
+    pid = fork();
+    if(pid > 0) {
+        waitpid(pid, &status, 0);
+        if(WIFSIGNALED(status))
+            status = WTERMSIG(status);
+        else
+            status = WIFEXITED(status);
+        switch(status) {
+#ifdef  SIGPWR
+        case SIGPWR:
+#endif
+        case SIGINT:
+        case SIGQUIT:
+        case SIGTERM:
+        case 0:
+            exit(status);
+        default:
+            goto restart;
+        }
+    }
+}
+
+static void exit_handler(void)
+{
+    if(_exitproc) {
+        (*_exitproc)();
+        _exitproc = NULL;
+    }
+}
+
+extern "C" {
+    static void abort_handler(int signo)
+    {
+        exit_handler();
+    }
+}
+
+void shell::exiting(exitproc_t handler)
+{
+
+    if(!_exitproc && handler) {
+        _exitproc = handler;
+        ::signal(SIGABRT, abort_handler);
+#ifdef  HAVE_ATEXIT
+        ::atexit(exit_handler);
+#endif
+    }
+    else
+        _exitproc = handler;
+}
+
+void shell::release(int exit_code)
+{
+    const char *dev = "/dev/null";
+    pid_t pid;
+    int fd;
+
+    fflush(stdout);
+    fflush(stderr);
+
+    close(0);
+    close(1);
+    close(2);
+#ifdef  SIGTTOU
+    signal(SIGTTOU, SIG_IGN);
+#endif
+
+#ifdef  SIGTTIN
+    signal(SIGTTIN, SIG_IGN);
+#endif
+
+#ifdef  SIGTSTP
+    signal(SIGTSTP, SIG_IGN);
+#endif
+    pid = fork();
+    if(pid > 0)
+        exit(exit_code);
+    crit(pid == 0, "detach without process");
+
+#if defined(SIGTSTP) && defined(TIOCNOTTY)
+    crit(setpgid(0, getpid()) == 0, "detach without process group");
+    if((fd = open(_PATH_TTY, O_RDWR)) >= 0) {
+        ioctl(fd, TIOCNOTTY, NULL);
+        close(fd);
+    }
+#else
+
+#ifdef HAVE_SETPGRP
+    crit(setpgrp() == 0, "detach without process group");
+#else
+    crit(setpgid(0, getpid()) == 0, "detach without process group");
+#endif
+    signal(SIGHUP, SIG_IGN);
+    pid = fork();
+    if(pid > 0)
+        exit(0);
+    crit(pid == 0, "detach without process");
+#endif
+    if(dev && *dev) {
+        fd = open(dev, O_RDWR);
+        if(fd > 0)
+            dup2(fd, 0);
+        if(fd != 1)
+            dup2(fd, 1);
+        if(fd != 2)
+            dup2(fd, 2);
+        if(fd > 2)
+            close(fd);
+    }
+}
+
+void shell::detach(mainproc_t entry)
+{
+    const char *dev = "/dev/null";
+    pid_t pid;
+    int fd;
+
+    close(0);
+    close(1);
+    close(2);
+#ifdef  SIGTTOU
+    signal(SIGTTOU, SIG_IGN);
+#endif
+
+#ifdef  SIGTTIN
+    signal(SIGTTIN, SIG_IGN);
+#endif
+
+#ifdef  SIGTSTP
+    signal(SIGTSTP, SIG_IGN);
+#endif
+    pid = fork();
+    if(pid > 0)
+        exit(0);
+    crit(pid == 0, "detach without process");
+
+#if defined(SIGTSTP) && defined(TIOCNOTTY)
+    crit(setpgid(0, getpid()) == 0, "detach without process group");
+    if((fd = open(_PATH_TTY, O_RDWR)) >= 0) {
+        ioctl(fd, TIOCNOTTY, NULL);
+        close(fd);
+    }
+#else
+
+#ifdef HAVE_SETPGRP
+    crit(setpgrp() == 0, "detach without process group");
+#else
+    crit(setpgid(0, getpid()) == 0, "detach without process group");
+#endif
+    signal(SIGHUP, SIG_IGN);
+    pid = fork();
+    if(pid > 0)
+        exit(0);
+    crit(pid == 0, "detach without process");
+#endif
+    if(dev && *dev) {
+        fd = open(dev, O_RDWR);
+        if(fd > 0)
+            dup2(fd, 0);
+        if(fd != 1)
+            dup2(fd, 1);
+        if(fd != 2)
+            dup2(fd, 2);
+        if(fd > 2)
+            close(fd);
+    }
+}
+
+int shell::detach(const char *path, char **argv, char **envp, fd_t *stdio)
+{
+    char symname[129];
+    const char *cp;
+    char *ep;
+    fd_t fd;
+
+    int max = sizeof(fd_set) * 8;
+#ifdef  RLIMIT_NOFILE
+    struct rlimit rlim;
+
+    if(!getrlimit(RLIMIT_NOFILE, &rlim))
+        max = rlim.rlim_max;
+#endif
+
+    pid_t pid = fork();
+    if(pid < 0)
+        return errno;
+
+    if(pid > 0)
+        return 0;
+
+    ::signal(SIGQUIT, SIG_DFL);
+    ::signal(SIGINT, SIG_DFL);
+    ::signal(SIGCHLD, SIG_DFL);
+    ::signal(SIGPIPE, SIG_DFL);
+    ::signal(SIGHUP, SIG_DFL);
+    ::signal(SIGABRT, SIG_DFL);
+    ::signal(SIGUSR1, SIG_DFL);
+
+#ifdef  SIGTTOU
+    ::signal(SIGTTOU, SIG_IGN);
+#endif
+
+#ifdef  SIGTTIN
+    ::signal(SIGTTIN, SIG_IGN);
+#endif
+
+#ifdef  SIGTSTP
+    ::signal(SIGTSTP, SIG_IGN);
+#endif
+
+    for(fd = 0; fd < 3; ++fd) {
+        if(stdio && stdio[fd] != INVALID_HANDLE_VALUE)
+            ::dup2(stdio[fd], fd);
+        else
+            ::close(fd);
+    }
+
+    for(fd = 3; fd < max; ++fd)
+        ::close(fd);
+
+#if defined(SIGTSTP) && defined(TIOCNOTTY)
+    if(setpgid(0, getpid()) == -1)
+        ::exit(-1);
+
+    if((fd = open("/dev/tty", O_RDWR)) >= 0) {
+        ::ioctl(fd, TIOCNOTTY, NULL);
+        ::close(fd);
+    }
+#else
+
+#ifdef  HAVE_SETPGRP
+    if(setpgrp() == -1)
+        ::exit(-1);
+#else
+    if(setpgid(0, getpid()) == -1)
+        ::exit(-1);
+#endif
+
+    if(getppid() != 1) {
+        if((pid = fork()) < 0)
+            ::exit(-1);
+        else if(pid > 0)
+            ::exit(0);
+    }
+#endif
+
+    for(fd = 0; fd < 3; ++fd) {
+        if(stdio && stdio[fd] != INVALID_HANDLE_VALUE)
+            continue;
+        fd_t tmp = ::open("/dev/null", O_RDWR);
+        if(tmp != fd) {
+            ::dup2(tmp, fd);
+            ::close(tmp);
+        }
+    }
+
+    while(envp && *envp) {
+        String::set(symname, sizeof(symname), *envp);
+        ep = strchr(symname, '=');
+        if(ep)
+            *ep = 0;
+        cp = strchr(*envp, '=');
+        if(cp)
+            ++cp;
+        ::setenv(symname, cp, 1);
+        ++envp;
+    }
+
+    if(strchr(path, '/'))
+        execv(path, argv);
+    else
+        execvp(path, argv);
+    exit(-1);
+}
+
+
+shell::pid_t shell::spawn(const char *path, char **argv, char **envp, fd_t *stdio)
+{
+    char symname[129];
+    const char *cp;
+    char *ep;
+    int fd;
+
+    int max = sizeof(fd_set) * 8;
+#ifdef  RLIMIT_NOFILE
+    struct rlimit rlim;
+
+    if(!getrlimit(RLIMIT_NOFILE, &rlim))
+        max = rlim.rlim_max;
+#endif
+
+    pid_t pid = fork();
+    if(pid < 0)
+        return INVALID_PID_VALUE;
+
+    if(pid > 0)
+        return pid;
+
+    ::signal(SIGQUIT, SIG_DFL);
+    ::signal(SIGINT, SIG_DFL);
+    ::signal(SIGCHLD, SIG_DFL);
+    ::signal(SIGPIPE, SIG_DFL);
+    ::signal(SIGHUP, SIG_DFL);
+    ::signal(SIGABRT, SIG_DFL);
+    ::signal(SIGUSR1, SIG_DFL);
+
+    for(fd = 0; fd < 3; ++fd) {
+        if(stdio && stdio[fd] != INVALID_HANDLE_VALUE)
+            ::dup2(stdio[fd], fd);
+    }
+
+    for(fd = 3; fd < max; ++fd)
+        ::close(fd);
+
+    while(envp && *envp) {
+        String::set(symname, sizeof(symname), *envp);
+        ep = strchr(symname, '=');
+        if(ep)
+            *ep = 0;
+        cp = strchr(*envp, '=');
+        if(cp)
+            ++cp;
+        ::setenv(symname, cp, 1);
+        ++envp;
+    }
+
+    if(strchr(path, '/'))
+        execv(path, argv);
+    else
+        execvp(path, argv);
+    exit(-1);
+}
+
+int shell::wait(shell::pid_t pid)
+{
+    int status = -1;
+
+    if(pid == INVALID_PID_VALUE || ::waitpid(pid, &status, 0) != pid)
+        return -1;
+
+    if(status == -1)
+        return -1;
+
+    return WEXITSTATUS(status);
+}
+
+int shell::cancel(shell::pid_t pid)
+{
+    if(kill(pid, SIGTERM))
+        return -1;
+    return wait(pid);
+}
+
+#endif
+
+const char *shell::texts(const char *singular, const char *plural, unsigned long value)
+{
+#ifdef  HAVE_GETTEXT
+    return ::ngettext(singular, plural, value);
+#else
+    if(value > 1)
+        return plural;
+
+    return singular;
+#endif
+}
+
+const char *shell::text(const char *msg)
+{
+#ifdef  HAVE_GETTEXT
+    return ::gettext(msg);
+#else
+    return msg;
+#endif
+}
+
+void shell::bind(const char *name)
+{
+    string_t locale;
+    const char *prior = _domain;
+
+    _domain = name;
+    locale = path(SYSTEM_SHARE) + "/locale";
+
+    if(!prior) {
+        setlocale(LC_ALL, "");
+        bindtextdomain("ucommon", *locale);
+    }
+
+    bindtextdomain(name, *locale);
+    textdomain(name);
+}
+
+void shell::rebind(const char *name)
+{
+    if(name)
+        textdomain(name);
+    else
+        textdomain(_domain);
+}
+
+#ifdef  _MSWINDOWS_
+void shell::priority(int level)
+{
+}
+#else
+void shell::priority(int level)
+{
+#if _POSIX_PRIORITY_SCHEDULING > 0
+    int policy = SCHED_OTHER;
+
+    if(level > 0)
+        policy = SCHED_RR;
+
+    struct sched_param sparam;
+    int min = sched_get_priority_min(policy);
+    int max = sched_get_priority_max(policy);
+    int pri = (int)level;
+
+    if(min == max)
+        pri = min;
+    else
+        pri += min;
+    if(pri > max)
+        pri = max;
+
+    setpriority(PRIO_PROCESS, 0, -level);
+    memset(&sparam, 0, sizeof(sparam));
+    sparam.sched_priority = pri;
+    sched_setscheduler(0, policy, &sparam);
+#else
+    nice(-level);
+#endif
+}
+#endif
+
+void shell::debug(unsigned level, const char *fmt, ...)
+{
+    assert(fmt != NULL && *fmt != 0);
+
+    char buf[256];
+    va_list args;
+
+    level += (unsigned)DEBUG0;
+
+    if(!errname || level > (unsigned)errlevel)
+        return;
+
+    va_start(args, fmt);
+    vsnprintf(buf, sizeof(buf), fmt, args);
+    va_end(args);
+
+    if(fmt[strlen(fmt) - 1] == '\n')
+        fprintf(stderr, "%s: %s", errname, buf);
+    else
+        fprintf(stderr, "%s: %s\n", errname, buf);
+}
+
+#ifdef  HAVE_SYSLOG_H
+
+#ifndef LOG_AUTHPRIV
+#define LOG_AUTHPRIV    LOG_AUTH
+#endif
+
+void shell::log(const char *name, loglevel_t level, logmode_t mode, logproc_t handler)
+{
+    errlevel = level;
+    errmode = mode;
+    errname = name;
+
+    if(handler != (logproc_t)NULL)
+        errproc = handler;
+
+    switch(mode) {
+    case NONE:
+        closelog();
+        return;
+    case CONSOLE_LOG:
+        ::openlog(name, LOG_CONS, LOG_DAEMON);
+        return;
+    case USER_LOG:
+        ::openlog(name, 0, LOG_USER);
+        return;
+    case SYSTEM_LOG:
+        ::openlog(name, LOG_CONS, LOG_DAEMON);
+        return;
+    case SECURITY_LOG:
+        ::openlog(name, LOG_CONS, LOG_AUTHPRIV);
+        return;
+    }
+}
+
+void shell::security(loglevel_t loglevel, const char *fmt, ...)
+{
+    assert(fmt != NULL && *fmt != 0);
+
+    char buf[256];
+    va_list args;
+    int level= LOG_ERR;
+
+    if(!errname || errmode == NONE || loglevel >= DEBUG0)
+        return;
+
+    va_start(args, fmt);
+    vsnprintf(buf, sizeof(buf), fmt, args);
+    va_end(args);
+
+    switch(loglevel) {
+    case INFO:
+        level = LOG_INFO;
+        break;
+    case NOTIFY:
+        level = LOG_NOTICE;
+        break;
+    case WARN:
+        level = LOG_WARNING;
+        break;
+    case ERR:
+        level = LOG_ERR;
+        break;
+    case FAIL:
+        level = LOG_CRIT;
+        break;
+    default:
+        level = LOG_ERR;
+    }
+
+    ::syslog(level | LOG_AUTHPRIV, "%s", buf);
+
+    if(level == LOG_CRIT)
+        cpr_runtime_error(buf);
+}
+
+void shell::log(loglevel_t loglevel, const char *fmt, ...)
+{
+    assert(fmt != NULL && *fmt != 0);
+
+    char buf[256];
+    va_list args;
+    int level= LOG_ERR;
+
+    if(!errname || errmode == NONE || loglevel > errlevel)
+        return;
+
+    va_start(args, fmt);
+    vsnprintf(buf, sizeof(buf), fmt, args);
+    va_end(args);
+
+    if(errproc != (logproc_t)NULL) {
+        if((*errproc)(loglevel, buf))
+            return;
+    }
+
+    if(loglevel >= DEBUG0) {
+        if(getppid() > 1) {
+            if(fmt[strlen(fmt) - 1] == '\n')
+                fprintf(stderr, "%s: %s", errname, buf);
+            else
+                fprintf(stderr, "%s: %s\n", errname, buf);
+        }
+        return;
+    }
+
+    switch(loglevel) {
+    case INFO:
+        level = LOG_INFO;
+        break;
+    case NOTIFY:
+        level = LOG_NOTICE;
+        break;
+    case WARN:
+        level = LOG_WARNING;
+        break;
+    case ERR:
+        level = LOG_ERR;
+        break;
+    case FAIL:
+        level = LOG_CRIT;
+        break;
+    default:
+        level = LOG_ERR;
+    }
+
+    if(getppid() > 1) {
+        if(fmt[strlen(fmt) - 1] == '\n')
+            fprintf(stderr, "%s: %s", errname, buf);
+        else
+            fprintf(stderr, "%s: %s\n", errname, buf);
+    }
+    ::syslog(level, "%s", buf);
+
+    if(level == LOG_CRIT)
+        cpr_runtime_error(buf);
+}
+
+#else
+
+void shell::log(const char *name, loglevel_t level, logmode_t mode, logproc_t handler)
+{
+    errlevel = level;
+    errmode = mode;
+    errname = name;
+
+    if(handler != (logproc_t)NULL)
+        errproc = handler;
+}
+
+void shell::security(loglevel_t loglevel, const char *fmt, ...)
+{
+    assert(fmt != NULL && *fmt != 0);
+
+    char buf[256];
+    va_list args;
+
+    if(!errname || errmode == NONE || loglevel >= DEBUG0)
+        return;
+
+    va_start(args, fmt);
+    vsnprintf(buf, sizeof(buf), fmt, args);
+    va_end(args);
+
+    if(fmt[strlen(fmt) - 1] == '\n')
+        fprintf(stderr, "%s: %s", errname, buf);
+    else
+        fprintf(stderr, "%s: %s\n", errname, buf);
+
+    if(loglevel == FAIL)
+        cpr_runtime_error(buf);
+}
+
+void shell::log(loglevel_t loglevel, const char *fmt, ...)
+{
+    assert(fmt != NULL && *fmt != 0);
+
+    char buf[256];
+    va_list args;
+
+    if(!errname || errmode == NONE || loglevel > errlevel)
+        return;
+
+    va_start(args, fmt);
+    vsnprintf(buf, sizeof(buf), fmt, args);
+    va_end(args);
+
+    if(errproc != (logproc_t)NULL) {
+        if((*errproc)(loglevel, buf))
+            return;
+    }
+
+    if(loglevel >= DEBUG0) {
+        if(fmt[strlen(fmt) - 1] == '\n')
+            fprintf(stderr, "%s: %s", errname, buf);
+        else
+            fprintf(stderr, "%s: %s\n", errname, buf);
+        return;
+    }
+
+    if(fmt[strlen(fmt) - 1] == '\n')
+        fprintf(stderr, "%s: %s", errname, buf);
+    else
+        fprintf(stderr, "%s: %s\n", errname, buf);
+
+    if(loglevel == FAIL)
+        cpr_runtime_error(buf);
+}
+
+#endif
+
+#ifndef _MSWINDOWS_
+
+void shell::restart(char *argv0, char **argv, char **list)
+{
+    unsigned args = count(argv);
+    unsigned head = count(list);
+    unsigned argc = 2 + args + head;
+    char **newargs = (char **)mempager::_alloc(sizeof(char **) * argc--);
+
+    memcpy(newargs, list, head * sizeof(char **));
+    newargs[head++] = argv0;
+    if(args)
+        memcpy(&newargs[head], argv, args * sizeof(char **));
+
+    newargs[argc] = NULL;
+    execvp(*list, newargs);
+    exit(-1);
+}
+
+#else
+
+void shell::restart(char *argv0, char **argv, char **list)
+{
+    exit(-1);
+}
+
+#endif
+
+bool shell::is_sym(const char *name)
+{
+    symlock.acquire();
+
+    linked_pointer<syms> sp;
+
+    while(is(sp)) {
+        if(eq(sp->name, name)) {
+            symlock.release();
+            return true;
+        }
+        ++sp;
+    }
+    symlock.release();
+    return false;
+}
+
+const char *shell::get(const char *name, const char *value)
+{
+    symlock.acquire();
+    linked_pointer<syms> sp = _syms;
+
+    while(is(sp)) {
+        if(eq(sp->name, name)) {
+            value = sp->value;
+            symlock.release();
+            return value;
+        }
+        ++sp;
+    }
+
+    symlock.release();
+    return env(name, value);
+}
+
+void shell::set(const char *name, const char *value)
+{
+    symlock.acquire();
+    linked_pointer<syms> sp;
+
+    while(is(sp)) {
+        if(eq(sp->name, name)) {
+            sp->value = dup(value);
+            symlock.release();
+            return;
+        }
+        ++sp;
+    }
+
+    syms *v = (syms *)mempager::_alloc(sizeof(syms));
+    v->name = dup(name);
+    v->value = dup(value);
+    v->enlist(&_syms);
+    symlock.release();
+}
+
+String shell::path(String& prefix, const char *dir)
+{
+    if(*dir == '\\' || *dir == '/')
+        return str(dir);
+
+    if(strchr(prefix, '\\'))
+        return prefix + "\\" + dir;
+
+    return prefix + "/" + dir;
+}
+
+String shell::path(path_t id, const char *dir)
+{
+    string_t result;
+
+    if(*dir == '\\' || *dir == '/')
+        result = dir;
+    else {
+        result = path(id);
+        if(strchr(*result, '\\'))
+            result = result + "\\" + dir;
+        else
+            result = result + "/" + dir;
+    }
+    return result;
+}
+
diff --git a/jni/libucommon/sources/corelib/socket.cpp b/jni/libucommon/sources/corelib/socket.cpp
new file mode 100644
index 0000000..7f707ba
--- /dev/null
+++ b/jni/libucommon/sources/corelib/socket.cpp
@@ -0,0 +1,3313 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/socket.h>
+#include <ucommon/string.h>
+#include <ucommon/thread.h>
+#include <ucommon/fsys.h>
+#ifndef _MSWINDOWS_
+#include <net/if.h>
+#include <sys/un.h>
+#include <sys/ioctl.h>
+#include <arpa/inet.h>
+#else
+#define HAVE_GETADDRINFO 1
+#endif
+#ifdef  HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#include <errno.h>
+
+#if defined(HAVE_SOCKS)
+#include <socks.h>
+#undef  HAVE_POLL_H
+#undef  HAVE_SYS_POLL_H
+#endif
+
+#if defined(HAVE_POLL_H)
+#include <poll.h>
+#elif defined(HAVE_SYS_POLL_H)
+#include <sys/poll.h>
+#endif
+
+#if defined(HAVE_SYS_FILIO_H)
+#include <sys/filio.h>
+#endif
+
+#if defined(HAVE_POLL) && defined(POLLRDNORM)
+#define USE_POLL
+#endif
+
+#if defined(__linux__) && !defined(IP_MTU)
+#define IP_MTU 14
+#endif
+
+#ifndef MSG_DONTWAIT
+#define MSG_DONTWAIT 0
+#endif
+
+#ifndef MSG_NOSIGNAL
+#define MSG_NOSIGNAL 0
+#endif
+
+#ifdef  __FreeBSD__
+#ifdef  AI_V4MAPPED
+#undef  AI_V4MAPPED
+#endif
+#endif
+
+typedef struct multicast_internet
+{
+    union {
+        struct ip_mreq  ipv4;
+#ifdef  AF_INET6
+        struct ipv6_mreq ipv6;
+#endif
+    };
+} inetmulticast_t;
+
+#ifndef HAVE_GETADDRINFO
+
+struct addrinfo {
+    int ai_flags;
+    int ai_family;
+    int ai_socktype;
+    int ai_protocol;
+    size_t ai_addrlen;
+    char *ai_canonname;
+    struct sockaddr *ai_addr;
+    struct addrinfo *ai_next;
+};
+
+#define NI_NUMERICHOST  0x0001
+#define NI_NUMERICSERV  0x0002
+#define NI_NAMEREQD     0x0004
+#define NI_NOFQDN       0x0008
+#define NI_DGRAM        0x0010
+
+#define AI_PASSIVE      0x0100
+#define AI_CANONNAME    0x0200
+#define AI_NUMERICHOST  0x0400
+#define AI_NUMERICSERV  0x0800
+
+#endif
+
+#if defined(HAVE_SOCKS)
+#define _getsockname_(so, addr, alen) ::Rgetsockname(so, addr, alen)
+#define _getpeername_(so, addr, alen) ::Rgetpeername(so, addr, alen)
+#define _accept_(so, addr, alen) ::Raccept(so, addr, alen)
+#define _connect_(so, addr, alen) ::Rconnect(so, addr, alen)
+#define _bind_(so, addr, alen) ::Rbind(so, addr, alen)
+#define _listen_(so, backlog) ::Rlisten(so, backlog)
+#define _select_(cnt, rfd, wfd, efd, timeout) ::Rselect(cnt, rfd, wfd, efd, timeout)
+#define _send_(so, buf, bytes, flag) ::Rsend(so, buf, bytes, flag)
+#define _recv_(so, buf, bytes, flag) ::Rrecv(so, buf, bytes, flag)
+#define _sendto_(so, buf, bytes, flag, to, tolen) ::Rsendto(so, buf, bytes, flag, to, tolen)
+#define _recvfrom_(so, buf, bytes, flag, from, fromlen) ::Rrecvfrom(so, buf, bytes, flag, from, fromlen)
+#undef  USE_POLL
+#undef  accept
+#undef  sendto
+#undef  recvfrom
+#undef  select
+#elif defined(__PTH__)
+#define _send_(so, buf, bytes, flag) pth_send(so, buf, bytes, flag)
+#define _recv_(so, buf, bytes, flag) pth_recv(so, buf, bytes, flag)
+#define _sendto_(so, buf, bytes, flag, to, tolen) pth_sendto(so, buf, bytes, flag, to, tolen)
+#define _recvfrom_(so, buf, bytes, flag, from, fromlen) pth_recvfrom(so, buf, bytes, flag, from, fromlen)
+#define _connect_(so, addr, addrlen) pth_connect(so, addr, addrlen)
+#define _accept_(so, addr, addrlen) pth_accept(so, addr, addrlen)
+#define _select_(cnt, rfd, wfd, efd, timeout) pth_select(cnt, rfd, wfd, efd, timeout)
+#define _poll_(fds, cnt, timeout) pth_poll(fds, cnt, timeout)
+#define _getsockname_(so, addr, alen) ::getsockname(so, addr, alen)
+#define _getpeername_(so, addr, alen) ::getpeername(so, addr, alen)
+#define _bind_(so, addr, alen) ::bind(so, addr, alen)
+#define _listen_(so, count) ::listen(so, count)
+#else
+#define _send_(so, buf, bytes, flag) ::send(so, buf, bytes, flag)
+#define _recv_(so, buf, bytes, flag) ::recv(so, buf, bytes, flag)
+#define _sendto_(so, buf, bytes, flag, to, tolen) ::sendto(so, buf, bytes, flag, to, tolen)
+#define _recvfrom_(so, buf, bytes, flag, from, fromlen) ::recvfrom(so, buf, bytes, flag, from, fromlen)
+#define _connect_(so, addr, addrlen) ::connect(so, addr, addrlen)
+#define _accept_(so, addr, addrlen) ::accept(so, addr, addrlen)
+#define _select_(cnt, rfd, wfd, efd, timeout) ::select(cnt, rfd, wfd, efd, timeout)
+#define _poll_(fds, cnt, timeout) ::poll(fds, cnt, timeout)
+#define _getsockname_(so, addr, alen) ::getsockname(so, addr, alen)
+#define _getpeername_(so, addr, alen) ::getpeername(so, addr, alen)
+#define _bind_(so, addr, alen) ::bind(so, addr, alen)
+#define _listen_(so, count) ::listen(so, count)
+#endif
+
+using namespace UCOMMON_NAMESPACE;
+
+typedef unsigned char   bit_t;
+
+static int query_family = 0;
+static int v6only = 0;
+
+static void socket_mapping(int family, socket_t so)
+{
+    if(so == INVALID_SOCKET)
+        return;
+
+#if defined(IPV6_V6ONLY) && defined(IPPROTO_IPV6)
+    if(family == AF_INET6)
+        setsockopt (so, IPPROTO_IPV6, IPV6_V6ONLY, (char *) &v6only, sizeof (v6only));
+#endif
+}
+
+#ifndef HAVE_GETADDRINFO
+
+static mutex servmutex, hostmutex;
+
+static void freeaddrinfo(struct addrinfo *aip)
+{
+    while(aip != NULL) {
+        struct addrinfo *next = aip->ai_next;
+        if(aip->ai_canonname != NULL)
+            free(aip->ai_canonname);
+        if(aip->ai_addr != NULL)
+            free(aip->ai_addr);
+        free(aip);
+        aip = next;
+    }
+}
+
+static int getnameinfo(const struct sockaddr *addr, socklen_t len, char *host, size_t hostlen, char *service, size_t servlen, int flags)
+{
+    char *cp;
+    struct hostent *hp;
+    struct servent *sp;
+    assert(addr != NULL);
+    assert(host != NULL || hostlen == 0);
+    assert(service != NULL || servlen == 0);
+
+    short port = 0;
+
+    switch(addr->sa_family) {
+#ifdef  AF_UNIX
+    case AF_UNIX:
+        if(hostlen > 0)
+            snprintf(host, hostlen, "%s", ((struct sockaddr_un *)addr)->sun_path);
+        if(servlen > 0)
+            snprintf(service, servlen, "%s", ((struct sockaddr_un *)addr)->sun_path);
+        return 0;
+#endif
+#ifdef  AF_INET6
+    case AF_INET6:
+        port = ((struct sockaddr_in6 *)addr)->sin6_port;
+        break;
+#endif
+    case AF_INET:
+        port = ((struct sockaddr_in *)addr)->sin_port;
+        break;
+    default:
+        return -1;
+    }
+    if(hostlen > 0) {
+        if(flags & NI_NUMERICHOST) {
+            if(inet_ntop(addr->sa_family, addr, host, hostlen) == NULL)
+                return -1;
+        }
+        else {
+            hostmutex.lock();
+            hp = gethostbyaddr((caddr_t)addr, len, addr->sa_family);
+            if(hp != NULL && hp->h_name != NULL) {
+                if(flags & NI_NOFQDN) {
+                    cp = strchr(hp->h_name, '.');
+                    if(cp)
+                        *cp = 0;
+                }
+                snprintf(host, hostlen, "%s", hp->h_name);
+                hostmutex.unlock();
+            }
+            else {
+                hostmutex.unlock();
+                if(flags & NI_NAMEREQD)
+                    return -1;
+                if(inet_ntop(addr->sa_family, addr, host, hostlen) != NULL)
+                    return -1;
+            }
+        }
+    }
+    if(servlen > 0) {
+        if(flags & NI_NUMERICSERV)
+            snprintf(service, servlen, "%d", ntohs(port));
+        else {
+            servmutex.lock();
+            sp = getservbyport(port, (flags & NI_DGRAM) ? "udp" : NULL);
+            if(sp && sp->s_name)
+                snprintf(service, servlen, "%s", sp->s_name);
+            else
+                snprintf(service, servlen, "%d", ntohs(port));
+            servmutex.unlock();
+        }
+    }
+    return 0;
+}
+
+static int getaddrinfo(const char *hostname, const char *servname, const struct addrinfo *hintsp, struct addrinfo **res)
+{
+    int family;
+    const char *servtype = "tcp";
+    struct hostent *hp;
+    struct servent *sp;
+    char **np;
+    struct addrinfo hints;
+    struct addrinfo *aip = NULL, *prior = NULL;
+    socklen_t len;
+    short port = 0;
+    struct sockaddr_in *ipv4;
+#ifdef  AF_INET6
+    struct sockaddr_in6 *ipv6;
+#endif
+    if(hintsp == NULL) {
+        memset(&hints, 0, sizeof(hints));
+        hints.ai_family = AF_UNSPEC;
+    }
+    else
+        memcpy(&hints, hintsp, sizeof(hints));
+
+    *res = NULL;
+
+#ifdef  AF_UNIX
+    if(hints.ai_family == AF_UNIX || (hints.ai_family == AF_UNSPEC && hostname && *hostname == '/')) {
+        if(hints.ai_socktype == 0)
+            hints.ai_socktype = SOCK_STREAM;
+
+        aip = (struct addrinfo *)malloc(sizeof(struct addrinfo));
+        memset(aip, 0, sizeof(struct addrinfo));
+        aip->ai_next = NULL;
+        aip->ai_canonname = NULL;
+        aip->ai_protocol = hints.ai_protocol;
+        struct sockaddr_un *unp;
+        if(strlen(hostname) >= sizeof(unp->sun_path))
+            return -1;
+        unp = (struct sockaddr_un *)malloc(sizeof(struct sockaddr_un));
+        memset(unp, 0, sizeof(struct sockaddr_un));
+        unp->sun_family = AF_UNIX;
+        String::set(unp->sun_path, sizeof(unp->sun_path), hostname);
+#ifdef  __SUN_LEN
+        len = sizeof(unp->sun_len) + strlen(unp->sun_path) +
+            sizeof(unp->sun_family) + 1;
+        unp->sun_len = len;
+#else
+        len = strlen(unp->sun_path) + sizeof(unp->sun_family) + 1;
+#endif
+        if(hints.ai_flags & AI_PASSIVE)
+            unlink(unp->sun_path);
+        aip->ai_addr = (struct sockaddr *)unp;
+        aip->ai_addrlen = len;
+        *res = aip;
+        return 0;
+    }
+#endif
+
+    if(servname && *servname) {
+        if(servname[0] >= '0' && servname[0] <= '9') {
+            port = htons(atoi(servname));
+        }
+        else {
+            if(hints.ai_socktype == SOCK_DGRAM)
+                servtype = "udp";
+            servmutex.lock();
+            sp = getservbyname(servname, servtype);
+            if(!sp) {
+                servmutex.unlock();
+                return -1;
+            }
+            port = sp->s_port;
+            servmutex.unlock();
+        }
+    }
+
+    if((!hostname || !*hostname)) {
+        aip = (struct addrinfo *)malloc(sizeof(struct addrinfo));
+        memset(aip, 0, sizeof(struct addrinfo));
+        aip->ai_canonname = NULL;
+        aip->ai_socktype = hints.ai_socktype;
+        aip->ai_protocol = hints.ai_protocol;
+        aip->ai_next = NULL;
+
+#ifdef  AF_INET6
+        if(hints.ai_family == AF_INET6) {
+            aip->ai_family = AF_INET6;
+            ipv6 = (struct sockaddr_in6 *)malloc(sizeof(struct sockaddr_in6));
+            memset(ipv6, 0, sizeof(struct sockaddr_in6));
+            if(!(hints.ai_flags & AI_PASSIVE))
+                inet_pton(AF_INET6, "::1", &ipv6->sin6_addr);
+            ipv6->sin6_family = AF_INET6;
+            ipv6->sin6_port = port;
+            aip->ai_addr = (struct sockaddr *)ipv6;
+            *res = aip;
+            return 0;
+        }
+#endif
+        aip->ai_family = AF_INET;
+        ipv4 = (struct sockaddr_in*)malloc(sizeof(struct sockaddr_in));
+        memset(ipv4, 0, sizeof(struct sockaddr_in));
+        ipv4->sin_family = AF_INET;
+        ipv4->sin_port = port;
+        if(!(hints.ai_flags & AI_PASSIVE))
+            inet_pton(AF_INET, "127.0.0.1", &ipv4->sin_addr);
+        aip->ai_addr = (struct sockaddr *)ipv4;
+        *res = aip;
+        return 0;
+    }
+    family = hints.ai_family;
+#ifdef  AF_UNSPEC
+    if(family == AF_UNSPEC)
+        family = AF_INET;
+#endif
+    hostmutex.lock();
+#ifdef  HAVE_GETHOSTBYNAME2
+    hp = gethostbyname2(hostname, family);
+#else
+    hp = gethostbyname(hostname);
+#endif
+    if(!hp) {
+        hostmutex.unlock();
+        return -1;
+    }
+
+    for(np = hp->h_addr_list; *np != NULL; np++) {
+        aip = (struct addrinfo *)malloc(sizeof(struct addrinfo));
+        memset(aip, 0, sizeof(struct addrinfo));
+        if(hints.ai_flags & AI_CANONNAME)
+            aip->ai_canonname = strdup(hp->h_name);
+        else
+            aip->ai_canonname = NULL;
+        aip->ai_socktype = hints.ai_socktype;
+        aip->ai_protocol = hints.ai_protocol;
+        aip->ai_next = NULL;
+        if(prior)
+            prior->ai_next = aip;
+        else
+            *res = aip;
+        prior = aip;
+
+#ifdef  AF_INET6
+        if(hints.ai_family == AF_INET6) {
+            aip->ai_family = AF_INET6;
+            ipv6 = (struct sockaddr_in6 *)malloc(sizeof(struct sockaddr_in6));
+            memset(ipv6, 0, sizeof(struct sockaddr_in6));
+            memcpy(&ipv6->sin6_addr, *np, sizeof(&ipv6->sin6_addr));
+            ipv6->sin6_family = AF_INET6;
+            ipv6->sin6_port = port;
+            aip->ai_addr = (struct sockaddr *)ipv6;
+            continue;
+        }
+#endif
+        aip->ai_family = AF_INET;
+        ipv4 = (struct sockaddr_in*)malloc(sizeof(struct sockaddr_in));
+        memset(ipv4, 0, sizeof(struct sockaddr_in));
+        ipv4->sin_family = AF_INET;
+        ipv4->sin_port = port;
+        memcpy(&ipv4->sin_addr, *np, sizeof(&ipv4->sin_addr));
+        aip->ai_addr = (struct sockaddr *)ipv4;
+    }
+
+    hostmutex.unlock();
+    if(*res)
+        return 0;
+    else
+        return -1;
+}
+#endif
+
+#if defined(AF_UNIX) && !defined(_MSWINDOWS_)
+
+static socklen_t unixaddr(struct sockaddr_un *addr, const char *path)
+{
+    assert(addr != NULL);
+    assert(path != NULL && *path != 0);
+
+    socklen_t len;
+    unsigned slen = strlen(path);
+
+    if(slen > sizeof(struct sockaddr_storage) - 8)
+        slen = sizeof(struct sockaddr_storage) - 8;
+
+    memset(addr, 0, sizeof(struct sockaddr_storage));
+    addr->sun_family = AF_UNIX;
+    memcpy(addr->sun_path, path, slen);
+
+#ifdef  __SUN_LEN
+    len = sizeof(addr->sun_len) + strlen(addr->sun_path) +
+        sizeof(addr->sun_family) + 1;
+    addr->sun_len = len;
+#else
+    len = strlen(addr->sun_path) + sizeof(addr->sun_family) + 1;
+#endif
+    return len;
+}
+
+#endif
+
+#ifndef AF_UNSPEC
+#define AF_UNSPEC   0
+#endif
+
+static int setfamily(int family, const char *host)
+{
+    const char *hc = host;
+    if(!host)
+        return  family;
+
+    if(!family || family == AF_UNSPEC) {
+#ifdef  AF_INET6
+        if(strchr(host, ':'))
+            family = AF_INET6;
+#endif
+#ifdef  AF_UNIX
+        if(*host == '/')
+            family = AF_UNIX;
+#endif
+        while((*hc >= '0' && *hc <= '9') || *hc == '.')
+            ++hc;
+        if(!*hc)
+            family = AF_INET;
+    }
+
+    if(!family || family == AF_UNSPEC)
+        family = query_family;
+
+    return family;
+}
+
+static void bitmask(bit_t *bits, bit_t *mask, unsigned len)
+{
+    assert(bits != NULL);
+    assert(mask != NULL);
+
+    while(len--)
+        *(bits++) &= *(mask++);
+}
+
+static void bitimask(bit_t *bits, bit_t *mask, unsigned len)
+{
+    assert(bits != NULL);
+    assert(mask != NULL);
+
+    while(len--)
+        *(bits++) |= ~(*(mask++));
+}
+
+static void bitset(bit_t *bits, unsigned blen)
+{
+    assert(bits != NULL);
+
+    bit_t mask;
+
+    while(blen) {
+        mask = (bit_t)(1 << 7);
+        while(mask && blen) {
+            *bits |= mask;
+            mask >>= 1;
+            --blen;
+        }
+        ++bits;
+    }
+}
+
+static unsigned bitcount(bit_t *bits, unsigned len)
+{
+    assert(bits != NULL);
+
+    unsigned count = 0;
+    bit_t mask, test;
+
+    while(len--) {
+        mask = (bit_t)(1<<7);
+        test = *bits++;
+        while(mask) {
+            if(!(mask & test))
+                return count;
+            ++count;
+            mask >>= 1;
+        }
+    }
+    return count;
+}
+
+#ifdef  _MSWINDOWS_
+
+static bool _started = false;
+
+static void _socketcleanup(void)
+{
+    if(_started)
+        WSACleanup();
+}
+
+void Socket::init(void)
+{
+    static bool initialized = false;
+    unsigned short version;
+    WSADATA status;
+
+    if(initialized)
+        return;
+
+    initialized = true;
+    version = MAKEWORD(2,2);
+    status.wVersion = 0;
+    WSAStartup(version, &status);
+    crit(status.wVersion == version, "socket init failure");
+    atexit(_socketcleanup);
+    _started = true;
+}
+#else
+void Socket::init(void)
+{
+}
+#endif
+
+void Socket::init(const char *progname)
+{
+    assert(progname != NULL);
+
+    Socket::init();
+#ifdef  HAVE_SOCKS
+    const char *cp;
+
+#ifdef  _MSWINDOWS_
+    char path[65];
+
+    cp = strrchr(progname, '/');
+    if(!cp)
+        cp = strrchr(progname, '\\');
+    if(!cp)
+        cp = strrchr(progname, ':');
+    if(cp)
+        progname = ++cp;
+
+    String::set(path, sizeof(path), progname);
+    const char *ext = strrchr(path, '.');
+    if(ext && (case_eq(ext, ".exe") || case_eq(ext, ".com")))
+        *ext = 0;
+    progname = path;
+#else
+    cp = strrchr(progname, '/');
+    if(cp)
+        progname = ++cp;
+#endif
+
+    SOCKSinit((char *)progname);
+#endif
+}
+
+void Socket::v4mapping(bool enable)
+{
+    if(enable)
+        v6only = 0;
+    else
+        v6only = 1;
+}
+
+void Socket::query(int querymode)
+{
+    query_family = querymode;
+}
+
+cidr::cidr() :
+LinkedObject()
+{
+    Family = AF_UNSPEC;
+    memset(&Network, 0, sizeof(Network));
+    memset(&Netmask, 0, sizeof(Netmask));
+    Name[0] = 0;
+}
+
+cidr::cidr(const char *cp) :
+LinkedObject()
+{
+    assert(cp != NULL && *cp != 0);
+    set(cp);
+    Name[0] = 0;
+}
+
+cidr::cidr(policy **policy, const char *cp) :
+LinkedObject(policy)
+{
+    assert(policy != NULL);
+    assert(cp != NULL && *cp != 0);
+
+    set(cp);
+    Name[0] = 0;
+}
+
+cidr::cidr(policy **policy, const char *cp, const char *id) :
+LinkedObject(policy)
+{
+    assert(policy != NULL);
+    assert(cp != NULL && *cp != 0);
+    assert(id != NULL && *id != 0);
+
+    set(cp);
+    String::set(Name, sizeof(Name), id);
+}
+
+
+cidr::cidr(const cidr &copy) :
+LinkedObject()
+{
+    Family = copy.Family;
+    memcpy(&Network, &copy.Network, sizeof(Network));
+    memcpy(&Netmask, &copy.Netmask, sizeof(Netmask));
+    memcpy(&Name, &copy.Name, sizeof(Name));
+}
+
+unsigned cidr::mask(void) const
+{
+    switch(Family)
+    {
+    case AF_INET:
+        return bitcount((bit_t *)&Netmask.ipv4, sizeof(struct in_addr));
+#ifdef  AF_INET6
+    case AF_INET6:
+        return bitcount((bit_t *)&Netmask.ipv6, sizeof(struct in6_addr));
+#endif
+    default:
+        return 0;
+    }
+}
+
+const cidr *cidr::find(const policy *policy, const struct sockaddr *s)
+{
+    assert(policy != NULL);
+    assert(s != NULL);
+
+    const cidr *member = NULL;
+    unsigned top = 0;
+
+    linked_pointer<const cidr> p = policy;
+    while(p) {
+        if(p->is_member(s)) {
+            if(p->getMask() > top) {
+                top = p->getMask();
+                member = *p;
+            }
+        }
+        p.next();
+    }
+    return member;
+}
+
+const cidr *cidr::container(const policy *policy, const struct sockaddr *s)
+{
+    assert(policy != NULL);
+    assert(s != NULL);
+
+    const cidr *member = NULL;
+    unsigned top = 128;
+
+    linked_pointer<const cidr> p = policy;
+    while(p) {
+        if(p->is_member(s)) {
+            if(p->getMask() < top) {
+                top = p->getMask();
+                member = *p;
+            }
+        }
+        p.next();
+    }
+    return member;
+}
+
+
+bool cidr::is_member(const struct sockaddr *s) const
+{
+    assert(s != NULL);
+
+    inethostaddr_t host;
+    struct sockaddr_internet *addr = (struct sockaddr_internet *)s;
+
+    if(addr->address.sa_family != Family)
+        return false;
+
+    switch(Family) {
+    case AF_INET:
+        memcpy(&host.ipv4, &addr->ipv4.sin_addr, sizeof(host.ipv4));
+        bitmask((bit_t *)&host.ipv4, (bit_t *)&Netmask, sizeof(host.ipv4));
+        if(!memcmp(&host.ipv4, &Network.ipv4, sizeof(host.ipv4)))
+            return true;
+        return false;
+#ifdef  AF_INET6
+    case AF_INET6:
+        memcpy(&host.ipv6, &addr->ipv6.sin6_addr, sizeof(host.ipv6));
+        bitmask((bit_t *)&host.ipv6, (bit_t *)&Netmask, sizeof(host.ipv6));
+        if(!memcmp(&host.ipv6, &Network.ipv6, sizeof(host.ipv6)))
+            return true;
+        return false;
+#endif
+    default:
+        return false;
+    }
+}
+
+inethostaddr_t cidr::broadcast(void) const
+{
+    inethostaddr_t bcast;
+
+    switch(Family) {
+    case AF_INET:
+        memcpy(&bcast.ipv4, &Network.ipv4, sizeof(Network.ipv4));
+        bitimask((bit_t *)&bcast.ipv4, (bit_t *)&Netmask.ipv4, sizeof(bcast.ipv4));
+        return bcast;
+#ifdef  AF_INET6
+    case AF_INET6:
+        memcpy(&bcast.ipv6, &Network.ipv6, sizeof(Network.ipv6));
+        bitimask((bit_t *)&bcast.ipv6, (bit_t *)&Netmask.ipv6, sizeof(bcast.ipv6));
+        return bcast;
+#endif
+    default:
+        memset(&bcast, 0, sizeof(bcast));
+        return  bcast;
+    }
+}
+
+unsigned cidr::mask(const char *cp) const
+{
+    assert(cp != NULL && *cp != 0);
+
+    unsigned count = 0, rcount = 0, dcount = 0;
+    const char *sp = strchr(cp, '/');
+    bool flag = false;
+    const char *gp = cp;
+    unsigned char dots[4];
+    uint32_t mask;
+
+    switch(Family) {
+#ifdef  AF_INET6
+    case AF_INET6:
+        if(sp)
+            return atoi(++sp);
+        if(!strncmp(cp, "ff00:", 5))
+            return 8;
+        if(!strncmp(cp, "ff80:", 5))
+            return 10;
+        if(!strncmp(cp, "2002:", 5))
+            return 16;
+
+        sp = strrchr(cp, ':');
+        while(*(++sp) == '0')
+            ++sp;
+        if(*sp)
+            return 128;
+
+        while(*cp && count < 128) {
+            if(*(cp++) == ':') {
+                count += 16;
+                while(*cp == '0')
+                    ++cp;
+                if(*cp == ':') {
+                    if(!flag)
+                        rcount = count;
+                    flag = true;
+                }
+                else
+                    flag = false;
+            }
+        }
+        return rcount;
+#endif
+    case AF_INET:
+        if(sp) {
+            if(!strchr(++sp, '.'))
+                return atoi(sp);
+            mask = inet_addr(sp);
+            return bitcount((bit_t *)&mask, sizeof(mask));
+        }
+        memset(dots, 0, sizeof(dots));
+        dots[0] = atoi(cp);
+        while(*gp && dcount < 3) {
+            if(*(gp++) == '.')
+                dots[++dcount] = atoi(gp);
+        }
+        if(dots[3])
+            return 32;
+
+        if(dots[2])
+            return 24;
+
+        if(dots[1])
+            return 16;
+
+        return 8;
+    default:
+        return 0;
+    }
+}
+
+void cidr::set(const char *cp)
+{
+    assert(cp != NULL && *cp != 0);
+
+    char cbuf[128];
+    char *ep;
+    unsigned dots = 0;
+#ifdef  _MSWINDOWS_
+//  struct sockaddr saddr;
+    int slen;
+    struct sockaddr_in6 *paddr;
+    DWORD addr = (DWORD)inet_addr(cbuf);
+#endif
+
+#ifdef  AF_INET6
+    if(strchr(cp, ':'))
+        Family = AF_INET6;
+    else
+#endif
+        Family = AF_INET;
+
+    switch(Family) {
+    case AF_INET:
+        memset(&Netmask.ipv4, 0, sizeof(Netmask.ipv4));
+        bitset((bit_t *)&Netmask.ipv4, mask(cp));
+        String::set(cbuf, sizeof(cbuf), cp);
+        ep = (char *)strchr(cbuf, '/');
+        if(ep)
+            *ep = 0;
+
+        cp = cbuf;
+        while(NULL != (cp = strchr(cp, '.'))) {
+            ++dots;
+            ++cp;
+        }
+
+        while(dots++ < 3)
+            String::add(cbuf, sizeof(cbuf), ".0");
+
+#ifdef  _MSWINDOWS_
+        memcpy(&Network.ipv4, &addr, sizeof(Network.ipv4));
+#else
+        inet_aton(cbuf, &Network.ipv4);
+#endif
+        bitmask((bit_t *)&Network.ipv4, (bit_t *)&Netmask.ipv4, sizeof(Network.ipv4));
+        break;
+#ifdef  AF_INET6
+    case AF_INET6:
+        memset(&Netmask.ipv6, 0, sizeof(Netmask));
+        bitset((bit_t *)&Netmask.ipv6, mask(cp));
+        String::set(cbuf, sizeof(cbuf), cp);
+        ep = (char *)strchr(cp, '/');
+        if(ep)
+            *ep = 0;
+#ifdef  _MSWINDOWS_
+        struct sockaddr saddr;
+        slen = sizeof(saddr);
+        paddr = (struct sockaddr_in6 *)&saddr;
+        WSAStringToAddress((LPSTR)cbuf, AF_INET6, NULL, &saddr, &slen);
+        Network.ipv6 = paddr->sin6_addr;
+#else
+        inet_pton(AF_INET6, cbuf, &Network.ipv6);
+#endif
+        bitmask((bit_t *)&Network.ipv6, (bit_t *)&Netmask.ipv6, sizeof(Network.ipv6));
+#endif
+    default:
+        break;
+    }
+}
+
+Socket::address::address(int family, const char *a, int type, int protocol)
+{
+    assert(a != NULL && *a != 0);
+
+    list = NULL;
+#ifdef  _MSWINDOWS_
+    Socket::init();
+#endif
+    set(family, a, type, protocol);
+}
+
+Socket::address::address(const char *host, unsigned port)
+{
+    assert(host != NULL && *host != 0);
+
+    list = NULL;
+#ifdef  _MSWINDOWS_
+    Socket::init();
+#endif
+    set(host, port);
+}
+
+Socket::address::address(int family, const char *host, const char *svc)
+{
+    assert(host != NULL && *host != 0);
+    assert(svc != NULL && *svc != 0);
+
+    struct addrinfo hint;
+
+#ifdef  _MSWINDOWS_
+    Socket::init();
+#endif
+
+    list = NULL;
+    memset(&hint, 0, sizeof(hint));
+    hint.ai_family = family;
+    getaddrinfo(host, svc, &hint, &list);
+}
+
+Socket::address::address()
+{
+    list = NULL;
+}
+
+Socket::address::address(const address& from)
+{
+    list = NULL;
+    copy(from.list);
+}
+
+Socket::address::address(const char *host, const char *service, int type)
+{
+    list = NULL;
+    set(host, service, type);
+}
+
+Socket::address::~address()
+{
+    clear();
+}
+
+void Socket::address::clear(void)
+{
+    if(list) {
+        freeaddrinfo(list);
+        list = NULL;
+    }
+}
+
+void Socket::release(struct addrinfo *list)
+{
+    if(list)
+        freeaddrinfo(list);
+}
+
+struct ::addrinfo *Socket::query(const char *hp, const char *svc, int type, int protocol)
+{
+    assert(hp != NULL && *hp != 0);
+
+    int family = DEFAULT_FAMILY;
+    char hostbuf[256];
+    struct addrinfo hint;
+    String::set(hostbuf, sizeof(hostbuf), hp);
+    char *cp = strchr(hostbuf, '/');
+    char *host = hostbuf;
+
+    memset(&hint, 0, sizeof(hint));
+
+    hint.ai_socktype = type;
+    hint.ai_protocol = protocol;
+
+#ifdef  PF_UNSPEC
+    hint.ai_family = PF_UNSPEC;
+    hint.ai_flags = AI_PASSIVE;
+#endif
+
+    if(cp)
+        *cp = 0;
+
+    if(*host == '[') {
+        cp = strchr(++host, ']');
+        if(cp) {
+            *(cp++) = 0;
+            if(*cp == ':')
+                svc = ++cp;
+        }
+#ifdef  AF_INET6
+        family = AF_INET6;
+#else
+        return NULL;
+#endif
+    }
+    else if(((cp = strrchr(host, ':')) != NULL) && (strchr(host, ':') == cp)) {
+        *(cp++) = 0;
+        svc = cp;
+    }
+
+    if(is_numeric(host)) {
+        hint.ai_flags |= AI_NUMERICHOST;
+
+        if(strchr(host, ':')) {
+#ifdef  AF_INET6
+            family = AF_INET6;
+#else
+            return NULL;
+#endif
+        }
+        else
+            family = AF_INET;
+    }
+
+    if(family && family != AF_UNSPEC)
+        hint.ai_family = family;
+
+#if defined(AF_INET6) && defined(AI_V4MAPPED)
+    if(hint.ai_family == AF_INET6 && !v6only)
+        hint.ai_flags |= AI_V4MAPPED;
+#endif
+#ifdef  AI_NUMERICSERV
+    if(svc && atoi(svc) > 0)
+        hint.ai_flags |= AI_NUMERICSERV;
+#endif
+
+    struct addrinfo *result = NULL;
+    getaddrinfo(host, svc, &hint, &result);
+    return result;
+}
+
+void Socket::address::set(const char *host, unsigned port)
+{
+    assert(host != NULL && *host != 0);
+
+    char buf[16];
+
+    clear();
+
+    if(port) {
+        snprintf(buf, sizeof(buf), "%u", port);
+        list = Socket::query(host, buf);
+    }
+    else
+        list = Socket::query(host, NULL);
+}
+
+void Socket::address::set(int family, const char *a, int type, int protocol)
+{
+    assert(a != NULL && *a != 0);
+
+    char *addr = strdup(a);
+    char *host = strchr(addr, '@');
+    char *ep;
+    char *svc = NULL;
+    struct addrinfo hint;
+
+    clear();
+
+    memset(&hint, 0, sizeof(hint));
+#ifdef  PF_UNSPEC
+    hint.ai_family = PF_UNSPEC;
+    hint.ai_socktype = SOCK_STREAM;
+    hint.ai_flags = AI_PASSIVE;
+#endif
+
+    if(!host)
+        host = addr;
+    else
+        ++host;
+
+    if(*host != '[') {
+        ep = strchr(host, ':');
+        if(ep) {
+            *(ep++) = 0;
+            svc = ep;
+        }
+        goto proc;
+    }
+#ifdef  AF_INET6
+    if(*host == '[') {
+        family = AF_INET6;
+        ++host;
+        ep = strchr(host, ']');
+        if(ep) {
+            *(ep++) = 0;
+            if(*ep == ':')
+                svc = ++ep;
+        }
+    }
+#endif
+proc:
+    hint.ai_family = family;
+    hint.ai_socktype = type;
+    hint.ai_protocol = protocol;
+
+#if defined(AF_INET6) && defined(AI_V4MAPPED)
+    if(hint.ai_family == AF_INET6 && !v6only)
+        hint.ai_flags |= AI_V4MAPPED;
+#endif
+
+    getaddrinfo(host, svc, &hint, &list);
+}
+
+struct sockaddr *Socket::address::get(void) const
+{
+    if(!list)
+        return NULL;
+
+    return list->ai_addr;
+}
+
+int Socket::address::family(void) const
+{
+    struct sockaddr *ap;
+    if(!list)
+        return 0;
+
+    ap = list->ai_addr;
+    if(!ap)
+        return 0;
+
+    return ap->sa_family;
+}
+
+struct sockaddr *Socket::address::get(int family) const
+{
+    struct sockaddr *ap;
+    struct addrinfo *lp;
+
+    lp = list;
+
+    while(lp) {
+        ap = lp->ai_addr;
+        if(ap && ap->sa_family == family)
+            return ap;
+        lp = lp->ai_next;
+    }
+    return NULL;
+}
+
+void Socket::address::set(struct sockaddr *addr)
+{
+    clear();
+    add(addr);
+}
+
+bool Socket::address::remove(struct sockaddr *addr)
+{
+    assert(addr != NULL);
+    struct addrinfo *node = list, *prior = NULL;
+
+    while(node) {
+        if(node->ai_addr && equal(addr, node->ai_addr))
+            break;
+        prior = node;
+        node = node->ai_next;
+    }
+
+    if(!node)
+        return false;
+
+    if(!prior)
+        list = node->ai_next;
+    else
+        prior->ai_next = node->ai_next;
+
+    node->ai_next = NULL;
+    freeaddrinfo(node);
+    return true;
+}
+
+unsigned Socket::address::insert(struct addrinfo *alist)
+{
+    unsigned count = 0;
+    while(alist) {
+        if(insert(alist->ai_addr))
+            ++count;
+        alist = alist->ai_next;
+    }
+    return count;
+}
+
+unsigned Socket::address::remove(struct addrinfo *alist)
+{
+    unsigned count = 0;
+    while(alist) {
+        if(remove(alist->ai_addr))
+            ++count;
+        alist = alist->ai_next;
+    }
+    return count;
+}
+
+bool Socket::address::insert(struct sockaddr *addr)
+{
+    assert(addr != NULL);
+
+    struct addrinfo *node = list;
+
+    while(node) {
+        if(node->ai_addr && equal(addr, node->ai_addr))
+            return false;
+        node = node->ai_next;
+    }
+
+    node = (struct addrinfo *)malloc(sizeof(struct addrinfo));
+    memset(node, 0, sizeof(struct addrinfo));
+    node->ai_family = addr->sa_family;
+    node->ai_addrlen = len(addr);
+    node->ai_next = list;
+    node->ai_addr = (struct sockaddr *)malloc(node->ai_addrlen);
+    memcpy(node->ai_addr, addr, node->ai_addrlen);
+    list = node;
+    return true;
+}
+
+void Socket::address::copy(const struct addrinfo *addr)
+{
+    struct addrinfo *last = NULL;
+    struct addrinfo *node;
+
+    clear();
+    while(addr) {
+        node = (struct addrinfo *)malloc(sizeof(struct addrinfo));
+        memcpy(node, addr, sizeof(struct addrinfo));
+        node->ai_next = NULL;
+        node->ai_addr = dup(addr->ai_addr);
+        if(last)
+            last->ai_next = node;
+        else
+            list = node;
+        last = node;
+    }
+}
+
+struct sockaddr_in *Socket::address::ipv4(struct sockaddr *addr)
+{
+    if(addr == NULL || addr->sa_family != AF_INET)
+        return NULL;
+
+    return (struct sockaddr_in*)addr;
+}
+
+#ifdef  AF_INET6
+struct sockaddr_in6 *Socket::address::ipv6(struct sockaddr *addr)
+{
+    if(addr == NULL || addr->sa_family != AF_INET6)
+        return NULL;
+
+    return (struct sockaddr_in6*)addr;
+}
+#endif
+
+struct sockaddr *Socket::address::dup(struct sockaddr *addr)
+{
+    struct sockaddr *node;
+
+    if(!addr)
+        return NULL;
+
+    size_t slen = len(addr);
+    if(!slen)
+        return NULL;
+
+    node = (struct sockaddr *)malloc(slen);
+    memcpy(node, addr, slen);
+    return node;
+}
+
+void Socket::address::add(struct sockaddr *addr)
+{
+    assert(addr != NULL);
+
+    char buffer[80];
+    char svc[8];
+
+    Socket::query(addr, buffer, sizeof(buffer));
+    snprintf(svc, sizeof(svc), "%d", Socket::service(addr));
+    add(buffer, svc, addr->sa_family);
+}
+
+void Socket::address::set(const char *host, const char *svc, int socktype)
+{
+    clear();
+    add(host, svc, socktype);
+}
+
+void Socket::address::add(const char *host, const char *svc, int socktype)
+{
+    assert(host != NULL && *host != 0);
+    assert(svc != NULL && *svc != 0);
+
+    struct addrinfo *join = NULL, *last = NULL;
+
+    join = Socket::query(host, svc, socktype);
+    if(!join)
+        return;
+
+    if(!list) {
+        list = join;
+        return;
+    }
+    last = list;
+    while(last->ai_next)
+        last = last->ai_next;
+    last->ai_next = join;
+}
+
+struct sockaddr *Socket::address::find(const struct sockaddr *addr) const
+{
+    assert(addr != NULL);
+
+    struct addrinfo *node = list;
+
+    while(node) {
+        if(equal(addr, node->ai_addr))
+            return node->ai_addr;
+        node = node->ai_next;
+    }
+    return NULL;
+}
+
+Socket::Socket(const Socket &s)
+{
+#ifdef  _MSWINDOWS_
+    HANDLE pidH = GetCurrentProcess();
+    HANDLE dupH;
+
+    init();
+    if(DuplicateHandle(pidH, reinterpret_cast<HANDLE>(s.so), pidH, &dupH, 0, FALSE, DUPLICATE_SAME_ACCESS))
+        so = reinterpret_cast<SOCKET>(dupH);
+    else
+        so = INVALID_SOCKET;
+#else
+    so = ::dup(s.so);
+#endif
+    iowait = s.iowait;
+    ioerr = 0;
+}
+
+Socket::Socket()
+{
+    so = INVALID_SOCKET;
+    iowait = Timer::inf;
+    ioerr = 0;
+}
+
+Socket::Socket(socket_t s)
+{
+    so = s;
+    iowait = Timer::inf;
+    ioerr = 0;
+}
+
+Socket::Socket(struct addrinfo *addr)
+{
+#ifdef  _MSWINDOWS_
+    init();
+#endif
+    assert(addr != NULL);
+
+    while(addr) {
+        so = ::socket(addr->ai_family, addr->ai_socktype, addr->ai_protocol);
+        socket_mapping(addr->ai_family, so);
+        if(so != INVALID_SOCKET) {
+            if(!_connect_(so, addr->ai_addr, addr->ai_addrlen))
+                return;
+        }
+        addr = addr->ai_next;
+    }
+    so = INVALID_SOCKET;
+    iowait = Timer::inf;
+    ioerr = 0;
+}
+
+Socket::Socket(int family, int type, int protocol)
+{
+    so = create(family, type, protocol);
+    iowait = Timer::inf;
+    ioerr = 0;
+}
+
+Socket::Socket(const char *iface, const char *port, int family, int type, int protocol)
+{
+    assert(iface != NULL && *iface != 0);
+    assert(port != NULL && *port != 0);
+
+#ifdef  _MSWINDOWS_
+    init();
+#endif
+    family = setfamily(family, iface);
+    so = create(iface, port, family, type, protocol);
+    iowait = Timer::inf;
+    ioerr = 0;
+}
+
+socket_t Socket::create(const Socket::address &address)
+{
+    socket_t so;
+    struct addrinfo *res = *address;
+    if(!res)
+        return INVALID_SOCKET;
+
+    so = create(res->ai_family, res->ai_socktype, res->ai_protocol);
+    if(so == INVALID_SOCKET)
+        return INVALID_SOCKET;
+
+    if(connectto(so, res)) {
+        release(so);
+        return INVALID_SOCKET;
+    }
+    return so;
+}
+
+socket_t Socket::create(const char *iface, const char *port, int family, int type, int protocol)
+{
+    assert(iface != NULL && *iface != 0);
+    assert(port != NULL && *port != 0);
+
+    struct addrinfo hint, *res;
+    socket_t so;
+    int reuse = 1;
+
+#ifdef  _MSWINDOWS_
+    Socket::init();
+#endif
+
+    memset(&hint, 0, sizeof(hint));
+    hint.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
+    hint.ai_family = setfamily(family, iface);
+    hint.ai_socktype = type;
+    hint.ai_protocol = protocol;
+
+#if defined(AF_INET6) && defined(AI_V4MAPPED)
+    if(hint.ai_family == AF_INET6 && !v6only)
+        hint.ai_flags |= AI_V4MAPPED;
+#endif
+
+#if defined(AF_UNIX) && !defined(_MSWINDOWS_)
+    if(strchr(iface, '/')) {
+        struct sockaddr_un uaddr;
+        socklen_t len = unixaddr(&uaddr, iface);
+        if(!type)
+            type = SOCK_STREAM;
+        so = create(AF_UNIX, type, 0);
+        if(so == INVALID_SOCKET)
+            return INVALID_SOCKET;
+        if(_bind_(so, (struct sockaddr *)&uaddr, len)) {
+            release(so);
+            return INVALID_SOCKET;
+        }
+        return so;
+    };
+#endif
+
+    if(iface && !strcmp(iface, "*"))
+        iface = NULL;
+
+    getaddrinfo(iface, port, &hint, &res);
+    if(res == NULL)
+        return INVALID_SOCKET;
+
+    so = create(res->ai_family, res->ai_socktype, res->ai_protocol);
+    if(so == INVALID_SOCKET) {
+        freeaddrinfo(res);
+        return INVALID_SOCKET;
+    }
+    setsockopt(so, SOL_SOCKET, SO_REUSEADDR, (caddr_t)&reuse, sizeof(reuse));
+    if(res->ai_addr) {
+        if(_bind_(so, res->ai_addr, res->ai_addrlen)) {
+            release(so);
+            so = INVALID_SOCKET;
+        }
+    }
+    freeaddrinfo(res);
+    return so;
+}
+
+Socket::~Socket()
+{
+    release();
+}
+
+socket_t Socket::create(int family, int type, int protocol)
+{
+    socket_t so;
+#ifdef  _MSWINDOWS_
+    init();
+#endif
+    so = ::socket(family, type, protocol);
+    socket_mapping(family, so);
+    return so;
+}
+
+void Socket::cancel(void)
+{
+    if(so != INVALID_SOCKET)
+        ::shutdown(so, SHUT_RDWR);
+}
+
+void Socket::cancel(socket_t so)
+{
+    if(so != INVALID_SOCKET)
+        ::shutdown(so, SHUT_RDWR);
+}
+
+void Socket::release(socket_t so)
+{
+#ifdef  _MSWINDOWS_
+    ::closesocket(so);
+#else
+    if(!::shutdown(so, SHUT_RDWR))
+        ::close(so);
+#endif
+}
+
+void Socket::release(void)
+{
+    if(so != INVALID_SOCKET) {
+#ifdef  _MSWINDOWS_
+        ::closesocket(so);
+#else
+        ::shutdown(so, SHUT_RDWR);
+        ::close(so);
+#endif
+        so = INVALID_SOCKET;
+    }
+    iowait = Timer::inf;
+    ioerr = 0;
+}
+
+#ifdef  _MSWINDOWS_
+int Socket::error(void)
+{
+    switch(WSAGetLastError())
+    {
+    case WSANOTINITIALISED:
+    case WSAENETDOWN:
+    case WSASYSNOTREADY:
+        return ENETDOWN;
+    case WSAEFAULT:
+        return EFAULT;
+    case WSAEINTR:
+    case WSAECANCELLED:
+    case WSA_OPERATION_ABORTED:
+    case WSA_IO_INCOMPLETE:
+    case WSASYSCALLFAILURE:
+    case WSA_E_CANCELLED:
+        return EINTR;
+    case WSA_IO_PENDING:
+    case WSAEINPROGRESS:
+        return EINPROGRESS;
+    case WSAEINVAL:
+        return EINVAL;
+    case WSAEMFILE:
+        return EMFILE;
+    case WSAENETUNREACH:
+        return ENETUNREACH;
+    case WSAENOBUFS:
+    case WSAETOOMANYREFS:
+    case WSA_NOT_ENOUGH_MEMORY:
+        return ENOMEM;
+    case WSAEACCES:
+        return EACCES;
+    case WSAEBADF:
+    case WSAENOTSOCK:
+    case WSA_INVALID_HANDLE:
+        return EBADF;
+    case WSAEOPNOTSUPP:
+        return ENOSYS;
+    case WSAEWOULDBLOCK:
+    case WSAEALREADY:
+        return EAGAIN;
+    case WSAENOPROTOOPT:
+        return ENOPROTOOPT;
+    case WSAEADDRINUSE:
+        return EADDRINUSE;
+    case WSAENETRESET:
+        return ENETRESET;
+    case WSAECONNABORTED:
+        return ECONNABORTED;
+    case WSAECONNRESET:
+        return ECONNRESET;
+    case WSAEISCONN:
+        return EISCONN;
+    case WSAENOTCONN:
+        return ENOTCONN;
+    case WSAESHUTDOWN:
+        return ESHUTDOWN;
+    case WSAETIMEDOUT:
+        return ETIMEDOUT;
+    case WSAECONNREFUSED:
+        return ECONNREFUSED;
+    case WSAEHOSTDOWN:
+        return EHOSTDOWN;
+    case WSAEHOSTUNREACH:
+        return EHOSTUNREACH;
+    }
+    return EINVAL;
+}
+#else
+int Socket::error(void)
+{
+    return errno;
+}
+#endif
+
+Socket::operator bool()
+{
+    if(so == INVALID_SOCKET)
+        return false;
+    return true;
+}
+
+bool Socket::operator!() const
+{
+    if(so == INVALID_SOCKET)
+        return true;
+    return false;
+}
+
+Socket &Socket::operator=(socket_t s)
+{
+    release();
+    so = s;
+    return *this;
+}
+
+size_t Socket::peek(void *data, size_t len) const
+{
+    assert(data != NULL);
+    assert(len > 0);
+
+    if(iowait && iowait != Timer::inf && !Socket::wait(so, iowait))
+        return 0;
+
+    ssize_t rtn = _recv_(so, (caddr_t)data, 1, MSG_DONTWAIT | MSG_PEEK);
+    if(rtn < 1)
+        return 0;
+    return (size_t)rtn;
+}
+
+ssize_t Socket::recvinet(socket_t so, void *data, size_t len, int flags, struct sockaddr_internet *addr)
+{
+    assert(data != NULL);
+    assert(len > 0);
+
+    socklen_t slen = sizeof(struct sockaddr_internet);
+    return _recvfrom_(so, (caddr_t)data, len, flags, (struct sockaddr *)addr, &slen);
+}
+
+ssize_t Socket::recvfrom(socket_t so, void *data, size_t len, int flags, struct sockaddr_storage *addr)
+{
+    assert(data != NULL);
+    assert(len > 0);
+
+    socklen_t slen = sizeof(struct sockaddr_storage);
+    return _recvfrom_(so, (caddr_t)data, len, flags, (struct sockaddr *)addr, &slen);
+}
+
+size_t Socket::readfrom(void *data, size_t len, struct sockaddr_storage *from)
+{
+    assert(data != NULL);
+    assert(len > 0);
+
+    // wait for input by timer if possible...
+    if(iowait && iowait != Timer::inf && !Socket::wait(so, iowait))
+        return 0;
+
+    socklen_t slen = sizeof(struct sockaddr_storage);
+    ssize_t result = _recvfrom_(so, (caddr_t)data, len, 0, (struct sockaddr *)from, &slen);
+
+    if(result < 0) {
+        ioerr = Socket::error();
+        return 0;
+    }
+    return (size_t)result;
+}
+
+size_t Socket::writeto(const void *data, size_t dlen, const struct sockaddr *dest)
+{
+    assert(data != NULL);
+    assert(len > 0);
+
+    socklen_t slen = 0;
+    if(dest)
+        slen = len(dest);
+
+    ssize_t result = _sendto_(so, (caddr_t)data, dlen, MSG_NOSIGNAL, dest, slen);
+    if(result < 0) {
+        ioerr = Socket::error();
+        return 0;
+    }
+    return (size_t)result;
+}
+
+ssize_t Socket::sendto(socket_t so, const void *data, size_t dlen, int flags, const struct sockaddr *dest)
+{
+    assert(data != NULL);
+    assert(len > 0);
+
+    socklen_t slen = 0;
+    if(dest)
+        slen = len(dest);
+
+    return _sendto_(so, (caddr_t)data, dlen, MSG_NOSIGNAL | flags, dest, slen);
+}
+
+size_t Socket::writes(const char *str)
+{
+    if(!str)
+        return 0;
+
+    if(!*str)
+        return 0;
+
+    return writeto(str, strlen(str), NULL);
+}
+
+size_t Socket::readline(char *data, size_t max)
+{
+    assert(data != NULL);
+    assert(max > 0);
+
+    *data = 0;
+
+    ssize_t result = Socket::readline(so, data, max, iowait);
+    if(result < 0) {
+        ioerr = Socket::error();
+        return 0;
+    }
+    return (size_t)result;
+}
+
+size_t Socket::readline(String& s)
+{
+    if(!s.c_mem())
+        return 0;
+
+    ssize_t result = Socket::readline(so, s.c_mem(), s.size() + 1, iowait);
+    if(result < 0) {
+        ioerr = Socket::error();
+        s.clear();
+        return 0;
+    }
+    String::fix(s);
+    return (size_t)result;
+}
+
+ssize_t Socket::readline(socket_t so, char *data, size_t max, timeout_t timeout)
+{
+    assert(data != NULL);
+    assert(max > 0);
+
+    bool crlf = false;
+    bool nl = false;
+    int nleft = max - 1;        // leave space for null byte
+    int nstat, c;
+
+    if(max < 1)
+        return -1;
+
+    data[0] = 0;
+    while(nleft && !nl) {
+        if(timeout) {
+            if(!wait(so, timeout))
+                return 0;
+        }
+        nstat = _recv_(so, data, nleft, MSG_PEEK);
+        if(nstat < 0)
+            return -1;
+
+        if(nstat == 0)
+            return max - nleft - 1;
+
+        for(c = 0; c < nstat; ++c) {
+            if(data[c] == '\n') {
+                if(c > 0 && data[c - 1] == '\r')
+                    crlf = true;
+                ++c;
+                nl = true;
+                break;
+            }
+        }
+
+        nstat = _recv_(so, (caddr_t)data, c, 0);
+        if(nstat < 0)
+            break;
+
+        if(crlf) {
+            --nstat;
+            data[nstat - 1] = '\n';
+        }
+
+        data += nstat;
+        nleft -= nstat;
+    }
+
+    if(nl)
+        --data;
+
+    *data = 0;
+    return ssize_t(max - nleft - 1);
+}
+
+int Socket::loopback(socket_t so, bool enable)
+{
+    union {
+        struct sockaddr_storage saddr;
+        struct sockaddr_in inaddr;
+    } us;
+
+    struct sockaddr *addr = (struct sockaddr *)&us.saddr;
+    int family;
+    socklen_t len = sizeof(us.saddr);
+    int opt = 0;
+
+    if(enable)
+        opt = 1;
+
+    if(so == INVALID_SOCKET)
+        return EBADF;
+
+    _getsockname_(so, addr, &len);
+    family = us.inaddr.sin_family;
+    switch(family) {
+    case AF_INET:
+        if(!setsockopt(so, IPPROTO_IP, IP_MULTICAST_LOOP, (char *)&opt, sizeof(opt)))
+            return 0;
+        break;
+#if defined(AF_INET6) && defined(IPROTO_IPV6)
+    case AF_INET6:
+        if(!setsockopt(so, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, (char *)&opt, sizeof(opt)))
+            return 0;
+#endif
+    }
+    int err = Socket::error();
+    if(!err)
+        err = EIO;
+    return err;
+}
+
+int Socket::ttl(socket_t so, unsigned char t)
+{
+    union {
+        struct sockaddr_storage saddr;
+        struct sockaddr_in inaddr;
+    } us;
+
+    struct sockaddr *addr = (struct sockaddr *)&us.saddr;
+    int family;
+    socklen_t len = sizeof(us.saddr);
+
+    if(so == INVALID_SOCKET)
+        return EBADF;
+
+    _getsockname_(so, addr, &len);
+    family = us.inaddr.sin_family;
+    switch(family) {
+    case AF_INET:
+        if(!setsockopt(so, IPPROTO_IP, IP_TTL, (char *)&t, sizeof(t)))
+            return 0;
+        break;
+#if defined(AF_INET6) && defined(IPPROTO_IPV6)
+    case AF_INET6:
+        if(!setsockopt(so, IPPROTO_IPV6, IPV6_UNICAST_HOPS, (char *)&t, sizeof(t)))
+            return 0;
+#endif
+    }
+    int err = Socket::error();
+    if(!err)
+        err = EIO;
+    return err;
+}
+
+int Socket::priority(socket_t so, int pri)
+{
+    if(so == INVALID_SOCKET)
+        return EBADF;
+#ifdef  SO_PRIORITY
+    if(!setsockopt(so, SOL_SOCKET, SO_PRIORITY, (char *)&pri, (socklen_t)sizeof(pri)))
+        return 0;
+    int err = Socket::error();
+    if(!err)
+        err = EIO;
+    return err;
+#else
+    return ENOSYS;
+#endif
+}
+
+int Socket::tos(socket_t so, int ts)
+{
+    if(so == INVALID_SOCKET)
+        return EBADF;
+
+#ifdef  SOL_IP
+    if(!setsockopt(so, SOL_IP, IP_TOS,(char *)&ts, (socklen_t)sizeof(ts)))
+        return 0;
+
+    int err = Socket::error();
+    if(!err)
+        err = EIO;
+    return err;
+#else
+    return ENOSYS;
+#endif
+}
+
+int Socket::broadcast(socket_t so, bool enable)
+{
+    if(so == INVALID_SOCKET)
+        return EBADF;
+    int opt = (enable ? 1 : 0);
+    if(!::setsockopt(so, SOL_SOCKET, SO_BROADCAST,
+              (char *)&opt, (socklen_t)sizeof(opt)))
+        return 0;
+
+    int err = Socket::error();
+    if(!err)
+        err = EIO;
+    return err;
+}
+
+int Socket::nodelay(socket_t so)
+{
+    if(so == INVALID_SOCKET)
+        return EBADF;
+#if defined(TCP_NODELAY)
+    int opt = 1;
+    if(!::setsockopt(so, IPPROTO_TCP, TCP_NODELAY,
+            (char *)&opt, (socklen_t)sizeof(opt)))
+        return 0;
+#else
+    return ENOSYS;
+#endif
+    int err = Socket::error();
+    if(!err)
+        err = EIO;
+    return err;
+}
+
+int Socket::keepalive(socket_t so, bool enable)
+{
+    if(so == INVALID_SOCKET)
+        return EBADF;
+#if defined(SO_KEEPALIVE) || defined(_MSWINDOWS_)
+    int opt = (enable ? ~0 : 0);
+    if(!::setsockopt(so, SOL_SOCKET, SO_KEEPALIVE, (char *)&opt, (socklen_t)sizeof(opt)))
+        return 0;
+    int err = Socket::error();
+    if(!err)
+        err = EIO;
+    return err;
+#else
+    return ENOSYS;
+#endif
+}
+
+int Socket::multicast(socket_t so, unsigned ttl)
+{
+    struct sockaddr_internet addr;
+    socklen_t len = sizeof(addr);
+    bool enable;
+    int rtn;
+
+    if(so == INVALID_SOCKET)
+        return EBADF;
+
+    if(ttl)
+        enable = true;
+    else
+        enable = false;
+
+    _getsockname_(so, (struct sockaddr *)&addr, &len);
+    if(!enable)
+        switch(addr.address.sa_family)
+        {
+        case AF_INET:
+            memset(&addr.ipv4.sin_addr, 0, sizeof(addr.ipv4.sin_addr));
+            break;
+#ifdef  AF_INET6
+        case AF_INET6:
+            memset(&addr.ipv6.sin6_addr, 0, sizeof(addr.ipv6.sin6_addr));
+            break;
+#endif
+        default:
+            break;
+        }
+    switch(addr.address.sa_family) {
+#if defined(AF_INET6) && defined(IPPROTO_IPV6)
+    case AF_INET6:
+        rtn = ::setsockopt(so, IPPROTO_IPV6, IPV6_MULTICAST_IF, (char *)&addr.ipv6.sin6_addr, sizeof(addr.ipv6.sin6_addr));
+        if(!rtn)
+            rtn = ::setsockopt(so, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, (char *)&ttl, sizeof(ttl));
+        if(rtn) {
+            rtn = Socket::error();
+            if(!rtn)
+                rtn = EIO;
+        }
+        return rtn;
+#endif
+    case AF_INET:
+#ifdef  IP_MULTICAST_IF
+        rtn = ::setsockopt(so, IPPROTO_IP, IP_MULTICAST_IF, (char *)&addr.ipv4.sin_addr, sizeof(addr.ipv4.sin_addr));
+        if(!rtn)
+            rtn = ::setsockopt(so, IPPROTO_IP, IP_MULTICAST_TTL, (char *)&ttl, sizeof(ttl));
+        if(rtn) {
+            rtn = Socket::error();
+            if(!rtn)
+                rtn = EIO;
+        }
+        return rtn;
+#else
+        return ENOSYS;
+#endif
+    default:
+        return ENOSYS;
+    }
+}
+
+int Socket::join(const struct addrinfo *addr)
+{
+    int rtn = Socket::join(so, addr);
+    if(rtn)
+        ioerr = rtn;
+    return rtn;
+}
+
+int Socket::drop(const struct addrinfo *addr)
+{
+    int rtn = Socket::drop(so, addr);
+    if(rtn)
+        ioerr = rtn;
+    return rtn;
+}
+
+int Socket::wait(timeout_t timeout)
+{
+    bool mode = true;
+
+    if(timeout < Timer::inf)
+        mode = false;
+
+    int rtn = Socket::blocking(so, mode);
+    if(!rtn)
+        iowait = timeout;
+    else
+        ioerr = rtn;
+
+    return rtn;
+}
+
+int Socket::blocking(socket_t so, bool enable)
+{
+    if(so == INVALID_SOCKET)
+        return EBADF;
+
+#if defined(_MSWINDOWS_)
+    unsigned long flag = (enable ? 0 : 1);
+    if(!ioctlsocket(so, FIONBIO, &flag))
+        return 0;
+
+#else
+    long flags = fcntl(so, F_GETFL);
+    if(enable)
+        flags &=~ O_NONBLOCK;
+    else
+        flags |= O_NONBLOCK;
+    if(!fcntl(so, F_SETFL, flags))
+        return 0;
+#endif
+    int err = Socket::error();
+    if(!err)
+        err = EIO;
+    return err;
+}
+
+int Socket::disconnect(socket_t so)
+{
+    union {
+        struct sockaddr_storage saddr;
+        struct sockaddr_in inaddr;
+    } us;
+
+    struct sockaddr *addr = (struct sockaddr *)&us.saddr;
+    socklen_t len = sizeof(us.saddr);
+
+#if defined(_MSWINDOWS_)
+    _getsockname_(so, addr, &len);
+    int family = us.inaddr.sin_family;
+    memset(addr, 0, sizeof(us.saddr));
+    us.inaddr.sin_family = family;
+#else
+    memset(addr, 0, sizeof(us.saddr));
+    us.inaddr.sin_family = AF_UNSPEC;
+#endif
+    if((size_t)len > sizeof(us.saddr))
+        len = sizeof(us.saddr);
+    if(so == INVALID_SOCKET)
+        return EBADF;
+    if(!_connect_(so, addr, len))
+        return 0;
+    int err = Socket::error();
+    if(!err)
+        err = EIO;
+    return err;
+}
+
+int Socket::join(socket_t so, const struct addrinfo *node)
+{
+    assert(node != NULL);
+
+    struct multicast_internet mcast;
+    struct sockaddr_internet addr;
+    socklen_t len = sizeof(addr);
+    const struct sockaddr_internet *target;
+    int family;
+    int rtn = 0;
+
+    if(so == INVALID_SOCKET)
+        return EBADF;
+
+    _getsockname_(so, (struct sockaddr *)&addr, &len);
+    while(!rtn && node && node->ai_addr) {
+        target = (const struct sockaddr_internet *)node->ai_addr;
+        family = node->ai_family;
+        node = node->ai_next;
+        if(family != addr.address.sa_family)
+            continue;
+        switch(addr.address.sa_family) {
+#if defined(AF_INET6) && defined(IPV6_ADD_MEMBERSHIP) && defined(IPPROTO_IPV6)
+        case AF_INET6:
+            mcast.ipv6.ipv6mr_interface = 0;
+            memcpy(&mcast.ipv6.ipv6mr_multiaddr, &target->ipv6.sin6_addr, sizeof(target->ipv6.sin6_addr));
+            rtn = ::setsockopt(so, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, (char *)&mcast, sizeof(mcast.ipv6));
+            break;
+#endif
+#if defined(IP_ADD_MEMBERSHIP)
+        case AF_INET:
+            mcast.ipv4.imr_interface.s_addr = INADDR_ANY;
+            memcpy(&mcast.ipv4.imr_multiaddr, &target->ipv4.sin_addr, sizeof(target->ipv4.sin_addr));
+            rtn = ::setsockopt(so, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char *)&mcast, sizeof(mcast.ipv4));
+            break;
+#endif
+        default:
+            return ENOSYS;
+        }
+    }
+    if(rtn) {
+        rtn = Socket::error();
+        if(!rtn)
+            rtn = EIO;
+    }
+    return rtn;
+}
+
+int Socket::drop(socket_t so, const struct addrinfo *node)
+{
+    assert(node != NULL);
+
+    struct multicast_internet mcast;
+    struct sockaddr_internet addr;
+    socklen_t len = sizeof(addr);
+    const struct sockaddr_internet *target;
+    int family;
+    int rtn = 0;
+
+    if(so == INVALID_SOCKET)
+        return EBADF;
+
+    _getsockname_(so, (struct sockaddr *)&addr, &len);
+    while(!rtn && node && node->ai_addr) {
+        target = (const struct sockaddr_internet *)node->ai_addr;
+        family = node->ai_family;
+        node = node->ai_next;
+
+        if(family != addr.address.sa_family)
+            continue;
+
+        switch(addr.address.sa_family) {
+#if defined(AF_INET6) && defined(IPV6_DROP_MEMBERSHIP) && defined(IPPROTO_IPV6)
+        case AF_INET6:
+            mcast.ipv6.ipv6mr_interface = 0;
+            memcpy(&mcast.ipv6.ipv6mr_multiaddr, &target->ipv6.sin6_addr, sizeof(target->ipv6.sin6_addr));
+            rtn = ::setsockopt(so, IPPROTO_IPV6, IPV6_DROP_MEMBERSHIP, (char *)&mcast, sizeof(mcast.ipv6));
+            break;
+#endif
+#if defined(IP_DROP_MEMBERSHIP)
+        case AF_INET:
+            mcast.ipv4.imr_interface.s_addr = INADDR_ANY;
+            memcpy(&mcast.ipv4.imr_multiaddr, &target->ipv4.sin_addr, sizeof(target->ipv4.sin_addr));
+            rtn = ::setsockopt(so, IPPROTO_IP, IP_DROP_MEMBERSHIP, (char *)&mcast, sizeof(mcast.ipv4));
+            break;
+#endif
+        default:
+            return ENOSYS;
+        }
+    }
+    if(rtn) {
+        rtn = Socket::error();
+        if(!rtn)
+            rtn = EIO;
+    }
+    return rtn;
+}
+
+socket_t Socket::create(const struct addrinfo *node, int stype, int sprotocol)
+{
+    assert(node != NULL);
+
+    socket_t so = INVALID_SOCKET;
+    int sfamily = AF_UNSPEC;
+    int cprotocol, ctype;
+
+    while(node) {
+        if(stype && node->ai_socktype && node->ai_socktype != stype)
+            goto next;
+
+        if(sprotocol && node->ai_protocol && node->ai_protocol != sprotocol)
+            goto next;
+
+        if(node->ai_family != sfamily) {
+            if(so != INVALID_SOCKET)
+                Socket::release(so);
+            sfamily = node->ai_family;
+            if(stype)
+                ctype = stype;
+            else
+                ctype = node->ai_socktype;
+            if(sprotocol)
+                cprotocol = sprotocol;
+            else
+                cprotocol = node->ai_protocol;
+            so = Socket::create(sfamily, ctype, cprotocol);
+        }
+        if(so != INVALID_SOCKET) {
+            if(!_connect_(so, node->ai_addr, node->ai_addrlen))
+                return so;
+        }
+next:
+        node = node->ai_next;
+    }
+    if(so != INVALID_SOCKET)
+        Socket::release(so);
+    return INVALID_SOCKET;
+}
+
+int Socket::connectto(struct addrinfo *node)
+{
+    return (ioerr = connectto(so, node));
+}
+
+int Socket::disconnect(void)
+{
+    return (ioerr = disconnect(so));
+}
+
+int Socket::connectto(socket_t so, struct addrinfo *node)
+{
+    assert(node != NULL);
+
+    int rtn = -1;
+    int socket_family;
+
+    if(so == INVALID_SOCKET)
+        return EBADF;
+
+    socket_family = family(so);
+
+    while(node) {
+        if(node->ai_family == socket_family) {
+            if(!_connect_(so, node->ai_addr, node->ai_addrlen)) {
+                rtn = 0;
+                goto exit;
+            }
+        }
+        node = node->ai_next;
+    }
+
+exit:
+#ifndef _MSWINDOWS_
+    if(!rtn || errno == EINPROGRESS)
+        return 0;
+#endif
+    if(rtn) {
+        rtn = Socket::error();
+        if(!rtn)
+            rtn = EIO;
+    }
+    return rtn;
+}
+
+int Socket::error(socket_t so)
+{
+    assert(so != INVALID_SOCKET);
+
+    int opt;
+    socklen_t slen = sizeof(opt);
+
+    if(getsockopt(so, SOL_SOCKET, SO_ERROR, (caddr_t)&opt, &slen))
+        return ENOSYS;
+
+    return opt;
+}
+
+int Socket::sendwait(socket_t so, unsigned size)
+{
+    assert(so != INVALID_SOCKET);
+
+#ifdef  SO_SNDLOWAT
+    if(!setsockopt(so, SOL_SOCKET, SO_SNDLOWAT, (caddr_t)&size, sizeof(size)))
+        return 0;
+    int err = Socket::error();
+    if(!err)
+        err = EIO;
+    return err;
+#else
+    return ENOSYS;
+#endif
+}
+
+int Socket::sendsize(socket_t so, unsigned size)
+{
+    assert(so != INVALID_SOCKET);
+
+#ifdef  SO_SNDBUF
+    if(!setsockopt(so, SOL_SOCKET, SO_SNDBUF, (caddr_t)&size, sizeof(size)))
+        return 0;
+    int err = Socket::error();
+    if(!err)
+        err = EIO;
+    return err;
+#else
+    return ENOSYS;
+#endif
+}
+
+int Socket::recvsize(socket_t so, unsigned size)
+{
+#ifdef  SO_RCVBUF
+    if(!setsockopt(so, SOL_SOCKET, SO_RCVBUF, (caddr_t)&size, sizeof(size)))
+        return 0;
+    int err = Socket::error();
+    if(!err)
+        err = EIO;
+    return err;
+#else
+    return ENOSYS;
+#endif
+}
+
+bool Socket::connected(void) const
+{
+    char buf;
+
+    if(so == INVALID_SOCKET)
+        return false;
+
+    if(!wait())
+        return true;
+
+    if(_recv_(so, &buf, 1, MSG_DONTWAIT | MSG_PEEK) < 1)
+        return false;
+
+    return true;
+}
+
+bool Socket::is_pending(unsigned qio) const
+{
+    if(pending() >= qio)
+        return true;
+
+    return false;
+}
+
+#ifdef _MSWINDOWS_
+unsigned Socket::pending(socket_t so)
+{
+    u_long opt;
+    if(so == INVALID_SOCKET)
+        return 0;
+
+    ioctlsocket(so, FIONREAD, &opt);
+    return (unsigned)opt;
+}
+
+#else
+unsigned Socket::pending(socket_t so)
+{
+    int opt;
+    if(so == INVALID_SOCKET)
+        return 0;
+
+    if(::ioctl(so, FIONREAD, &opt))
+        return 0;
+    return (unsigned)opt;
+}
+
+#endif
+
+socket_t Socket::acceptfrom(socket_t so, struct sockaddr_storage *addr)
+{
+    socklen_t len = sizeof(struct sockaddr_storage);
+    if(addr)
+        return _accept_(so, (struct sockaddr *)addr, &len);
+    else
+        return _accept_(so, NULL, NULL);
+}
+
+bool Socket::wait(timeout_t timeout) const
+{
+    return wait(so, timeout);
+}
+
+bool Socket::wait(socket_t so, timeout_t timeout)
+{
+    int status;
+
+#ifdef  USE_POLL
+    struct pollfd pfd;
+
+    pfd.fd = so;
+    pfd.revents = 0;
+    pfd.events = POLLIN;
+
+    if(so == INVALID_SOCKET)
+        return false;
+
+    status = 0;
+    while(status < 1) {
+        if(timeout == Timer::inf)
+            status = _poll_(&pfd, 1, -1);
+        else
+            status = _poll_(&pfd, 1, timeout);
+        if(status == -1 && errno == EINTR)
+            continue;
+        if(status < 0)
+            return false;
+    }
+    if(pfd.revents & POLLIN)
+        return true;
+    return false;
+#else
+    struct timeval tv;
+    struct timeval *tvp = &tv;
+    fd_set grp;
+
+    if(so == INVALID_SOCKET)
+        return false;
+
+    if(timeout == Timer::inf)
+        tvp = NULL;
+    else {
+        tv.tv_usec = (timeout % 1000) * 1000;
+        tv.tv_sec = timeout / 1000;
+    }
+
+    FD_ZERO(&grp);
+    FD_SET(so, &grp);
+    status = _select_((int)(so + 1), &grp, NULL, NULL, tvp);
+    if(status < 1)
+        return false;
+    if(FD_ISSET(so, &grp))
+        return true;
+    return false;
+#endif
+}
+
+bool Socket::waitSending(timeout_t timeout) const
+{
+    int status;
+#ifdef  USE_POLL
+    struct pollfd pfd;
+
+    pfd.fd = so;
+    pfd.revents = 0;
+    pfd.events = POLLOUT;
+
+    if(so == INVALID_SOCKET)
+        return false;
+
+    status = 0;
+    while(status < 1) {
+        if(timeout == Timer::inf)
+            status = _poll_(&pfd, 1, -1);
+        else
+            status = _poll_(&pfd, 1, timeout);
+        if(status == -1 && errno == EINTR)
+            continue;
+        if(status < 0)
+            return false;
+    }
+    if(pfd.revents & POLLOUT)
+        return true;
+    return false;
+#else
+    struct timeval tv;
+    struct timeval *tvp = &tv;
+    fd_set grp;
+
+    if(so == INVALID_SOCKET)
+        return false;
+
+    if(timeout == Timer::inf)
+        tvp = NULL;
+    else {
+        tv.tv_usec = (timeout % 1000) * 1000;
+        tv.tv_sec = timeout / 1000;
+    }
+
+    FD_ZERO(&grp);
+    FD_SET(so, &grp);
+    status = _select_((int)(so + 1), NULL, &grp, NULL, tvp);
+    if(status < 1)
+        return false;
+    if(FD_ISSET(so, &grp))
+        return true;
+    return false;
+#endif
+}
+
+ListenSocket::ListenSocket(const char *iface, const char *svc, unsigned backlog, int family, int type, int protocol) :
+Socket()
+{
+    if(!iface)
+        iface = "*";
+
+    assert(iface != NULL && *iface != 0);
+    assert(svc != NULL && *svc != 0);
+    assert(backlog > 0);
+
+    so = create(iface, svc, backlog, family, type, protocol);
+}
+
+socket_t ListenSocket::create(const char *iface, const char *svc, unsigned backlog, int family, int type, int protocol)
+{
+    if(!type)
+        type = SOCK_STREAM;
+
+    socket_t so = Socket::create(iface, svc, family, type, protocol);
+
+    if(so == INVALID_SOCKET)
+        return so;
+
+    if(_listen_(so, backlog)) {
+        release(so);
+        return INVALID_SOCKET;
+    }
+    return so;
+}
+
+socket_t ListenSocket::accept(struct sockaddr_storage *addr) const
+{
+    socklen_t len = sizeof(struct sockaddr_storage);
+    if(addr)
+        return _accept_(so, (struct sockaddr *)addr, &len);
+    else
+        return _accept_(so, NULL, NULL);
+}
+
+TCPServer::TCPServer(const char *address, const char *service, unsigned backlog) :
+ListenSocket(address, service, backlog)
+{
+}
+
+#ifdef  _MSWINDOWS_
+#undef  AF_UNIX
+#endif
+
+struct ::addrinfo *Socket::hinting(socket_t so, struct addrinfo *hint)
+{
+    assert(hint != NULL);
+
+    union {
+        struct sockaddr_storage st;
+        struct sockaddr_in in;
+    } us;
+    struct sockaddr *sa = (struct sockaddr *)&us.st;
+    socklen_t slen = sizeof(us.st);
+
+    memset(hint, 0, sizeof(struct addrinfo));
+    memset(sa, 0, sizeof(us.st));
+    if(_getsockname_(so, sa, &slen))
+        return NULL;
+    hint->ai_family = us.in.sin_family;
+    slen = sizeof(hint->ai_socktype);
+    getsockopt(so, SOL_SOCKET, SO_TYPE, (caddr_t)&hint->ai_socktype, &slen);
+    return hint;
+}
+
+int Socket::type(socket_t so)
+{
+    int sotype;
+    socklen_t slen = sizeof(sotype);
+    if(getsockopt(so, SOL_SOCKET, SO_TYPE, (caddr_t)&sotype, &slen))
+        return 0;
+    return sotype;
+}
+
+bool Socket::ccid(socket_t so, uint8_t ccid)
+{
+    uint8_t ccids[4];
+    socklen_t len = sizeof(ccids);
+    bool supported = false;
+
+    // maybe also not dccp socket...
+    if(getsockopt(so, SOL_DCCP, DCCP_SOCKOPT_AVAILABLE_CCIDS, (char *)&ccids, &len) < 0)
+        return false;
+
+    for(unsigned pos = 0; pos < sizeof(ccids); ++pos) {
+        if(ccid == ccids[pos]) {
+            supported = true;
+            break;
+        }
+    }
+
+    if(!supported)
+        return false;
+
+    if(setsockopt(so, SOL_DCCP, DCCP_SOCKOPT_CCID, (char *)&ccid, sizeof(ccid)) < 0)
+        return false;
+
+    return true;
+}
+
+unsigned Socket::segsize(socket_t so, unsigned size)
+{
+#ifdef  IP_MTU
+    socklen_t alen = sizeof(size);
+#endif
+
+    switch(type(so)) {
+    case SOCK_STREAM:
+#ifdef  TCP_MAXSEG
+        if(size)
+            setsockopt(so, IPPROTO_TCP, TCP_MAXSEG, (char *)&size, sizeof(size));
+#endif
+        break;
+    case SOCK_DCCP:
+#ifdef  DCCP_MAXSEG
+        if(size)
+            setsockopt(so, IPPROTO_DCCP, DCCP_MAXSEG, (char *)&size, sizeof(size));
+#endif
+        break;
+    }
+#ifdef  IP_MTU
+    getsockopt(so, IPPROTO_IP, IP_MTU, &size, &alen);
+#else
+    size = 0;
+#endif
+    return size;
+}
+
+char *Socket::hostname(const struct sockaddr *sa, char *buf, size_t max)
+{
+    assert(sa != NULL);
+    assert(buf != NULL);
+    assert(max > 0);
+
+    socklen_t sl;
+
+#ifdef  AF_UNIX
+    const struct sockaddr_un *un = (const struct sockaddr_un *)sa;
+#endif
+
+    switch(sa->sa_family) {
+#ifdef  AF_UNIX
+    case AF_UNIX:
+        if(max > sizeof(un->sun_path))
+            max = sizeof(un->sun_path);
+        else
+            --max;
+        strncpy(buf, un->sun_path, max);
+        buf[max] = 0;
+        return buf;
+#endif
+    case AF_INET:
+        sl = sizeof(struct sockaddr_in);
+        break;
+#ifdef  AF_INET6
+    case AF_INET6:
+        sl = sizeof(struct sockaddr_in6);
+        break;
+#endif
+    default:
+        return NULL;
+    }
+
+    if(getnameinfo(sa, sl, buf, max, NULL, 0, NI_NOFQDN))
+        return NULL;
+
+    return buf;
+}
+
+socklen_t Socket::query(socket_t so, struct sockaddr_storage *sa, const char *host, const char *svc)
+{
+    assert(sa != NULL);
+    assert(host != NULL && *host != 0);
+    assert(svc != NULL && *svc != 0);
+
+    socklen_t len = 0;
+    struct addrinfo hint, *res = NULL;
+
+#ifdef  AF_UNIX
+    if(strchr(host, '/'))
+        return unixaddr((struct sockaddr_un *)sa, host);
+#endif
+
+    if(!hinting(so, &hint) || !svc)
+        return 0;
+
+    if(getaddrinfo(host, svc, &hint, &res) || !res)
+        goto exit;
+
+    memcpy(sa, res->ai_addr, res->ai_addrlen);
+    len = res->ai_addrlen;
+
+exit:
+    if(res)
+        freeaddrinfo(res);
+    return len;
+}
+
+int Socket::bindto(socket_t so, const struct sockaddr *iface)
+{
+    if(!_bind_(so, iface, len(iface)))
+        return 0;
+    return Socket::error();
+}
+
+int Socket::listento(socket_t so, const struct sockaddr *iface, int backlog)
+{
+    if(_bind_(so, iface, len(iface)))
+        return Socket::error();
+    if(_listen_(so, backlog))
+        return Socket::error();
+    return 0;
+}
+
+int Socket::bindto(socket_t so, const char *host, const char *svc, int protocol)
+{
+    assert(so != INVALID_SOCKET);
+    assert(host != NULL && *host != 0);
+    assert(svc != NULL && *svc != 0);
+
+    int rtn = -1;
+    int reuse = 1;
+
+    struct addrinfo hint, *res = NULL;
+
+    setsockopt(so, SOL_SOCKET, SO_REUSEADDR, (caddr_t)&reuse, sizeof(reuse));
+
+#ifdef AF_UNIX
+    if(strchr(host, '/')) {
+        struct sockaddr_un uaddr;
+        socklen_t len = unixaddr(&uaddr, host);
+        rtn = _bind_(so, (struct sockaddr *)&uaddr, len);
+        goto exit;
+    };
+#endif
+
+    if(!hinting(so, &hint) || !svc)
+        return ENOSYS;
+
+    hint.ai_protocol = protocol;
+    if(host && !strcmp(host, "*"))
+        host = NULL;
+
+#if defined(SO_BINDTODEVICE) && !defined(__QNX__)
+    if(host && !strchr(host, '.') && !strchr(host, ':')) {
+        struct ifreq ifr;
+        memset(&ifr, 0, sizeof(ifr));
+        strncpy(ifr.ifr_ifrn.ifrn_name, host, IFNAMSIZ);
+        setsockopt(so, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr));
+        host = NULL;
+    }
+#endif
+
+    hint.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
+
+#if defined(AF_INET6) && defined(AI_V4MAPPED)
+    if(hint.ai_family == AF_INET6 && !v6only)
+        hint.ai_flags |= AI_V4MAPPED;
+#endif
+
+    rtn = getaddrinfo(host, svc, &hint, &res);
+    if(rtn)
+        goto exit;
+
+    rtn = _bind_(so, res->ai_addr, res->ai_addrlen);
+exit:
+    if(res)
+        freeaddrinfo(res);
+    if(rtn)
+        rtn = Socket::error();
+    return rtn;
+}
+
+unsigned Socket::keyhost(const struct sockaddr *addr, unsigned keysize)
+{
+    assert(addr != NULL);
+    assert(keysize > 0);
+
+    unsigned key = 0;
+    caddr_t cp = NULL;
+    unsigned len;
+switch(addr->sa_family) {
+#ifdef  AF_INET6
+    case AF_INET6:
+        cp = (caddr_t)(&((const struct sockaddr_in6 *)(addr))->sin6_addr);
+        len = 16;
+        break;
+#endif
+    case AF_INET:
+        cp = (caddr_t)(&((const struct sockaddr_in *)(addr))->sin_addr);
+        len = 4;
+        break;
+    default:
+        return 0;
+    }
+    while(len--) {
+        key = key << 1;
+        key ^= cp[len];
+    }
+    return key % keysize;
+}
+
+unsigned Socket::keyindex(const struct sockaddr *addr, unsigned keysize)
+{
+    assert(addr != NULL);
+    assert(keysize > 0);
+
+    unsigned key = 0;
+    caddr_t cp = NULL;
+    unsigned len;
+switch(addr->sa_family) {
+#ifdef  AF_INET6
+    case AF_INET6:
+        cp = (caddr_t)(&((const struct sockaddr_in6 *)(addr))->sin6_addr);
+        len = 16;
+        key = service(addr);
+        break;
+#endif
+    case AF_INET:
+        cp = (caddr_t)(&((const struct sockaddr_in *)(addr))->sin_addr);
+        len = 4;
+        key = service(addr);
+        break;
+    default:
+        return 0;
+    }
+    while(len--) {
+        key = key << 1;
+        key ^= cp[len];
+    }
+    return key % keysize;
+}
+
+short Socket::service(const struct sockaddr *addr)
+{
+    assert(addr != NULL);
+
+    switch(addr->sa_family) {
+#ifdef  AF_INET6
+    case AF_INET6:
+        return ntohs(((const struct sockaddr_in6 *)(addr))->sin6_port);
+#endif
+    case AF_INET:
+        return ntohs(((const struct sockaddr_in *)(addr))->sin_port);
+    }
+    return 0;
+}
+
+char *Socket::query(const struct sockaddr *addr, char *name, socklen_t size)
+{
+    assert(addr != NULL);
+    assert(name != NULL);
+
+#ifdef  _MSWINDOWS_
+    DWORD slen = size;
+#endif
+
+    *name = 0;
+    if(!addr)
+        return NULL;
+
+    switch(addr->sa_family) {
+#ifdef  AF_UNIX
+    case AF_UNIX:
+        String::set(name, size, ((const struct sockaddr_un *)(addr))->sun_path);
+        return name;
+#endif
+#ifdef  _MSWINDOWS_
+#ifdef  AF_INET6
+    case AF_INET6:
+        struct sockaddr_in6 saddr6;
+        memcpy(&saddr6, addr, sizeof(saddr6));
+        saddr6.sin6_port = 0;
+        WSAAddressToString((struct sockaddr *)&saddr6, sizeof(saddr6), NULL, name, &slen);
+        return name;
+#endif
+    case AF_INET:
+        struct sockaddr_in saddr;
+        memcpy(&saddr, addr, sizeof(saddr));
+        saddr.sin_port = 0;
+        WSAAddressToString((struct sockaddr *)&saddr, sizeof(saddr), NULL, name, &slen);
+        return name;
+#else
+#ifdef  HAVE_INET_NTOP
+#ifdef  AF_INET6
+    case AF_INET6:
+        inet_ntop(addr->sa_family, &((const struct sockaddr_in6 *)(addr))->sin6_addr, name, size);
+        return name;
+#endif
+    case AF_INET:
+        inet_ntop(addr->sa_family, &((const struct sockaddr_in *)(addr))->sin_addr, name, size);
+        return name;
+#else
+    case AF_INET:
+        ENTER_EXCLUSIVE
+        String::set(name, size, inet_ntoa(((const struct sockaddr_in *)(addr))->sin_addr));
+        LEAVE_EXCLUSIVE
+        return name;
+#endif
+#endif
+    }
+    return NULL;
+}
+
+int Socket::via(struct sockaddr *iface, const struct sockaddr *dest)
+{
+    assert(iface != NULL);
+    assert(dest != NULL);
+
+    int rtn = -1;
+    socket_t so = INVALID_SOCKET;
+    socklen_t slen = len(dest);
+
+    if(slen)
+        memset(iface, 0, slen);
+
+    iface->sa_family = AF_UNSPEC;
+    switch(dest->sa_family) {
+#ifdef  AF_INET6
+    case AF_INET6:
+#endif
+    case AF_INET:
+        so = ::socket(dest->sa_family, SOCK_DGRAM, 0);
+        if((socket_t)so == INVALID_SOCKET)
+            return -1;
+        socket_mapping(dest->sa_family, so);
+        if(!_connect_(so, dest, slen))
+            rtn = _getsockname_(so, iface, &slen);
+        break;
+    default:
+        return ENOSYS;
+    }
+    switch(iface->sa_family) {
+    case AF_INET:
+        ((struct sockaddr_in*)(iface))->sin_port = 0;
+        break;
+#ifdef  AF_INET6
+    case AF_INET6:
+        ((struct sockaddr_in6*)(iface))->sin6_port = 0;
+        break;
+#endif
+    }
+
+    if((socket_t)so != INVALID_SOCKET) {
+#ifdef  _MSWINDOWS_
+        ::closesocket(so);
+#else
+        ::shutdown(so, SHUT_RDWR);
+        ::close(so);
+#endif
+        so = INVALID_SOCKET;
+    }
+    if(rtn)
+        rtn = Socket::error();
+    return rtn;
+}
+
+bool Socket::eq_subnet(const struct sockaddr *s1, const struct sockaddr *s2)
+{
+    assert(s1 != NULL && s2 != NULL);
+
+    unsigned char *a1, *a2;
+    if(s1->sa_family != s2->sa_family)
+        return false;
+
+    if(s1->sa_family != AF_INET)
+        return true;
+
+    a1 = (unsigned char *)&(((const struct sockaddr_in *)(s1))->sin_addr);
+    a2 = (unsigned char *)&(((const struct sockaddr_in *)(s1))->sin_addr);
+
+    if(*a1 == *a2 && *a1 < 128)
+        return true;
+
+    if(*a1 != *a2)
+        return false;
+
+    if(*a1 > 127 && *a1 < 192 && a1[1] == a2[1])
+        return true;
+
+    if(a1[1] != a2[1])
+        return false;
+
+    if(a1[2] != a2[2])
+        return false;
+
+    return true;
+}
+
+unsigned Socket::store(struct sockaddr_internet *storage, const struct sockaddr *address)
+{
+    if(storage == NULL || address == NULL)
+        return 0;
+
+    if(address->sa_family == AF_INET) {
+        memcpy(&storage->ipv4, address, sizeof(storage->ipv4));
+        return sizeof(storage->ipv4);
+    }
+
+#ifdef  AF_INET6
+    if(address->sa_family == AF_INET6) {
+        memcpy(&storage->ipv6, address, sizeof(storage->ipv6));
+        return sizeof(storage->ipv6);
+    }
+#endif
+
+    return 0;
+}
+
+unsigned Socket::copy(struct sockaddr *s1, const struct sockaddr *s2)
+{
+    if(s1 == NULL || s2 == NULL)
+        return 0;
+
+    socklen_t slen = len(s1);
+    if(len > 0) {
+        memcpy(s1, s2, slen);
+        return slen;
+    }
+    return 0;
+}
+
+bool Socket::eq_host(const struct sockaddr *s1, const struct sockaddr *s2)
+{
+    assert(s1 != NULL && s2 != NULL);
+
+    if(s1->sa_family != s2->sa_family)
+        return false;
+
+    switch(s1->sa_family) {
+    case AF_INET:
+        if(memcmp(&(((const struct sockaddr_in *)s1)->sin_addr),
+            &(((const struct sockaddr_in *)s2)->sin_addr), 4))
+                return false;
+
+        return true;
+#ifdef  AF_INET6
+    case AF_INET6:
+        if(memcmp(&(((const struct sockaddr_in6 *)s1)->sin6_addr),
+            &(((const struct sockaddr_in6 *)s2)->sin6_addr), 4))
+                return false;
+
+        return true;
+#endif
+    default:
+        if(memcmp(s1, s2, len(s1)))
+            return false;
+        return true;
+    }
+    return false;
+}
+
+
+bool Socket::equal(const struct sockaddr *s1, const struct sockaddr *s2)
+{
+    assert(s1 != NULL && s2 != NULL);
+
+    if(s1->sa_family != s2->sa_family)
+        return false;
+
+    switch(s1->sa_family) {
+    case AF_INET:
+        if(memcmp(&(((const struct sockaddr_in *)s1)->sin_addr),
+            &(((const struct sockaddr_in *)s2)->sin_addr), 4))
+                return false;
+
+        if(!((const struct sockaddr_in *)s1)->sin_port || !((const struct sockaddr_in *)s2)->sin_port)
+            return true;
+
+        if(((const struct sockaddr_in *)s1)->sin_port != ((const struct sockaddr_in *)s2)->sin_port)
+            return false;
+
+        return true;
+#ifdef  AF_INET6
+    case AF_INET6:
+        if(memcmp(&(((const struct sockaddr_in6 *)s1)->sin6_addr),
+            &(((const struct sockaddr_in6 *)s2)->sin6_addr), 4))
+                return false;
+
+        if(!((const struct sockaddr_in6 *)s1)->sin6_port || !((const struct sockaddr_in6 *)s2)->sin6_port)
+            return true;
+
+        if(((const struct sockaddr_in6 *)s1)->sin6_port != ((const struct sockaddr_in6 *)s2)->sin6_port)
+            return false;
+
+        return true;
+#endif
+    default:
+        if(memcmp(s1, s2, len(s1)))
+            return false;
+        return true;
+    }
+    return false;
+}
+
+size_t Socket::printf(const char *format, ...)
+{
+    assert(format != NULL);
+
+    char buf[1024];
+    va_list args;
+
+    va_start(args, format);
+    vsnprintf(buf, sizeof(buf), format, args);
+    va_end(args);
+
+    return writes(buf);
+}
+
+ssize_t Socket::printf(socket_t so, const char *format, ...)
+{
+    assert(format != NULL);
+
+    char buf[536];
+    va_list args;
+
+    va_start(args, format);
+    vsnprintf(buf, sizeof(buf), format, args);
+    va_end(args);
+
+    return sendto(so, buf, strlen(buf), 0, NULL);
+}
+
+socklen_t Socket::len(const struct sockaddr *sa)
+{
+    if(!sa)
+        return 0;
+
+    switch(sa->sa_family)
+    {
+    case AF_INET:
+        return sizeof(sockaddr_in);
+#ifdef  AF_INET6
+    case AF_INET6:
+        return sizeof(sockaddr_in6);
+#endif
+    default:
+        return sizeof(sockaddr_storage);
+    }
+}
+
+int Socket::family(socket_t so)
+{
+    assert(so != INVALID_SOCKET);
+
+    union {
+        struct sockaddr_storage saddr;
+        struct sockaddr_in inaddr;
+    } us;
+
+    socklen_t len = sizeof(us.saddr);
+    struct sockaddr *addr = (struct sockaddr *)(&us.saddr);
+
+    if(_getsockname_(so, addr, &len))
+        return AF_UNSPEC;
+
+    return us.inaddr.sin_family;
+}
+
+bool Socket::is_null(const char *str)
+{
+    assert(str != NULL);
+
+    while(*str && strchr("0:.*", *str) != NULL)
+        ++str;
+
+    // allow field separation...
+    if(*str <= ' ')
+        return true;
+
+    if(*str)
+        return false;
+
+    return true;
+}
+
+bool Socket::is_numeric(const char *str)
+{
+    assert(str != NULL);
+
+    // if raw ipv6, then we can just exit, no chance to confuse with names
+    if(strchr(str, ':'))
+        return true;
+
+    while(*str && strchr("0123456789.", *str) != NULL)
+        ++str;
+
+    // allow field separators
+    if(*str <= ' ')
+        return true;
+
+    if(*str)
+        return false;
+
+    return true;
+}
+
+int Socket::local(socket_t sock, struct sockaddr_storage *addr)
+{
+    socklen_t slen = sizeof(sockaddr_storage);
+    return _getsockname_(sock, (struct sockaddr *)addr, &slen);
+}
+
+int Socket::remote(socket_t sock, struct sockaddr_storage *addr)
+{
+    socklen_t slen = sizeof(sockaddr_storage);
+    return _getpeername_(sock, (struct sockaddr *)addr, &slen);
+}
+
+String str(Socket& so, strsize_t size)
+{
+    String s(size);
+    so.readline(s.c_mem(), s.size());
+    String::fix(s);
+    return s;
+}
+
+NAMESPACE_UCOMMON
+
+struct sockaddr *_getaddrinfo(struct addrinfo *list)
+{
+    return list->ai_addr;
+}
+
+struct addrinfo *_nextaddrinfo(struct addrinfo *list)
+{
+    if(!list)
+        return NULL;
+
+    return list->ai_next;
+}
+
+socket_t _getaddrsock(struct addrinfo *list)
+{
+    if(!list)
+        return INVALID_SOCKET;
+
+    return ::socket(list->ai_family, list->ai_socktype, list->ai_protocol);
+}
+
+END_NAMESPACE
+
diff --git a/jni/libucommon/sources/corelib/stream.cpp b/jni/libucommon/sources/corelib/stream.cpp
new file mode 100644
index 0000000..b3e26ff
--- /dev/null
+++ b/jni/libucommon/sources/corelib/stream.cpp
@@ -0,0 +1,852 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#if defined(OLD_STDCPP) || defined(NEW_STDCPP)
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/thread.h>
+#include <ucommon/socket.h>
+#include <ucommon/string.h>
+#include <ucommon/shell.h>
+#include <ucommon/stream.h>
+#include <stdarg.h>
+
+#ifndef _MSWINDOWS_
+#include <netinet/tcp.h>
+#include <arpa/inet.h>
+#include <sys/socket.h>
+#include <sys/wait.h>
+#ifdef  HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#endif
+
+#ifdef  HAVE_SYS_RESOURCE_H
+#include <sys/time.h>
+#include <sys/resource.h>
+#endif
+
+using namespace UCOMMON_NAMESPACE;
+using namespace std;
+
+StreamBuffer::StreamBuffer() :
+streambuf(),
+#ifdef OLD_STDCPP
+    iostream()
+#else
+    iostream((streambuf *)this)
+#endif
+{
+    bufsize = 0;
+    gbuf = pbuf = NULL;
+#ifdef OLD_STDCPP
+    init((streambuf *)this);
+#endif
+}
+
+int StreamBuffer::uflow()
+{
+    int ret = underflow();
+
+    if (ret == EOF)
+        return EOF;
+
+    if (bufsize != 1)
+        gbump(1);
+
+    return ret;
+}
+
+void StreamBuffer::allocate(size_t size)
+{
+    if(gbuf)
+        delete[] gbuf;
+
+    if(pbuf)
+        delete[] pbuf;
+
+    gbuf = pbuf = NULL;
+
+    if(size < 2) {
+        bufsize = 1;
+        return;
+    }
+
+    gbuf = new char[size];
+    pbuf = new char[size];
+    assert(gbuf != NULL && pbuf != NULL);
+    bufsize = size;
+    clear();
+#if (defined(__GNUC__) && (__GNUC__ < 3)) && !defined(MSWINDOWS) && !defined(STLPORT)
+    setb(gbuf, gbuf + size, 0);
+#endif
+    setg(gbuf, gbuf + size, gbuf + size);
+    setp(pbuf, pbuf + size);
+}
+
+void StreamBuffer::release(void)
+{
+    if(gbuf)
+        delete[] gbuf;
+
+    if(pbuf)
+        delete[] pbuf;
+
+    gbuf = pbuf = NULL;
+    bufsize = 0;
+    clear();
+}
+
+int StreamBuffer::sync(void)
+{
+    if(!bufsize)
+        return 0;
+
+    overflow(EOF);
+    setg(gbuf, gbuf + bufsize, gbuf + bufsize);
+    return 0;
+}
+
+tcpstream::tcpstream(const tcpstream &copy) :
+StreamBuffer()
+{
+    so = Socket::create(Socket::family(copy.so), SOCK_STREAM, IPPROTO_TCP);
+    timeout = copy.timeout;
+}
+
+tcpstream::tcpstream(int family, timeout_t tv) :
+StreamBuffer()
+{
+    so = Socket::create(family, SOCK_STREAM, IPPROTO_TCP);
+    timeout = tv;
+}
+
+tcpstream::tcpstream(Socket::address& list, unsigned segsize, timeout_t tv) :
+StreamBuffer()
+{
+    so = Socket::create(list.family(), SOCK_STREAM, IPPROTO_TCP);
+    timeout = tv;
+    open(list);
+}
+
+tcpstream::tcpstream(const TCPServer *server, unsigned segsize, timeout_t tv) :
+StreamBuffer()
+{
+    so = server->accept();
+    timeout = tv;
+    if(so == INVALID_SOCKET) {
+        clear(ios::failbit | rdstate());
+        return;
+    }
+    allocate(segsize);
+}
+
+tcpstream::~tcpstream()
+{
+    tcpstream::release();
+}
+
+void tcpstream::release(void)
+{
+    StreamBuffer::release();
+    Socket::release(so);
+}
+
+#ifndef MSG_WAITALL
+#define MSG_WAITALL 0
+#endif
+
+bool tcpstream::_wait(void)
+{
+    if(!timeout)
+        return true;
+
+    return Socket::wait(so, timeout);
+}
+
+ssize_t tcpstream::_read(char *buffer, size_t size)
+{
+    return Socket::recvfrom(so, buffer, size, MSG_WAITALL);
+}
+
+ssize_t tcpstream::_write(const char *buffer, size_t size)
+{
+    return Socket::sendto(so, buffer, size);
+}
+
+int tcpstream::underflow(void)
+{
+    ssize_t rlen = 1;
+    unsigned char ch;
+
+    if(bufsize == 1) {
+        if(!_wait()) {
+            clear(ios::failbit | rdstate());
+            return EOF;
+        }
+        else
+            rlen = _read((char *)&ch, 1);
+        if(rlen < 1) {
+            if(rlen < 0)
+                reset();
+            return EOF;
+        }
+        return ch;
+    }
+
+    if(!gptr())
+        return EOF;
+
+    if(gptr() < egptr())
+        return (unsigned char)*gptr();
+
+    rlen = (ssize_t)((gbuf + bufsize) - eback());
+    if(!_wait()) {
+        clear(ios::failbit | rdstate());
+        return EOF;
+    }
+    else {
+        rlen = _read(eback(), rlen);
+    }
+    if(rlen < 1) {
+//      clear(ios::failbit | rdstate());
+        if(rlen < 0)
+            reset();
+        else
+            clear(ios::failbit | rdstate());
+        return EOF;
+    }
+
+    setg(eback(), eback(), eback() + rlen);
+    return (unsigned char) *gptr();
+}
+
+int tcpstream::overflow(int c)
+{
+    unsigned char ch;
+    ssize_t rlen, req;
+
+    if(bufsize == 1) {
+        if(c == EOF)
+            return 0;
+
+        ch = (unsigned char)(c);
+        rlen = _write((const char *)&ch, 1);
+        if(rlen < 1) {
+            if(rlen < 0)
+                reset();
+            return EOF;
+        }
+        else
+            return c;
+    }
+
+    if(!pbase())
+        return EOF;
+
+    req = (ssize_t)(pptr() - pbase());
+    if(req) {
+        rlen = _write(pbase(), req);
+        if(rlen < 1) {
+            if(rlen < 0)
+                reset();
+            return EOF;
+        }
+        req -= rlen;
+    }
+    // if write "partial", rebuffer remainder
+
+    if(req)
+//      memmove(pbuf, pptr() + rlen, req);
+        memmove(pbuf, pbuf + rlen, req);
+    setp(pbuf, pbuf + bufsize);
+    pbump(req);
+
+    if(c != EOF) {
+        *pptr() = (unsigned char)c;
+        pbump(1);
+    }
+    return c;
+}
+
+void tcpstream::open(Socket::address& list, unsigned mss)
+{
+    if(bufsize)
+        close();    // close if existing is open...
+
+    if(Socket::connectto(so, *list))
+        return;
+
+    allocate(mss);
+}
+
+void tcpstream::open(const char *host, const char *service, unsigned mss)
+{
+    if(bufsize)
+        close();
+
+    struct addrinfo *list = Socket::query(host, service, SOCK_STREAM, 0);
+    if(!list)
+        return;
+
+    if(Socket::connectto(so, list)) {
+        Socket::release(list);
+        return;
+    }
+
+    Socket::release(list);
+    allocate(mss);
+}
+
+void tcpstream::reset(void)
+{
+    if(!bufsize)
+        return;
+
+    if(gbuf)
+        delete[] gbuf;
+
+    if(pbuf)
+        delete[] pbuf;
+
+    gbuf = pbuf = NULL;
+    bufsize = 0;
+    clear();
+    Socket::disconnect(so);
+}
+
+void tcpstream::close(void)
+{
+    if(!bufsize)
+        return;
+
+    sync();
+
+    if(gbuf)
+        delete[] gbuf;
+
+    if(pbuf)
+        delete[] pbuf;
+
+    gbuf = pbuf = NULL;
+    bufsize = 0;
+    clear();
+    Socket::disconnect(so);
+}
+
+void tcpstream::allocate(unsigned mss)
+{
+    unsigned size = mss;
+    unsigned max = 0;
+#ifdef  TCP_MAXSEG
+    socklen_t alen = sizeof(max);
+#endif
+
+    if(mss == 1)
+        goto allocate;
+
+#ifdef  TCP_MAXSEG
+    if(mss)
+        setsockopt(so, IPPROTO_TCP, TCP_MAXSEG, (char *)&max, sizeof(max));
+    getsockopt(so, IPPROTO_TCP, TCP_MAXSEG, (char *)&max, &alen);
+#endif
+
+    if(max && max < mss)
+        mss = max;
+
+    if(!mss) {
+        if(max)
+            mss = max;
+        else
+            mss = 536;
+        goto allocate;
+    }
+
+#ifdef  TCP_MAXSEG
+    setsockopt(so, IPPROTO_TCP, TCP_MAXSEG, (char *)&mss, sizeof(mss));
+#endif
+
+    if(mss < 80)
+        mss = 80;
+
+    if(mss * 7 < 64000u)
+        bufsize = mss * 7;
+    else if(mss * 6 < 64000u)
+        bufsize = mss * 6;
+    else
+        bufsize = mss * 5;
+
+    Socket::sendsize(so, bufsize);
+    Socket::recvsize(so, bufsize);
+
+    if(mss < 512)
+        Socket::sendwait(so, mss * 4);
+
+allocate:
+    StreamBuffer::allocate(size);
+}
+
+pipestream::pipestream() :
+StreamBuffer()
+{
+}
+
+pipestream::pipestream(const char *cmd, access_t access, char **args, char **envp, size_t size) :
+StreamBuffer()
+{
+    open(cmd, access, args, envp, size);
+}
+
+pipestream::~pipestream()
+{
+    close();
+}
+
+void pipestream::terminate(void)
+{
+    if(bufsize) {
+        shell::cancel(pid);
+        close();
+    }
+}
+
+void pipestream::release(void)
+{
+    if(gbuf)
+        fsys::release(rd);
+
+    if(pbuf)
+        fsys::release(wr);
+
+    StreamBuffer::release();
+}
+
+void pipestream::allocate(size_t size, access_t mode)
+{
+    if(gbuf)
+        delete[] gbuf;
+
+    if(pbuf)
+        delete[] pbuf;
+
+    gbuf = pbuf = NULL;
+
+    if(size < 2) {
+        bufsize = 1;
+        return;
+    }
+
+    if(mode == RDONLY || mode == RDWR)
+        gbuf = new char[size];
+    if(mode == WRONLY || mode == RDWR)
+        pbuf = new char[size];
+    bufsize = size;
+    clear();
+    if(mode == RDONLY || mode == RDWR) {
+#if (defined(__GNUC__) && (__GNUC__ < 3)) && !defined(MSWINDOWS) && !defined(STLPORT)
+        setb(gbuf, gbuf + size, 0);
+#endif
+        setg(gbuf, gbuf + size, gbuf + size);
+    }
+    if(mode == WRONLY || mode == RDWR)
+        setp(pbuf, pbuf + size);
+}
+
+int pipestream::underflow(void)
+{
+    ssize_t rlen = 1;
+    unsigned char ch;
+
+    if(!gbuf)
+        return EOF;
+
+    if(bufsize == 1) {
+        rlen = rd.read(&ch, 1);
+        if(rlen < 1) {
+            if(rlen < 0)
+                close();
+            return EOF;
+        }
+        return ch;
+    }
+
+    if(!gptr())
+        return EOF;
+
+    if(gptr() < egptr())
+        return (unsigned char)*gptr();
+
+    rlen = (ssize_t)((gbuf + bufsize) - eback());
+    rlen = rd.read(eback(), rlen);
+    if(rlen < 1) {
+//      clear(ios::failbit | rdstate());
+        if(rlen < 0)
+            close();
+        else
+            clear(ios::failbit | rdstate());
+        return EOF;
+    }
+
+    setg(eback(), eback(), eback() + rlen);
+    return (unsigned char) *gptr();
+}
+
+int pipestream::overflow(int c)
+{
+    unsigned char ch;
+    ssize_t rlen, req;
+
+    if(!pbuf)
+        return EOF;
+
+    if(bufsize == 1) {
+        if(c == EOF)
+            return 0;
+
+        ch = (unsigned char)(c);
+        rlen = wr.write(&ch, 1);
+        if(rlen < 1) {
+            if(rlen < 0)
+                close();
+            return EOF;
+        }
+        else
+            return c;
+    }
+
+    if(!pbase())
+        return EOF;
+
+    req = (ssize_t)(pptr() - pbase());
+    if(req) {
+        rlen = wr.write(pbase(), req);
+        if(rlen < 1) {
+            if(rlen < 0)
+                close();
+            return EOF;
+        }
+        req -= rlen;
+    }
+    // if write "partial", rebuffer remainder
+
+    if(req)
+//      memmove(pbuf, pptr() + rlen, req);
+        memmove(pbuf, pbuf + rlen, req);
+    setp(pbuf, pbuf + bufsize);
+    pbump(req);
+
+    if(c != EOF) {
+        *pptr() = (unsigned char)c;
+        pbump(1);
+    }
+    return c;
+}
+
+void pipestream::open(const char *path, access_t mode, char **args, char **envp, size_t size)
+{
+/*#ifdef    RLIMIT_NOFILE
+    struct rlimit rlim;
+
+    if(!getrlimit(RLIMIT_NOFILE, &rlim))
+        max = rlim.rlim_max;
+#endif
+*/  close();
+
+    fd_t stdio[3] = {INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE};
+    fd_t input = INVALID_HANDLE_VALUE, output = INVALID_HANDLE_VALUE;
+
+    if(mode == RDONLY || mode == RDWR) {
+        if(fsys::pipe(input, stdio[1]))
+            return;
+        fsys::inherit(input, false);
+    }
+    else
+        stdio[1] = fsys::null();
+
+    if(mode == WRONLY || mode == RDWR) {
+        if(fsys::pipe(stdio[0], output)) {
+            if(mode == RDWR) {
+                fsys::release(stdio[1]);
+                fsys::release(input);
+                input = INVALID_HANDLE_VALUE;
+            }
+            return;
+        }
+    }
+    else
+        stdio[0] = fsys::null();
+
+    pid = shell::spawn(path, args, envp, stdio);
+
+    fsys::release(stdio[0]);
+    fsys::release(stdio[1]);
+    if(pid == INVALID_PID_VALUE) {
+        fsys::release(input);
+        fsys::release(output);
+        input = output = INVALID_HANDLE_VALUE;
+    }
+    else
+        allocate(size, mode);
+    rd.assign(input);
+    wr.assign(output);
+}
+
+int pipestream::close(void)
+{
+    sync();
+
+    if(bufsize) {
+        release();
+        return shell::wait(pid);
+    }
+    return -1;
+}
+
+filestream::filestream() :
+StreamBuffer()
+{
+}
+
+filestream::filestream(const filestream& copy) :
+StreamBuffer()
+{
+    if(copy.bufsize)
+        fd = copy.fd;
+    if(is(fd))
+        allocate(copy.bufsize, copy.ac);
+}
+
+filestream::filestream(const char *filename, fsys::access_t mode, size_t size) :
+StreamBuffer()
+{
+    open(filename, mode, size);
+}
+
+filestream::filestream(const char *filename, unsigned mode, fsys::access_t access, size_t size) :
+StreamBuffer()
+{
+    open(filename, mode, access, size);
+}
+
+filestream::~filestream()
+{
+    close();
+}
+
+void filestream::seek(fsys::offset_t offset)
+{
+    if(bufsize) {
+        sync();
+        fd.seek(offset);
+    }
+}
+
+void filestream::close(void)
+{
+    sync();
+
+    if(bufsize)
+        fd.close();
+
+    StreamBuffer::release();
+}
+
+void filestream::allocate(size_t size, fsys::access_t mode)
+{
+    if(gbuf)
+        delete[] gbuf;
+
+    if(pbuf)
+        delete[] pbuf;
+
+    gbuf = pbuf = NULL;
+    ac = mode;
+
+    if(size < 2) {
+        bufsize = 1;
+        return;
+    }
+
+    if(mode == fsys::RDONLY || fsys::RDWR || fsys::SHARED)
+        gbuf = new char[size];
+    if(mode == fsys::WRONLY || fsys::APPEND || fsys::SHARED || fsys::RDWR)
+        pbuf = new char[size];
+    bufsize = size;
+    clear();
+    if(mode == fsys::RDONLY || fsys::RDWR || fsys::SHARED) {
+#if (defined(__GNUC__) && (__GNUC__ < 3)) && !defined(MSWINDOWS) && !defined(STLPORT)
+        setb(gbuf, gbuf + size, 0);
+#endif
+        setg(gbuf, gbuf + size, gbuf + size);
+    }
+    if(mode == fsys::WRONLY || fsys::APPEND || fsys::SHARED || fsys::RDWR)
+        setp(pbuf, pbuf + size);
+}
+
+void filestream::open(const char *fname, unsigned fmode, fsys::access_t access, size_t size)
+{
+    close();
+    fd.open(fname, fmode, access);
+    if(is(fd))
+        allocate(size, access);
+}
+
+void filestream::open(const char *fname, fsys::access_t access, size_t size)
+{
+    close();
+    fd.open(fname, access);
+    if(is(fd))
+        allocate(size, access);
+}
+
+int filestream::underflow(void)
+{
+    ssize_t rlen = 1;
+
+    if(!gbuf)
+        return EOF;
+
+    if(!gptr())
+        return EOF;
+
+    if(gptr() < egptr())
+        return (unsigned char)*gptr();
+
+    rlen = (ssize_t)((gbuf + bufsize) - eback());
+    rlen = fd.read(eback(), rlen);
+    if(rlen < 1) {
+//      clear(ios::failbit | rdstate());
+        if(rlen < 0)
+            close();
+        else
+            clear(ios::failbit | rdstate());
+        return EOF;
+    }
+
+    setg(eback(), eback(), eback() + rlen);
+    return (unsigned char) *gptr();
+}
+
+int filestream::overflow(int c)
+{
+    ssize_t rlen, req;
+
+    if(!pbuf)
+        return EOF;
+
+    if(!pbase())
+        return EOF;
+
+    req = (ssize_t)(pptr() - pbase());
+    if(req) {
+        rlen = fd.write(pbase(), req);
+        if(rlen < 1) {
+            if(rlen < 0)
+                close();
+            return EOF;
+        }
+        req -= rlen;
+    }
+    // if write "partial", rebuffer remainder
+
+    if(req)
+//      memmove(pbuf, pptr() + rlen, req);
+        memmove(pbuf, pbuf + rlen, req);
+    setp(pbuf, pbuf + bufsize);
+    pbump(req);
+
+    if(c != EOF) {
+        *pptr() = (unsigned char)c;
+        pbump(1);
+    }
+    return c;
+}
+
+std::istream& _stream_operators::input(std::istream& inp, InputProtocol& fmt)
+{
+    int c = 0;
+    while(!c) {
+        if(!inp.good())
+            c = EOF;
+        else
+            c = inp.get();
+
+        c = fmt._input(c);
+        if(!c)
+            continue;
+        if(c != EOF)
+            inp.putback(c);
+    }
+    return inp;
+}
+
+std::ostream& _stream_operators::print(std::ostream& out, const PrintProtocol& fmt)
+{
+    if(out.good()) {
+        const char *cp = fmt._print();
+
+        if(cp)
+            out.write(cp, strlen(cp));
+        else
+            out << std::endl;
+    }
+    return out;
+}
+
+std::istream& _stream_operators::input(std::istream& inp, string_t& str)
+{
+    inp.getline(str.c_mem(), str.size());
+    return inp;
+}
+
+std::ostream& _stream_operators::print(std::ostream& out, const string_t& str)
+{
+    out.write(str.c_str(), str.len());
+    return out;
+}
+
+std::istream& _stream_operators::input(std::istream& inp, stringlist_t& list)
+{
+    size_t size = list.size() - 64;
+
+    char *tmp = (char *)malloc(size);
+    while(inp.good()) {
+        inp.getline(tmp, size);
+        if(!list.filter(tmp, size))
+            break;
+    }
+    free(tmp);
+    return inp;
+}
+
+std::ostream& _stream_operators::print(std::ostream& out, const stringlist_t& list)
+{
+    StringPager::iterator sp = list.begin();
+    while(is(sp) && out.good()) {
+        const char *cp = sp->get();
+        size_t size = strlen(cp);
+        if(size)
+            out.write(cp, size);
+        out.put('\n');
+        sp.next();
+    }
+    return out;
+}
+
+#endif
+
diff --git a/jni/libucommon/sources/corelib/string.cpp b/jni/libucommon/sources/corelib/string.cpp
new file mode 100644
index 0000000..3baa4be
--- /dev/null
+++ b/jni/libucommon/sources/corelib/string.cpp
@@ -0,0 +1,2318 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/string.h>
+#include <stdarg.h>
+#include <ctype.h>
+#include <stdio.h>
+#ifdef  HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#include <limits.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+#if _MSC_VER > 1400        // windows broken dll linkage issue...
+#else
+const strsize_t String::npos = (strsize_t)(-1);
+const size_t memstring::header = sizeof(cstring);
+#endif
+
+String::cstring::cstring(strsize_t size) :
+CountedObject()
+{
+    max = size;
+    len = 0;
+    fill = 0;
+    text[0] = 0;
+}
+
+String::cstring::cstring(strsize_t size, char f) :
+CountedObject()
+{
+    max = size;
+    len = 0;
+    fill = f;
+
+    if(fill) {
+        memset(text, fill, max);
+        len = max;
+    }
+}
+
+void String::cstring::fix(void)
+{
+    while(fill && len < max)
+        text[len++] = fill;
+    text[len] = 0;
+}
+
+void String::cstring::unfix(void)
+{
+    while(len && fill) {
+        if(text[len - 1] == fill)
+            --len;
+    }
+    text[len] = 0;
+}
+
+void String::cstring::clear(strsize_t offset, strsize_t size)
+{
+    if(!fill || offset >= max)
+        return;
+
+    while(size && offset < max) {
+        text[offset++] = fill;
+        --size;
+    }
+}
+
+void String::cstring::dec(strsize_t offset)
+{
+    if(!len)
+        return;
+
+    if(offset >= len) {
+        text[0] = 0;
+        len = 0;
+        fix();
+        return;
+    }
+
+    if(!fill) {
+        text[--len] = 0;
+        return;
+    }
+
+    while(len) {
+        if(text[--len] == fill)
+            break;
+    }
+    text[len] = 0;
+    fix();
+}
+
+void String::cstring::inc(strsize_t offset)
+{
+    if(!offset)
+        ++offset;
+
+    if(offset >= len) {
+        text[0] = 0;
+        len = 0;
+        fix();
+        return;
+    }
+
+    memmove(text, text + offset, len - offset);
+    len -= offset;
+    fix();
+}
+
+void String::cstring::add(const char *str)
+{
+    strsize_t size = strlen(str);
+
+    if(!size)
+        return;
+
+    while(fill && len && text[len - 1] == fill)
+        --len;
+
+    if(len + size > max)
+        size = max - len;
+
+    if(size < 1)
+        return;
+
+    memcpy(text + len, str, size);
+    len += size;
+    fix();
+}
+
+void String::cstring::add(char ch)
+{
+    if(!ch)
+        return;
+
+    while(fill && len && text[len - 1] == fill)
+        --len;
+
+    if(len == max)
+        return;
+
+    text[len++] = ch;
+    fix();
+}
+
+void String::cstring::set(strsize_t offset, const char *str, strsize_t size)
+{
+    assert(str != NULL);
+
+    if(offset >= max || offset > len)
+        return;
+
+    if(offset + size > max)
+        size = max - offset;
+
+    while(*str && size) {
+        text[offset++] = *(str++);
+        --size;
+    }
+
+    while(size && fill) {
+        text[offset++] = fill;
+        --size;
+    }
+
+    if(offset > len) {
+        len = offset;
+        text[len] = 0;
+    }
+}
+
+char String::fill(void)
+{
+    if(!str)
+        return 0;
+
+    return str->fill;
+}
+
+strsize_t String::size(void) const
+{
+    if(!str)
+        return 0;
+
+    return str->max;
+}
+
+strsize_t String::len(void) const
+{
+    if(!str)
+        return 0;
+
+    return str->len;
+}
+
+void String::cstring::set(const char *str)
+{
+    assert(str != NULL);
+
+    strsize_t size = strlen(str);
+    if(size > max)
+        size = max;
+
+    if(str < text || str > text + len)
+        memcpy(text, str, size);
+    else if(str != text)
+        memmove(text, str, size);
+    len = size;
+    fix();
+}
+
+String::String()
+{
+    str = NULL;
+}
+
+String::String(const char *s, const char *end)
+{
+    strsize_t size = 0;
+
+    if(!s)
+        s = "";
+    else if(!end)
+        size = strlen(s);
+    else if(end > s)
+        size = (strsize_t)(end - s);
+    str = create(size);
+    str->retain();
+    str->set(s);
+}
+
+String::String(const char *s)
+{
+    strsize_t size = count(s);
+    if(!s)
+        s = "";
+    str = create(size);
+    str->retain();
+    str->set(s);
+}
+
+String::String(const char *s, strsize_t size)
+{
+    if(!s)
+        s = "";
+    if(!size)
+        size = strlen(s);
+    str = create(size);
+    str->retain();
+    str->set(s);
+}
+
+String::String(strsize_t size)
+{
+    str = create(size);
+    str->retain();
+}
+
+String::String(long value)
+{
+    str = create(20);
+    str->retain();
+    snprintf(&str->text[0], 20, "%ld", value);
+    str->len = strlen(str->text);
+    str->fix();
+}
+
+String::String(double value)
+{
+    str = create(32);
+    str->retain();
+    snprintf(&str->text[0], 32, "%f", value);
+    str->len = strlen(str->text);
+    str->fix();
+}
+
+String::String(strsize_t size, char fill)
+{
+    str = create(size, fill);
+    str->retain();
+}
+
+String::String(strsize_t size, const char *format, ...)
+{
+    assert(format != NULL);
+
+    va_list args;
+    va_start(args, format);
+
+    str = create(size);
+    str->retain();
+    vsnprintf(str->text, size + 1, format, args);
+    va_end(args);
+}
+
+String::String(const String &dup)
+{
+    str = dup.c_copy();
+    if(str)
+        str->retain();
+}
+
+String::~String()
+{
+    String::release();
+}
+
+String::cstring *String::c_copy(void) const
+{
+    return str;
+}
+
+String String::get(strsize_t offset, strsize_t len) const
+{
+    if(!str || offset >= str->len)
+        return String("");
+
+    if(!len)
+        len = str->len - offset;
+    return String(str->text + offset, len);
+}
+
+String::cstring *String::create(strsize_t size, char fill) const
+{
+    if(fill)
+        return new((size_t)size) cstring(size, fill);
+    else
+        return new((size_t)size) cstring(size);
+}
+
+void String::retain(void)
+{
+    if(str)
+        str->retain();
+}
+
+void String::release(void)
+{
+    if(str)
+        str->release();
+    str = NULL;
+}
+
+char *String::c_mem(void) const
+{
+    if(!str)
+        return NULL;
+
+    return str->text;
+}
+
+const char *String::c_str(void) const
+{
+    if(!str)
+        return "";
+
+    return str->text;
+}
+
+bool String::equal(const char *s) const
+{
+#ifdef  HAVE_STRCOLL
+    const char *mystr = "";
+
+    if(str)
+        mystr = str->text;
+
+    if(!s)
+        s = "";
+
+    return strcmp(mystr, s) == 0;
+#else
+    return compare(s) == 0;
+#endif
+}
+
+int String::compare(const char *s) const
+{
+    const char *mystr = "";
+
+    if(str)
+        mystr = str->text;
+
+    if(!s)
+        s = "";
+
+#ifdef  HAVE_STRCOLL
+    return strcoll(mystr, s);
+#else
+    return strcmp(mystr, s);
+#endif
+}
+
+const char *String::begin(void) const
+{
+    if(!str)
+        return NULL;
+
+    return str->text;
+}
+
+const char *String::end(void) const
+{
+    if(!str)
+        return NULL;
+
+    return str->text + str->len;
+}
+
+const char *String::chr(char ch) const
+{
+    assert(ch != 0);
+
+    if(!str)
+        return NULL;
+
+    return ::strchr(str->text, ch);
+}
+
+const char *String::rchr(char ch) const
+{
+    assert(ch != 0);
+
+    if(!str)
+        return NULL;
+
+    return ::strrchr(str->text, ch);
+}
+
+const char *String::skip(const char *clist, strsize_t offset) const
+{
+    if(!str || !clist || !*clist || !str->len || offset > str->len)
+        return NULL;
+
+    while(offset < str->len) {
+        if(!strchr(clist, str->text[offset]))
+            return str->text + offset;
+        ++offset;
+    }
+    return NULL;
+}
+
+const char *String::rskip(const char *clist, strsize_t offset) const
+{
+    if(!str || !clist || !*clist)
+        return NULL;
+
+    if(!str->len)
+        return NULL;
+
+    if(offset > str->len)
+        offset = str->len;
+
+    while(offset--) {
+        if(!strchr(clist, str->text[offset]))
+            return str->text + offset;
+    }
+    return NULL;
+}
+
+const char *String::rfind(const char *clist, strsize_t offset) const
+{
+    if(!str || !clist || !*clist)
+        return NULL;
+
+    if(!str->len)
+        return str->text;
+
+    if(offset > str->len)
+        offset = str->len;
+
+    while(offset--) {
+        if(strchr(clist, str->text[offset]))
+            return str->text + offset;
+    }
+    return NULL;
+}
+
+void String::chop(const char *clist)
+{
+    strsize_t offset;
+
+    if(!str)
+        return;
+
+    if(!str->len)
+        return;
+
+    offset = str->len;
+    while(offset) {
+        if(!strchr(clist, str->text[offset - 1]))
+            break;
+        --offset;
+    }
+
+    if(!offset) {
+        clear();
+        return;
+    }
+
+    if(offset == str->len)
+        return;
+
+    str->len = offset;
+    str->fix();
+}
+
+void String::strip(const char *clist)
+{
+    trim(clist);
+    chop(clist);
+}
+
+void String::trim(const char *clist)
+{
+    unsigned offset = 0;
+
+    if(!str)
+        return;
+
+    while(offset < str->len) {
+        if(!strchr(clist, str->text[offset]))
+            break;
+        ++offset;
+    }
+
+    if(!offset)
+        return;
+
+    if(offset == str->len) {
+        clear();
+        return;
+    }
+
+    memmove(str->text, str->text + offset, str->len - offset);
+    str->len -= offset;
+    str->fix();
+}
+
+unsigned String::replace(const char *substring, const char *cp, unsigned flags)
+{
+    const char *result = "";
+    unsigned count = 0;
+    size_t cpl = 0;
+
+    if(cp)
+        cpl = strlen(cp);
+
+    if(!str || !substring || str->len == 0)
+        return 0;
+
+    strsize_t offset = 0;
+
+    size_t tcl = strlen(substring);
+
+    while(result) {
+        const char *text = str->text + offset;
+#if defined(_MSWINDOWS_)
+        if((flags & 0x01) == INSENSITIVE)
+            result = strstr(text, substring);
+#elif  defined(HAVE_STRICMP)
+        if((flags & 0x01) == INSENSITIVE)
+            result = stristr(text, substring);
+#else
+        if((flags & 0x01) == INSENSITIVE)
+            result = strcasestr(text, substring);
+#endif
+        else
+            result = strstr(text, substring);
+
+        if(result) {
+            ++count;
+            offset = text - str->text;
+            cut(offset, tcl);
+            if(cpl) {
+                paste(offset, cp);
+                offset += cpl;
+            }
+        }
+    }
+    return count;
+}
+
+const char *String::search(const char *substring, unsigned instance, unsigned flags) const
+{
+    const char *result = "";
+
+    if(!str || !substring || str->len == 0)
+        return NULL;
+
+    const char *text = str->text;
+
+    if(!instance)
+        ++instance;
+    while(instance-- && result) {
+#if defined(_MSWINDOWS_)
+        if((flags & 0x01) == INSENSITIVE)
+            result = strstr(text, substring);
+#elif  defined(HAVE_STRICMP)
+        if((flags & 0x01) == INSENSITIVE)
+            result = stristr(text, substring);
+#else
+        if((flags & 0x01) == INSENSITIVE)
+            result = strcasestr(text, substring);
+#endif
+        else
+            result = strstr(text, substring);
+
+        if(result)
+            text = result + strlen(result);
+    }
+    return result;
+}
+
+const char *String::find(const char *clist, strsize_t offset) const
+{
+    if(!str || !clist || !*clist || !str->len || offset > str->len)
+        return NULL;
+
+    while(offset < str->len) {
+        if(strchr(clist, str->text[offset]))
+            return str->text + offset;
+        ++offset;
+    }
+    return NULL;
+}
+
+bool String::unquote(const char *clist)
+{
+    assert(clist != NULL);
+
+    char *s;
+
+    if(!str)
+        return false;
+
+    str->unfix();
+    s = unquote(str->text, clist);
+    if(!s) {
+        str->fix();
+        return false;
+    }
+
+    set(s);
+    return true;
+}
+
+void String::upper(void)
+{
+    if(str)
+        upper(str->text);
+}
+
+void String::lower(void)
+{
+    if(str)
+        lower(str->text);
+}
+
+void String::erase(void)
+{
+    if(str) {
+        memset(str->text, 0, str->max);
+        str->fix();
+    }
+}
+
+strsize_t String::offset(const char *s) const
+{
+    if(!str || !s)
+        return npos;
+
+    if(s < str->text || s > str->text + str->max)
+        return npos;
+
+    if(s - str->text > str->len)
+        return str->len;
+
+    return (strsize_t)(s - str->text);
+}
+
+strsize_t String::count(void) const
+{
+    if(!str)
+        return 0;
+    return str->len;
+}
+
+strsize_t String::ccount(const char *clist) const
+{
+    if(!str)
+        return 0;
+
+    return ccount(str->text, clist);
+}
+
+strsize_t String::printf(const char *format, ...)
+{
+    assert(format != NULL);
+
+    va_list args;
+    va_start(args, format);
+    if(str) {
+        vsnprintf(str->text, str->max + 1, format, args);
+        str->len = strlen(str->text);
+        str->fix();
+    }
+    va_end(args);
+    return len();
+}
+
+strsize_t String::vprintf(const char *format, va_list args)
+{
+    assert(format != NULL);
+
+    if(str) {
+        vsnprintf(str->text, str->max + 1, format, args);
+        str->len = strlen(str->text);
+        str->fix();
+    }
+    return len();
+}
+
+#if !defined(_MSC_VER)
+int String::vscanf(const char *format, va_list args)
+{
+    assert(format != NULL);
+
+    if(str)
+        return vsscanf(str->text, format, args);
+    return -1;
+}
+
+int String::scanf(const char *format, ...)
+{
+    assert(format != NULL);
+
+    va_list args;
+    int rtn = -1;
+
+    va_start(args, format);
+    if(str)
+        rtn = vsscanf(str->text, format, args);
+    va_end(args);
+    return rtn;
+}
+#else
+int String::vscanf(const char *format, va_list args)
+{
+    return 0;
+}
+
+int String::scanf(const char *format, ...)
+{
+    return 0;
+}
+#endif
+
+void String::rsplit(const char *s)
+{
+    if(!str || !s || s <= str->text || s > str->text + str->len)
+        return;
+
+    str->set(s);
+}
+
+void String::rsplit(strsize_t pos)
+{
+    if(!str || pos > str->len || !pos)
+        return;
+
+    str->set(str->text + pos);
+}
+
+void String::split(const char *s)
+{
+    unsigned pos;
+
+    if(!s || !*s || !str)
+        return;
+
+    if(s < str->text || s >= str->text + str->len)
+        return;
+
+    pos = s - str->text;
+    str->text[pos] = 0;
+    str->fix();
+}
+
+void String::split(strsize_t pos)
+{
+    if(!str || pos >= str->len)
+        return;
+
+    str->text[pos] = 0;
+    str->fix();
+}
+
+void String::set(strsize_t offset, const char *s, strsize_t size)
+{
+    if(!s || !*s || !str)
+        return;
+
+    if(!size)
+        size = strlen(s);
+
+    str->set(offset, s, size);
+}
+
+void String::set(const char *s, char overflow, strsize_t offset, strsize_t size)
+{
+    size_t len = count(s);
+
+    if(!s || !*s || !str)
+        return;
+
+    if(offset >= str->max)
+        return;
+
+    if(!size || size > str->max - offset)
+        size = str->max - offset;
+
+    if(len <= size) {
+        set(offset, s, size);
+        return;
+    }
+
+    set(offset, s, size);
+
+    if(len > size && overflow)
+        str->text[offset + size - 1] = overflow;
+}
+
+void String::rset(const char *s, char overflow, strsize_t offset, strsize_t size)
+{
+    size_t len = count(s);
+    strsize_t dif;
+
+    if(!s || !*s || !str)
+        return;
+
+    if(offset >= str->max)
+        return;
+
+    if(!size || size > str->max - offset)
+        size = str->max - offset;
+
+    dif = len;
+    while(dif < size && str->fill) {
+        str->text[offset++] = str->fill;
+        ++dif;
+    }
+
+    if(len > size)
+        s += len - size;
+    set(offset, s, size);
+    if(overflow && len > size)
+        str->text[offset] = overflow;
+}
+
+void String::set(const char *s)
+{
+    strsize_t len;
+
+    if(!s)
+        s = "";
+
+    if(!str) {
+        len = strlen(s);
+        str = create(len);
+        str->retain();
+    }
+
+    str->set(s);
+}
+
+void String::paste(strsize_t offset, const char *cp, strsize_t size)
+{
+    if(!cp)
+        return;
+
+    if(!size)
+        size = strlen(cp);
+
+    if(!size)
+        return;
+
+    cow(size);
+
+    if(!str) {
+        String::set(str->text, ++size, cp);
+        str->len = --size;
+        str->fix();
+        return;
+    }
+
+    if(offset >= str->len)
+        String::set(str->text + str->len, size + 1, cp);
+    else {
+        memmove(str->text + offset + size, str->text + offset, str->len - offset);
+        memmove(str->text + offset, cp, size);
+    }
+    str->len += size;
+    str->fix();
+}
+
+void String::cut(strsize_t offset, strsize_t size)
+{
+    if(!str || offset >= str->len)
+        return;
+
+    if(!size)
+        size = str->len;
+
+    if(offset + size >= str->len) {
+        str->len = offset;
+        str->fix();
+        return;
+    }
+
+    memmove(str->text + offset, str->text + offset + size, str->len - offset - size);
+    str->len -= size;
+    str->fix();
+}
+
+void String::paste(char *text, size_t max, size_t offset, const char *cp, size_t size)
+{
+    if(!cp || !text)
+        return;
+
+    if(!size)
+        size = strlen(cp);
+
+    if(!size)
+        return;
+
+    size_t len = strlen(text);
+    if(len <= max)
+        return;
+
+    if(len + size >= max)
+        size = max - len;
+
+    if(offset >= len)
+        String::set(text + len, size + 1, cp);
+    else {
+        memmove(text + offset + size, text + offset, len - offset);
+        memmove(text + offset, cp, size);
+    }
+}
+
+void String::cut(char *text, size_t offset, size_t size)
+{
+    if(!text)
+        return;
+
+    size_t len = strlen(text);
+    if(!len || offset >= len)
+        return;
+
+    if(offset + size >= len) {
+        text[offset] = 0;
+        return;
+    }
+
+    memmove(text + offset, text + offset + size, len - offset - size);
+    len -= size;
+    text[len] = 0;
+}
+
+bool String::resize(strsize_t size)
+{
+    char fill = 0;
+
+    if(!size) {
+        release();
+        str = NULL;
+        return true;
+    }
+
+    if(!str) {
+        str = create(size, fill);
+        str->retain();
+    }
+    else if(str->is_copied() || str->max < size) {
+        fill = str->fill;
+        str->release();
+        str = create(size, fill);
+        str->retain();
+    }
+    return true;
+}
+
+void String::clear(strsize_t offset, strsize_t size)
+{
+    if(!str)
+        return;
+
+    if(!size)
+        size = str->max;
+
+    str->clear(offset, size);
+}
+
+void String::clear(void)
+{
+    if(str)
+        str->set("");
+}
+
+void String::cow(strsize_t size)
+{
+    if(str) {
+        if(str->fill)
+            size = str->max;
+        else
+            size += str->len;
+    }
+
+    if(!size)
+        return;
+
+    if(!str || !str->max || str->is_copied() || size > str->max) {
+        cstring *s = create(size);
+        s->len = str->len;
+        String::set(s->text, s->max + 1, str->text);
+        s->retain();
+        str->release();
+        str = s;
+    }
+}
+
+void String::add(char ch)
+{
+    char buf[2];
+
+    if(ch == 0)
+        return;
+
+    buf[0] = ch;
+    buf[1] = 0;
+
+    if(!str) {
+        set(buf);
+        return;
+    }
+
+    cow(1);
+    str->add(buf);
+}
+
+void String::add(const char *s)
+{
+    if(!s || !*s)
+        return;
+
+    if(!str) {
+        set(s);
+        return;
+    }
+
+    cow(strlen(s));
+    str->add(s);
+}
+
+char String::at(int offset) const
+{
+    if(!str)
+        return 0;
+
+    if(offset >= (int)str->len)
+        return 0;
+
+    if(offset > -1)
+        return str->text[offset];
+
+    if((strsize_t)(-offset) >= str->len)
+        return str->text[0];
+
+    return str->text[(int)(str->len) + offset];
+}
+
+String String::operator()(int offset, strsize_t len) const
+{
+    const char *cp = operator()(offset);
+    if(!cp)
+        cp = "";
+
+    if(!len)
+        len = strlen(cp);
+
+    return String(cp, len);
+}
+
+const char *String::operator()(int offset) const
+{
+    if(!str)
+        return NULL;
+
+    if(offset >= (int)str->len)
+        return NULL;
+
+    if(offset > -1)
+        return str->text + offset;
+
+    if((strsize_t)(-offset) >= str->len)
+        return str->text;
+
+    return str->text + str->len + offset;
+}
+
+const char String::operator[](int offset) const
+{
+    if(!str)
+        return 0;
+
+    if(offset >= (int)str->len)
+        return 0;
+
+    if(offset > -1)
+        return str->text[offset];
+
+    if((strsize_t)(-offset) >= str->len)
+        return *str->text;
+
+    return str->text[str->len + offset];
+}
+
+String &String::operator++()
+{
+    if(str)
+        str->inc(1);
+    return *this;
+}
+
+String &String::operator--()
+{
+    if(str)
+        str->dec(1);
+    return *this;
+}
+
+String &String::operator+=(strsize_t offset)
+{
+    if(str)
+        str->inc(offset);
+    return *this;
+}
+
+String &String::operator-=(strsize_t offset)
+{
+    if(str)
+        str->dec(offset);
+    return *this;
+}
+
+bool String::operator*=(const char *substr)
+{
+    if(search(substr))
+        return true;
+
+    return false;
+}
+
+String &String::operator^=(const char *s)
+{
+    release();
+    set(s);
+    return *this;
+}
+
+String &String::operator=(const char *s)
+{
+    release();
+    set(s);
+    return *this;
+}
+
+String &String::operator|=(const char *s)
+{
+    set(s);
+    return *this;
+}
+
+String &String::operator&=(const char *s)
+{
+    set(s);
+    return *this;
+}
+
+String &String::operator^=(const String &s)
+{
+    release();
+    set(s.c_str());
+    return *this;
+}
+
+String &String::operator=(const String &s)
+{
+    if(str == s.str)
+        return *this;
+
+    if(s.str)
+        s.str->retain();
+
+    if(str)
+        str->release();
+
+    str = s.str;
+    return *this;
+}
+
+bool String::full(void) const
+{
+    if(!str)
+        return false;
+
+    if(str->len == str->max &&
+       str->text[str->len - 1] != str->fill)
+        return true;
+
+    return false;
+}
+
+bool String::operator!() const
+{
+    bool rtn = false;
+    if(!str)
+        return true;
+
+    str->unfix();
+    if(!str->len)
+        rtn = true;
+
+    str->fix();
+    return rtn;
+}
+
+String::operator bool() const
+{
+    bool rtn = false;
+
+    if(!str)
+        return false;
+
+    str->unfix();
+    if(str->len)
+        rtn = true;
+    str->fix();
+    return rtn;
+}
+
+bool String::operator==(const char *s) const
+{
+    return (compare(s) == 0);
+}
+
+bool String::operator!=(const char *s) const
+{
+    return (compare(s) != 0);
+}
+
+bool String::operator<(const char *s) const
+{
+    return (compare(s) < 0);
+}
+
+bool String::operator<=(const char *s) const
+{
+    return (compare(s) <= 0);
+}
+
+bool String::operator>(const char *s) const
+{
+    return (compare(s) > 0);
+}
+
+bool String::operator>=(const char *s) const
+{
+    return (compare(s) >= 0);
+}
+
+String &String::operator&(const char *s)
+{
+    add(s);
+    return *this;
+}
+
+String &String::operator|(const char *s)
+{
+    if(!s || !*s)
+        return *this;
+
+    if(!str) {
+        set(s);
+        return *this;
+    }
+
+    str->add(s);
+    return *this;
+}
+
+String String::operator+(const char *s)
+{
+    String tmp;
+    if(str && str->text)
+        tmp.set(str->text);
+
+    if(s && *s)
+        tmp.add(s);
+
+    return tmp;
+}
+
+String &String::operator+=(const char *s)
+{
+    if(!s || !*s)
+        return *this;
+
+    add(s);
+    return *this;
+}
+
+memstring::memstring(void *mem, strsize_t size, char fill)
+{
+    assert(mem != NULL);
+    assert(size > 0);
+
+    str = new((caddr_t)mem) cstring(size, fill);
+    str->set("");
+}
+
+memstring::~memstring()
+{
+    str = NULL;
+}
+
+memstring *memstring::create(strsize_t size, char fill)
+{
+    assert(size > 0);
+
+    caddr_t mem = (caddr_t)cpr_memalloc(size + sizeof(memstring) + sizeof(cstring));
+    return new(mem) memstring(mem + sizeof(memstring), size, fill);
+}
+
+memstring *memstring::create(MemoryProtocol *mpager, strsize_t size, char fill)
+{
+    assert(size > 0);
+
+    caddr_t mem = (caddr_t)mpager->alloc(size + sizeof(memstring) + sizeof(cstring));
+    return new(mem) memstring(mem + sizeof(memstring), size, fill);
+}
+
+void memstring::release(void)
+{
+    str = NULL;
+}
+
+bool memstring::resize(strsize_t size)
+{
+    return false;
+}
+
+void memstring::cow(strsize_t adj)
+{
+}
+
+char *String::token(char *text, char **token, const char *clist, const char *quote, const char *eol)
+{
+    char *result;
+
+    if(!eol)
+        eol = "";
+
+    if(!token || !clist)
+        return NULL;
+
+    if(!*token)
+        *token = text;
+
+    if(!**token) {
+        *token = text;
+        return NULL;
+    }
+
+    while(**token && strchr(clist, **token))
+        ++*token;
+
+    result = *token;
+
+    if(*result && *eol && NULL != (eol = strchr(eol, *result))) {
+        if(eol[0] != eol[1] || *result == eol[1]) {
+            *token = text;
+            return NULL;
+        }
+    }
+
+    if(!*result) {
+        *token = text;
+        return NULL;
+    }
+
+    while(quote && *quote && *result != *quote) {
+        quote += 2;
+    }
+
+    if(quote && *quote) {
+        ++result;
+        ++quote;
+        *token = strchr(result, *quote);
+        if(!*token)
+            *token = result + strlen(result);
+        else {
+            **token = 0;
+            ++(*token);
+        }
+        return result;
+    }
+
+    while(**token && !strchr(clist, **token))
+        ++(*token);
+
+    if(**token) {
+        **token = 0;
+        ++(*token);
+    }
+
+    return result;
+}
+
+String::cstring *memstring::c_copy(void) const
+{
+    cstring *tmp = String::create(str->max, str->fill);
+    tmp->set(str->text);
+    return tmp;
+}
+
+void String::fix(String &s)
+{
+    if(s.str) {
+        s.str->len = strlen(s.str->text);
+        s.str->fix();
+    }
+}
+
+void String::swap(String &s1, String &s2)
+{
+    String::cstring *s = s1.str;
+    s1.str = s2.str;
+    s2.str = s;
+}
+
+char *String::dup(const char *cp)
+{
+    char *mem;
+
+    if(!cp)
+        return NULL;
+
+    size_t len = strlen(cp) + 1;
+    mem = (char *)malloc(len);
+    crit(mem != NULL, "string dup allocation error");
+    String::set(mem, len, cp);
+    return mem;
+}
+
+char *String::left(const char *cp, size_t size)
+{
+    char *mem;
+
+    if(!cp)
+        return NULL;
+
+    if(!size)
+        size = strlen(cp);
+
+    mem = (char *)malloc(++size);
+    crit(mem != NULL, "string dup allocation error");
+    String::set(mem, size, cp);
+    return mem;
+}
+
+const char *String::pos(const char *cp, ssize_t offset)
+{
+    if(!cp)
+        return NULL;
+
+    size_t len = strlen(cp);
+    if(!len)
+        return cp;
+
+    if(offset >= 0) {
+        if((size_t)offset > len)
+            offset = len;
+        return cp + offset;
+    }
+
+    offset = -offset;
+    if((size_t)offset >= len)
+        return cp;
+
+    return cp + len - offset;
+}
+
+size_t String::count(const char *cp)
+{
+    if(!cp)
+        return 0;
+
+    return strlen(cp);
+}
+
+const char *String::find(const char *str, const char *key, const char *delim)
+{
+    unsigned l1 = strlen(str);
+    unsigned l2 = strlen(key);
+
+    if(!delim[0])
+        delim = NULL;
+
+    while(l1 >= l2) {
+        if(!strncmp(key, str, l2)) {
+            if(l1 == l2 || !delim || strchr(delim, str[l2]))
+                return str;
+        }
+        if(!delim) {
+            ++str;
+            --l1;
+            continue;
+        }
+        while(l1 >= l2 && !strchr(delim, *str)) {
+            ++str;
+            --l1;
+        }
+        while(l1 >= l2 && strchr(delim, *str)) {
+            ++str;
+            --l1;
+        }
+    }
+    return NULL;
+}
+
+const char *String::ifind(const char *str, const char *key, const char *delim)
+{
+    unsigned l1 = strlen(str);
+    unsigned l2 = strlen(key);
+
+    if(!delim[0])
+        delim = NULL;
+
+    while(l1 >= l2) {
+        if(!strnicmp(key, str, l2)) {
+            if(l1 == l2 || !delim || strchr(delim, str[l2]))
+                return str;
+        }
+        if(!delim) {
+            ++str;
+            --l1;
+            continue;
+        }
+        while(l1 >= l2 && !strchr(delim, *str)) {
+            ++str;
+            --l1;
+        }
+        while(l1 >= l2 && strchr(delim, *str)) {
+            ++str;
+            --l1;
+        }
+    }
+    return NULL;
+}
+
+char *String::set(char *str, size_t size, const char *s, size_t len)
+{
+    if(!str)
+        return NULL;
+
+    if(size < 2)
+        return str;
+
+    if(!s)
+        s = "";
+
+    size_t l = strlen(s);
+    if(l >= size)
+        l = size - 1;
+
+    if(l > len)
+        l = len;
+
+    if(!l) {
+        *str = 0;
+        return str;
+    }
+
+    memmove(str, s, l);
+    str[l] = 0;
+    return str;
+}
+
+char *String::rset(char *str, size_t size, const char *s)
+{
+    size_t len = count(s);
+    if(len > size)
+        s += len - size;
+    return set(str, size, s);
+}
+
+char *String::set(char *str, size_t size, const char *s)
+{
+    if(!str)
+        return NULL;
+
+    if(size < 2)
+        return str;
+
+    if(!s)
+        s = "";
+
+    size_t l = strlen(s);
+
+    if(l >= size)
+        l = size - 1;
+
+    if(!l) {
+        *str = 0;
+        return str;
+    }
+
+    memmove(str, s, l);
+    str[l] = 0;
+    return str;
+}
+
+char *String::add(char *str, size_t size, const char *s, size_t len)
+{
+    if(!str)
+        return NULL;
+
+    if(!s)
+        return str;
+
+    size_t l = strlen(s);
+    size_t o = strlen(str);
+
+    if(o >= (size - 1))
+        return str;
+    set(str + o, size - o, s, l);
+    return str;
+}
+
+char *String::add(char *str, size_t size, const char *s)
+{
+    if(!str)
+        return NULL;
+
+    if(!s)
+        return str;
+
+    size_t o = strlen(str);
+
+    if(o >= (size - 1))
+        return str;
+
+    set(str + o, size - o, s);
+    return str;
+}
+
+char *String::trim(char *str, const char *clist)
+{
+    if(!str)
+        return NULL;
+
+    if(!clist)
+        return str;
+
+    while(*str && strchr(clist, *str))
+        ++str;
+
+    return str;
+}
+
+char *String::chop(char *str, const char *clist)
+{
+    if(!str)
+        return NULL;
+
+    if(!clist)
+        return str;
+
+    size_t offset = strlen(str);
+    while(offset && strchr(clist, str[offset - 1]))
+        str[--offset] = 0;
+    return str;
+}
+
+char *String::strip(char *str, const char *clist)
+{
+    str = trim(str, clist);
+    chop(str, clist);
+    return str;
+}
+
+void String::upper(char *str)
+{
+    while(str && *str) {
+        *str = toupper(*str);
+        ++str;
+    }
+}
+
+void String::lower(char *str)
+{
+    while(str && *str) {
+        *str = tolower(*str);
+        ++str;
+    }
+}
+
+void String::erase(char *str)
+{
+    if(!str || *str == 0)
+        return;
+
+    memset(str, 0, strlen(str));
+}
+
+unsigned String::ccount(const char *str, const char *clist)
+{
+    unsigned count = 0;
+    while(str && *str) {
+        if(strchr(clist, *(str++)))
+            ++count;
+    }
+    return count;
+}
+
+char *String::skip(char *str, const char *clist)
+{
+    if(!str || !clist)
+        return NULL;
+
+    while(*str && strchr(clist, *str))
+        ++str;
+
+    if(*str)
+        return str;
+
+    return NULL;
+}
+
+char *String::rskip(char *str, const char *clist)
+{
+    size_t len = count(str);
+
+    if(!len || !clist)
+        return NULL;
+
+    while(len > 0) {
+        if(!strchr(clist, str[--len]))
+            return str;
+    }
+    return NULL;
+}
+
+size_t String::seek(char *str, const char *clist)
+{
+    size_t pos = 0;
+
+    if(!str)
+        return 0;
+
+    if(!clist)
+        return strlen(str);
+
+    while(str[pos]) {
+        if(strchr(clist, str[pos]))
+            return pos;
+        ++pos;
+    }
+    return pos;
+}
+
+char *String::find(char *str, const char *clist)
+{
+    if(!str)
+        return NULL;
+
+    if(!clist)
+        return str;
+
+    while(str && *str) {
+        if(strchr(clist, *str))
+            return str;
+    }
+    return NULL;
+}
+
+char *String::rfind(char *str, const char *clist)
+{
+    if(!str)
+        return NULL;
+
+    if(!clist)
+        return str + strlen(str);
+
+    char *s = str + strlen(str);
+
+    while(s > str) {
+        if(strchr(clist, *(--s)))
+            return s;
+    }
+    return NULL;
+}
+
+bool String::eq_case(const char *s1, const char *s2)
+{
+    if(!s1)
+        s1 = "";
+
+    if(!s2)
+        s2 = "";
+
+#ifdef  HAVE_STRICMP
+    return stricmp(s1, s2) == 0;
+#else
+    return strcasecmp(s1, s2) == 0;
+#endif
+}
+
+int String::case_compare(const char *s1, const char *s2)
+{
+    if(!s1)
+        s1 = "";
+
+    if(!s2)
+        s2 = "";
+
+#ifdef  HAVE_STRICMP
+    return stricmp(s1, s2);
+#else
+    return strcasecmp(s1, s2);
+#endif
+}
+
+int String::case_compare(const char *s1, const char *s2, size_t size)
+{
+    if(!s1)
+        s1 = "";
+
+    if(!s2)
+        s2 = "";
+
+#ifdef  HAVE_STRICMP
+    return strnicmp(s1, s2, size);
+#else
+    return strncasecmp(s1, s2, size);
+#endif
+}
+
+bool String::eq_case(const char *s1, const char *s2, size_t size)
+{
+    if(!s1)
+        s1 = "";
+
+    if(!s2)
+        s2 = "";
+
+#ifdef  HAVE_STRICMP
+    return strnicmp(s1, s2, size) == 0;
+#else
+    return strncasecmp(s1, s2, size) == 0;
+#endif
+}
+
+bool String::equal(const char *s1, const char *s2)
+{
+    if(!s1)
+        s1 = "";
+    if(!s2)
+        s2 = "";
+
+    return strcmp(s1, s2) == 0;
+}
+
+bool String::equal(const char *s1, const char *s2, size_t size)
+{
+    if(!s1)
+        s1 = "";
+    if(!s2)
+        s2 = "";
+
+    return strncmp(s1, s2, size) == 0;
+}
+
+int String::compare(const char *s1, const char *s2)
+{
+    if(!s1)
+        s1 = "";
+    if(!s2)
+        s2 = "";
+
+#ifdef  HAVE_STRCOLL
+    return strcoll(s1, s2);
+#else
+    return strcmp(s1, s2);
+#endif
+}
+
+
+char *String::unquote(char *str, const char *clist)
+{
+    assert(clist != NULL);
+
+    size_t len = count(str);
+    if(!len || !str)
+        return NULL;
+
+    while(clist[0]) {
+        if(*str == clist[0] && str[len - 1] == clist[1]) {
+            str[len - 1] = 0;
+            return ++str;
+        }
+        clist += 2;
+    }
+    return str;
+}
+
+char *String::fill(char *str, size_t size, char fill)
+{
+    if(!str)
+        return NULL;
+
+    memset(str, fill, size - 1);
+    str[size - 1] = 0;
+    return str;
+}
+
+unsigned String::hexsize(const char *format)
+{
+    unsigned count = 0;
+    char *ep;
+    unsigned skip;
+
+    while(format && *format) {
+        while(*format && !isdigit(*format)) {
+            ++format;
+            ++count;
+        }
+        if(isdigit(*format)) {
+            skip = (unsigned)strtol(format, &ep, 10);
+            format = ep;
+            count += skip * 2;
+        }
+    }
+    return count;
+}
+
+unsigned String::hexdump(const unsigned char *binary, char *string, const char *format)
+{
+    unsigned count = 0;
+    char *ep;
+    unsigned skip;
+
+    while(format && *format) {
+        while(*format && !isdigit(*format)) {
+            *(string++) = *(format++);
+            ++count;
+        }
+        if(isdigit(*format)) {
+            skip = (unsigned)strtol(format, &ep, 10);
+            format = ep;
+            count += skip * 2;
+            while(skip--) {
+                snprintf(string, 3, "%02x", *(binary++));
+                string += 2;
+            }
+        }
+    }
+    *string = 0;
+    return count;
+}
+
+static unsigned hex(char ch)
+{
+    if(ch >= '0' && ch <= '9')
+        return ch - '0';
+    else
+        return toupper(ch) - 'A' + 10;
+}
+
+unsigned String::hexpack(unsigned char *binary, const char *string, const char *format)
+{
+    unsigned count = 0;
+    char *ep;
+    unsigned skip;
+
+    while(format && *format) {
+        while(*format && !isdigit(*format)) {
+            if(*(string++) != *(format++))
+                return count;
+            ++count;
+        }
+        if(isdigit(*format)) {
+            skip = (unsigned)strtol(format, &ep, 10);
+            format = ep;
+            count += skip * 2;
+            while(skip--) {
+                *(binary++) = hex(string[0]) * 16 + hex(string[1]);
+                string += 2;
+            }
+        }
+    }
+    return count;
+}
+
+String &String::operator%(unsigned short& value)
+{
+    unsigned long temp = USHRT_MAX + 1;
+    char *ep;
+    if(!str || !str->text)
+        return *this;
+
+    value = 0;
+    temp = strtoul(str->text, &ep, 0);
+    if(temp > USHRT_MAX)
+        goto failed;
+
+    value = (unsigned short)temp;
+
+    if(ep)
+        set(ep);
+    else
+        set("");
+
+failed:
+    return *this;
+}
+
+String &String::operator%(short& value)
+{
+    long temp = SHRT_MAX + 1;
+    char *ep;
+    if(!str || !str->text)
+        return *this;
+
+    value = 0;
+    temp = strtol(str->text, &ep, 0);
+    if(temp < 0 && temp < SHRT_MIN)
+        goto failed;
+
+    if(temp > SHRT_MAX)
+        goto failed;
+
+    value = (short)temp;
+
+    if(ep)
+        set(ep);
+    else
+        set("");
+
+failed:
+    return *this;
+}
+
+String &String::operator%(long& value)
+{
+    value = 0;
+    char *ep;
+    if(!str || !str->text)
+        return *this;
+
+    value = strtol(str->text, &ep, 0);
+    if(ep)
+        set(ep);
+    else
+        set("");
+
+    return *this;
+}
+
+String &String::operator%(unsigned long& value)
+{
+    value = 0;
+    char *ep;
+    if(!str || !str->text)
+        return *this;
+
+    value = strtoul(str->text, &ep, 0);
+    if(ep)
+        set(ep);
+    else
+        set("");
+
+    return *this;
+}
+
+String &String::operator%(double& value)
+{
+    value = 0;
+    char *ep;
+    if(!str || !str->text)
+        return *this;
+
+    value = strtod(str->text, &ep);
+    if(ep)
+        set(ep);
+    else
+        set("");
+
+    return *this;
+}
+
+String &String::operator%(const char *get)
+{
+    if(!str || !str->text || !get)
+        return *this;
+
+    unsigned len = strlen(get);
+    const char *cp = str->text;
+
+    while(isspace(*cp))
+        ++cp;
+
+    if(eq(cp, get, len))
+        set(cp + len);
+    else if(cp != str->text)
+        set(cp);
+
+    return *this;
+}
+
+String str(CharacterProtocol *p, strsize_t size)
+{
+    String temp(size);
+    char *cp = temp.c_mem();
+    int ch;
+    bool cr = false;
+
+    while(--size) {
+        ch = p->getchar();
+        if(ch == 0 || ch == EOF || ch == '\n')
+            break;
+
+        if(cr) {
+            cr = false;
+            *(cp++) = '\r';
+        }
+
+        if(ch == '\r')
+            cr = true;
+        else
+            *(cp++) = ch;
+    }
+
+    *cp = 0;
+
+    String::fix(temp);
+    return temp;
+}
+
+static const unsigned char alphabet[65] =
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+size_t String::b64encode(char *dest, const uint8_t *bin, size_t size, size_t dsize)
+{
+    assert(dest != NULL && bin != NULL);
+
+    size_t count = 0;
+
+    if(!dsize)
+        dsize = (size * 4 / 3) + 1;
+
+    if (!dsize || !size)
+        goto end;
+
+    unsigned bits;
+
+    while(size >= 3 && dsize > 4) {
+        bits = (((unsigned)bin[0])<<16) | (((unsigned)bin[1])<<8)
+            | ((unsigned)bin[2]);
+        bin += 3;
+        size -= 3;
+        count += 3;
+        *(dest++) = alphabet[bits >> 18];
+        *(dest++) = alphabet[(bits >> 12) & 0x3f];
+        *(dest++) = alphabet[(bits >> 6) & 0x3f];
+        *(dest++) = alphabet[bits & 0x3f];
+        dsize -= 4;
+    }
+
+    if (size && dsize > 4) {
+        bits = ((unsigned)bin[0])<<16;
+        *(dest++) = alphabet[bits >> 18];
+        ++count;
+        if (size == 1) {
+            *(dest++) = alphabet[(bits >> 12) & 0x3f];
+            *(dest++) = '=';
+        }
+        else {
+            ++count;
+            bits |= ((unsigned)bin[1])<<8;
+            *(dest++) = alphabet[(bits >> 12) & 0x3f];
+            *(dest++) = alphabet[(bits >> 6) & 0x3f];
+        }
+        *(dest++) = '=';
+    }
+
+end:
+    *dest = 0;
+    return count;
+}
+
+size_t String::b64decode(uint8_t *dest, const char *src, size_t size)
+{
+    char decoder[256];
+    unsigned long bits;
+    uint8_t c;
+    unsigned i;
+    size_t count = 0;
+
+    for (i = 0; i < 256; ++i)
+        decoder[i] = 64;
+
+    for (i = 0; i < 64 ; ++i)
+        decoder[alphabet[i]] = i;
+
+    bits = 1;
+
+    while(*src) {
+        c = (uint8_t)(*(src++));
+        if (c == '=') {
+            if (bits & 0x40000) {
+                if (size < 2)
+                    break;
+                *(dest++) = (uint8_t)((bits >> 10) & 0xff);
+                *(dest++) = (uint8_t)((bits >> 2) & 0xff);
+                count += 2;
+                break;
+            }
+            if ((bits & 0x1000) && size) {
+                *(dest++) = (uint8_t)((bits >> 4) & 0xff);
+                ++count;
+            }
+            break;
+        }
+        // end on invalid chars
+        if (decoder[c] == 64)
+            break;
+        bits = (bits << 6) + decoder[c];
+        if (bits & 0x1000000) {
+            if (size < 3)
+                break;
+            *(dest++) = (uint8_t)((bits >> 16) & 0xff);
+            *(dest++) = (uint8_t)((bits >> 8) & 0xff);
+            *(dest++) = (uint8_t)((bits & 0xff));
+            bits = 1;
+            size -= 3;
+            count += 3;
+        }
+    }
+    return count;
+}
+
+#define CRC24_INIT 0xb704ceL
+#define CRC24_POLY 0x1864cfbL
+
+uint32_t String::crc24(uint8_t *binary, size_t size)
+{
+    uint32_t crc = CRC24_INIT;
+    unsigned i;
+
+    while (size--) {
+        crc ^= (*binary++) << 16;
+        for (i = 0; i < 8; i++) {
+            crc <<= 1;
+            if (crc & 0x1000000)
+                crc ^= CRC24_POLY;
+        }
+    }
+    return crc & 0xffffffL;
+}
+
+uint16_t String::crc16(uint8_t *binary, size_t size)
+{
+    uint16_t crc = 0xffff;
+    unsigned i;
+
+    while (size--) {
+        crc ^= (*binary++);
+        for (i = 0; i < 8; i++) {
+            if(crc & 1)
+                crc = (crc >> 1) ^ 0xa001;
+            else
+                crc = (crc >> 1);
+        }
+    }
+    return crc;
+}
+
diff --git a/jni/libucommon/sources/corelib/tcpbuffer.cpp b/jni/libucommon/sources/corelib/tcpbuffer.cpp
new file mode 100644
index 0000000..f23be8c
--- /dev/null
+++ b/jni/libucommon/sources/corelib/tcpbuffer.cpp
@@ -0,0 +1,190 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/protocols.h>
+#include <ucommon/socket.h>
+#include <ucommon/timers.h>
+#include <ucommon/buffer.h>
+#include <ucommon/string.h>
+#include <ucommon/shell.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+TCPBuffer::TCPBuffer() :
+BufferProtocol()
+{
+    so = INVALID_SOCKET;
+}
+
+TCPBuffer::TCPBuffer(const char *host, const char *service, size_t size) :
+BufferProtocol()
+{
+    so = INVALID_SOCKET;
+    open(host, service, size);
+}
+
+TCPBuffer::TCPBuffer(const TCPServer *server, size_t size) :
+BufferProtocol()
+{
+    so = INVALID_SOCKET;
+    open(server, size);
+}
+
+TCPBuffer::~TCPBuffer()
+{
+    TCPBuffer::close();
+}
+
+void TCPBuffer::open(const char *host, const char *service, size_t size)
+{
+    struct addrinfo *list = Socket::query(host, service, SOCK_STREAM, 0);
+    if(!list)
+        return;
+
+    so = Socket::create(list, SOCK_STREAM, 0);
+    Socket::release(list);
+    if(so == INVALID_SOCKET)
+        return;
+
+    _buffer(size);
+}
+
+void TCPBuffer::open(const TCPServer *server, size_t size)
+{
+    close();
+    so = server->accept();
+    if(so == INVALID_SOCKET)
+        return;
+
+    _buffer(size);
+}
+
+void TCPBuffer::close(void)
+{
+    if(so == INVALID_SOCKET)
+        return;
+
+    BufferProtocol::release();
+    Socket::release(so);
+    so = INVALID_SOCKET;
+}
+
+void TCPBuffer::_buffer(size_t size)
+{
+    unsigned iobuf = 0;
+    unsigned mss = size;
+    unsigned max = 0;
+
+#ifdef  TCP_MAXSEG
+    socklen_t alen = sizeof(max);
+#endif
+
+    if(size < 80) {
+        allocate(size);
+        return;
+    }
+
+#ifdef  TCP_MAXSEG
+    if(mss)
+        setsockopt(so, IPPROTO_TCP, TCP_MAXSEG, (char *)&max, sizeof(max));
+    getsockopt(so, IPPROTO_TCP, TCP_MAXSEG, (char *)&max, &alen);
+#endif
+
+    if(max && max < mss)
+        mss = max;
+
+    if(!mss) {
+        if(max)
+            mss = max;
+        else
+            mss = 536;
+        goto alloc;
+    }
+
+    if(mss < 80)
+        mss = 80;
+
+    if(mss * 7 < 64000u)
+        iobuf = mss * 7;
+    else if(size * 6 < 64000u)
+        iobuf = mss * 6;
+    else
+        iobuf = mss * 5;
+
+    Socket::sendsize(so, iobuf);
+    Socket::recvsize(so, iobuf);
+
+    if(mss < 512)
+        Socket::sendwait(so, mss * 4);
+
+alloc:
+    allocate(size);
+}
+
+int TCPBuffer::_err(void) const
+{
+    return ioerr;
+}
+
+void TCPBuffer::_clear(void)
+{
+    ioerr = 0;
+}
+
+bool TCPBuffer::_blocking(void)
+{
+    if(iowait)
+        return true;
+
+    return false;
+}
+
+size_t TCPBuffer::_push(const char *address, size_t len)
+{
+    if(ioerr)
+        return 0;
+
+    ssize_t result = writeto(address, len);
+    if(result < 0)
+        result = 0;
+
+    return (size_t)result;
+}
+
+size_t TCPBuffer::_pull(char *address, size_t len)
+{
+    ssize_t result;
+
+    result = readfrom(address, len);
+
+    if(result < 0)
+        result = 0;
+    return (size_t)result;
+}
+
+bool TCPBuffer::_pending(void)
+{
+    if(input_pending())
+        return true;
+
+    if(is_input() && iowait && iowait != Timer::inf)
+        return Socket::wait(so, iowait);
+
+    return Socket::wait(so, 0);
+}
diff --git a/jni/libucommon/sources/corelib/thread.cpp b/jni/libucommon/sources/corelib/thread.cpp
new file mode 100644
index 0000000..2bf752f
--- /dev/null
+++ b/jni/libucommon/sources/corelib/thread.cpp
@@ -0,0 +1,2266 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/object.h>
+#include <ucommon/thread.h>
+#include <ucommon/timers.h>
+#include <ucommon/linked.h>
+#include <errno.h>
+#include <string.h>
+#include <stdarg.h>
+#include <limits.h>
+
+#if _POSIX_PRIORITY_SCHEDULING > 0
+#include <sched.h>
+static int realtime_policy = SCHED_FIFO;
+#endif
+
+#undef  _POSIX_SPIN_LOCKS
+
+static unsigned max_sharing = 0;
+
+using namespace UCOMMON_NAMESPACE;
+
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+extern int _posix_clocking;
+int _posix_clocking = CLOCK_REALTIME;
+#endif
+
+struct mutex_entry
+{
+    pthread_mutex_t mutex;
+    struct mutex_entry *next;
+    const void *pointer;
+    unsigned count;
+};
+
+class __LOCAL rwlock_entry : public ThreadLock
+{
+public:
+    rwlock_entry();
+    rwlock_entry *next;
+    const void *object;
+    unsigned count;
+};
+
+class __LOCAL mutex_index : public Mutex
+{
+public:
+    struct mutex_entry *list;
+
+    mutex_index();
+};
+
+class __LOCAL rwlock_index : public Mutex
+{
+public:
+    rwlock_entry *list;
+
+    rwlock_index();
+};
+
+static rwlock_index single_rwlock;
+static rwlock_index *rwlock_table = &single_rwlock;
+static mutex_index single_table;
+static mutex_index *mutex_table = &single_table;
+static unsigned mutex_indexing = 1;
+static unsigned rwlock_indexing = 1;
+
+#ifdef  __PTH__
+static pth_key_t threadmap;
+#else
+#ifdef  _MSWINDOWS_
+static DWORD threadmap;
+#else
+static pthread_key_t threadmap;
+#endif
+#endif
+
+mutex_index::mutex_index() : Mutex()
+{
+    list = NULL;
+}
+
+rwlock_index::rwlock_index() : Mutex()
+{
+    list = NULL;
+}
+
+rwlock_entry::rwlock_entry() : ThreadLock()
+{
+    count = 0;
+}
+
+#if !defined(_MSWINDOWS_) && !defined(__PTH__)
+Conditional::attribute Conditional::attr;
+#endif
+
+#ifdef  __PTH__
+static int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime)
+{
+    static pth_key_t ev_key = PTH_KEY_INIT;
+    pth_event_t ev = pth_event(PTH_EVENT_TIME|PTH_MODE_STATIC, &ev_key,
+        pth_time(abstime->tv_sec, (abstime->tv_nsec) / 1000));
+
+    if(!pth_cond_await(cond, mutex, ev))
+        return errno;
+    return 0;
+}
+
+static void pthread_shutdown(void)
+{
+    pth_kill();
+}
+
+inline pthread_t pthread_self(void)
+    {return pth_self();};
+
+#endif
+
+static unsigned hash_address(const void *ptr, unsigned indexing)
+{
+    assert(ptr != NULL);
+
+    unsigned key = 0;
+    unsigned count = 0;
+    const unsigned char *addr = (unsigned char *)(&ptr);
+
+    if(indexing < 2)
+        return 0;
+
+    // skip lead zeros if little endian...
+    while(count < sizeof(const void *) && *addr == 0) {
+        ++count;
+        ++addr;
+    }
+
+    while(count++ < sizeof(const void *) && *addr)
+        key = (key << 1) ^ *(addr++);
+
+    return key % indexing;
+}
+
+ReusableAllocator::ReusableAllocator() :
+Conditional()
+{
+    freelist = NULL;
+    waiting = 0;
+}
+
+void ReusableAllocator::release(ReusableObject *obj)
+{
+    assert(obj != NULL);
+
+    LinkedObject **ru = (LinkedObject **)&freelist;
+
+    obj->retain();
+    obj->release();
+
+    lock();
+    obj->enlist(ru);
+
+    if(waiting)
+        signal();
+
+    unlock();
+}
+
+void ConditionalAccess::limit_sharing(unsigned max)
+{
+    max_sharing = max;
+}
+
+void Conditional::set(struct timespec *ts, timeout_t msec)
+{
+    assert(ts != NULL);
+
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+    clock_gettime(_posix_clocking, ts);
+#else
+    timeval tv;
+    gettimeofday(&tv, NULL);
+    ts->tv_sec = tv.tv_sec;
+    ts->tv_nsec = tv.tv_usec * 1000l;
+#endif
+    ts->tv_sec += msec / 1000;
+    ts->tv_nsec += (msec % 1000) * 1000000l;
+    while(ts->tv_nsec >= 1000000000l) {
+        ++ts->tv_sec;
+        ts->tv_nsec -= 1000000000l;
+    }
+}
+
+Semaphore::Semaphore(unsigned limit) :
+Conditional()
+{
+    assert(limit > 0);
+
+    count = limit;
+    waits = 0;
+    used = 0;
+}
+
+void Semaphore::_share(void)
+{
+    wait();
+}
+
+void Semaphore::_unlock(void)
+{
+    release();
+}
+
+bool Semaphore::wait(timeout_t timeout)
+{
+    bool result = true;
+    struct timespec ts;
+    Conditional::set(&ts, timeout);
+
+    lock();
+    while(used >= count && result) {
+        ++waits;
+        result = Conditional::wait(&ts);
+        --waits;
+    }
+    if(result)
+        ++used;
+    unlock();
+    return result;
+}
+
+void Semaphore::wait(void)
+{
+    lock();
+    if(used >= count) {
+        ++waits;
+        Conditional::wait();
+        --waits;
+    }
+    ++used;
+    unlock();
+}
+
+void Semaphore::release(void)
+{
+    lock();
+    if(used)
+        --used;
+    if(waits)
+        signal();
+    unlock();
+}
+
+void Semaphore::set(unsigned value)
+{
+    assert(value > 0);
+
+    unsigned diff;
+
+    lock();
+    count = value;
+    if(used >= count || !waits) {
+        unlock();
+        return;
+    }
+    diff = count - used;
+    if(diff > waits)
+        diff = waits;
+    unlock();
+    while(diff--) {
+        lock();
+        signal();
+        unlock();
+    }
+}
+
+#ifdef  _MSWINDOWS_
+
+bool Thread::equal(pthread_t t1, pthread_t t2)
+{
+    return t1 == t2;
+}
+
+#ifdef  _MSCONDITIONAL_
+
+Conditional::Conditional()
+{
+    InitializeCriticalSection(&mutex);
+    InitializeConditionVariable(&cond);
+}
+
+Conditional::~Conditional()
+{
+    DeleteCriticalSection(&mutex);
+}
+
+void Conditional::wait(void)
+{
+    SleepConditionVariableCS(&cond, &mutex, INFINITE);
+}
+
+bool Conditional::wait(timeout_t timeout)
+{
+    if(SleepConditionVariableCS(&cond, &mutex, timeout))
+        return true;
+
+    return false;
+}
+
+void Conditional::signal(void)
+{
+    WakeConditionVariable(&cond);
+}
+
+void Conditional::broadcast(void)
+{
+    WakeAllConditionVariable(&cond);
+}
+
+#else
+void Conditional::wait(void)
+{
+    int result;
+
+    EnterCriticalSection(&mlock);
+    ++waiting;
+    LeaveCriticalSection(&mlock);
+    LeaveCriticalSection(&mutex);
+    result = WaitForMultipleObjects(2, events, FALSE, INFINITE);
+    EnterCriticalSection(&mlock);
+    --waiting;
+    result = ((result == WAIT_OBJECT_0 + BROADCAST) && (waiting == 0));
+    LeaveCriticalSection(&mlock);
+    if(result)
+        ResetEvent(&events[BROADCAST]);
+    EnterCriticalSection(&mutex);
+}
+
+void Conditional::signal(void)
+{
+    EnterCriticalSection(&mlock);
+    if(waiting)
+        SetEvent(&events[SIGNAL]);
+    LeaveCriticalSection(&mlock);
+}
+
+void Conditional::broadcast(void)
+{
+    EnterCriticalSection(&mlock);
+    if(waiting)
+        SetEvent(&events[BROADCAST]);
+    LeaveCriticalSection(&mlock);
+
+}
+
+Conditional::Conditional()
+{
+    waiting = 0;
+
+    InitializeCriticalSection(&mutex);
+    InitializeCriticalSection(&mlock);
+    events[SIGNAL] = CreateEvent(NULL, FALSE, FALSE, NULL);
+    events[BROADCAST] = CreateEvent(NULL, TRUE, FALSE, NULL);
+}
+
+Conditional::~Conditional()
+{
+    DeleteCriticalSection(&mlock);
+    DeleteCriticalSection(&mutex);
+    CloseHandle(events[SIGNAL]);
+    CloseHandle(events[BROADCAST]);
+}
+
+bool Conditional::wait(timeout_t timeout)
+{
+    int result;
+    bool rtn = true;
+
+    if(!timeout)
+        return false;
+
+    EnterCriticalSection(&mlock);
+    ++waiting;
+    LeaveCriticalSection(&mlock);
+    LeaveCriticalSection(&mutex);
+    result = WaitForMultipleObjects(2, events, FALSE, timeout);
+    EnterCriticalSection(&mlock);
+    --waiting;
+    if(result == WAIT_OBJECT_0 || result == WAIT_OBJECT_0 + BROADCAST)
+        rtn = true;
+    result = ((result == WAIT_OBJECT_0 + BROADCAST) && (waiting == 0));
+    LeaveCriticalSection(&mlock);
+    if(result)
+        ResetEvent(&events[BROADCAST]);
+    EnterCriticalSection(&mutex);
+    return rtn;
+}
+#endif
+
+bool Conditional::wait(struct timespec *ts)
+{
+    assert(ts != NULL);
+
+    return wait((timeout_t)(ts->tv_sec * 1000 + (ts->tv_nsec / 1000000l)));
+}
+
+#else
+
+#include <stdio.h>
+bool Thread::equal(pthread_t t1, pthread_t t2)
+{
+#ifdef  __PTH__
+    return (t1 == t2);
+#else
+    return pthread_equal(t1, t2) != 0;
+#endif
+}
+
+#ifndef __PTH__
+Conditional::attribute::attribute()
+{
+    Thread::init();
+    pthread_condattr_init(&attr);
+#if _POSIX_TIMERS > 0 && defined(HAVE_PTHREAD_CONDATTR_SETCLOCK) && defined(POSIX_TIMERS)
+#if defined(_POSIX_MONOTONIC_CLOCK)
+    if(!pthread_condattr_setclock(&attr, CLOCK_MONOTONIC))
+        _posix_clocking = CLOCK_MONOTONIC;
+#else
+    pthread_condattr_setclock(&attr, CLOCK_REALTIME);
+#endif
+#endif
+}
+#endif
+
+Conditional::Conditional()
+{
+#ifdef  __PTH__
+    Thread::init();
+    pth_cond_init(&cond);
+    pth_mutex_init(&mutex);
+#else
+    crit(pthread_cond_init(&cond, &attr.attr) == 0, "conditional init failed");
+    crit(pthread_mutex_init(&mutex, NULL) == 0, "mutex init failed");
+#endif
+}
+
+Conditional::~Conditional()
+{
+#ifndef __PTH__
+    pthread_cond_destroy(&cond);
+    pthread_mutex_destroy(&mutex);
+#endif
+}
+
+bool Conditional::wait(timeout_t timeout)
+{
+    struct timespec ts;
+    set(&ts, timeout);
+    return wait(&ts);
+}
+
+bool Conditional::wait(struct timespec *ts)
+{
+    assert(ts != NULL);
+
+    if(pthread_cond_timedwait(&cond, &mutex, ts) == ETIMEDOUT)
+        return false;
+
+    return true;
+}
+
+#endif
+
+
+#if defined(_MSCONDITIONAL_)
+
+ConditionalAccess::ConditionalAccess()
+{
+    waiting = pending = sharing = 0;
+    InitializeConditionVariable(&bcast);
+}
+
+ConditionalAccess::~ConditionalAccess()
+{
+}
+
+bool ConditionalAccess::waitBroadcast(timeout_t timeout)
+{
+    assert(ts != NULL);
+
+    if(SleepConditionVariableCS(&bcast, &mutex, timeout))
+        return true;
+
+    return false;
+}
+
+bool ConditionalAccess::waitSignal(timeout_t timeout)
+{
+    assert(ts != NULL);
+
+    if(SleepConditionVariableCS(&cond, &mutex, timeout))
+        return true;
+
+    return false;
+}
+
+bool ConditionalAccess::waitBroadcast(struct timespec *ts)
+{
+    assert(ts != NULL);
+
+    return waitBroadcast((timeout_t)(ts->tv_sec * 1000 + (ts->tv_nsec / 1000000l)));
+}
+
+bool ConditionalAccess::waitSignal(struct timespec *ts)
+{
+    assert(ts != NULL);
+
+    return waitSignal((timeout_t)(ts->tv_sec * 1000 + (ts->tv_nsec / 1000000l)));
+}
+
+#elif defined(_MSWINDOWS_)
+
+void ConditionalAccess::waitSignal(void)
+{
+    LeaveCriticalSection(&mutex);
+    WaitForSingleObject(&events[SIGNAL], INFINITE);
+    EnterCriticalSection(&mutex);
+}
+
+void ConditionalAccess::waitBroadcast(void)
+{
+    int result;
+
+    EnterCriticalSection(&mlock);
+    ++waiting;
+    LeaveCriticalSection(&mlock);
+    LeaveCriticalSection(&mutex);
+    result = WaitForSingleObject(&events[BROADCAST], INFINITE);
+    EnterCriticalSection(&mlock);
+    --waiting;
+    result = ((result == WAIT_OBJECT_0) && (waiting == 0));
+    LeaveCriticalSection(&mlock);
+    if(result)
+        ResetEvent(&events[BROADCAST]);
+    EnterCriticalSection(&mutex);
+}
+
+ConditionalAccess::ConditionalAccess() : Conditional()
+{
+    pending = waiting = sharing = 0;
+}
+
+ConditionalAccess::~ConditionalAccess()
+{
+}
+
+bool ConditionalAccess::waitSignal(timeout_t timeout)
+{
+    int result;
+    bool rtn = true;
+
+    if(!timeout)
+        return false;
+
+    LeaveCriticalSection(&mutex);
+    result = WaitForSingleObject(events[SIGNAL], timeout);
+    if(result == WAIT_OBJECT_0)
+        rtn = true;
+    EnterCriticalSection(&mutex);
+    return rtn;
+}
+
+bool ConditionalAccess::waitSignal(struct timespec *ts)
+{
+    assert(ts != NULL);
+
+    return waitSignal((timeout_t)(ts->tv_sec * 1000 + (ts->tv_nsec / 1000000l)));
+}
+
+
+bool ConditionalAccess::waitBroadcast(timeout_t timeout)
+{
+    int result;
+    bool rtn = true;
+
+    if(!timeout)
+        return false;
+
+    EnterCriticalSection(&mlock);
+    ++waiting;
+    LeaveCriticalSection(&mlock);
+    LeaveCriticalSection(&mutex);
+    result = WaitForSingleObject(events[BROADCAST], timeout);
+    EnterCriticalSection(&mlock);
+    --waiting;
+    if(result == WAIT_OBJECT_0)
+        rtn = true;
+    result = ((result == WAIT_OBJECT_0) && (waiting == 0));
+    LeaveCriticalSection(&mlock);
+    if(result)
+        ResetEvent(&events[BROADCAST]);
+    EnterCriticalSection(&mutex);
+    return rtn;
+}
+
+bool ConditionalAccess::waitBroadcast(struct timespec *ts)
+{
+    assert(ts != NULL);
+
+    return waitBroadcast((timeout_t)(ts->tv_sec * 1000 + (ts->tv_nsec / 1000000l)));
+}
+
+#else
+
+ConditionalAccess::ConditionalAccess()
+{
+    waiting = pending = sharing = 0;
+#ifdef  __PTH__
+    pth_cond_init(&bcast);
+#else
+    crit(pthread_cond_init(&bcast, &attr.attr) == 0, "conditional init failed");
+#endif
+}
+
+ConditionalAccess::~ConditionalAccess()
+{
+#ifndef __PTH__
+    pthread_cond_destroy(&bcast);
+#endif
+}
+
+bool ConditionalAccess::waitSignal(timeout_t timeout)
+{
+    struct timespec ts;
+    set(&ts, timeout);
+    return waitSignal(&ts);
+}
+
+bool ConditionalAccess::waitBroadcast(struct timespec *ts)
+{
+    assert(ts != NULL);
+
+    if(pthread_cond_timedwait(&bcast, &mutex, ts) == ETIMEDOUT)
+        return false;
+
+    return true;
+}
+
+bool ConditionalAccess::waitBroadcast(timeout_t timeout)
+{
+    struct timespec ts;
+    set(&ts, timeout);
+    return waitBroadcast(&ts);
+}
+
+bool ConditionalAccess::waitSignal(struct timespec *ts)
+{
+    assert(ts != NULL);
+
+    if(pthread_cond_timedwait(&cond, &mutex, ts) == ETIMEDOUT)
+        return false;
+
+    return true;
+}
+
+#endif
+
+// abstract class never runs...
+bool Thread::is_active(void)
+{
+    return false;
+}
+
+bool JoinableThread::is_active(void)
+{
+#ifdef  _MSWINDOWS_
+    return (running != INVALID_HANDLE_VALUE) && !joining;
+#else
+    return running && !joining;
+#endif
+}
+
+bool DetachedThread::is_active(void)
+{
+    return active;
+}
+
+void ConditionalAccess::modify(void)
+{
+    lock();
+    while(sharing) {
+        ++pending;
+        waitSignal();
+        --pending;
+    }
+}
+
+void ConditionalAccess::commit(void)
+{
+    if(pending)
+        signal();
+    else if(waiting)
+        broadcast();
+    unlock();
+}
+
+void ConditionalAccess::access(void)
+{
+    lock();
+    assert(!max_sharing || sharing < max_sharing);
+    while(pending) {
+        ++waiting;
+        waitBroadcast();
+        --waiting;
+    }
+    ++sharing;
+    unlock();
+}
+
+void ConditionalAccess::release(void)
+{
+   lock();
+    assert(sharing);
+
+    --sharing;
+    if(pending && !sharing)
+        signal();
+    else if(waiting && !pending)
+        broadcast();
+    unlock();
+}
+
+RecursiveMutex::RecursiveMutex() :
+Conditional()
+{
+    lockers = 0;
+    waiting = 0;
+}
+
+void RecursiveMutex::_lock(void)
+{
+    lock();
+}
+
+void RecursiveMutex::_unlock(void)
+{
+    release();
+}
+
+bool RecursiveMutex::lock(timeout_t timeout)
+{
+    bool result = true;
+    struct timespec ts;
+    set(&ts, timeout);
+
+    Conditional::lock();
+    while(result && lockers) {
+        if(Thread::equal(locker, pthread_self()))
+            break;
+        ++waiting;
+        result = Conditional::wait(&ts);
+        --waiting;
+    }
+    if(!lockers) {
+        result = true;
+        locker = pthread_self();
+    }
+    else
+        result = false;
+    ++lockers;
+    Conditional::unlock();
+    return result;
+}
+
+void RecursiveMutex::lock(void)
+{
+    Conditional::lock();
+    while(lockers) {
+        if(Thread::equal(locker, pthread_self()))
+            break;
+        ++waiting;
+        Conditional::wait();
+        --waiting;
+    }
+    if(!lockers)
+        locker = pthread_self();
+    ++lockers;
+    Conditional::unlock();
+    return;
+}
+
+void RecursiveMutex::release(void)
+{
+    Conditional::lock();
+    --lockers;
+    if(!lockers && waiting)
+        Conditional::signal();
+    Conditional::unlock();
+}
+
+ThreadLock::ThreadLock() :
+ConditionalAccess()
+{
+    writers = 0;
+}
+
+void ThreadLock::_lock(void)
+{
+    modify();
+}
+
+void ThreadLock::_share(void)
+{
+    access();
+}
+
+void ThreadLock::_unlock(void)
+{
+    release();
+}
+
+bool ThreadLock::modify(timeout_t timeout)
+{
+    bool rtn = true;
+    struct timespec ts;
+
+    if(timeout && timeout != Timer::inf)
+        set(&ts, timeout);
+
+    lock();
+    while((writers || sharing) && rtn) {
+        if(writers && Thread::equal(writeid, pthread_self()))
+            break;
+        ++pending;
+        if(timeout == Timer::inf)
+            waitSignal();
+        else if(timeout)
+            rtn = waitSignal(&ts);
+        else
+            rtn = false;
+        --pending;
+    }
+    assert(!max_sharing || writers < max_sharing);
+    if(rtn) {
+        if(!writers)
+            writeid = pthread_self();
+        ++writers;
+    }
+    unlock();
+    return rtn;
+}
+
+bool ThreadLock::access(timeout_t timeout)
+{
+    struct timespec ts;
+    bool rtn = true;
+
+    if(timeout && timeout != Timer::inf)
+        set(&ts, timeout);
+
+    lock();
+    while((writers || pending) && rtn) {
+        ++waiting;
+        if(timeout == Timer::inf)
+            waitBroadcast();
+        else if(timeout)
+            rtn = waitBroadcast(&ts);
+        else
+            rtn = false;
+        --waiting;
+    }
+    assert(!max_sharing || sharing < max_sharing);
+    if(rtn)
+        ++sharing;
+    unlock();
+    return rtn;
+}
+
+void ThreadLock::release(void)
+{
+    lock();
+    assert(sharing || writers);
+
+    if(writers) {
+        assert(!sharing);
+        --writers;
+        if(pending && !writers)
+            signal();
+        else if(waiting && !writers)
+            broadcast();
+        unlock();
+        return;
+    }
+    if(sharing) {
+        assert(!writers);
+        --sharing;
+        if(pending && !sharing)
+            signal();
+        else if(waiting && !pending)
+            broadcast();
+    }
+    unlock();
+}
+
+auto_protect::auto_protect()
+{
+    object = NULL;
+}
+
+auto_protect::auto_protect(const void *obj)
+{
+    object = obj;
+    if(object)
+        Mutex::protect(obj);
+}
+
+auto_protect::~auto_protect()
+{
+    release();
+}
+
+void auto_protect::release()
+{
+    if(object) {
+        Mutex::release(object);
+        object = NULL;
+    }
+}
+
+void auto_protect::operator=(const void *obj)
+{
+    if(obj == object)
+        return;
+
+    release();
+    object = obj;
+    if(object)
+        Mutex::protect(object);
+}
+
+Mutex::guard::guard()
+{
+    object = NULL;
+}
+
+Mutex::guard::guard(const void *obj)
+{
+    object = obj;
+    if(obj)
+        Mutex::protect(object);
+}
+
+Mutex::guard::~guard()
+{
+    release();
+}
+
+void Mutex::guard::set(const void *obj)
+{
+    release();
+    object = obj;
+    if(obj)
+        Mutex::protect(object);
+}
+
+void Mutex::guard::release(void)
+{
+    if(object) {
+        Mutex::release(object);
+        object = NULL;
+    }
+}
+
+Mutex::Mutex()
+{
+#ifdef  __PTH__
+    pth_mutex_init(&mlock);
+#else
+    crit(pthread_mutex_init(&mlock, NULL) == 0, "mutex init failed");
+#endif
+}
+
+Mutex::~Mutex()
+{
+    pthread_mutex_destroy(&mlock);
+}
+
+void Mutex::indexing(unsigned index)
+{
+    if(index > 1) {
+        mutex_table = new mutex_index[index];
+        mutex_indexing = index;
+    }
+}
+
+void ThreadLock::indexing(unsigned index)
+{
+    if(index > 1) {
+        rwlock_table = new rwlock_index[index];
+        rwlock_indexing = index;
+    }
+}
+
+ThreadLock::guard_reader::guard_reader()
+{
+    object = NULL;
+}
+
+ThreadLock::guard_reader::guard_reader(const void *obj)
+{
+    object = obj;
+    if(obj)
+        if(!ThreadLock::reader(object))
+            object = NULL;
+}
+
+ThreadLock::guard_reader::~guard_reader()
+{
+    release();
+}
+
+void ThreadLock::guard_reader::set(const void *obj)
+{
+    release();
+    object = obj;
+    if(obj)
+        if(!ThreadLock::reader(object))
+            object = NULL;
+}
+
+void ThreadLock::guard_reader::release(void)
+{
+    if(object) {
+        ThreadLock::release(object);
+        object = NULL;
+    }
+}
+
+ThreadLock::guard_writer::guard_writer()
+{
+    object = NULL;
+}
+
+ThreadLock::guard_writer::guard_writer(const void *obj)
+{
+    object = obj;
+    if(obj)
+        if(!ThreadLock::writer(object))
+            object = NULL;
+}
+
+ThreadLock::guard_writer::~guard_writer()
+{
+    release();
+}
+
+void ThreadLock::guard_writer::set(const void *obj)
+{
+    release();
+    object = obj;
+    if(obj)
+        if(!ThreadLock::writer(object))
+            object = NULL;
+}
+
+void ThreadLock::guard_writer::release(void)
+{
+    if(object) {
+        ThreadLock::release(object);
+        object = NULL;
+    }
+}
+
+bool ThreadLock::reader(const void *ptr, timeout_t timeout)
+{
+    rwlock_index *index = &rwlock_table[hash_address(ptr, rwlock_indexing)];
+    rwlock_entry *entry, *empty = NULL;
+
+    if(!ptr)
+        return false;
+
+    index->acquire();
+    entry = index->list;
+    while(entry) {
+        if(entry->count && entry->object == ptr)
+            break;
+        if(!entry->count)
+            empty = entry;
+        entry = entry->next;
+    }
+    if(!entry) {
+        if(empty)
+            entry = empty;
+        else {
+            entry = new rwlock_entry;
+            entry->next = index->list;
+            index->list = entry;
+        }
+    }
+    entry->object = ptr;
+    ++entry->count;
+    index->release();
+    if(entry->access(timeout))
+        return true;
+    index->acquire();
+    --entry->count;
+    index->release();
+    return false;
+}
+
+bool ThreadLock::writer(const void *ptr, timeout_t timeout)
+{
+    rwlock_index *index = &rwlock_table[hash_address(ptr, rwlock_indexing)];
+    rwlock_entry *entry, *empty = NULL;
+
+    if(!ptr)
+        return false;
+
+    index->acquire();
+    entry = index->list;
+    while(entry) {
+        if(entry->count && entry->object == ptr)
+            break;
+        if(!entry->count)
+            empty = entry;
+        entry = entry->next;
+    }
+    if(!entry) {
+        if(empty)
+            entry = empty;
+        else {
+            entry = new rwlock_entry;
+            entry->next = index->list;
+            index->list = entry;
+        }
+    }
+    entry->object = ptr;
+    ++entry->count;
+    index->release();
+    if(entry->modify(timeout))
+        return true;
+    index->acquire();
+    --entry->count;
+    index->release();
+    return false;
+}
+
+void Mutex::protect(const void *ptr)
+{
+    mutex_index *index = &mutex_table[hash_address(ptr, mutex_indexing)];
+    mutex_entry *entry, *empty = NULL;
+
+    if(!ptr)
+        return;
+
+    index->acquire();
+    entry = index->list;
+    while(entry) {
+        if(entry->count && entry->pointer == ptr)
+            break;
+        if(!entry->count)
+            empty = entry;
+        entry = entry->next;
+    }
+    if(!entry) {
+        if(empty)
+            entry = empty;
+        else {
+            entry = new struct mutex_entry;
+            entry->count = 0;
+            pthread_mutex_init(&entry->mutex, NULL);
+            entry->next = index->list;
+            index->list = entry;
+        }
+    }
+    entry->pointer = ptr;
+    ++entry->count;
+//  printf("ACQUIRE %p, THREAD %d, POINTER %p, COUNT %d\n", entry, Thread::self(), entry->pointer, entry->count);
+    index->release();
+    pthread_mutex_lock(&entry->mutex);
+}
+
+void ThreadLock::release(const void *ptr)
+{
+    rwlock_index *index = &rwlock_table[hash_address(ptr, rwlock_indexing)];
+    rwlock_entry *entry;
+
+    if(!ptr)
+        return;
+
+    index->acquire();
+    entry = index->list;
+    while(entry) {
+        if(entry->count && entry->object == ptr)
+            break;
+        entry = entry->next;
+    }
+
+    assert(entry);
+    if(entry) {
+        entry->release();
+        --entry->count;
+    }
+    index->release();
+}
+
+void Mutex::release(const void *ptr)
+{
+    mutex_index *index = &mutex_table[hash_address(ptr, mutex_indexing)];
+    mutex_entry *entry;
+
+    if(!ptr)
+        return;
+
+    index->acquire();
+    entry = index->list;
+    while(entry) {
+        if(entry->count && entry->pointer == ptr)
+            break;
+        entry = entry->next;
+    }
+
+    assert(entry);
+    if(entry) {
+//      printf("RELEASE %p, THREAD %d, POINTER %p COUNT %d\n", entry, Thread::self(), entry->pointer, entry->count);
+        pthread_mutex_unlock(&entry->mutex);
+        --entry->count;
+    }
+    index->release();
+}
+
+void Mutex::_lock(void)
+{
+    pthread_mutex_lock(&mlock);
+}
+
+void Mutex::_unlock(void)
+{
+    pthread_mutex_unlock(&mlock);
+}
+
+#ifdef  _MSWINDOWS_
+
+TimedEvent::TimedEvent() :
+Timer()
+{
+    event = CreateEvent(NULL, FALSE, FALSE, NULL);
+    InitializeCriticalSection(&mutex);
+    set();
+}
+
+TimedEvent::~TimedEvent()
+{
+    if(event != INVALID_HANDLE_VALUE) {
+        CloseHandle(event);
+        event = INVALID_HANDLE_VALUE;
+    }
+    DeleteCriticalSection(&mutex);
+}
+
+TimedEvent::TimedEvent(timeout_t timeout) :
+Timer(timeout)
+{
+    event = CreateEvent(NULL, FALSE, FALSE, NULL);
+    InitializeCriticalSection(&mutex);
+}
+
+TimedEvent::TimedEvent(time_t timer) :
+Timer(timer)
+{
+    event = CreateEvent(NULL, FALSE, FALSE, NULL);
+    InitializeCriticalSection(&mutex);
+}
+
+void TimedEvent::signal(void)
+{
+    SetEvent(event);
+}
+
+void TimedEvent::reset(void)
+{
+    set();
+    ResetEvent(event);
+}
+
+bool TimedEvent::sync(void)
+{
+    int result;
+    timeout_t timeout;
+
+    timeout = get();
+    if(!timeout)
+        return false;
+
+    LeaveCriticalSection(&mutex);
+    result = WaitForSingleObject(event, timeout);
+    EnterCriticalSection(&mutex);
+    if(result != WAIT_OBJECT_0)
+        return true;
+    return false;
+}
+
+bool TimedEvent::wait(timeout_t timer)
+{
+    int result;
+    timeout_t timeout;
+
+    if(timer)
+        operator+=(timer);
+
+    timeout = get();
+    if(!timeout)
+        return false;
+
+    result = WaitForSingleObject(event, timeout);
+    if(result == WAIT_OBJECT_0)
+        return true;
+    return false;
+}
+
+void TimedEvent::wait(void)
+{
+    WaitForSingleObject(event, INFINITE);
+}
+
+#else
+
+TimedEvent::TimedEvent() :
+Timer()
+{
+    signalled = false;
+#ifdef  __PTH__
+    Thread::init();
+    pth_cond_init(&cond);
+    pth_mutex_init(&mutex);
+#else
+    crit(pthread_cond_init(&cond, Conditional::initializer()) == 0, "conditional init failed");
+    crit(pthread_mutex_init(&mutex, NULL) == 0, "mutex init failed");
+#endif
+    set();
+}
+
+TimedEvent::TimedEvent(timeout_t timeout) :
+Timer(timeout)
+{
+    signalled = false;
+#ifdef  __PTH__
+    Thread::init();
+    pth_cond_init(&cond);
+    pth_mutex_init(&mutex);
+#else
+    crit(pthread_cond_init(&cond, Conditional::initializer()) == 0, "conditional init failed");
+    crit(pthread_mutex_init(&mutex, NULL) == 0, "mutex init failed");
+#endif
+}
+
+TimedEvent::TimedEvent(time_t timer) :
+Timer(timer)
+{
+    signalled = false;
+#ifdef  __PTH__
+    Thread::init();
+    pth_cond_init(&cond);
+    pth_mutex_init(&mutex);
+#else
+    crit(pthread_cond_init(&cond, Conditional::initializer()) == 0, "conditional init failed");
+    crit(pthread_mutex_init(&mutex, NULL) == 0, "mutex init failed");
+#endif
+}
+
+TimedEvent::~TimedEvent()
+{
+#ifndef __PTH__
+    pthread_cond_destroy(&cond);
+    pthread_mutex_destroy(&mutex);
+#endif
+}
+
+void TimedEvent::reset(void)
+{
+    pthread_mutex_lock(&mutex);
+    signalled = false;
+    set();
+    pthread_mutex_unlock(&mutex);
+}
+
+void TimedEvent::signal(void)
+{
+    pthread_mutex_lock(&mutex);
+    signalled = true;
+    pthread_cond_signal(&cond);
+    pthread_mutex_unlock(&mutex);
+}
+
+bool TimedEvent::sync(void)
+{
+    timeout_t timeout = get();
+    struct timespec ts;
+
+    if(signalled) {
+        signalled = false;
+        return true;
+    }
+
+    if(!timeout)
+        return false;
+
+    Conditional::set(&ts, timeout);
+
+    if(pthread_cond_timedwait(&cond, &mutex, &ts) == ETIMEDOUT)
+        return false;
+
+    signalled = false;
+    return true;
+}
+
+void TimedEvent::wait(void)
+{
+    pthread_mutex_lock(&mutex);
+    if(signalled)
+        signalled = false;
+    else
+        pthread_cond_wait(&cond, &mutex);
+    pthread_mutex_unlock(&mutex);
+}
+
+bool TimedEvent::wait(timeout_t timeout)
+{
+    bool result = true;
+
+    pthread_mutex_lock(&mutex);
+    operator+=(timeout);
+    result = sync();
+    pthread_mutex_unlock(&mutex);
+    return result;
+}
+#endif
+
+void TimedEvent::lock(void)
+{
+    pthread_mutex_lock(&mutex);
+}
+
+void TimedEvent::release(void)
+{
+    pthread_mutex_unlock(&mutex);
+}
+
+ConditionalLock::ConditionalLock() :
+ConditionalAccess()
+{
+    contexts = NULL;
+}
+
+ConditionalLock::~ConditionalLock()
+{
+    linked_pointer<Context> cp = contexts, next;
+    while(cp) {
+        next = cp->getNext();
+        delete *cp;
+        cp = next;
+    }
+}
+
+ConditionalLock::Context *ConditionalLock::getContext(void)
+{
+    Context *slot = NULL;
+    pthread_t tid = Thread::self();
+    linked_pointer<Context> cp = contexts;
+
+    while(cp) {
+        if(cp->count && Thread::equal(cp->thread, tid))
+            return *cp;
+        if(!cp->count)
+            slot = *cp;
+        cp.next();
+    }
+    if(!slot) {
+        slot = new Context(&this->contexts);
+        slot->count = 0;
+    }
+    slot->thread = tid;
+    return slot;
+}
+
+void ConditionalLock::_share(void)
+{
+    access();
+}
+
+void ConditionalLock::_unlock(void)
+{
+    release();
+}
+
+void ConditionalLock::modify(void)
+{
+    Context *context;
+
+    lock();
+    context = getContext();
+
+    assert(context && sharing >= context->count);
+
+    sharing -= context->count;
+    while(sharing) {
+        ++pending;
+        waitSignal();
+        --pending;
+    }
+    ++context->count;
+}
+
+void ConditionalLock::commit(void)
+{
+    Context *context = getContext();
+    --context->count;
+
+    if(context->count) {
+        sharing += context->count;
+        unlock();
+    }
+    else
+        ConditionalAccess::commit();
+}
+
+void ConditionalLock::release(void)
+{
+    Context *context;
+
+    lock();
+    context = getContext();
+    assert(sharing && context && context->count > 0);
+    --sharing;
+    --context->count;
+    if(pending && !sharing)
+        signal();
+    else if(waiting && !pending)
+        broadcast();
+    unlock();
+}
+
+void ConditionalLock::access(void)
+{
+    Context *context;
+    lock();
+    context = getContext();
+    assert(context && (!max_sharing || sharing < max_sharing));
+
+    // reschedule if pending exclusives to make sure modify threads are not
+    // starved.
+
+    ++context->count;
+
+    while(context->count < 2 && pending) {
+        ++waiting;
+        waitBroadcast();
+        --waiting;
+    }
+    ++sharing;
+    unlock();
+}
+
+void ConditionalLock::exclusive(void)
+{
+    Context *context;
+
+    lock();
+    context = getContext();
+    assert(sharing && context && context->count > 0);
+    sharing -= context->count;
+    while(sharing) {
+        ++pending;
+        waitSignal();
+        --pending;
+    }
+}
+
+void ConditionalLock::share(void)
+{
+    Context *context = getContext();
+    assert(!sharing && context && context->count);
+    sharing += context->count;
+    unlock();
+}
+
+barrier::barrier(unsigned limit) :
+Conditional()
+{
+    count = limit;
+    waits = 0;
+}
+
+barrier::~barrier()
+{
+    lock();
+    if(waits)
+        broadcast();
+    unlock();
+}
+
+void barrier::set(unsigned limit)
+{
+    assert(limit > 0);
+
+    lock();
+    count = limit;
+    if(count <= waits) {
+        waits = 0;
+        broadcast();
+    }
+    unlock();
+}
+
+void barrier::dec(void)
+{
+    lock();
+    if(count)
+        --count;
+    unlock();
+}
+
+unsigned barrier::operator--(void)
+{
+    unsigned result;
+    lock();
+    if(count)
+        --count;
+    result = count;
+    unlock();
+    return result;
+}
+
+void barrier::inc(void)
+{
+    lock();
+    count++;
+    if(count <= waits) {
+        waits = 0;
+        broadcast();
+    }
+    unlock();
+}
+
+unsigned barrier::operator++(void)
+{
+    unsigned result;
+    lock();
+    count++;
+    if(count <= waits) {
+        waits = 0;
+        broadcast();
+    }
+    result = count;
+    unlock();
+    return result;
+}
+
+bool barrier::wait(timeout_t timeout)
+{
+    bool result;
+
+    Conditional::lock();
+    if(!count) {
+        Conditional::unlock();
+        return true;
+    }
+    if(++waits >= count) {
+        waits = 0;
+        Conditional::broadcast();
+        Conditional::unlock();
+        return true;
+    }
+    result = Conditional::wait(timeout);
+    Conditional::unlock();
+    return result;
+}
+
+void barrier::wait(void)
+{
+    Conditional::lock();
+    if(!count) {
+        Conditional::unlock();
+        return;
+    }
+    if(++waits >= count) {
+        waits = 0;
+        Conditional::broadcast();
+        Conditional::unlock();
+        return;
+    }
+    Conditional::wait();
+    Conditional::unlock();
+}
+
+LockedPointer::LockedPointer()
+{
+#ifdef  _MSWINDOWS_
+    InitializeCriticalSection(&mutex);
+#else
+#ifdef  __PTH__
+    static pthread_mutex_t lock = PTH_MUTEX_INIT;
+#else
+    static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
+#endif
+    memcpy(&mutex, &lock, sizeof(mutex));
+#endif
+    pointer = NULL;
+}
+
+void LockedPointer::replace(ObjectProtocol *obj)
+{
+    assert(obj != NULL);
+
+    pthread_mutex_lock(&mutex);
+    obj->retain();
+    if(pointer)
+        pointer->release();
+    pointer = obj;
+    pthread_mutex_unlock(&mutex);
+}
+
+ObjectProtocol *LockedPointer::dup(void)
+{
+    ObjectProtocol *temp;
+    pthread_mutex_lock(&mutex);
+    temp = pointer;
+    if(temp)
+        temp->retain();
+    pthread_mutex_unlock(&mutex);
+    return temp;
+}
+
+SharedObject::~SharedObject()
+{
+}
+
+SharedPointer::SharedPointer() :
+ConditionalAccess()
+{
+    pointer = NULL;
+}
+
+SharedPointer::~SharedPointer()
+{
+}
+
+void SharedPointer::replace(SharedObject *ptr)
+{
+    modify();
+
+    if(pointer)
+        delete pointer;
+    pointer = ptr;
+    if(ptr)
+        ptr->commit(this);
+
+    commit();
+}
+
+SharedObject *SharedPointer::share(void)
+{
+    access();
+    return pointer;
+}
+
+Thread::Thread(size_t size)
+{
+    stack = size;
+    priority = 0;
+#ifdef  _MSWINDOWS_
+    cancellor = INVALID_HANDLE_VALUE;
+#else
+    cancellor = NULL;
+#endif
+    init();
+}
+
+#if defined(_MSWINDOWS_)
+
+void Thread::setPriority(void)
+{
+    HANDLE hThread = GetCurrentThread();
+    priority += THREAD_PRIORITY_NORMAL;
+    if(priority < THREAD_PRIORITY_LOWEST)
+        priority = THREAD_PRIORITY_LOWEST;
+    else if(priority > THREAD_PRIORITY_HIGHEST)
+        priority = THREAD_PRIORITY_HIGHEST;
+
+    SetThreadPriority(hThread, priority);
+}
+#elif _POSIX_PRIORITY_SCHEDULING > 0
+
+void Thread::setPriority(void)
+{
+#ifndef __PTH__
+    int policy;
+    struct sched_param sp;
+    pthread_t ptid = pthread_self();
+    int pri = 0;
+
+    if(!priority)
+        return;
+
+    if(pthread_getschedparam(ptid, &policy, &sp))
+        return;
+
+    if(priority > 0) {
+        policy = realtime_policy;
+        if(realtime_policy == SCHED_OTHER)
+            pri = sp.sched_priority + priority;
+        else
+            pri = sched_get_priority_min(policy) + priority;
+        policy = realtime_policy;
+        if(pri > sched_get_priority_max(policy))
+            pri = sched_get_priority_max(policy);
+    } else if(priority < 0) {
+        pri = sp.sched_priority - priority;
+        if(pri < sched_get_priority_min(policy))
+            pri = sched_get_priority_min(policy);
+    }
+
+    sp.sched_priority = pri;
+    pthread_setschedparam(ptid, policy, &sp);
+#endif
+}
+
+#else
+void Thread::setPriority(void) {}
+#endif
+
+void Thread::concurrency(int level)
+{
+#if defined(HAVE_PTHREAD_SETCONCURRENCY) && !defined(_MSWINDOWS_) && !defined(ANDROID)
+    pthread_setconcurrency(level);
+#endif
+}
+
+void Thread::policy(int polid)
+{
+#if _POSIX_PRIORITY_SCHEDULING > 0
+    realtime_policy = polid;
+#endif
+}
+
+JoinableThread::JoinableThread(size_t size)
+{
+#ifdef  _MSWINDOWS_
+    cancellor = INVALID_HANDLE_VALUE;
+    running = INVALID_HANDLE_VALUE;
+    joining = false;
+#else
+    joining = false;
+    running = false;
+    cancellor = NULL;
+#endif
+    stack = size;
+}
+
+DetachedThread::DetachedThread(size_t size)
+{
+#ifdef  _MSWINDOWS_
+    cancellor = INVALID_HANDLE_VALUE;
+#else
+    cancellor = NULL;
+#endif
+    active = false;
+    stack = size;
+}
+
+void Thread::sleep(timeout_t timeout)
+{
+#if defined(__PTH__)
+    pth_usleep(timeout * 1000);
+#elif defined(HAVE_PTHREAD_DELAY)
+    timespec ts;
+    ts.tv_sec = timeout / 1000l;
+    ts.tv_nsec = (timeout % 1000l) * 1000000l;
+    pthread_delay(&ts);
+#elif defined(HAVE_PTHREAD_DELAY_NP)
+    timespec ts;
+    ts.tv_sec = timeout / 1000l;
+    ts.tv_nsec = (timeout % 1000l) * 1000000l;
+    pthread_delay_np(&ts);
+#elif defined(_MSWINDOWS_)
+    ::Sleep(timeout);
+#else
+    usleep(timeout * 1000);
+#endif
+}
+
+void Thread::yield(void)
+{
+#if defined(_MSWINDOWS_)
+    SwitchToThread();
+#elif defined(__PTH__)
+    pth_yield(NULL);
+#elif defined(HAVE_PTHREAD_YIELD_NP) && !defined(ANDROID)
+    pthread_yield_np();
+#elif defined(HAVE_PTHREAD_YIELD) && !defined(ANDROID)
+    pthread_yield();
+#else
+    sched_yield();
+#endif
+}
+
+void DetachedThread::exit(void)
+{
+    delete this;
+    pthread_exit(NULL);
+}
+
+Thread::~Thread()
+{
+}
+
+JoinableThread::~JoinableThread()
+{
+    join();
+}
+
+DetachedThread::~DetachedThread()
+{
+}
+
+extern "C" {
+#ifdef  _MSWINDOWS_
+    static unsigned __stdcall exec_thread(void *obj) {
+        assert(obj != NULL);
+
+        Thread *th = static_cast<Thread *>(obj);
+        th->setPriority();
+        th->run();
+        th->exit();
+        return 0;
+    }
+#else
+    static void *exec_thread(void *obj)
+    {
+        assert(obj != NULL);
+
+        Thread *th = static_cast<Thread *>(obj);
+        th->setPriority();
+        th->run();
+        th->exit();
+        return NULL;
+    }
+#endif
+}
+
+#ifdef  _MSWINDOWS_
+void JoinableThread::start(int adj)
+{
+    if(running != INVALID_HANDLE_VALUE)
+        return;
+
+    priority = adj;
+
+    if(stack == 1)
+        stack = 1024;
+
+    joining = false;
+    running = (HANDLE)_beginthreadex(NULL, stack, &exec_thread, this, 0, (unsigned int *)&tid);
+    if(!running)
+        running = INVALID_HANDLE_VALUE;
+}
+
+void DetachedThread::start(int adj)
+{
+    HANDLE hThread;;
+
+    priority = adj;
+
+    if(stack == 1)
+        stack = 1024;
+
+    hThread = (HANDLE)_beginthreadex(NULL, stack, &exec_thread, this, 0, (unsigned int *)&tid);
+    if(hThread != INVALID_HANDLE_VALUE)
+        active = true;
+    CloseHandle(hThread);
+}
+
+void JoinableThread::join(void)
+{
+    pthread_t self = pthread_self();
+    int rc;
+
+    // already joined, so we ignore...
+    if(running == INVALID_HANDLE_VALUE)
+        return;
+
+    // self join does cleanup...
+    if(equal(tid, self)) {
+        CloseHandle(running);
+        running = INVALID_HANDLE_VALUE;
+        Thread::exit();
+    }
+
+    joining = true;
+    rc = WaitForSingleObject(running, INFINITE);
+    if(rc == WAIT_OBJECT_0 || rc == WAIT_ABANDONED) {
+        CloseHandle(running);
+        running = INVALID_HANDLE_VALUE;
+    }
+}
+
+#else
+
+void JoinableThread::start(int adj)
+{
+    int result;
+
+    if(running)
+        return;
+
+    joining = false;
+    priority = adj;
+
+#ifndef __PTH__
+    pthread_attr_t attr;
+    pthread_attr_init(&attr);
+    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
+    #ifndef ANDROID
+    pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);
+    #endif
+#endif
+// we typically use "stack 1" for min stack...
+#ifdef  PTHREAD_STACK_MIN
+    if(stack && stack < PTHREAD_STACK_MIN)
+        stack = PTHREAD_STACK_MIN;
+#else
+    if(stack && stack < 2)
+        stack = 0;
+#endif
+#ifdef  __PTH__
+    pth_attr_t attr = PTH_ATTR_DEFAULT;
+    pth_attr_set(attr, PTH_ATTR_JOINABLE);
+    tid = pth_spawn(attr, &exec_thread, this);
+#else
+    if(stack)
+        pthread_attr_setstacksize(&attr, stack);
+    result = pthread_create(&tid, &attr, &exec_thread, this);
+    pthread_attr_destroy(&attr);
+    if(!result)
+        running = true;
+#endif
+}
+
+void DetachedThread::start(int adj)
+{
+    priority = adj;
+#ifndef __PTH__
+    pthread_attr_t attr;
+    pthread_attr_init(&attr);
+    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+    #ifndef ANDROID
+    pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);
+    #endif
+#endif
+// we typically use "stack 1" for min stack...
+#ifdef  PTHREAD_STACK_MIN
+    if(stack && stack < PTHREAD_STACK_MIN)
+        stack = PTHREAD_STACK_MIN;
+#else
+    if(stack && stack < 2)
+        stack = 0;
+#endif
+#ifdef  __PTH__
+    tid = pth_spawn(PTH_ATTR_DEFAULT, &exec_thread, this);
+#else
+    if(stack)
+        pthread_attr_setstacksize(&attr, stack);
+    pthread_create(&tid, &attr, &exec_thread, this);
+    pthread_attr_destroy(&attr);
+#endif
+    active = true;
+}
+
+void JoinableThread::join(void)
+{
+    pthread_t self = pthread_self();
+
+    // already joined, so we ignore...
+    if(!running)
+        return;
+
+    if(equal(tid, self)) {
+        running = false;
+        Thread::exit();
+    }
+
+    joining = true;
+
+#ifdef  __PTH__
+    if(pth_join(tid, NULL))
+        running = false;
+#else
+    if(!pthread_join(tid, NULL))
+        running = false;
+#endif
+}
+
+#endif
+
+void Thread::exit(void)
+{
+    pthread_exit(NULL);
+}
+
+locked_release::locked_release(const locked_release &copy)
+{
+    object = copy.object;
+    object->retain();
+}
+
+locked_release::locked_release()
+{
+    object = NULL;
+}
+
+locked_release::locked_release(LockedPointer &p)
+{
+    object = p.dup();
+}
+
+locked_release::~locked_release()
+{
+    release();
+}
+
+void locked_release::release(void)
+{
+    if(object)
+        object->release();
+    object = NULL;
+}
+
+locked_release &locked_release::operator=(LockedPointer &p)
+{
+    release();
+    object = p.dup();
+    return *this;
+}
+
+shared_release::shared_release(const shared_release &copy)
+{
+    ptr = copy.ptr;
+}
+
+shared_release::shared_release()
+{
+    ptr = NULL;
+}
+
+SharedObject *shared_release::get(void)
+{
+    if(ptr)
+        return ptr->pointer;
+    return NULL;
+}
+
+void SharedObject::commit(SharedPointer *spointer)
+{
+}
+
+shared_release::shared_release(SharedPointer &p)
+{
+    ptr = &p;
+    p.share(); // create rdlock
+}
+
+shared_release::~shared_release()
+{
+    release();
+}
+
+void shared_release::release(void)
+{
+    if(ptr)
+        ptr->release();
+    ptr = NULL;
+}
+
+shared_release &shared_release::operator=(SharedPointer &p)
+{
+    release();
+    ptr = &p;
+    p.share();
+    return *this;
+}
+
+void Thread::map(void)
+{
+    Thread::init();
+#ifdef  __PTH__
+    pth_key_setdata(threadmap, this);
+#else
+#ifdef  _MSWINDOWS_
+    TlsSetValue(threadmap, this);
+#else
+    pthread_setspecific(threadmap, this);
+#endif
+#endif
+}
+
+Thread *Thread::get(void)
+{
+#ifdef  __PTH__
+    return (Thread *)pth_key_setdata(threadmap);
+#else
+#ifdef  _MSWINDOWS_
+    return (Thread *)TlsGetValue(threadmap);
+#else
+    return (Thread *)pthread_getspecific(threadmap);
+#endif
+#endif
+}
+
+void Thread::init(void)
+{
+    static volatile bool initialized = false;
+
+    if(!initialized) {
+#ifdef  __PTH__
+        pth_init();
+        pth_key_create(&threadmap, NULL);
+        atexit(pthread_shutdown);
+#else
+#ifdef  _MSWINDOWS_
+        threadmap = TlsAlloc();
+#else
+        pthread_key_create(&threadmap, NULL);
+#endif
+#endif
+        initialized = true;
+    }
+}
+
+#ifdef  __PTH__
+pthread_t Thread::self(void)
+{
+    return pth_self();
+}
+#else
+pthread_t Thread::self(void)
+{
+    return pthread_self();
+}
+#endif
+
+
diff --git a/jni/libucommon/sources/corelib/timer.cpp b/jni/libucommon/sources/corelib/timer.cpp
new file mode 100644
index 0000000..3bacec6
--- /dev/null
+++ b/jni/libucommon/sources/corelib/timer.cpp
@@ -0,0 +1,502 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/timers.h>
+#include <ucommon/thread.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+extern int _posix_clocking;
+#endif
+
+static long _difftime(time_t ref)
+{
+    time_t now;
+    time(&now);
+
+    return (long)difftime(ref, now);
+}
+
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+static void adj(struct timespec *ts)
+{
+    assert(ts != NULL);
+
+    if(ts->tv_nsec >= 1000000000l)
+        ts->tv_sec += (ts->tv_nsec / 1000000000l);
+    ts->tv_nsec %= 1000000000l;
+    if(ts->tv_nsec < 0)
+        ts->tv_nsec = -ts->tv_nsec;
+}
+#else
+static void adj(struct timeval *ts)
+{
+    assert(ts != NULL);
+
+    if(ts->tv_usec >= 1000000l)
+        ts->tv_sec += (ts->tv_usec / 1000000l);
+    ts->tv_usec %= 1000000l;
+    if(ts->tv_usec < 0)
+        ts->tv_usec = -ts->tv_usec;
+}
+#endif
+
+#ifdef  WIN32
+#ifdef  _WIN32_WCE
+extern "C" int gettimeofday(struct timeval *tv_,  void *tz_)
+{
+    assert(tv_ != NULL);
+
+    // We could use _ftime(), but it is not available on WinCE.
+    // (WinCE also lacks time.h)
+    // Note also that the average error of _ftime is around 20 ms :)
+    DWORD ms = GetTickCount();
+    tv_->tv_sec = ms / 1000;
+    tv_->tv_usec = ms * 1000;
+    return 0;
+}
+#else
+#ifdef  HAVE_SYS_TIMEB_H
+#include <sys/timeb.h>
+#endif
+
+extern "C" int gettimeofday(struct timeval *tv_, void *tz_)
+{
+    assert(tv_ != NULL);
+
+#if defined(_MSC_VER) && _MSC_VER >= 1300
+    struct __timeb64 tb;
+    _ftime64(&tb);
+#else
+# ifndef __BORLANDC__
+    struct _timeb tb;
+    _ftime(&tb);
+# else
+    struct timeb tb;
+    ftime(&tb);
+# endif
+#endif
+    tv_->tv_sec = (long)tb.time;
+    tv_->tv_usec = tb.millitm * 1000;
+    return 0;
+}
+#endif
+#endif
+
+#if _MSC_VER > 1400        // windows broken dll linkage issue...
+#else
+const timeout_t Timer::inf = ((timeout_t)(-1));
+const time_t Timer::reset = ((time_t)0);
+#endif
+
+TimerQueue::event::event(timeout_t timeout) :
+Timer(), LinkedList()
+{
+    set(timeout);
+}
+
+TimerQueue::event::event(TimerQueue *tq, timeout_t timeout) :
+Timer(), LinkedList()
+{
+    set(timeout);
+    Timer::update();
+    attach(tq);
+}
+
+TimerQueue::event::~event()
+{
+    detach();
+}
+
+Timer::Timer()
+{
+    clear();
+}
+
+Timer::Timer(timeout_t in)
+{
+    set();
+    operator+=(in);
+}
+
+Timer::Timer(const Timer& copy)
+{
+    timer = copy.timer;
+}
+
+Timer::Timer(time_t in)
+{
+    set();
+    timer.tv_sec += _difftime(in);
+}
+
+#ifdef  _MSWINDOWS_
+
+Timer::tick_t Timer::ticks(void)
+{
+    ULARGE_INTEGER timer;
+
+    GetSystemTimeAsFileTime((FILETIME*)&timer);
+    timer.QuadPart +=
+        (tick_t) (6893856000000000);
+    return timer.QuadPart;
+}
+
+#else
+
+Timer::tick_t Timer::ticks(void)
+{
+    struct timeval tv;
+    gettimeofday(&tv, NULL);
+    return ((tick_t)tv.tv_sec * (tick_t)10000000) +
+        ((tick_t)tv.tv_usec * 10) + (((tick_t)0x01B21DD2) << 32) + (tick_t)0x13814000;
+}
+#endif
+
+void Timer::set(timeout_t timeout)
+{
+    set();
+    operator+=(timeout);
+}
+
+void Timer::set(time_t time)
+{
+    set();
+    timer.tv_sec += _difftime(time);
+}
+
+void TimerQueue::event::attach(TimerQueue *tq)
+{
+    if(tq == list())
+        return;
+
+    detach();
+    if(!tq)
+        return;
+
+    tq->modify();
+    enlist(tq);
+    Timer::update();
+    tq->update();
+}
+
+void TimerQueue::event::arm(timeout_t timeout)
+{
+    TimerQueue *tq = list();
+    if(tq)
+        tq->modify();
+    set(timeout);
+    if(tq)
+        tq->update();
+}
+
+void TimerQueue::event::disarm(void)
+{
+    TimerQueue *tq = list();
+    bool flag = is_active();
+
+    if(tq && flag)
+        tq->modify();
+    clear();
+    if(tq && flag)
+        tq->update();
+}
+
+void TimerQueue::event::update(void)
+{
+    TimerQueue *tq = list();
+    if(Timer::update() && tq) {
+        tq->modify();
+        tq->update();
+    }
+}
+
+void TimerQueue::event::detach(void)
+{
+    TimerQueue *tq = list();
+    if(tq) {
+        tq->modify();
+        clear();
+        delist();
+        tq->update();
+    }
+}
+
+void Timer::set(void)
+{
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+    clock_gettime(_posix_clocking, &timer);
+#else
+    gettimeofday(&timer, NULL);
+#endif
+    updated = true;
+}
+
+void Timer::clear(void)
+{
+    timer.tv_sec = 0;
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+    timer.tv_nsec = 0;
+#else
+    timer.tv_usec = 0;
+#endif
+    updated = false;
+}
+
+bool Timer::update(void)
+{
+    bool rtn = updated;
+    updated = false;
+    return rtn;
+}
+
+bool Timer::is_active(void)
+{
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+    if(!timer.tv_sec && !timer.tv_nsec)
+        return false;
+#else
+    if(!timer.tv_sec && !timer.tv_usec)
+        return false;
+#endif
+    return true;
+}
+
+timeout_t Timer::get(void) const
+{
+    timeout_t diff;
+#if _POSIX_TIMERS > 0 && POSIX_TIMERS
+    struct timespec current;
+
+    clock_gettime(_posix_clocking, &current);
+    adj(&current);
+    if(current.tv_sec > timer.tv_sec)
+        return 0;
+    if(current.tv_sec == timer.tv_sec && current.tv_nsec > timer.tv_nsec)
+        return 0;
+    diff = (timer.tv_sec - current.tv_sec) * 1000;
+    diff += ((timer.tv_nsec - current.tv_nsec) / 1000000l);
+#else
+    struct timeval current;
+    gettimeofday(&current, NULL);
+    adj(&current);
+    if(current.tv_sec > timer.tv_sec)
+        return 0;
+    if(current.tv_sec == timer.tv_sec && current.tv_usec > timer.tv_usec)
+        return 0;
+    diff = (timer.tv_sec - current.tv_sec) * 1000;
+    diff += ((timer.tv_usec - current.tv_usec) / 1000);
+#endif
+    return diff;
+}
+
+Timer::operator bool() const
+{
+    if(get())
+        return false;
+
+    return true;
+}
+
+bool Timer::operator!() const
+{
+    if(get())
+        return true;
+
+    return false;
+}
+
+timeout_t Timer::operator-(const Timer& source)
+{
+    timeout_t tv = get(), dv = source.get();
+    if(!tv)
+        return 0;
+
+    if(tv == Timer::inf)
+        return Timer::inf;
+
+    if(dv == Timer::inf)
+        return tv;
+
+    if(dv > tv)
+        return 0;
+
+    return tv - dv;
+}
+
+bool Timer::operator==(const Timer& source) const
+{
+    return get() == source.get();
+}
+
+bool Timer::operator!=(const Timer& source) const
+{
+    return get() != source.get();
+}
+
+bool Timer::operator<(const Timer& source) const
+{
+    return get() < source.get();
+}
+
+bool Timer::operator<=(const Timer& source) const
+{
+    return get() <= source.get();
+}
+
+bool Timer::operator>(const Timer& source) const
+{
+    return get() > source.get();
+}
+
+bool Timer::operator>=(const Timer& source) const
+{
+    return get() >= source.get();
+}
+
+Timer& Timer::operator=(timeout_t to)
+{
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+    clock_gettime(_posix_clocking, &timer);
+#else
+    gettimeofday(&timer, NULL);
+#endif
+    operator+=(to);
+    return *this;
+}
+
+Timer& Timer::operator+=(timeout_t to)
+{
+    if(!is_active())
+        set();
+
+    timer.tv_sec += (to / 1000);
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+    timer.tv_nsec += (to % 1000l) * 1000000l;
+#else
+    timer.tv_usec += (to % 1000l) * 1000l;
+#endif
+    adj(&timer);
+    updated = true;
+    return *this;
+}
+
+Timer& Timer::operator-=(timeout_t to)
+{
+    if(!is_active())
+        set();
+    timer.tv_sec -= (to / 1000);
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+    timer.tv_nsec -= (to % 1000l) * 1000000l;
+#else
+    timer.tv_usec -= (to % 1000l) * 1000l;
+#endif
+    adj(&timer);
+    return *this;
+}
+
+
+Timer& Timer::operator+=(time_t abs)
+{
+    if(!is_active())
+        set();
+    timer.tv_sec += _difftime(abs);
+    updated = true;
+    return *this;
+}
+
+Timer& Timer::operator-=(time_t abs)
+{
+    if(!is_active())
+        set();
+    timer.tv_sec -= _difftime(abs);
+    return *this;
+}
+
+Timer& Timer::operator=(time_t abs)
+{
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+    clock_gettime(_posix_clocking, &timer);
+#else
+    gettimeofday(&timer, NULL);
+#endif
+    if(!abs)
+        return *this;
+
+    timer.tv_sec += _difftime(abs);
+    updated = true;
+    return *this;
+}
+
+void Timer::sync(Timer &t)
+{
+#if _POSIX_TIMERS > 0 && defined(HAVE_CLOCK_NANOSLEEP) && defined(POSIX_TIMERS)
+    clock_nanosleep(_posix_clocking, TIMER_ABSTIME, &t.timer, NULL);
+#elif defined(_MSWINDOWS_)
+    SleepEx(t.get(), FALSE);
+#else
+    usleep(t.get());
+#endif
+}
+
+
+timeout_t TQEvent::timeout(void)
+{
+    timeout_t timeout = get();
+    if(is_active() && !timeout) {
+        disarm();
+        expired();
+        timeout = get();
+        Timer::update();
+    }
+    return timeout;
+}
+
+TimerQueue::TimerQueue() : OrderedIndex()
+{
+}
+
+TimerQueue::~TimerQueue()
+{
+}
+
+timeout_t TimerQueue::expire(void)
+{
+    timeout_t first = Timer::inf, next;
+    linked_pointer<TimerQueue::event> timer = begin();
+    TimerQueue::event *tp;
+
+    while(timer) {
+        tp = *timer;
+        timer.next();
+        next = tp->timeout();
+        if(next && next < first)
+            first = next;
+    }
+    return first;
+}
+
+void TimerQueue::operator+=(event &te) { te.attach(this); }
+
+void TimerQueue::operator-=(event &te)
+{
+    if(te.list() == this)
+        te.detach();
+}
diff --git a/jni/libucommon/sources/corelib/unicode.cpp b/jni/libucommon/sources/corelib/unicode.cpp
new file mode 100644
index 0000000..a7cfe80
--- /dev/null
+++ b/jni/libucommon/sources/corelib/unicode.cpp
@@ -0,0 +1,722 @@
+// Copyright (C) 2009-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/protocols.h>
+#include <ucommon/string.h>
+#include <ucommon/unicode.h>
+#include <ucommon/thread.h>
+#include <ucommon/socket.h>
+#include <stdarg.h>
+#include <ctype.h>
+#include <stdio.h>
+#ifdef  HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+
+#ifdef  HAVE_WCHAR_H
+#include <wchar.h>
+#else
+typedef ucs4_t  wchar_t;
+#endif
+
+using namespace UCOMMON_NAMESPACE;
+
+const char *utf8::nil = NULL;
+const unsigned utf8::ucsize = sizeof(wchar_t);
+
+ucs4_t utf8::get(CharacterProtocol& cp)
+{
+    int ch = cp.getchar();
+    unsigned count = 0;
+    ucs4_t code;
+
+    if(ch == EOF)
+        return EOF;
+
+    if(ch < 0x80)
+        return ch;
+
+    if((ch & 0xe0) == 0xc0) {
+        code = ch & 0x1f;
+        count = 1;
+    }
+    else if((ch & 0xf0) == 0xe0) {
+        code = ch & 0x0f;
+        count = 2;
+    }
+    else if((ch & 0xf8) == 0xf0) {
+        code = ch & 0x07;
+        count = 3;
+    }
+    else if((ch & 0xfc) == 0xf8) {
+        code = ch & 0x03;
+        count = 4;
+    }
+    else if((ch & 0xfe) == 0xfc) {
+        code = ch & 0x01;
+        count = 5;
+    }
+    else
+        return EOF;
+
+    while(count--) {
+        ch = cp.getchar();
+        if(ch == EOF)
+            return EOF;
+        if((ch & 0xc0) != 0x80)
+            return EOF;
+        code = (code << 6) | (ch & 0x3f);
+    }
+    return code;
+}
+
+unsigned utf8::size(const char *string)
+{
+    unsigned char v = (unsigned char)(*string);
+
+    if(v < 0x80)
+        return 1;
+
+    if((v & 0xe0) == 0xc0)
+        return 2;
+
+    if((v & 0xf0) == 0xe0)
+        return 3;
+
+    if((v & 0xf8) == 0xf0)
+        return 4;
+
+    if((v & 0xfc) == 0xf8)
+        return 5;
+
+    if((v & 0xfe) == 0xfc)
+        return 6;
+
+    return 0;
+}
+
+ucs4_t utf8::codepoint(const char *string)
+{
+    unsigned codesize = size(string);
+    unsigned char encoded = (unsigned char)(*(string++));
+    ucs4_t code = 0;
+
+    if(encoded == 0)
+        return 0;
+
+    if(!codesize)
+        return -1;
+
+    switch(codesize)
+    {
+    case 1:
+        return (ucs4_t)encoded;
+    case 2:
+        code = encoded & 0x1f;
+        break;
+    case 3:
+        code = encoded & 0x0f;
+        break;
+    case 4:
+        code = encoded & 0x07;
+        break;
+    case 5:
+        code = encoded & 0x03;
+        break;
+    case 6:
+        code = encoded & 0x01;
+        break;
+    }
+
+    while(--codesize) {
+        encoded = (unsigned char)(*(string++));
+        // validity check...
+        if((encoded & 0xc0) != 0x80)
+            return 0;
+        code = (code << 6) | (encoded & 0x3f);
+    }
+    return code;
+}
+
+size_t utf8::count(const char *string)
+{
+    size_t pos = 0;
+    unsigned codesize;
+
+    if(!string)
+        return 0;
+
+    while(*string && (codesize = size(string) != 0)) {
+        pos += codesize;
+        string += codesize;
+    }
+
+    return pos;
+}
+
+char *utf8::offset(char *string, ssize_t pos)
+{
+    if(!string)
+        return NULL;
+
+    ssize_t codepoints = count(string);
+    if(pos > codepoints)
+        return NULL;
+
+    if(pos == 0)
+        return string;
+
+    if(pos < 0) {
+        pos = -pos;
+        if(pos > codepoints)
+            return NULL;
+
+        pos = codepoints - pos;
+    }
+
+    while(pos--) {
+        unsigned codesize = size(string);
+        if(!codesize)
+            return NULL;
+
+        string += codesize;
+    }
+    return string;
+}
+
+size_t utf8::chars(const unicode_t str)
+{
+    size_t ccount = 0;
+    const wchar_t *string = (const wchar_t *)str;
+
+    if(!string)
+        return 0;
+
+    while(*string != 0l) {
+        ucs4_t chr = (ucs4_t)(*(string++));
+        ccount += chars(chr);
+    }
+    return ccount;
+}
+
+size_t utf8::chars(ucs4_t code)
+{
+    if(code <= 0x80)
+        return 1;
+    if(code <= 0x000007ff)
+        return 2;
+    if(code <= 0x0000ffff)
+        return 3;
+    if(code <= 0x001fffff)
+        return 4;
+    if(code <= 0x03ffffff)
+        return 5;
+
+    return 6;
+}
+
+unicode_t unidup(const char *string)
+{
+    if(sizeof(wchar_t) < 4)
+        return (unicode_t) utf8::wdup(string);
+    return (unicode_t) utf8::udup(string);
+}
+
+size_t utf8::pack(unicode_t buffer, CharacterProtocol& cp, size_t len)
+{
+    size_t used = 0;
+    wchar_t *target = (wchar_t *)buffer;
+
+    assert(len > 0);
+
+    while(--len) {
+        ucs4_t code = utf8::get(cp);
+        if(!code || code == (ucs4_t)EOF)
+            break;
+        *(target++) = (wchar_t)code;
+        ++used;
+    }
+
+    *target = (wchar_t)0;
+    return used;
+}
+
+ucs4_t utf8::put(ucs4_t code, CharacterProtocol& cp)
+{
+    char buffer[8];
+    unsigned used = 0, count = 0;
+
+    if(code < 0x80)
+        return cp.putchar(code);
+
+    if(code < 0x000007ff) {
+        buffer[used++] = (code >> 6) | 0xc0;
+        buffer[used++] = (code & 0x3f) | 0x80;
+    }
+    else if(code <= 0x0000ffff) {
+        buffer[used++] = (code >> 12) | 0xe0;
+        buffer[used++] = (code >> 6 & 0x3f) | 0x80;
+        buffer[used++] = (code & 0x3f) | 0x80;
+    }
+    else if(code <= 0x001fffff) {
+        buffer[used++] = (code >> 18) | 0xf0;
+        buffer[used++] = (code >> 12 & 0x3f) | 0x80;
+        buffer[used++] = (code >> 6  & 0x3f) | 0x80;
+        buffer[used++] = (code & 0x3f) | 0x80;
+    }
+    else if(code <= 0x03ffffff) {
+        buffer[used++] = (code >> 24) | 0xf8;
+        buffer[used++] = (code >> 18 & 0x3f) | 0x80;
+        buffer[used++] = (code >> 12 & 0x3f) | 0x80;
+        buffer[used++] = (code >> 6  & 0x3f) | 0x80;
+        buffer[used++] = (code & 0x3f) | 0x80;
+    }
+    else {
+        buffer[used++] = (code >> 30) | 0xfc;
+        buffer[used++] = (code >> 24 & 0x3f) | 0x80;
+        buffer[used++] = (code >> 18 & 0x3f) | 0x80;
+        buffer[used++] = (code >> 12 & 0x3f) | 0x80;
+        buffer[used++] = (code >> 6  & 0x3f) | 0x80;
+        buffer[used++] = (code & 0x3f) | 0x80;
+    }
+
+    while(count < used) {
+        if(cp.putchar(buffer[count++]) == EOF)
+            return EOF;
+    }
+    return code;
+}
+
+ucs4_t *utf8::udup(const char *string)
+{
+    if(!string)
+        return NULL;
+
+    unsigned len = count(string);
+    unsigned pos = 0;
+    ucs4_t *out = (ucs4_t *)malloc(sizeof(ucs4_t) * (++len));
+
+    while(*string) {
+        out[pos++] = utf8::codepoint(string);
+        string += utf8::size(string);
+    }
+    out[pos] = 0;
+    return out;
+}
+
+ucs2_t *utf8::wdup(const char *string)
+{
+    if(!string)
+        return NULL;
+
+    unsigned len = count(string);
+    unsigned pos = 0;
+    ucs2_t *out = (ucs2_t *)malloc(sizeof(ucs2_t) * (++len));
+    ucs4_t ch;
+
+    while(*string) {
+        ch = utf8::codepoint(string);
+        if(ch >= 0x10000 || ch < 0) {
+            free(out);
+            return NULL;
+        }
+        out[pos++] = (ucs2_t)ch;
+        string += utf8::size(string);
+    }
+    out[pos] = 0;
+    return out;
+}
+
+size_t utf8::unpack(const unicode_t str, CharacterProtocol& cp)
+{
+    unsigned points = 0;
+    ucs4_t code;
+    const wchar_t *string = (const wchar_t *)str;
+
+    while(0 != (code = (*(string++)))) {
+        if(utf8::put(code, cp) == EOF)
+            break;
+        ++points;
+    }
+    return points;
+}
+
+unsigned utf8::ccount(const char *cp, ucs4_t code)
+{
+    unsigned total = 0;
+    ucs4_t ch;
+    unsigned cs;
+
+    if(!cp)
+        return 0;
+
+    while(*cp) {
+        ch = utf8::codepoint(cp);
+        cs = utf8::size(cp);
+        if(!cs || ch == -1)
+            break;
+        if(ch == code)
+            ++total;
+        cp += cs;
+    }
+    return total;
+}
+
+const char *utf8::find(const char *cp, ucs4_t code, size_t pos)
+{
+    ucs4_t ch;
+    unsigned cs;
+    size_t cpos = 0;
+
+    if(!cp)
+        return NULL;
+
+    while(*cp) {
+        ch = utf8::codepoint(cp);
+        cs = utf8::size(cp);
+        if(pos && ++cpos > pos)
+            return NULL;
+        if(!cs || ch == -1)
+            return NULL;
+        if(ch == code)
+            return cp;
+        cp += cs;
+    }
+    return NULL;
+}
+
+const char *utf8::rfind(const char *cp, ucs4_t code, size_t pos)
+{
+    const char *result = NULL;
+    ucs4_t ch;
+    unsigned cs;
+    size_t cpos = 0;
+
+    if(!cp)
+        return NULL;
+
+    while(*cp) {
+        ch = utf8::codepoint(cp);
+        cs = utf8::size(cp);
+
+        if(!cs || ch == -1)
+            break;
+
+        if(ch == code)
+            result = cp;
+
+        if(++cpos > pos)
+            break;
+
+        cp += cs;
+    }
+    return result;
+}
+
+UString::UString()
+{
+    str = NULL;
+}
+
+UString::~UString() {}
+
+UString::UString(strsize_t size)
+{
+    str = create(size);
+    str->retain();
+}
+
+UString::UString(const char *text, strsize_t size)
+{
+    str = NULL;
+    String::set(0, text, size);
+}
+
+UString::UString(const unicode_t text)
+{
+    str = NULL;
+    set(text);
+}
+
+UString::UString(const UString& copy)
+{
+    str = NULL;
+    if(copy.str)
+        String::set(copy.str->text);
+}
+
+void UString::set(const unicode_t text)
+{
+    strsize_t size = utf8::chars(text);
+    str = NULL;
+    str = create(size);
+    str->retain();
+
+    chartext cp(str->text, str->max);
+    utf8::unpack(text, cp);
+    str->fix();
+}
+
+void UString::add(const unicode_t text)
+{
+    strsize_t alloc, size;
+
+    size = alloc = utf8::chars(text);
+    if(str)
+        alloc += str->len;
+
+    if(!resize(alloc))
+        return;
+
+    chartext cp(str->text + str->len, size);
+    utf8::unpack(text, cp);
+    str->fix();
+}
+
+size_t UString::get(unicode_t output, size_t points) const
+{
+    chartext cp(str->text);
+    return utf8::pack(output, cp, points);
+}
+
+void UString::cut(strsize_t pos, strsize_t size)
+{
+    if(!str)
+        return;
+
+    strsize_t bpos = 0, blen = 0;
+    if(pos && pos != npos)
+         bpos = String::offset(utf8::offset(str->text, (ssize_t)pos));
+
+    if(size && size != npos)
+        blen = String::offset(utf8::offset(str->text, (ssize_t)size));
+
+    String::cut(bpos, blen);
+}
+
+void UString::paste(strsize_t pos, const char *text, strsize_t size)
+{
+    strsize_t bpos = 0, blen = 0;
+    if(pos && pos != npos && str)
+         bpos = String::offset(utf8::offset(str->text, (ssize_t)pos));
+
+    if(size && size != npos && str)
+        blen = String::offset(utf8::offset(str->text, (ssize_t)size));
+
+    String::paste(bpos, text, blen);
+}
+
+UString UString::get(strsize_t pos, strsize_t size) const
+{
+    if(!str)
+        return UString("", 0);
+
+    char *substr = utf8::offset(str->text, (ssize_t)pos);
+    if(!substr)
+        return UString("", 0);
+
+    if(!size)
+        return UString(substr, 0);
+
+    const char *end = utf8::offset(substr, size);
+    if(!end)
+        return UString(substr);
+
+    pos = (end - substr + 1);
+    return UString(substr, pos);
+}
+
+ucs4_t UString::at(int offset) const
+{
+    const char *cp;
+
+    if(!str)
+        return -1;
+
+    cp = utf8::offset(str->text, offset);
+
+    if(!cp)
+        return -1;
+
+    return utf8::codepoint(cp);
+}
+
+const char *UString::find(ucs4_t code, strsize_t pos) const
+{
+    if(!str)
+        return NULL;
+
+    return utf8::find(str->text, code, (size_t)pos);
+}
+
+const char *UString::rfind(ucs4_t code, strsize_t pos) const
+{
+    if(!str)
+        return NULL;
+
+    return utf8::rfind(str->text, code, (size_t)pos);
+}
+
+unsigned UString::ccount(ucs4_t code) const
+{
+    if(!str)
+        return 0;
+
+    return utf8::ccount(str->text, code);
+}
+
+UString UString::operator()(int codepoint, strsize_t size) const
+{
+    return UString::get(codepoint, size);
+}
+
+const char *UString::operator()(int offset) const
+{
+    if(!str)
+        return NULL;
+
+    return utf8::offset(str->text, offset);
+}
+
+utf8_pointer::utf8_pointer()
+{
+    text = NULL;
+}
+
+utf8_pointer::utf8_pointer(const char *str)
+{
+    text = (uint8_t*)str;
+}
+
+utf8_pointer::utf8_pointer(const utf8_pointer& copy)
+{
+    text = copy.text;
+}
+
+void utf8_pointer::inc(void)
+{
+    if(!text)
+        return;
+
+    if(*text < 0x80) {
+        ++text;
+        return;
+    }
+
+    if((*text & 0xc0) == 0xc0)
+        ++text;
+
+    while((*text & 0xc0) == 0x80)
+        ++text;
+}
+
+void utf8_pointer::dec(void)
+{
+    if(!text)
+        return;
+
+    while((*(--text) & 0xc0) == 0x80)
+        ;
+}
+
+utf8_pointer& utf8_pointer::operator++()
+{
+    inc();
+    return *this;
+}
+
+utf8_pointer& utf8_pointer::operator--()
+{
+    dec();
+    return *this;
+}
+
+utf8_pointer& utf8_pointer::operator+=(long offset)
+{
+    if(!text || !offset)
+        return *this;
+
+    if(offset > 0) {
+        while(offset--)
+            inc();
+    }
+    else {
+        while(offset++)
+            dec();
+    }
+    return *this;
+}
+
+utf8_pointer& utf8_pointer::operator-=(long offset)
+{
+    if(!text || !offset)
+        return *this;
+
+    if(offset > 0) {
+        while(offset--)
+            dec();
+    }
+    else {
+        while(offset++)
+            inc();
+    }
+    return *this;
+}
+
+utf8_pointer utf8_pointer::operator+(long offset) const
+{
+    utf8_pointer nsp(c_str());
+    nsp += offset;
+    return nsp;
+}
+
+utf8_pointer utf8_pointer::operator-(long offset) const
+{
+    utf8_pointer nsp(c_str());
+    nsp -= offset;
+    return nsp;
+}
+
+utf8_pointer& utf8_pointer::operator=(const char *str)
+{
+    text = (uint8_t *)str;
+    return *this;
+}
+
+ucs4_t utf8_pointer::operator[](long offset) const
+{
+    utf8_pointer ncp(c_str());
+
+    if(!text)
+        return 0l;
+
+    if(!offset)
+        return utf8::codepoint((const char*)text);
+
+    if(offset > 0) {
+        while(offset--)
+            ncp.inc();
+    }
+    else {
+        while(offset++)
+            ncp.dec();
+    }
+    return *ncp;
+}
+
diff --git a/jni/libucommon/sources/corelib/vector.cpp b/jni/libucommon/sources/corelib/vector.cpp
new file mode 100644
index 0000000..a7830bb
--- /dev/null
+++ b/jni/libucommon/sources/corelib/vector.cpp
@@ -0,0 +1,676 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/protocols.h>
+#include <ucommon/object.h>
+#include <ucommon/vector.h>
+#include <ucommon/thread.h>
+#include <string.h>
+#include <stdarg.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+const vectorsize_t Vector::npos = (vectorsize_t)(-1);
+
+Vector::array::array(vectorsize_t size)
+{
+    assert(size > 0);
+
+    max = size;
+    len = 0;
+    list[0] = 0;
+}
+
+void Vector::array::dealloc(void)
+{
+    purge();
+    CountedObject::dealloc();
+}
+
+void Vector::array::purge(void)
+{
+    vectorsize_t pos = 0;
+    while(list[pos])
+        list[pos++]->release();
+    len = 0;
+    list[0] = 0;
+}
+
+void Vector::array::dec(vectorsize_t offset)
+{
+    if(!len)
+        return;
+
+    if(offset >= len) {
+        purge();
+        return;
+    }
+
+    while(offset--) {
+        list[--len]->release();
+        list[len] = 0;
+    }
+}
+
+void Vector::array::inc(vectorsize_t offset)
+{
+    if(!offset)
+        ++offset;
+
+    if(offset >= len) {
+        purge();
+        return;
+    }
+
+    if(!len)
+        return;
+
+    for(vectorsize_t pos = 0; pos < offset; ++pos)
+        list[pos]->release();
+
+    memmove(list, &list[offset], (len - offset) * sizeof(void *));
+    len -= offset;
+    list[len] = 0;
+}
+
+void Vector::array::set(ObjectProtocol **items)
+{
+    assert(items != NULL);
+
+    purge();
+    add(items);
+}
+
+void Vector::array::add(ObjectProtocol **items)
+{
+    assert(items != NULL);
+
+    vectorsize_t size = Vector::size((void **)(items));
+
+    if(!size)
+        return;
+
+    if(len + size > max)
+        size = max - len;
+
+    if(size < 1)
+        return;
+
+    for(vectorsize_t pos = 0; pos < size; ++pos) {
+        list[len++] = items[pos];
+        items[pos]->retain();
+    }
+    list[len] = 0;
+}
+
+void Vector::array::add(ObjectProtocol *obj)
+{
+    assert(obj);
+
+    if(len == max)
+        return;
+
+    obj->retain();
+    list[len++] = obj;
+    list[len] = 0;
+}
+
+vectorsize_t Vector::size(void) const
+{
+    if(!data)
+        return 0;
+
+    return data->max;
+}
+
+vectorsize_t Vector::len(void) const
+{
+    if(!data)
+        return 0;
+
+    return data->len;
+}
+
+Vector::Vector()
+{
+    data = NULL;
+}
+
+Vector::Vector(ObjectProtocol **items, vectorsize_t limit)
+{
+    assert(items);
+
+    if(!limit)
+        limit = size((void **)items);
+
+    data = create(limit);
+    data->retain();
+    data->set(items);
+}
+
+Vector::Vector(vectorsize_t size)
+{
+    assert(size > 0);
+
+    data = create(size);
+    data->retain();
+}
+
+Vector::~Vector()
+{
+    release();
+}
+
+ObjectProtocol **Vector::list(void) const
+{
+    if(!data)
+        return NULL;
+
+    return data->list;
+}
+
+ObjectProtocol *Vector::invalid(void) const
+{
+    return NULL;
+}
+
+ObjectProtocol *Vector::get(int offset) const
+{
+    if(!data || !data->len)
+        return invalid();
+
+    if(offset >= (int)(data->len))
+        return invalid();
+
+    if(((vectorsize_t)(-offset)) >= data->len)
+        return invalid();
+
+    if(offset >= 0)
+        return data->list[offset];
+
+    return data->list[data->len + offset];
+}
+
+vectorsize_t Vector::get(void **target, vectorsize_t limit) const
+{
+    assert(target != NULL && limit > 0);
+
+    vectorsize_t pos;
+    if(!data) {
+        target[0] = 0;
+        return 0;
+    }
+
+    for(pos = 0; pos < data->len && pos < limit - 1; ++pos)
+        target[pos] = data->list[pos];
+    target[pos] = 0;
+    return pos;
+}
+
+Vector::array *Vector::create(vectorsize_t size) const
+{
+    assert(size > 0);
+
+    return new((size_t)size) array(size);
+}
+
+void Vector::release(void)
+{
+    if(data)
+        data->release();
+    data = NULL;
+}
+
+ObjectProtocol *Vector::begin(void) const
+{
+    if(!data)
+        return NULL;
+
+    return data->list[0];
+}
+
+ObjectProtocol *Vector::end(void) const
+{
+    if(!data || !data->len)
+        return NULL;
+
+    return data->list[data->len - 1];
+}
+
+vectorsize_t Vector::find(ObjectProtocol *obj, vectorsize_t pos) const
+{
+    assert(obj != NULL);
+
+    if(!data)
+        return npos;
+
+    while(pos < data->len) {
+        if(data->list[pos] == obj)
+            return pos;
+        ++pos;
+    }
+    return npos;
+}
+
+void Vector::split(vectorsize_t pos)
+{
+    if(!data || pos >= data->len)
+        return;
+
+    while(data->len > pos) {
+        --data->len;
+        data->list[data->len]->release();
+    }
+    data->list[data->len] = NULL;
+}
+
+void Vector::rsplit(vectorsize_t pos)
+{
+    vectorsize_t head = 0;
+
+    if(!data || pos >= data->len || !pos)
+        return;
+
+    while(head < pos)
+        data->list[head++]->release();
+
+    head = 0;
+    while(data->list[pos])
+        data->list[head++] = data->list[pos++];
+
+    data->len = head;
+    data->list[head] = NULL;
+}
+
+void Vector::set(ObjectProtocol **list)
+{
+    assert(list);
+
+    if(!data && list) {
+        data = create(size((void **)list));
+        data->retain();
+    }
+    if(data && list)
+        data->set(list);
+}
+
+void Vector::set(vectorsize_t pos, ObjectProtocol *obj)
+{
+    assert(obj != NULL);
+
+    if(!data || pos > data->len)
+        return;
+
+    if(pos == data->len && data->len < data->max) {
+        data->list[data->len++] = obj;
+        data->list[data->len] = NULL;
+        obj->retain();
+        return;
+    }
+    data->list[pos]->release();
+    data->list[pos] = obj;
+    obj->retain();
+}
+
+void Vector::add(ObjectProtocol **list)
+{
+    assert(list);
+
+    if(data && list)
+        data->add(list);
+}
+
+void Vector::add(ObjectProtocol *obj)
+{
+    assert(obj);
+
+    if(data && obj)
+        data->add(obj);
+}
+
+void Vector::clear(void)
+{
+    if(data)
+        data->purge();
+}
+
+bool Vector::resize(vectorsize_t size)
+{
+    if(!size) {
+        release();
+        data = NULL;
+        return true;
+    }
+
+    if(data->is_copied() || data->max < size) {
+        data->release();
+        data = create(size);
+        data->retain();
+    }
+    return true;
+}
+
+void Vector::cow(vectorsize_t size)
+{
+    if(data) {
+        size += data->len;
+    }
+
+    if(!size)
+        return;
+
+    if(!data || !data->max || data->is_copied() || size > data->max) {
+        array *a = create(size);
+        a->len = data->len;
+        memcpy(a->list, data->list, data->len * sizeof(ObjectProtocol *));
+        a->list[a->len] = 0;
+        a->retain();
+        data->release();
+        data = a;
+    }
+}
+
+void Vector::operator^=(Vector &v)
+{
+    release();
+    set(v.list());
+}
+
+Vector &Vector::operator^(Vector &v)
+{
+    vectorsize_t vs = v.len();
+
+    if(!vs)
+        return *this;
+
+    if(data && data->len + vs > data->max)
+        cow();
+
+    add(v.list());
+    return *this;
+}
+
+void Vector::operator++()
+{
+    if(!data)
+        return;
+
+    data->inc(1);
+}
+
+void Vector::operator--()
+{
+    if(!data)
+        return;
+
+    data->dec(1);
+}
+
+void Vector::operator+=(vectorsize_t inc)
+{
+    if(!data)
+        return;
+
+    data->inc(inc);
+}
+
+void Vector::operator-=(vectorsize_t dec)
+{
+    if(!data)
+        return;
+
+    data->inc(dec);
+}
+
+MemVector::MemVector(void *mem, vectorsize_t size)
+{
+    assert(mem != NULL);
+    assert(size > 0);
+
+    data = new((caddr_t)mem) array(size);
+}
+
+MemVector::~MemVector()
+{
+    data = NULL;
+}
+
+void MemVector::release(void)
+{
+    data = NULL;
+}
+
+bool MemVector::resize(vectorsize_t size)
+{
+    return false;
+}
+
+void MemVector::cow(vectorsize_t adj)
+{
+}
+
+ArrayReuse::ArrayReuse(size_t size, unsigned c, void *memory) :
+ReusableAllocator()
+{
+    assert(c > 0 && size > 0 && memory != NULL);
+
+    objsize = size;
+    count = 0;
+    limit = c;
+    used = 0;
+    mem = (caddr_t)memory;
+}
+
+ArrayReuse::ArrayReuse(size_t size, unsigned c) :
+ReusableAllocator()
+{
+    assert(c > 0 && size > 0);
+
+    objsize = size;
+    count = 0;
+    limit = c;
+    used = 0;
+    mem = (caddr_t)malloc(size * c);
+    crit(mem != NULL, "vector reuse alloc failed");
+}
+
+ArrayReuse::~ArrayReuse()
+{
+    if(mem) {
+        free(mem);
+        mem = NULL;
+    }
+}
+
+bool ArrayReuse::avail(void)
+{
+    bool rtn = false;
+    lock();
+    if(count < limit)
+        rtn = true;
+    unlock();
+    return rtn;
+}
+
+ReusableObject *ArrayReuse::get(timeout_t timeout)
+{
+    bool rtn = true;
+    struct timespec ts;
+    ReusableObject *obj = NULL;
+
+    if(timeout && timeout != Timer::inf)
+        set(&ts, timeout);
+
+    lock();
+    while(!freelist && used >= limit && rtn) {
+        ++waiting;
+        if(timeout == Timer::inf)
+            wait();
+        else if(timeout)
+            rtn = wait(&ts);
+        else
+            rtn = false;
+        --waiting;
+    }
+
+    if(!rtn) {
+        unlock();
+        return NULL;
+    }
+
+    if(freelist) {
+        obj = freelist;
+        freelist = next(obj);
+    } else if(used < limit) {
+        obj = (ReusableObject *)&mem[used * objsize];
+        ++used;
+    }
+    if(obj)
+        ++count;
+    unlock();
+    return obj;
+}
+
+ReusableObject *ArrayReuse::get(void)
+{
+    return get(Timer::inf);
+}
+
+ReusableObject *ArrayReuse::request(void)
+{
+    ReusableObject *obj = NULL;
+
+    lock();
+    if(freelist) {
+        obj = freelist;
+        freelist = next(obj);
+    }
+    else if(used < limit) {
+        obj = (ReusableObject *)(mem + (used * objsize));
+        ++used;
+    }
+    if(obj)
+        ++count;
+    unlock();
+    return obj;
+}
+
+vectorsize_t Vector::size(void **list)
+{
+    assert(list != NULL);
+
+    vectorsize_t pos = 0;
+    while(list[pos])
+        ++pos;
+    return pos;
+}
+
+PagerReuse::PagerReuse(mempager *p, size_t objsize, unsigned c) :
+MemoryRedirect(p), ReusableAllocator()
+{
+    assert(objsize > 0 && c > 0);
+
+    limit = c;
+    count = 0;
+    osize = objsize;
+}
+
+PagerReuse::~PagerReuse()
+{
+}
+
+bool PagerReuse::avail(void)
+{
+    bool rtn = false;
+
+    if(!limit)
+        return true;
+
+    lock();
+    if(count < limit)
+        rtn = true;
+    unlock();
+    return rtn;
+}
+
+ReusableObject *PagerReuse::request(void)
+{
+    ReusableObject *obj = NULL;
+    lock();
+    if(!limit || count < limit) {
+        if(freelist) {
+            ++count;
+            obj = freelist;
+            freelist = next(obj);
+        }
+        else {
+            ++count;
+            unlock();
+            return (ReusableObject *)_alloc(osize);
+        }
+    }
+    unlock();
+    return obj;
+}
+
+ReusableObject *PagerReuse::get(void)
+{
+    return get(Timer::inf);
+}
+
+ReusableObject *PagerReuse::get(timeout_t timeout)
+{
+    bool rtn = true;
+    struct timespec ts;
+    ReusableObject *obj;
+
+    if(timeout && timeout != Timer::inf)
+        set(&ts, timeout);
+
+    lock();
+    while(rtn && limit && count >= limit) {
+        ++waiting;
+        if(timeout == Timer::inf)
+            wait();
+        else if(timeout)
+            rtn = wait(&ts);
+        else
+            rtn = false;
+        --waiting;
+    }
+    if(!rtn) {
+        unlock();
+        return NULL;
+    }
+    if(freelist) {
+        obj = freelist;
+        freelist = next(obj);
+    }
+    else {
+        ++count;
+        unlock();
+        return (ReusableObject *)_alloc(osize);
+    }
+    if(obj)
+        ++count;
+    unlock();
+    return obj;
+}
+
+
diff --git a/jni/libucommon/sources/corelib/xml.cpp b/jni/libucommon/sources/corelib/xml.cpp
new file mode 100644
index 0000000..6ce1ba3
--- /dev/null
+++ b/jni/libucommon/sources/corelib/xml.cpp
@@ -0,0 +1,555 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/export.h>
+#include <ucommon/protocols.h>
+#include <ucommon/string.h>
+#include <ucommon/xml.h>
+#include <ctype.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+static bool isElement(char c)
+{
+    return isalnum(c) || c == ':' || c == '-' || c == '.' || c == '_';
+}
+
+XMLParser::XMLParser(unsigned size)
+{
+    state = NONE;
+    bufpos = 0;
+    bufsize = size;
+    buffer = new char[size];
+    ecount = dcount = 0;
+}
+
+XMLParser::~XMLParser()
+{
+    if(buffer) {
+        delete[] buffer;
+        buffer = NULL;
+    }
+}
+
+void XMLParser::putBuffer(char c)
+{
+    buffer[bufpos++] = c;
+    if(bufpos >= bufsize) {
+        if(ecount)
+            characters((caddr_t)buffer, bufpos);
+        bufpos = 0;
+    }
+}
+
+void XMLParser::clearBuffer(void)
+{
+    if(bufpos && ecount)
+        characters((caddr_t)buffer, bufpos);
+    bufpos = 0;
+}
+
+bool XMLParser::parse(FILE *fp)
+{
+    state = NONE;
+    bufpos = 0;
+    ecount = dcount = 0;
+
+    int ch;
+    unsigned char cp;
+
+    while((ch = fgetc(fp)) != EOF) {
+        switch(state) {
+        case AMP:
+            if((!bufpos && ch == '#') || isElement(ch)) {
+                buffer[bufpos++] = ch;
+                break;
+            }
+            if(ch != ';')
+                return false;
+            buffer[bufpos] = 0;
+            if(buffer[0] == '#')
+                cp = atoi(buffer + 1);
+            else if(eq(buffer, "amp"))
+                cp = '&';
+            else if(eq(buffer, "lt"))
+                cp = '<';
+            else if(eq(buffer, "gt"))
+                cp = '>';
+            else if(eq(buffer, "apos"))
+                cp = '`';
+            else if(eq(buffer, "quot"))
+                cp = '\"';
+            else
+                return false;
+            characters((caddr_t)&cp, 1);
+            bufpos = 0;
+            state = NONE;
+            break;
+        case TAG:
+            if(ch == '>') {
+                state = NONE;
+                if(!parseTag())
+                    return false;
+            }
+            else if(ch == '[' && bufpos == 7 && !strncmp(buffer, "![CDATA", 7)) {
+                state = CDATA;
+            }
+            else if(ch == '-' && bufpos == 2 && !strncmp(buffer, "!-", 2)) {
+                state = COMMENT;
+                bufpos = 0;
+            }
+            else if(ch == '[' && !strncmp(buffer, "!DOCTYPE ", 9)) {
+                state = DTD;
+                bufpos = 0;
+            }
+            else
+                putBuffer(ch);
+            break;
+        case COMMENT:
+            if(ch == '>' && bufpos >= 2 && !strncmp(&buffer[bufpos - 2], "--", 2)) {
+                bufpos -= 2;
+                if(bufpos)
+                    comment((caddr_t)buffer, bufpos);
+                bufpos = 0;
+                state = NONE;
+            }
+            else {
+                buffer[bufpos++] = ch;
+                if(bufpos == bufsize) {
+                    comment((caddr_t)buffer, bufpos);
+                    bufpos = 0;
+                }
+            }
+            break;
+        case CDATA:
+            putBuffer(ch);
+            if(bufpos > 2)
+                if(eq(&buffer[bufpos - 3], "]]>")) {
+                    bufpos -= 3;
+                    state = NONE;
+                    clearBuffer();
+                }
+            break;
+        case DTD:
+            if(ch == '<')
+                ++dcount;
+            else if(ch == '>' && dcount)
+                --dcount;
+            else if(ch == '>')
+                state = NONE;
+            break;
+        case NONE:
+            if(ch == '<') {
+                clearBuffer();
+                state = TAG;
+            }
+            else if(ecount && ch == '&') {
+                clearBuffer();
+                state = AMP;
+            }
+            else if(ecount)
+                putBuffer(ch);
+            break;
+        case END:
+            return true;
+        }
+        if(state == END)
+            return true;
+    }
+    // eof before end of ducument...
+    return false;
+}
+
+
+bool XMLParser::parse(CharacterProtocol& io)
+{
+    state = NONE;
+    bufpos = 0;
+    ecount = dcount = 0;
+
+    int ch;
+    unsigned char cp;
+
+    while((ch = io.getchar()) != EOF) {
+        switch(state) {
+        case AMP:
+            if((!bufpos && ch == '#') || isElement(ch)) {
+                buffer[bufpos++] = ch;
+                break;
+            }
+            if(ch != ';')
+                return false;
+            buffer[bufpos] = 0;
+            if(buffer[0] == '#')
+                cp = atoi(buffer + 1);
+            else if(eq(buffer, "amp"))
+                cp = '&';
+            else if(eq(buffer, "lt"))
+                cp = '<';
+            else if(eq(buffer, "gt"))
+                cp = '>';
+            else if(eq(buffer, "apos"))
+                cp = '`';
+            else if(eq(buffer, "quot"))
+                cp = '\"';
+            else
+                return false;
+            characters((caddr_t)&cp, 1);
+            bufpos = 0;
+            state = NONE;
+            break;
+        case TAG:
+            if(ch == '>') {
+                state = NONE;
+                if(!parseTag())
+                    return false;
+            }
+            else if(ch == '[' && bufpos == 7 && !strncmp(buffer, "![CDATA", 7)) {
+                state = CDATA;
+            }
+            else if(ch == '-' && bufpos == 2 && !strncmp(buffer, "!-", 2)) {
+                state = COMMENT;
+                bufpos = 0;
+            }
+            else if(ch == '[' && !strncmp(buffer, "!DOCTYPE ", 9)) {
+                state = DTD;
+                bufpos = 0;
+            }
+            else
+                putBuffer(ch);
+            break;
+        case COMMENT:
+            if(ch == '>' && bufpos >= 2 && !strncmp(&buffer[bufpos - 2], "--", 2)) {
+                bufpos -= 2;
+                if(bufpos)
+                    comment((caddr_t)buffer, bufpos);
+                bufpos = 0;
+                state = NONE;
+            }
+            else {
+                buffer[bufpos++] = ch;
+                if(bufpos == bufsize) {
+                    comment((caddr_t)buffer, bufpos);
+                    bufpos = 0;
+                }
+            }
+            break;
+        case CDATA:
+            putBuffer(ch);
+            if(bufpos > 2)
+                if(eq(&buffer[bufpos - 3], "]]>")) {
+                    bufpos -= 3;
+                    state = NONE;
+                    clearBuffer();
+                }
+            break;
+        case DTD:
+            if(ch == '<')
+                ++dcount;
+            else if(ch == '>' && dcount)
+                --dcount;
+            else if(ch == '>')
+                state = NONE;
+            break;
+        case NONE:
+            if(ch == '<') {
+                clearBuffer();
+                state = TAG;
+            }
+            else if(ecount && ch == '&') {
+                clearBuffer();
+                state = AMP;
+            }
+            else if(ecount)
+                putBuffer(ch);
+            break;
+        case END:
+            return true;
+        }
+        if(state == END)
+            return true;
+    }
+    // eof before end of ducument...
+    return false;
+}
+
+bool XMLParser::partial(const char *data, size_t len)
+{
+    if(state == END)
+        state = NONE;
+
+    unsigned char cp;
+    while(len--) {
+        switch(state) {
+        case AMP:
+            if((!bufpos && *data == '#') || isElement(*data)) {
+                buffer[bufpos++] = *data;
+                break;
+            }
+            if(*data != ';')
+                return false;
+            buffer[bufpos] = 0;
+            if(buffer[0] == '#')
+                cp = atoi(buffer + 1);
+            else if(eq(buffer, "amp"))
+                cp = '&';
+            else if(eq(buffer, "lt"))
+                cp = '<';
+            else if(eq(buffer, "gt"))
+                cp = '>';
+            else if(eq(buffer, "apos"))
+                cp = '`';
+            else if(eq(buffer, "quot"))
+                cp = '\"';
+            else
+                return false;
+            characters((caddr_t)&cp, 1);
+            bufpos = 0;
+            state = NONE;
+            break;
+        case TAG:
+            if(*data == '>') {
+                state = NONE;
+                if(!parseTag())
+                    return false;
+            }
+            else if(*data == '[' && bufpos == 7 && !strncmp(buffer, "![CDATA", 7)) {
+                state = CDATA;
+            }
+            else if(*data == '-' && bufpos == 2 && !strncmp(buffer, "!-", 2)) {
+                state = COMMENT;
+                bufpos = 0;
+            }
+            else if(*data == '[' && !strncmp(buffer, "!DOCTYPE ", 9)) {
+                state = DTD;
+                bufpos = 0;
+            }
+            else
+                putBuffer(*data);
+            break;
+        case COMMENT:
+            if(*data == '>' && bufpos >= 2 && !strncmp(&buffer[bufpos - 2], "--", 2)) {
+                bufpos -= 2;
+                if(bufpos)
+                    comment((caddr_t)buffer, bufpos);
+                bufpos = 0;
+                state = NONE;
+            }
+            else {
+                buffer[bufpos++] = *data;
+                if(bufpos == bufsize) {
+                    comment((caddr_t)buffer, bufpos);
+                    bufpos = 0;
+                }
+            }
+            break;
+        case CDATA:
+            putBuffer(*data);
+            if(bufpos > 2)
+                if(eq(&buffer[bufpos - 3], "]]>")) {
+                    bufpos -= 3;
+                    state = NONE;
+                    clearBuffer();
+                }
+            break;
+        case DTD:
+            if(*data == '<')
+                ++dcount;
+            else if(*data == '>' && dcount)
+                --dcount;
+            else if(*data == '>')
+                state = NONE;
+            break;
+        case NONE:
+        case END:
+            if(*data == '<') {
+                clearBuffer();
+                state = TAG;
+            }
+            else if(ecount && *data == '&') {
+                clearBuffer();
+                state = AMP;
+            }
+            else if(ecount)
+                putBuffer(*data);
+        }
+        ++data;
+    }
+    return true;
+}
+
+bool XMLParser::parseTag(void)
+{
+    size_t len = bufpos;
+    const char *data = buffer;
+    bool end = false;
+    caddr_t attrib[128];
+    unsigned attr = 0;
+    char *ep;
+
+    if(*data == '/') {
+        while(--len) {
+            if(!isElement(*(++data)))
+                break;
+        }
+        if(len)
+            return false;
+
+        buffer[bufpos] = 0;
+        endElement((caddr_t)(buffer + 1));
+        bufpos = 0;
+        --ecount;
+        if(ecount < 0)
+            return false;
+        if(!ecount) {
+            state = END;
+            endDocument();
+        }
+    }
+    else if(*data == '!') {
+        bufpos = 0;
+        return true; // dtd
+    }
+    else if(*data == '?') {
+        if(!strnicmp(data, "?xml version=\"", 14)) {
+            // version info
+        }
+        bufpos = 0;
+    }
+    else if(!isElement(*data))
+        return false;
+    else {
+        end = false;
+        if(buffer[bufpos - 1] == '/') {
+            --bufpos;
+            end = true;
+        }
+        len = 0;
+        data = buffer;
+        while(len < bufpos) {
+            if(!isElement(*data))
+                break;
+            ++len;
+            ++data;
+        }
+        if(len == bufpos) {
+            if(!ecount)
+                startDocument();
+            ++ecount;
+            attrib[0] = attrib[1] = NULL;
+            buffer[bufpos] = 0;
+            startElement((caddr_t)buffer, attrib);
+            if(end) {
+ending:
+                --ecount;
+                endElement((caddr_t)buffer);
+                if(!ecount) {
+                    state = END;
+                    endDocument();
+                }
+            }
+            bufpos = 0;
+            return true;
+        }
+        if(!ecount)
+            startDocument();
+        ++ecount;
+
+        // attributes, name is between data and len
+
+        for(;;) {
+            while(!isElement(buffer[len]) && len < bufpos) {
+                if(!isspace(buffer[len]))
+                    return false;
+                buffer[len++] = 0;
+            }
+
+            if(len == bufpos)
+                break;
+
+            attrib[attr++] = (caddr_t)(buffer + len);
+            while(len < bufpos && isElement(buffer[len]))
+                ++len;
+
+            if(len == bufpos)
+                return false;
+
+            if(buffer[len] != '=')
+                return false;
+
+            buffer[len++] = 0;
+            if(len == bufpos) {
+                attrib[attr++] = (caddr_t)"";
+                break;
+            }
+
+            if(isspace(buffer[len])) {
+                attrib[attr++] = (caddr_t)"";
+                continue;
+            }
+            if(buffer[len] == '\'' || buffer[len] == '\"') {
+                ep = strchr(buffer + len + 1, buffer[len]);
+                if(!ep)
+                    return false;
+                attrib[attr++] = (caddr_t)buffer + len + 1;
+                *(ep++) = 0;
+                len = ep - buffer;
+                continue;
+            }
+            if(!isElement(buffer[len]))
+                return false;
+            attrib[attr++] = (caddr_t)buffer;
+            while(isElement(buffer[len]) && len < bufpos)
+                ++len;
+            if(len == bufpos) {
+                buffer[len] = 0;
+                break;
+            }
+        }
+
+        attrib[attr++] = NULL;
+        attrib[attr++] = NULL;
+        startElement((caddr_t)buffer, attrib);
+        if(end)
+            goto ending;
+        bufpos = 0;
+        return true;
+    }
+    return true;
+}
+
+// all our lovely base virtuals stubbed out so if we are lazy and forget to
+// implement something we want to ignore anyway (say comments...) we don't
+// bring whatever it is crashing down one day when we choose to add a
+// comment into an xml stream...
+
+void XMLParser::startDocument()
+{
+}
+
+void XMLParser::endDocument()
+{
+}
+
+void XMLParser::comment(caddr_t text, size_t len)
+{
+}
+
+void XMLParser::characters(caddr_t text, size_t len)
+{
+}
diff --git a/jni/libucommon/sources/directive b/jni/libucommon/sources/directive
new file mode 100644
index 0000000..240d8fc
--- /dev/null
+++ b/jni/libucommon/sources/directive
@@ -0,0 +1,3 @@
+version: 1.1
+directory: commoncpp
+filename: ucommon-6.0.7.tar.gz
diff --git a/jni/libucommon/sources/directive.in b/jni/libucommon/sources/directive.in
new file mode 100644
index 0000000..0b2520c
--- /dev/null
+++ b/jni/libucommon/sources/directive.in
@@ -0,0 +1,3 @@
+version: 1.1
+directory: commoncpp
+filename: ucommon-@VERSION@.tar.gz
diff --git a/jni/libucommon/sources/doxy.config.cmake b/jni/libucommon/sources/doxy.config.cmake
new file mode 100644
index 0000000..d940149
--- /dev/null
+++ b/jni/libucommon/sources/doxy.config.cmake
@@ -0,0 +1,79 @@
+PROJECT_NAME    = "@PROJECT_NAME@"
+OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@/doc
+OUTPUT_LANGUAGE = English
+FULL_PATH_NAMES = YES
+STRIP_FROM_PATH = @CMAKE_CURRENT_SOURCE_DIR@/inc
+SHORT_NAMES = YES
+TAB_SIZE = 4
+INPUT = @CMAKE_CURRENT_SOURCE_DIR@/inc/ucommon @CMAKE_CURRENT_SOURCE_DIR@/inc/commoncpp
+EXAMPLE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/test
+FILE_PATTERNS = *.h
+RECURSIVE = NO
+ALIASES = "license=\par License:\n"
+JAVADOC_AUTOBRIEF = YES
+OPTIMIZE_OUTPUT_FOR_C = YES
+OPTIMIZE_OUTPUT_JAVA = NO
+EXTRACT_ALL = NO
+EXTRACT_PRIVATE = NO
+EXTRACT_STATIC = NO
+HIDE_UNDOC_CLASSES = YES
+HIDE_UNDOC_MEMBERS = NO
+CASE_SENSE_NAMES = NO
+SHOW_INCLUDE_FILES = YES
+SORT_BY_SCOPE_NAME = YES
+SORT_GROUP_NAMES = YES
+SORT_BRIEF_DOCS = YES
+SORT_MEMBER_DOCS = YES
+SEARCH_INCLUDES = YES
+INCLUDE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/inc @CMAKE_CURRENT_SOURCE_DIR@/inc/ucommon @CMAKE_CURRENT_SOURCE_DIR@/inc/commoncpp /usr/include /usr/local/include
+GENERATE_TODOLIST = YES
+GENERATE_TESTLIST = YES
+GENERATE_BUGLIST = YES
+GENERATE_DEPRECATEDLIST = YES
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = YES
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
+ALPHABETICAL_INDEX = YES
+COLS_IN_ALPHA_INDEX = 5
+GENERATE_HTML = YES
+HTML_ALIGN_MEMBERS = YES
+GENERATE_HTMLHELP = YES
+GENERATE_TREEVIEW = YES
+TREEVIEW_WIDTH = 256
+GENERATE_LATEX = YES
+COMPACT_LATEX = YES
+PDF_HYPERLINKS = YES
+USE_PDFLATEX = NO
+LATEX_BATCHMODE = YES
+LATEX_HIDE_INDICES = NO
+GENERATE_RTF = YES
+COMPACT_RTF = YES
+RTF_HYPERLINKS = NO
+GENERATE_MAN = NO
+GENERATE_XML = NO
+GENERATE_PERLMOD = NO
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = YES
+EXPAND_ONLY_PREDEF = NO
+SEARCH_INCLUDES = YES
+PREDEFINED = AF_INET6 NEW_STDCPP
+CLASS_DIAGRAMS = YES
+COLLABORATION_GRAPH = YES
+HIDE_UNDOC_RELATIONS = NO
+HAVE_DOT = YES
+CLASS_GRAPH = YES
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+CALL_GRAPH = YES
+SOURCE_BROWSER = YES
+GRAPHICAL_HIERARCHY = YES
+DOT_IMAGE_FORMAT = png
+DOT_TRANSPARENT = YES
+# MAX_DOT_GRAPH_WIDTH = 1024
+# MAX_DOT_GRAPH_HEIGHT = 1024
+TEMPLATE_RELATIONS = NO
+GENERATE_LEGEND = YES
+SEARCHENGINE = NO
+WARN_IF_UNDOCUMENTED = NO
+
diff --git a/jni/libucommon/sources/gnutls/.deps/cipher.Plo b/jni/libucommon/sources/gnutls/.deps/cipher.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/.deps/cipher.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/gnutls/.deps/common.Plo b/jni/libucommon/sources/gnutls/.deps/common.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/.deps/common.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/gnutls/.deps/digest.Plo b/jni/libucommon/sources/gnutls/.deps/digest.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/.deps/digest.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/gnutls/.deps/hmac.Plo b/jni/libucommon/sources/gnutls/.deps/hmac.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/.deps/hmac.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/gnutls/.deps/random.Plo b/jni/libucommon/sources/gnutls/.deps/random.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/.deps/random.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/gnutls/.deps/secure.Plo b/jni/libucommon/sources/gnutls/.deps/secure.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/.deps/secure.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/gnutls/.deps/ssl.Plo b/jni/libucommon/sources/gnutls/.deps/ssl.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/.deps/ssl.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/gnutls/.deps/sstream.Plo b/jni/libucommon/sources/gnutls/.deps/sstream.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/.deps/sstream.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/gnutls/Makefile b/jni/libucommon/sources/gnutls/Makefile
new file mode 100644
index 0000000..16c5c01
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/Makefile
@@ -0,0 +1,701 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# gnutls/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2013 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.
+
+
+
+# Copyright (C) 2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+
+
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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)/ucommon
+pkgincludedir = $(includedir)/ucommon
+pkglibdir = $(libdir)/ucommon
+pkglibexecdir = $(libexecdir)/ucommon
+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 = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+target_triplet = x86_64-unknown-linux-gnu
+subdir = gnutls
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/autoconf/depcomp $(noinst_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+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)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libusecure_la_LIBADD =
+am_libusecure_la_OBJECTS = secure.lo ssl.lo digest.lo random.lo \
+	cipher.lo hmac.lo sstream.lo common.lo
+libusecure_la_OBJECTS = $(am_libusecure_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libusecure_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(libusecure_la_LDFLAGS) $(LDFLAGS) \
+	-o $@
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = -I. -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+SOURCES = $(libusecure_la_SOURCES)
+DIST_SOURCES = $(libusecure_la_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+HEADERS = $(noinst_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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing aclocal-1.13
+AMTAR = $${TAR-tar}
+AM_DEFAULT_VERBOSITY = 1
+AR = ar
+AS = as
+AUTOCONF = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoconf
+AUTOHEADER = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoheader
+AUTOMAKE = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing automake-1.13
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CHECKFLAGS = 
+COMPAT = commoncpp
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS =  -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DLLTOOL = dlltool
+DOXYGEN = /usr/bin/doxygen
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /usr/bin/grep -E
+EXEEXT = 
+FGREP = /usr/bin/grep -F
+GNUTLS_CFLAGS = 
+GNUTLS_LIBS = -lgnutls
+GREP = /usr/bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+LT_GENERIC = $(SHELL) $(top_builddir)/libtool
+LT_VERSION = 6:3:0
+MAKEINFO = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing makeinfo
+MANIFEST_TOOL = :
+MKDIR_P = /usr/bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_CFLAGS = 
+OPENSSL_LIBS = -lssl -lcrypto -lz 
+OTOOL = 
+OTOOL64 = 
+PACKAGE = ucommon
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = ucommon
+PACKAGE_STRING = ucommon 6.0.7
+PACKAGE_TARNAME = ucommon
+PACKAGE_URL = 
+PACKAGE_VERSION = 6.0.7
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PKG_CONFIG_LIBDIR = 
+PKG_CONFIG_PATH = 
+RANLIB = ranlib
+SECURE = gnutls
+SECURE_LIBS = -lgnutls
+SECURE_LOCAL = ../gnutls/libusecure.la -lgnutls
+SED = /usr/bin/sed
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = strip
+UCOMMON_CFGPATH = /etc
+UCOMMON_CLINK =  -lc
+UCOMMON_FLAGS =  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+UCOMMON_INCLUDES = /usr/local/include/ucommon
+UCOMMON_LIBC = -lc
+UCOMMON_LIBS =   -lrt  -ldl -lpthread -lc
+UCOMMON_LINKED =   -lrt  -ldl -lpthread
+UCOMMON_LOCALE = /usr/local/share/locale
+UCOMMON_MODEL = CXX
+UCOMMON_PREFIX = /usr/local
+UCOMMON_VARPATH = /var
+UCOMMON_VISIBILITY = 1
+VERSION = 6.0.7
+abs_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources/gnutls
+abs_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources/gnutls
+abs_top_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+abs_top_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+includes = ${includedir}/ucommon
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+libs = /usr/local/lib
+localedir = ${datarootdir}/locale
+localstatedir = /var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = /etc
+target = x86_64-unknown-linux-gnu
+target_alias = 
+target_cpu = x86_64
+target_os = linux-gnu
+target_vendor = unknown
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = ..
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = -version-info $(LT_VERSION)
+AM_CXXFLAGS = -I$(top_srcdir)/inc  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+noinst_HEADERS = local.h
+lib_LTLIBRARIES = libusecure.la
+libusecure_la_LDFLAGS = ../corelib/libucommon.la   -lrt  -ldl -lpthread -lc -lgnutls  -lc $(RELEASE)
+libusecure_la_SOURCES = secure.cpp ssl.cpp digest.cpp random.cpp cipher.cpp \
+    hmac.cpp sstream.cpp ../nossl/common.cpp
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(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) --gnu gnutls/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu gnutls/Makefile
+.PRECIOUS: 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):
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	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)'; 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)'; \
+	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}; \
+	}
+
+libusecure.la: $(libusecure_la_OBJECTS) $(libusecure_la_DEPENDENCIES) $(EXTRA_libusecure_la_DEPENDENCIES) 
+	$(AM_V_CXXLD)$(libusecure_la_LINK) -rpath $(libdir) $(libusecure_la_OBJECTS) $(libusecure_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/cipher.Plo
+include ./$(DEPDIR)/common.Plo
+include ./$(DEPDIR)/digest.Plo
+include ./$(DEPDIR)/hmac.Plo
+include ./$(DEPDIR)/random.Plo
+include ./$(DEPDIR)/secure.Plo
+include ./$(DEPDIR)/ssl.Plo
+include ./$(DEPDIR)/sstream.Plo
+
+.cpp.o:
+	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	$(AM_V_CXX)source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	$(AM_V_CXX)source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+#	$(AM_V_CXX)source='$<' object='$@' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(LTCXXCOMPILE) -c -o $@ $<
+
+common.lo: ../nossl/common.cpp
+	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT common.lo -MD -MP -MF $(DEPDIR)/common.Tpo -c -o common.lo `test -f '../nossl/common.cpp' || echo '$(srcdir)/'`../nossl/common.cpp
+	$(AM_V_at)$(am__mv) $(DEPDIR)/common.Tpo $(DEPDIR)/common.Plo
+#	$(AM_V_CXX)source='../nossl/common.cpp' object='common.lo' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o common.lo `test -f '../nossl/common.cpp' || echo '$(srcdir)/'`../nossl/common.cpp
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+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`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(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
+
+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
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)"; 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:
+
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+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
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool 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-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 tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+
+
+# 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/jni/libucommon/sources/gnutls/Makefile.am b/jni/libucommon/sources/gnutls/Makefile.am
new file mode 100644
index 0000000..6e3ce96
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/Makefile.am
@@ -0,0 +1,23 @@
+# Copyright (C) 2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = -version-info $(LT_VERSION)
+AM_CXXFLAGS = -I$(top_srcdir)/inc @UCOMMON_FLAGS@
+
+noinst_HEADERS = local.h
+
+lib_LTLIBRARIES = libusecure.la
+
+libusecure_la_LDFLAGS = ../corelib/libucommon.la @UCOMMON_LIBS@ @SECURE_LIBS@ @UCOMMON_CLINK@ $(RELEASE)
+libusecure_la_SOURCES = secure.cpp ssl.cpp digest.cpp random.cpp cipher.cpp \
+    hmac.cpp sstream.cpp ../nossl/common.cpp
+
+
diff --git a/jni/libucommon/sources/gnutls/Makefile.in b/jni/libucommon/sources/gnutls/Makefile.in
new file mode 100644
index 0000000..3e43b66
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/Makefile.in
@@ -0,0 +1,701 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 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@
+
+# Copyright (C) 2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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@
+target_triplet = @target@
+subdir = gnutls
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/autoconf/depcomp $(noinst_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+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)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libusecure_la_LIBADD =
+am_libusecure_la_OBJECTS = secure.lo ssl.lo digest.lo random.lo \
+	cipher.lo hmac.lo sstream.lo common.lo
+libusecure_la_OBJECTS = $(am_libusecure_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libusecure_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(libusecure_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)/autoconf/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+SOURCES = $(libusecure_la_SOURCES)
+DIST_SOURCES = $(libusecure_la_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+HEADERS = $(noinst_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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECKFLAGS = @CHECKFLAGS@
+COMPAT = @COMPAT@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_GENERIC = @LT_GENERIC@
+LT_VERSION = @LT_VERSION@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+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@
+RANLIB = @RANLIB@
+SECURE = @SECURE@
+SECURE_LIBS = @SECURE_LIBS@
+SECURE_LOCAL = @SECURE_LOCAL@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UCOMMON_CFGPATH = @UCOMMON_CFGPATH@
+UCOMMON_CLINK = @UCOMMON_CLINK@
+UCOMMON_FLAGS = @UCOMMON_FLAGS@
+UCOMMON_INCLUDES = @UCOMMON_INCLUDES@
+UCOMMON_LIBC = @UCOMMON_LIBC@
+UCOMMON_LIBS = @UCOMMON_LIBS@
+UCOMMON_LINKED = @UCOMMON_LINKED@
+UCOMMON_LOCALE = @UCOMMON_LOCALE@
+UCOMMON_MODEL = @UCOMMON_MODEL@
+UCOMMON_PREFIX = @UCOMMON_PREFIX@
+UCOMMON_VARPATH = @UCOMMON_VARPATH@
+UCOMMON_VISIBILITY = @UCOMMON_VISIBILITY@
+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_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+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@
+includes = @includes@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libs = @libs@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = -version-info $(LT_VERSION)
+AM_CXXFLAGS = -I$(top_srcdir)/inc @UCOMMON_FLAGS@
+noinst_HEADERS = local.h
+lib_LTLIBRARIES = libusecure.la
+libusecure_la_LDFLAGS = ../corelib/libucommon.la @UCOMMON_LIBS@ @SECURE_LIBS@ @UCOMMON_CLINK@ $(RELEASE)
+libusecure_la_SOURCES = secure.cpp ssl.cpp digest.cpp random.cpp cipher.cpp \
+    hmac.cpp sstream.cpp ../nossl/common.cpp
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(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) --gnu gnutls/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu gnutls/Makefile
+.PRECIOUS: 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):
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	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)'; 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)'; \
+	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}; \
+	}
+
+libusecure.la: $(libusecure_la_OBJECTS) $(libusecure_la_DEPENDENCIES) $(EXTRA_libusecure_la_DEPENDENCIES) 
+	$(AM_V_CXXLD)$(libusecure_la_LINK) -rpath $(libdir) $(libusecure_la_OBJECTS) $(libusecure_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/digest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hmac.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secure.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sstream.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+common.lo: ../nossl/common.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT common.lo -MD -MP -MF $(DEPDIR)/common.Tpo -c -o common.lo `test -f '../nossl/common.cpp' || echo '$(srcdir)/'`../nossl/common.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/common.Tpo $(DEPDIR)/common.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='../nossl/common.cpp' object='common.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o common.lo `test -f '../nossl/common.cpp' || echo '$(srcdir)/'`../nossl/common.cpp
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+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`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(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
+
+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
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)"; 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:
+
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+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
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool 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-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 tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+
+
+# 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/jni/libucommon/sources/gnutls/cipher.cpp b/jni/libucommon/sources/gnutls/cipher.cpp
new file mode 100644
index 0000000..348d9e3
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/cipher.cpp
@@ -0,0 +1,337 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+static const unsigned char *_salt = NULL;
+static unsigned _rounds = 1;
+
+int context::map_cipher(const char *cipher)
+{
+    char algoname[64];
+
+    enum {
+        NONE, CBC, ECB, CFB, OFB
+    } modeid;
+
+    String::set(algoname, sizeof(algoname), cipher);
+    char *fpart = strchr(algoname, '-');
+    char *lpart = strrchr(algoname, '-');
+
+    modeid = NONE;
+
+    if(lpart) {
+        if(fpart != lpart)
+            *(fpart++) = 0;
+        else
+            ++fpart;
+
+        *(lpart++) = 0;
+        if(eq_case(lpart, "cbc"))
+            modeid = CBC;
+        else if(eq_case(lpart, "ecb"))
+            modeid = ECB;
+        else if(eq_case(lpart, "cfb") || eq_case(lpart, "pgp"))
+            modeid = CFB;
+        else if(eq_case(lpart, "ofb"))
+            modeid = OFB;
+        else
+            modeid = NONE;    
+    }
+    else if(eq_case(cipher, "aes128") || eq_case(cipher, "aes"))
+        return GNUTLS_CIPHER_AES_128_CBC;
+    else if(eq_case(cipher, "aes256"))
+        return GNUTLS_CIPHER_AES_256_CBC;
+    else if(eq_case(cipher, "aes192"))
+        return GNUTLS_CIPHER_AES_192_CBC;
+    else if(eq_case(cipher, "arcfour") || eq_case(cipher, "arc4"))
+        return GNUTLS_CIPHER_ARCFOUR_128;
+    else if(eq_case(cipher, "des"))
+        return GNUTLS_CIPHER_DES_CBC;
+    else if(eq_case(cipher, "3des"))
+        return GNUTLS_CIPHER_3DES_CBC;
+    else if(eq_case(cipher, "rc2"))
+        return GNUTLS_CIPHER_RC2_40_CBC;
+    else if(eq_case(cipher, "idea"))
+        return GNUTLS_CIPHER_IDEA_PGP_CFB;
+    else if(eq_case(cipher, "twofish") || eq_case(cipher, "2fish"))
+        return GNUTLS_CIPHER_TWOFISH_PGP_CFB;
+    else if(eq_case(cipher, "blowfish"))
+        return GNUTLS_CIPHER_BLOWFISH_PGP_CFB;
+
+    else if(eq_case(algoname, "cast") || eq_case(algoname, "cast5"))
+        return GNUTLS_CIPHER_CAST5_PGP_CFB;
+
+    switch(modeid) {
+    case CFB:
+        if(eq_case(algoname, "aes")) {
+            if(atoi(fpart) == 128)
+                return GNUTLS_CIPHER_AES128_PGP_CFB;
+            if(atoi(fpart) == 192)
+                return GNUTLS_CIPHER_AES192_PGP_CFB;
+            if(atoi(fpart) == 256)
+                return GNUTLS_CIPHER_AES256_PGP_CFB;
+            return 0;
+        }
+
+        if(eq_case(algoname, "idea"))
+            return GNUTLS_CIPHER_IDEA_PGP_CFB;
+        if(eq_case(algoname, "3des"))
+            return GNUTLS_CIPHER_3DES_PGP_CFB;
+        if(eq_case(algoname, "cast") || eq_case(algoname, "cast5"))
+            return GNUTLS_CIPHER_CAST5_PGP_CFB;
+        if(eq_case(algoname, "twofish") || eq_case(algoname, "2fish"))
+            return GNUTLS_CIPHER_TWOFISH_PGP_CFB;
+        if(eq_case(algoname, "blowfish"))
+            return GNUTLS_CIPHER_BLOWFISH_PGP_CFB;
+        if(eq_case(algoname, "sk"))
+            return GNUTLS_CIPHER_SAFER_SK128_PGP_CFB;
+        return 0;
+    case CBC:
+        if(eq_case(algoname, "aes")) {
+            if(atoi(fpart) == 128)
+                return GNUTLS_CIPHER_AES_128_CBC;
+            if(atoi(fpart) == 192)
+                return GNUTLS_CIPHER_AES_192_CBC;
+            if(atoi(fpart) == 256)
+                return GNUTLS_CIPHER_AES_256_CBC;
+            return 0;
+        }
+        if(eq_case(algoname, "camellia")) {
+            if(atoi(fpart) == 128)
+                return GNUTLS_CIPHER_CAMELLIA_128_CBC;
+            if(atoi(fpart) == 256)
+                return GNUTLS_CIPHER_CAMELLIA_256_CBC;
+            return 0;
+        }
+        if(eq_case(algoname, "3des"))
+            return GNUTLS_CIPHER_3DES_CBC;
+        if(eq_case(algoname, "des"))
+            return GNUTLS_CIPHER_DES_CBC;
+        if(eq_case(algoname, "rc2"))
+            return GNUTLS_CIPHER_RC2_40_CBC;
+        return 0;
+    default:
+        if(eq_case(algoname, "arc4") || eq_case(algoname, "arcfour")) {
+            if(atoi(fpart) == 40)
+                return GNUTLS_CIPHER_ARCFOUR_40;
+            if(atoi(fpart) == 128)
+                return GNUTLS_CIPHER_ARCFOUR_128;
+        }
+        return 0;
+    }
+}
+
+void Cipher::Key::assign(const char *text, size_t size, const unsigned char *salt, unsigned count)
+{
+    if(!hashid || !algoid) {
+        keysize = 0;
+        return;
+    }
+
+    size_t kpos = 0, ivpos = 0;
+    size_t mdlen = gnutls_hash_get_len((MD_ID)hashid);
+    size_t tlen = strlen(text);
+
+    if(!hashid || !mdlen) {
+        clear();
+        return;
+    }
+
+    char previous[MAX_DIGEST_HASHSIZE / 8];
+    unsigned char temp[MAX_DIGEST_HASHSIZE / 8];
+    MD_CTX mdc;
+
+    unsigned prior = 0;
+    unsigned loop;
+
+    if(!salt)
+        salt = _salt;
+
+    if(!count)
+        count = _rounds;
+
+    do {
+        gnutls_hash_init(&mdc, (MD_ID)hashid);
+
+        if(prior++)
+            gnutls_hash(mdc, previous, mdlen);
+
+        gnutls_hash(mdc, text, tlen);
+
+        if(salt)
+            gnutls_hash(mdc, salt, 8);
+
+        gnutls_hash_deinit(mdc, previous);
+
+        for(loop = 1; loop < count; ++loop) {
+            memcpy(temp, previous, mdlen);
+            gnutls_hash_fast((MD_ID)hashid, temp, mdlen, previous); 
+        }
+
+        size_t pos = 0;
+        while(kpos < keysize && pos < mdlen)
+            keybuf[kpos++] = previous[pos++];
+        while(ivpos < blksize && pos < mdlen)
+            ivbuf[ivpos++] = previous[pos++];
+    } while(kpos < keysize || ivpos < blksize);
+}
+
+void Cipher::Key::assign(const char *text, size_t size)
+{
+    assign(text, size, _salt, _rounds);
+}
+
+void Cipher::Key::options(const unsigned char *salt, unsigned rounds)
+{
+    _salt = salt;
+    _rounds = rounds;
+}
+
+void Cipher::Key::set(const char *cipher, const char *digest)
+{
+    set(cipher);
+
+    hashid = context::map_digest(digest);
+}
+
+void Cipher::Key::set(const char *cipher)
+{
+    clear();
+    
+    algoid = context::map_cipher(cipher);
+
+    if(algoid) {
+        blksize = gnutls_cipher_get_block_size((CIPHER_ID)algoid);
+        keysize = gnutls_cipher_get_key_size((CIPHER_ID)algoid);
+    }
+}
+
+void Cipher::push(unsigned char *address, size_t size)
+{
+}
+
+void Cipher::release(void)
+{
+    keys.clear();
+    if(context) {
+        gnutls_cipher_deinit((CIPHER_CTX)context);
+        context = NULL;
+    }
+}
+
+bool Cipher::has(const char *cipher)
+{
+    return context::map_cipher(cipher) != 0;
+}
+
+void Cipher::set(const key_t key, mode_t mode, unsigned char *address, size_t size)
+{
+    release();
+
+    bufsize = size;
+    bufmode = mode;
+    bufaddr = address;
+
+    memcpy(&keys, key, sizeof(keys));
+    if(!keys.keysize)
+        return;
+
+    gnutls_datum_t keyinfo, ivinfo;
+    keyinfo.data = keys.keybuf;
+    keyinfo.size = keys.keysize;
+    ivinfo.data = keys.ivbuf;
+    ivinfo.size = keys.blksize;
+
+    gnutls_cipher_init((CIPHER_CTX *)&context, (CIPHER_ID)keys.algoid, &keyinfo, &ivinfo);
+}
+
+size_t Cipher::put(const unsigned char *data, size_t size)
+{
+    if(size % keys.iosize() || !bufaddr)
+        return 0;
+
+    size_t count = 0;
+
+    while(bufsize && size + bufpos > bufsize) {
+        size_t diff = bufsize - bufpos;
+        count += put(data, diff);
+        data += diff;
+        size -= diff;
+    }
+
+    switch(bufmode) {
+    case Cipher::ENCRYPT:
+        gnutls_cipher_encrypt2((CIPHER_CTX)context, (void *)data, size, bufaddr + bufpos, size);
+        break;
+    case Cipher::DECRYPT:
+        gnutls_cipher_decrypt2((CIPHER_CTX)context, data, size, bufaddr + bufpos, size);
+    }
+
+    count += size;
+    if(!count) {
+        release();
+        return 0;
+    }
+    bufpos += size;
+    if(bufsize && bufpos >= bufsize) {
+        push(bufaddr, bufsize);
+        bufpos = 0;
+    }
+    return count;
+}
+
+size_t Cipher::pad(const unsigned char *data, size_t size)
+{
+    size_t padsz = 0;
+    unsigned char padbuf[64];
+    const unsigned char *ep;
+
+    if(!bufaddr)
+        return 0;
+
+    switch(bufmode) {
+    case DECRYPT:
+        if(size % keys.iosize())
+            return 0;
+        put(data, size);
+        ep = data + size - 1;
+        bufpos -= *ep;
+        size -= *ep;
+        break;
+    case ENCRYPT:
+        padsz = size % keys.iosize();
+        put(data, size - padsz);
+        if(padsz) {
+            memcpy(padbuf, data + size - padsz, padsz);
+            memset(padbuf + padsz, keys.iosize() - padsz, keys.iosize() - padsz);
+            size = (size - padsz) + keys.iosize();
+        }
+        else {
+            size += keys.iosize();
+            memset(padbuf, keys.iosize(), keys.iosize());
+        }
+
+        put((const unsigned char *)padbuf, keys.iosize());
+        zerofill(padbuf, sizeof(padbuf));
+    }
+
+    flush();
+    return size;
+}
+
+
diff --git a/jni/libucommon/sources/gnutls/digest.cpp b/jni/libucommon/sources/gnutls/digest.cpp
new file mode 100644
index 0000000..bd360d9
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/digest.cpp
@@ -0,0 +1,159 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+void Digest::release(void)
+{
+    if(context) {
+        gnutls_hash_deinit((MD_CTX)context, buffer);
+        context = NULL;
+    }
+
+    bufsize = 0;
+    textbuf[0] = 0;
+    hashid = 0;
+}
+
+int context::map_digest(const char *type)
+{
+    if(eq_case(type, "sha") || eq_case(type, "sha1")) 
+        return GNUTLS_DIG_SHA1;
+    else if(eq_case(type, "sha256"))
+        return GNUTLS_DIG_SHA256;
+    else if(eq_case(type, "sha512"))
+        return GNUTLS_DIG_SHA512;
+    else if(eq_case(type, "md5"))
+        return GNUTLS_DIG_MD5;
+    else if(eq_case(type, "md2"))
+        return GNUTLS_DIG_MD2;
+    else if(eq_case(type, "rmd160"))
+        return GNUTLS_DIG_RMD160;
+    else
+        return 0;
+}
+
+void Digest::set(const char *type)
+{
+    secure::init();
+
+    release();
+
+    hashid = context::map_digest(type);
+    
+    if(!hashid || gnutls_hash_get_len((MD_ID)hashid) < 1) {
+        hashid = 0;
+        return;
+    }
+
+    gnutls_hash_init((MD_CTX *)&context, (MD_ID)hashid);
+}
+
+bool Digest::has(const char *type)
+{
+    MD_ID id = (MD_ID)context::map_digest(type);
+
+    if(!id || (gnutls_hash_get_len(id) < 1))
+        return false;
+
+    return true;
+}
+
+bool Digest::put(const void *address, size_t size)
+{
+    if(!context || hashid == 0)
+        return false;
+
+    gnutls_hash((MD_CTX)context, address, size);
+    return true;
+}
+
+void Digest::reset(void)
+{
+    unsigned char temp[MAX_DIGEST_HASHSIZE / 8];
+
+    if(context) {
+        gnutls_hash_deinit((MD_CTX)context, temp);
+        context = NULL;
+    }
+    if(hashid == 0)
+        return;
+
+    gnutls_hash_init((MD_CTX *)&context, (MD_ID)hashid);
+    bufsize = 0;
+}
+
+void Digest::recycle(bool bin)
+{
+    unsigned size = bufsize;
+
+    if(!context || hashid == 0)
+        return;
+
+    if(!bufsize) {
+        gnutls_hash_deinit((MD_CTX)context, buffer);
+        context = NULL;
+        gnutls_hash_init((MD_CTX *)&context, (MD_ID)hashid);
+    }
+    else
+        Digest::reset();
+
+    size = gnutls_hash_get_len((MD_ID)hashid);
+
+    if(!size || !context || !hashid)
+        return;
+
+    if(bin)
+        gnutls_hash((MD_CTX)context, buffer, size);
+    else {
+        unsigned count = 0;
+
+        while(count < size) {
+            snprintf(textbuf + (count * 2), 3, "%2.2x",
+buffer[count]);
+            ++count;
+
+        }
+        gnutls_hash((MD_CTX)context, textbuf, size * 2);
+    }
+    bufsize = 0;
+}
+
+const unsigned char *Digest::get(void)
+{
+    unsigned count = 0;
+    unsigned size = 0;
+
+    if(bufsize)
+        return buffer;
+
+    if(!context || hashid == 0)
+        return NULL;
+
+    gnutls_hash_deinit((MD_CTX)context, buffer);
+    size = gnutls_hash_get_len((MD_ID)hashid);
+    context = NULL;
+    bufsize = size;
+
+    while(count < bufsize) {
+        snprintf(textbuf + (count * 2), 3, "%2.2x",
+buffer[count]);
+        ++count;
+    }
+    return buffer;
+}
+
diff --git a/jni/libucommon/sources/gnutls/hmac.cpp b/jni/libucommon/sources/gnutls/hmac.cpp
new file mode 100644
index 0000000..d0b8cbf
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/hmac.cpp
@@ -0,0 +1,130 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+// for older/broken versions of gnutls_hmac_init headers
+
+class multicode
+{
+public:
+    int code;
+
+    inline operator HMAC_ID()
+        {return (HMAC_ID)code;}
+
+    inline operator MD_ID()
+        {return (MD_ID)code;}
+};
+
+void HMAC::release(void)
+{
+    if(context) {
+        gnutls_hmac_deinit((HMAC_CTX)context, buffer);
+        context = NULL;
+    }
+
+    bufsize = 0;
+    textbuf[0] = 0;
+    hmacid = 0;
+}
+
+int context::map_hmac(const char *type)
+{
+    if(eq_case(type, "sha") || eq_case(type, "sha1")) 
+        return GNUTLS_MAC_SHA1;
+    else if(eq_case(type, "sha256"))
+        return GNUTLS_MAC_SHA256;
+    else if(eq_case(type, "sha224"))
+        return GNUTLS_MAC_SHA224;
+    else if(eq_case(type, "sha384"))
+        return GNUTLS_MAC_SHA384;
+    else if(eq_case(type, "sha512"))
+        return GNUTLS_MAC_SHA512;
+    else if(eq_case(type, "md5"))
+        return GNUTLS_MAC_MD5;
+    else if(eq_case(type, "md2"))
+        return GNUTLS_MAC_MD2;
+    else if(eq_case(type, "rmd160"))
+        return GNUTLS_MAC_RMD160;
+    else
+        return 0;
+}
+
+void HMAC::set(const char *digest, const char *key, size_t len)
+{
+    secure::init();
+
+    release();
+
+    if(!len)
+        len = strlen(key);
+
+    if(!len)
+        return;
+
+    hmacid = context::map_hmac(digest);
+
+    multicode id;
+    id.code = hmacid;
+
+    if(hmacid)
+        gnutls_hmac_init((HMAC_CTX *)&context, id, key, len);
+}
+
+bool HMAC::has(const char *type)
+{
+    HMAC_ID id = (HMAC_ID)context::map_hmac(type);
+
+    if(!id || (gnutls_hmac_get_len(id) < 1))
+        return false;
+
+    return true;
+}
+
+bool HMAC::put(const void *address, size_t size)
+{
+    if(!context || hmacid == 0)
+        return false;
+
+    gnutls_hmac((HMAC_CTX)context, address, size);
+    return true;
+}
+
+const unsigned char *HMAC::get(void)
+{
+    unsigned count = 0;
+    unsigned size = 0;
+
+    if(bufsize)
+        return buffer;
+
+    if(!context || hmacid == 0)
+        return NULL;
+
+    size = gnutls_hmac_get_len((HMAC_ID)hmacid);
+    release();
+
+    bufsize = size;
+
+    while(count < bufsize) {
+        snprintf(textbuf + (count * 2), 3, "%2.2x",
+buffer[count]);
+        ++count;
+    }
+    return buffer;
+}
diff --git a/jni/libucommon/sources/gnutls/local.h b/jni/libucommon/sources/gnutls/local.h
new file mode 100644
index 0000000..4c358e9
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/local.h
@@ -0,0 +1,67 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/ucommon.h>
+#include <ucommon/export.h>
+#include <ucommon/secure.h>
+#include <gnutls/gnutls.h>
+#include <gnutls/crypto.h>
+
+#ifdef  _MSWINDOWS_
+#include <wincrypt.h>
+#endif
+
+#define NAMESPACE_LOCAL namespace __secure__ {
+#define LOCAL_NAMESPACE __secure__
+
+NAMESPACE_LOCAL
+using namespace UCOMMON_NAMESPACE;
+
+class __LOCAL context : public secure
+{
+public:
+    ~context();
+
+    unsigned int connect;
+    gnutls_credentials_type_t xtype;
+    gnutls_certificate_credentials_t xcred;
+    gnutls_dh_params_t dh;
+
+    static gnutls_priority_t priority_cache;
+
+    static gnutls_session_t session(context *ctx);
+
+    static int map_digest(const char *type);
+    static int map_cipher(const char *type);
+    static int map_hmac(const char *type);
+};
+
+typedef gnutls_session_t SSL;
+typedef gnutls_mac_algorithm_t HMAC_ID;
+typedef gnutls_hmac_hd_t HMAC_CTX;
+typedef gnutls_digest_algorithm_t MD_ID;
+typedef gnutls_hash_hd_t MD_CTX;
+typedef gnutls_cipher_hd_t CIPHER_CTX;
+typedef gnutls_cipher_algorithm_t CIPHER_ID;
+typedef gnutls_datum_t CIPHER_KEYDATA;
+typedef context *SSL_CTX;
+
+END_NAMESPACE
+
+using namespace UCOMMON_NAMESPACE;
+using namespace LOCAL_NAMESPACE;
diff --git a/jni/libucommon/sources/gnutls/random.cpp b/jni/libucommon/sources/gnutls/random.cpp
new file mode 100644
index 0000000..e83b369
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/random.cpp
@@ -0,0 +1,48 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+void Random::seed(void)
+{
+    secure::init();
+}
+
+bool Random::seed(const unsigned char *buf, size_t size)
+{
+    secure::init();
+    return true;
+}
+
+size_t Random::key(unsigned char *buf, size_t size)
+{
+    gnutls_rnd(GNUTLS_RND_KEY, buf, size);
+    return 0;
+}
+
+size_t Random::fill(unsigned char *buf, size_t size)
+{
+    gnutls_rnd(GNUTLS_RND_RANDOM, buf, size);
+    return 0;
+}
+
+bool Random::status(void)
+{
+    return true;
+}
+
+
diff --git a/jni/libucommon/sources/gnutls/secure.cpp b/jni/libucommon/sources/gnutls/secure.cpp
new file mode 100644
index 0000000..8746eca
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/secure.cpp
@@ -0,0 +1,147 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+extern "C" {
+    static void secure_shutdown(void)
+    {
+        gnutls_global_deinit();
+    }
+}
+
+gnutls_priority_t context::priority_cache;
+
+bool secure::fips(void)
+{
+    return false;
+}
+
+bool secure::init(void)
+{
+    static bool initialized = false;
+
+    if(!initialized) {
+        Thread::init();
+        Socket::init();
+
+        gnutls_global_init();
+        gnutls_priority_init (&context::priority_cache, "NORMAL", NULL);
+        atexit(secure_shutdown);
+        initialized = true;
+    }
+    return true;
+}
+
+secure::server_t secure::server(const char *certfile, const char *ca)
+{
+    context *ctx = new context;
+
+    if(!ctx)
+        return NULL;
+
+    ctx->error = secure::OK;
+    ctx->connect = GNUTLS_SERVER;
+    ctx->xtype = GNUTLS_CRD_CERTIFICATE;
+    ctx->xcred = NULL;
+    ctx->dh = NULL;
+    gnutls_certificate_allocate_credentials(&ctx->xcred);
+
+    gnutls_certificate_set_x509_key_file(ctx->xcred, certfile, certfile, GNUTLS_X509_FMT_PEM);
+
+    if(!ca)
+        return ctx;
+
+    if(eq(ca, "*"))
+        ca = oscerts();
+
+    gnutls_certificate_set_x509_trust_file (ctx->xcred, ca, GNUTLS_X509_FMT_PEM);
+
+    return ctx;
+}
+
+secure::client_t secure::client(const char *ca)
+{
+    context *ctx = new context;
+
+    if(!ctx)
+        return NULL;
+
+    ctx->error = secure::OK;
+    ctx->connect = GNUTLS_CLIENT;
+    ctx->xtype = GNUTLS_CRD_CERTIFICATE;
+    ctx->xcred = NULL;
+    ctx->dh = NULL;
+    gnutls_certificate_allocate_credentials(&ctx->xcred);
+
+    if(!ca)
+        return ctx;
+
+    if(eq(ca, "*"))
+        ca = oscerts();
+
+    gnutls_certificate_set_x509_trust_file (ctx->xcred, ca, GNUTLS_X509_FMT_PEM);
+
+    return ctx;
+}
+
+context::~context()
+{
+    if(dh)
+        gnutls_dh_params_deinit(dh);
+
+    if(!xcred)
+        return;
+
+    switch(xtype) {
+    case GNUTLS_CRD_ANON:
+        gnutls_anon_free_client_credentials((gnutls_anon_client_credentials_t)xcred);
+        break;
+    case GNUTLS_CRD_CERTIFICATE:
+        gnutls_certificate_free_credentials(xcred);
+        break;
+    default:
+        break;
+    }
+}
+
+secure::~secure()
+{
+}
+
+gnutls_session_t context::session(context *ctx)
+{
+    SSL ssl = NULL;
+    if(ctx && ctx->xcred && ctx->err() == secure::OK) {
+        gnutls_init(&ssl, ctx->connect);
+        switch(ctx->connect) {
+        case GNUTLS_CLIENT:
+            gnutls_priority_set_direct(ssl, "PERFORMANCE", NULL);
+            break;
+        case GNUTLS_SERVER:
+            gnutls_priority_set(ssl, context::priority_cache);
+            gnutls_certificate_server_set_request(ssl, GNUTLS_CERT_REQUEST);
+            gnutls_session_enable_compatibility_mode(ssl);
+        default:
+            break;
+        }
+        gnutls_credentials_set(ssl, ctx->xtype, ctx->xcred);
+    }
+    return ssl;
+}
+
+
diff --git a/jni/libucommon/sources/gnutls/ssl.cpp b/jni/libucommon/sources/gnutls/ssl.cpp
new file mode 100644
index 0000000..3f2cb70
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/ssl.cpp
@@ -0,0 +1,130 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+SSLBuffer::SSLBuffer(const TCPServer *tcp, secure::server_t scontext, size_t size) :
+TCPBuffer(tcp, size)
+{
+    ssl = context::session((context *)scontext);
+    bio = NULL;
+    server = true;
+
+    if(!is_open() || !ssl)
+        return;
+
+    gnutls_transport_set_ptr((SSL)ssl, reinterpret_cast<gnutls_transport_ptr_t>( so));
+    int result = gnutls_handshake((SSL)ssl);
+
+    if(result >= 0)
+        bio = ssl;
+
+}
+
+SSLBuffer::SSLBuffer(secure::client_t scontext) :
+TCPBuffer()
+{
+    ssl = context::session((context *)scontext);
+    bio = NULL;
+    server = false;
+}
+
+SSLBuffer::~SSLBuffer()
+{
+    release();
+}
+
+bool SSLBuffer::_pending(void)
+{
+    return TCPBuffer::_pending();
+}
+
+void SSLBuffer::open(const char *host, const char *service, size_t size)
+{
+    if(server) {
+        ioerr = EBADF;
+        return;
+    }
+
+    close();
+
+    TCPBuffer::open(host, service, size);
+
+    if(!is_open() || !ssl)
+        return;
+
+    gnutls_transport_set_ptr((SSL)ssl, reinterpret_cast<gnutls_transport_ptr_t>(so));
+    int result = gnutls_handshake((SSL)ssl);
+
+    if(result >= 0)
+        bio = ssl;
+}
+
+void SSLBuffer::close(void)
+{
+    if(server) {
+        ioerr = EBADF;
+        return;
+    }
+
+    if(bio)
+        gnutls_bye((SSL)ssl, GNUTLS_SHUT_RDWR);
+    bio = NULL;
+    TCPBuffer::close();
+}
+
+void SSLBuffer::release(void)
+{
+    server = false;
+    close();
+    if(ssl) {
+        gnutls_deinit((SSL)ssl);
+        ssl = NULL;
+    }
+}
+
+bool SSLBuffer::_flush(void)
+{
+    return TCPBuffer::_flush();
+}
+
+size_t SSLBuffer::_push(const char *address, size_t size)
+{
+    if(!bio)
+        return TCPBuffer::_push(address, size);
+
+    int result = gnutls_record_send((SSL)ssl, address, size);
+    if(result < 0) {
+        result = 0;
+        ioerr = EIO;
+    }
+    return (size_t)result;
+}
+
+size_t SSLBuffer::_pull(char *address, size_t size)
+{
+    if(!bio)
+        return TCPBuffer::_pull(address, size);
+
+    int result = gnutls_record_recv((SSL)ssl, address, size);
+    if(result < 0) {
+        result = 0;
+        ioerr = EIO;
+    }
+    return (size_t)result;
+}
+
diff --git a/jni/libucommon/sources/gnutls/sstream.cpp b/jni/libucommon/sources/gnutls/sstream.cpp
new file mode 100644
index 0000000..60feafb
--- /dev/null
+++ b/jni/libucommon/sources/gnutls/sstream.cpp
@@ -0,0 +1,125 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+#if defined(OLD_STDCPP) || defined(NEW_STDCPP)
+
+sstream::sstream(secure::client_t scontext) :
+tcpstream()
+{
+    ssl = context::session((context *)scontext);
+    bio = NULL;
+    server = false;
+}
+
+sstream::sstream(const TCPServer *tcp, secure::server_t scontext, size_t size) :
+tcpstream(tcp, size)
+{
+
+    ssl = context::session((context *)scontext);
+    bio = NULL;
+    server = true;
+
+    if(!is_open() || !ssl)
+        return;
+
+    gnutls_transport_set_ptr((SSL)ssl, reinterpret_cast<gnutls_transport_ptr_t>( so));
+    int result = gnutls_handshake((SSL)ssl);
+
+    if(result >= 0)
+        bio = ssl;
+}
+
+sstream::~sstream()
+{
+    release();
+}
+
+void sstream::open(const char *host, const char *service, size_t bufsize)
+{
+    if(server)
+        return;
+
+    close();
+    tcpstream::open(host, service, bufsize);
+
+    if(!is_open() || !ssl)
+        return;
+
+    gnutls_transport_set_ptr((SSL)ssl, reinterpret_cast<gnutls_transport_ptr_t>(so));
+    int result = gnutls_handshake((SSL)ssl);
+
+    if(result >= 0)
+        bio = ssl;
+}
+
+void sstream::close(void)
+{
+    if(server)
+        return;
+
+    if(bio) {
+        gnutls_bye((SSL)ssl, GNUTLS_SHUT_RDWR);
+        bio = NULL;
+    }
+
+    tcpstream::close();
+}
+
+void sstream::release(void)
+{
+    server = false;
+    close();
+
+    if(ssl) {
+        gnutls_deinit((SSL)ssl);
+        ssl = NULL;
+    }
+}
+
+ssize_t sstream::_write(const char *address, size_t size)
+{
+    if(!bio)
+        return tcpstream::_write(address, size);
+
+    return gnutls_record_send((SSL)ssl, address, size);
+}
+
+ssize_t sstream::_read(char *address, size_t size)
+{
+    if(!bio)
+        return tcpstream::_read(address, size);
+
+    return gnutls_record_recv((SSL)ssl, address, size);
+}
+
+bool sstream::_wait(void)
+{
+    // we have no way to examine the pending queue in gnutls??
+    if(ssl)
+        return true;
+
+    return tcpstream::_wait();
+}
+
+int sstream::sync()
+{
+    return tcpstream::sync();
+}
+
+#endif
diff --git a/jni/libucommon/sources/inc/Makefile b/jni/libucommon/sources/inc/Makefile
new file mode 100644
index 0000000..bb09a34
--- /dev/null
+++ b/jni/libucommon/sources/inc/Makefile
@@ -0,0 +1,654 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# inc/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2013 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.
+
+
+
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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)/ucommon
+pkgincludedir = $(includedir)/ucommon
+pkglibdir = $(libdir)/ucommon
+pkglibexecdir = $(libexecdir)/ucommon
+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 = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+target_triplet = x86_64-unknown-linux-gnu
+subdir = inc
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+am__v_at_1 = 
+SOURCES =
+DIST_SOURCES =
+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
+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 \
+	distdir
+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
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+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"
+ACLOCAL = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing aclocal-1.13
+AMTAR = $${TAR-tar}
+AM_DEFAULT_VERBOSITY = 1
+AR = ar
+AS = as
+AUTOCONF = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoconf
+AUTOHEADER = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoheader
+AUTOMAKE = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing automake-1.13
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CHECKFLAGS = 
+COMPAT = commoncpp
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS =  -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DLLTOOL = dlltool
+DOXYGEN = /usr/bin/doxygen
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /usr/bin/grep -E
+EXEEXT = 
+FGREP = /usr/bin/grep -F
+GNUTLS_CFLAGS = 
+GNUTLS_LIBS = -lgnutls
+GREP = /usr/bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+LT_GENERIC = $(SHELL) $(top_builddir)/libtool
+LT_VERSION = 6:3:0
+MAKEINFO = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing makeinfo
+MANIFEST_TOOL = :
+MKDIR_P = /usr/bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_CFLAGS = 
+OPENSSL_LIBS = -lssl -lcrypto -lz 
+OTOOL = 
+OTOOL64 = 
+PACKAGE = ucommon
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = ucommon
+PACKAGE_STRING = ucommon 6.0.7
+PACKAGE_TARNAME = ucommon
+PACKAGE_URL = 
+PACKAGE_VERSION = 6.0.7
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PKG_CONFIG_LIBDIR = 
+PKG_CONFIG_PATH = 
+RANLIB = ranlib
+SECURE = gnutls
+SECURE_LIBS = -lgnutls
+SECURE_LOCAL = ../gnutls/libusecure.la -lgnutls
+SED = /usr/bin/sed
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = strip
+UCOMMON_CFGPATH = /etc
+UCOMMON_CLINK =  -lc
+UCOMMON_FLAGS =  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+UCOMMON_INCLUDES = /usr/local/include/ucommon
+UCOMMON_LIBC = -lc
+UCOMMON_LIBS =   -lrt  -ldl -lpthread -lc
+UCOMMON_LINKED =   -lrt  -ldl -lpthread
+UCOMMON_LOCALE = /usr/local/share/locale
+UCOMMON_MODEL = CXX
+UCOMMON_PREFIX = /usr/local
+UCOMMON_VARPATH = /var
+UCOMMON_VISIBILITY = 1
+VERSION = 6.0.7
+abs_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources/inc
+abs_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources/inc
+abs_top_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+abs_top_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+includes = ${includedir}/ucommon
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+libs = /usr/local/lib
+localedir = ${datarootdir}/locale
+localstatedir = /var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = /etc
+target = x86_64-unknown-linux-gnu
+target_alias = 
+target_cpu = x86_64
+target_os = linux-gnu
+target_vendor = unknown
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = ..
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = $(LT_VERSION) -release $(LT_RELEASE)
+AM_CXXFLAGS = $(UCOMMON_FLAGS)
+EXTRA_DIST = *.cmake
+SUBDIRS = ucommon commoncpp
+all: all-recursive
+
+.SUFFIXES:
+$(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) --gnu inc/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu inc/Makefile
+.PRECIOUS: 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):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+# 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.
+$(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//`; \
+	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; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(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"
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: 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; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+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) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+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
+
+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
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    $(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="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+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:
+
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+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
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+	check-am clean clean-generic clean-libtool cscopelist-am ctags \
+	ctags-am distclean 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 \
+	installdirs-am maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am tags tags-am uninstall uninstall-am
+
+
+# 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/jni/libucommon/sources/inc/Makefile.am b/jni/libucommon/sources/inc/Makefile.am
new file mode 100644
index 0000000..e7cc364
--- /dev/null
+++ b/jni/libucommon/sources/inc/Makefile.am
@@ -0,0 +1,17 @@
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = $(LT_VERSION) -release $(LT_RELEASE)
+AM_CXXFLAGS = $(UCOMMON_FLAGS)
+EXTRA_DIST = *.cmake
+
+SUBDIRS = ucommon commoncpp
+
diff --git a/jni/libucommon/sources/inc/Makefile.in b/jni/libucommon/sources/inc/Makefile.in
new file mode 100644
index 0000000..ff502a9
--- /dev/null
+++ b/jni/libucommon/sources/inc/Makefile.in
@@ -0,0 +1,654 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 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@
+
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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@
+target_triplet = @target@
+subdir = inc
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-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 =
+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
+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 \
+	distdir
+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
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+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"
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECKFLAGS = @CHECKFLAGS@
+COMPAT = @COMPAT@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_GENERIC = @LT_GENERIC@
+LT_VERSION = @LT_VERSION@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+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@
+RANLIB = @RANLIB@
+SECURE = @SECURE@
+SECURE_LIBS = @SECURE_LIBS@
+SECURE_LOCAL = @SECURE_LOCAL@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UCOMMON_CFGPATH = @UCOMMON_CFGPATH@
+UCOMMON_CLINK = @UCOMMON_CLINK@
+UCOMMON_FLAGS = @UCOMMON_FLAGS@
+UCOMMON_INCLUDES = @UCOMMON_INCLUDES@
+UCOMMON_LIBC = @UCOMMON_LIBC@
+UCOMMON_LIBS = @UCOMMON_LIBS@
+UCOMMON_LINKED = @UCOMMON_LINKED@
+UCOMMON_LOCALE = @UCOMMON_LOCALE@
+UCOMMON_MODEL = @UCOMMON_MODEL@
+UCOMMON_PREFIX = @UCOMMON_PREFIX@
+UCOMMON_VARPATH = @UCOMMON_VARPATH@
+UCOMMON_VISIBILITY = @UCOMMON_VISIBILITY@
+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_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+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@
+includes = @includes@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libs = @libs@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = $(LT_VERSION) -release $(LT_RELEASE)
+AM_CXXFLAGS = $(UCOMMON_FLAGS)
+EXTRA_DIST = *.cmake
+SUBDIRS = ucommon commoncpp
+all: all-recursive
+
+.SUFFIXES:
+$(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) --gnu inc/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu inc/Makefile
+.PRECIOUS: 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):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+# 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.
+$(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//`; \
+	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; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(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"
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: 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; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+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) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+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
+
+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
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    $(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="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+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:
+
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+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
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+	check-am clean clean-generic clean-libtool cscopelist-am ctags \
+	ctags-am distclean 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 \
+	installdirs-am maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am tags tags-am uninstall uninstall-am
+
+
+# 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/jni/libucommon/sources/inc/commoncpp/Makefile b/jni/libucommon/sources/inc/commoncpp/Makefile
new file mode 100644
index 0000000..1e96074
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/Makefile
@@ -0,0 +1,598 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# inc/commoncpp/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2013 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.
+
+
+
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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)/ucommon
+pkglibdir = $(libdir)/ucommon
+pkglibexecdir = $(libexecdir)/ucommon
+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 = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+target_triplet = x86_64-unknown-linux-gnu
+subdir = inc/commoncpp
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(pkginclude_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+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
+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)$(pkgincludedir)"
+HEADERS = $(pkginclude_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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkgincludedir = $(includedir)/commoncpp
+ACLOCAL = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing aclocal-1.13
+AMTAR = $${TAR-tar}
+AM_DEFAULT_VERBOSITY = 1
+AR = ar
+AS = as
+AUTOCONF = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoconf
+AUTOHEADER = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoheader
+AUTOMAKE = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing automake-1.13
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CHECKFLAGS = 
+COMPAT = commoncpp
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS =  -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DLLTOOL = dlltool
+DOXYGEN = /usr/bin/doxygen
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /usr/bin/grep -E
+EXEEXT = 
+FGREP = /usr/bin/grep -F
+GNUTLS_CFLAGS = 
+GNUTLS_LIBS = -lgnutls
+GREP = /usr/bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+LT_GENERIC = $(SHELL) $(top_builddir)/libtool
+LT_VERSION = 6:3:0
+MAKEINFO = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing makeinfo
+MANIFEST_TOOL = :
+MKDIR_P = /usr/bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_CFLAGS = 
+OPENSSL_LIBS = -lssl -lcrypto -lz 
+OTOOL = 
+OTOOL64 = 
+PACKAGE = ucommon
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = ucommon
+PACKAGE_STRING = ucommon 6.0.7
+PACKAGE_TARNAME = ucommon
+PACKAGE_URL = 
+PACKAGE_VERSION = 6.0.7
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PKG_CONFIG_LIBDIR = 
+PKG_CONFIG_PATH = 
+RANLIB = ranlib
+SECURE = gnutls
+SECURE_LIBS = -lgnutls
+SECURE_LOCAL = ../gnutls/libusecure.la -lgnutls
+SED = /usr/bin/sed
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = strip
+UCOMMON_CFGPATH = /etc
+UCOMMON_CLINK =  -lc
+UCOMMON_FLAGS =  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+UCOMMON_INCLUDES = /usr/local/include/ucommon
+UCOMMON_LIBC = -lc
+UCOMMON_LIBS =   -lrt  -ldl -lpthread -lc
+UCOMMON_LINKED =   -lrt  -ldl -lpthread
+UCOMMON_LOCALE = /usr/local/share/locale
+UCOMMON_MODEL = CXX
+UCOMMON_PREFIX = /usr/local
+UCOMMON_VARPATH = /var
+UCOMMON_VISIBILITY = 1
+VERSION = 6.0.7
+abs_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources/inc/commoncpp
+abs_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources/inc/commoncpp
+abs_top_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+abs_top_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+includes = ${includedir}/ucommon
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+libs = /usr/local/lib
+localedir = ${datarootdir}/locale
+localstatedir = /var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = /etc
+target = x86_64-unknown-linux-gnu
+target_alias = 
+target_cpu = x86_64
+target_os = linux-gnu
+target_vendor = unknown
+top_build_prefix = ../../
+top_builddir = ../..
+top_srcdir = ../..
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = $(LT_VERSION) -release $(LT_RELEASE)
+AM_CXXFLAGS = $(UCOMMON_FLAGS)
+pkginclude_HEADERS = config.h export.h string.h exception.h thread.h \
+	slog.h applog.h address.h socket.h tcp.h udp.h dccp.h mime.h file.h \
+	process.h pointer.h serial.h tokenizer.h numbers.h object.h \
+	commoncpp.h
+
+all: all-am
+
+.SUFFIXES:
+$(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) --gnu inc/commoncpp/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu inc/commoncpp/Makefile
+.PRECIOUS: 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):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-pkgincludeHEADERS: $(pkginclude_HEADERS)
+	@$(NORMAL_INSTALL)
+	@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || 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)$(pkgincludedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
+	done
+
+uninstall-pkgincludeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir)
+
+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`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(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
+
+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
+check-am: all-am
+check: check-am
+all-am: Makefile $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(pkgincludedir)"; 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:
+
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pkgincludeHEADERS
+
+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
+	-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-pkgincludeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libtool cscopelist-am ctags ctags-am distclean \
+	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-pkgincludeHEADERS install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am tags tags-am uninstall uninstall-am \
+	uninstall-pkgincludeHEADERS
+
+
+# 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/jni/libucommon/sources/inc/commoncpp/Makefile.am b/jni/libucommon/sources/inc/commoncpp/Makefile.am
new file mode 100644
index 0000000..34e8fdd
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/Makefile.am
@@ -0,0 +1,21 @@
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = $(LT_VERSION) -release $(LT_RELEASE)
+AM_CXXFLAGS = $(UCOMMON_FLAGS)
+
+pkgincludedir = $(includedir)/commoncpp
+pkginclude_HEADERS = config.h export.h string.h exception.h thread.h \
+	slog.h applog.h address.h socket.h tcp.h udp.h dccp.h mime.h file.h \
+	process.h pointer.h serial.h tokenizer.h numbers.h object.h \
+	commoncpp.h
+
+
diff --git a/jni/libucommon/sources/inc/commoncpp/Makefile.in b/jni/libucommon/sources/inc/commoncpp/Makefile.in
new file mode 100644
index 0000000..4587de9
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/Makefile.in
@@ -0,0 +1,598 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 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@
+
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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@
+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@
+target_triplet = @target@
+subdir = inc/commoncpp
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(pkginclude_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-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__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 = 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)$(pkgincludedir)"
+HEADERS = $(pkginclude_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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkgincludedir = $(includedir)/commoncpp
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECKFLAGS = @CHECKFLAGS@
+COMPAT = @COMPAT@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_GENERIC = @LT_GENERIC@
+LT_VERSION = @LT_VERSION@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+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@
+RANLIB = @RANLIB@
+SECURE = @SECURE@
+SECURE_LIBS = @SECURE_LIBS@
+SECURE_LOCAL = @SECURE_LOCAL@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UCOMMON_CFGPATH = @UCOMMON_CFGPATH@
+UCOMMON_CLINK = @UCOMMON_CLINK@
+UCOMMON_FLAGS = @UCOMMON_FLAGS@
+UCOMMON_INCLUDES = @UCOMMON_INCLUDES@
+UCOMMON_LIBC = @UCOMMON_LIBC@
+UCOMMON_LIBS = @UCOMMON_LIBS@
+UCOMMON_LINKED = @UCOMMON_LINKED@
+UCOMMON_LOCALE = @UCOMMON_LOCALE@
+UCOMMON_MODEL = @UCOMMON_MODEL@
+UCOMMON_PREFIX = @UCOMMON_PREFIX@
+UCOMMON_VARPATH = @UCOMMON_VARPATH@
+UCOMMON_VISIBILITY = @UCOMMON_VISIBILITY@
+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_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+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@
+includes = @includes@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libs = @libs@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = $(LT_VERSION) -release $(LT_RELEASE)
+AM_CXXFLAGS = $(UCOMMON_FLAGS)
+pkginclude_HEADERS = config.h export.h string.h exception.h thread.h \
+	slog.h applog.h address.h socket.h tcp.h udp.h dccp.h mime.h file.h \
+	process.h pointer.h serial.h tokenizer.h numbers.h object.h \
+	commoncpp.h
+
+all: all-am
+
+.SUFFIXES:
+$(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) --gnu inc/commoncpp/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu inc/commoncpp/Makefile
+.PRECIOUS: 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):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-pkgincludeHEADERS: $(pkginclude_HEADERS)
+	@$(NORMAL_INSTALL)
+	@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || 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)$(pkgincludedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
+	done
+
+uninstall-pkgincludeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir)
+
+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`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(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
+
+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
+check-am: all-am
+check: check-am
+all-am: Makefile $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(pkgincludedir)"; 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:
+
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pkgincludeHEADERS
+
+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
+	-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-pkgincludeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libtool cscopelist-am ctags ctags-am distclean \
+	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-pkgincludeHEADERS install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am tags tags-am uninstall uninstall-am \
+	uninstall-pkgincludeHEADERS
+
+
+# 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/jni/libucommon/sources/inc/commoncpp/address.h b/jni/libucommon/sources/inc/commoncpp/address.h
new file mode 100644
index 0000000..7a8ec5d
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/address.h
@@ -0,0 +1,1041 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+/**
+ * @file commoncpp/address.h
+ * @short Network addresses and sockets related classes.
+ **/
+
+#ifndef COMMONCPP_ADDRESS_H_
+#define COMMONCPP_ADDRESS_H_
+
+#ifndef COMMONCPP_CONFIG_H_
+#include <commoncpp/config.h>
+#endif
+
+#ifndef COMMONCPP_THREAD_H_
+#include <commoncpp/thread.h>
+#endif
+
+#ifndef COMMMONCPP_EXCEPTION_H_
+#include <commoncpp/exception.h>
+#endif
+
+NAMESPACE_COMMONCPP
+
+// future definition of ipv4 specific classes, now defines
+
+#define INET_IPV4_ADDRESS_SIZE  16
+#define CIDR_IPV4_ADDRESS_SIZE  32
+#define INET_IPV6_ADDRESS_SIZE  40
+#define CIDR_IPV6_ADDRESS_SIZE  45
+
+#define CIDR        IPV4Cidr
+#define InetAddress IPV4Address
+#define InetHostAddress IPV4Host
+#define InetMaskAddress IPV4Mask
+#define InetMcastAddress IPV4Multicast
+#define InetMcastAddressValidator IPV4MulticastValidator
+#define InetAddrValidator IPV4Validator
+#define BroadcastAddress IPV4Broadcast
+
+/**
+ * Transport Protocol Ports.
+ */
+typedef unsigned short tpport_t;
+
+class IPV4Host;
+
+/**
+ * Classes derived from IPV4Address would require an specific
+ * validator to pass to the IPV4Address constructor. This is a base
+ * class for classes of function objects used by such derived classes.
+ *
+ * @author Federico Montesino <p5087@quintero.fie.us.es>
+ * @short Abstract base class for derived inet addresses validators.
+ */
+class __EXPORT IPV4Validator
+{
+public:
+    /**
+     * Constructor. Does not deal with any state.
+     */
+    IPV4Validator() { };
+
+    /**
+     * keeps compilers happy.
+     */
+    virtual ~IPV4Validator() {};
+
+    /**
+     * Pure virtual application operator. Apply the validation
+     * algorithm specific to derived classes.
+     */
+    virtual void
+    operator()(const in_addr address) const = 0;
+};
+
+/**
+ * Class for the function object that validates multicast addresses.
+ * Implements a specific application operator to validate multicast
+ * addresses.
+ *
+ * @author Federico Montesino <p5087@quintero.fie.us.es>
+ * @short Validating class specialized for multicast addresses.
+ */
+class __EXPORT IPV4MulticastValidator: public IPV4Validator
+{
+public:
+    /**
+     * Constructor. Does not deal with any state.
+     */
+    IPV4MulticastValidator(){};
+
+    /**
+     * Keeps compilers happy.
+     */
+    virtual ~IPV4MulticastValidator(){};
+
+    /**
+     * Application operator. Apply the validation algorithm
+     * specific to multicast addresses
+     */
+    void operator()(const in_addr address) const;
+};
+
+/**
+ * The CIDR class is used to support routing tables and validate address
+ * policies.
+ *
+ * @author David Sugar <dyfet@gnutelephony.org>
+ * @short Classless Internet Domain Routing
+ */
+class __EXPORT IPV4Cidr
+{
+protected:
+    struct in_addr netmask, network;
+
+    unsigned getMask(const char *cp) const;
+public:
+    /**
+     * Get network address associated with this cidr.
+     *
+     * @return system binary coded address.
+     */
+    inline struct in_addr getNetwork(void) const
+        {return network;};
+
+    /**
+     * Get network mask associated with this cidr.
+     *
+     * @return system binary coded network mask.
+     */
+    inline struct in_addr getNetmask(void) const
+        {return netmask;};
+
+    /**
+     * Compute the broadcast address associated with this cidr.
+     *
+     * @return system binary coded network address.
+     */
+    struct in_addr getBroadcast(void) const;
+
+    /**
+     * Set the cidr from a full or partial hostname, or from an
+     * address/mask, or a host/bits specification.
+     *
+     * @param cidr string to use.
+     */
+    void set(const char *cidr);
+
+    /**
+     * Construct a new cidr from a string.
+     *
+     * @param cidr string to use.
+     */
+    IPV4Cidr(const char *cidr);
+
+    /**
+     * Construct an empty cidr.
+     */
+    IPV4Cidr();
+
+    /**
+     * Construct a copy of a cidr.
+     *
+     * @param cidr to copy from.
+     */
+    IPV4Cidr(IPV4Cidr &);
+
+    /**
+     * See if a socket address is a member of this cidr's network.
+     *
+     * @param saddr pointer to test.
+     * @return true if member of cidr.
+     */
+    bool isMember(const struct sockaddr *saddr) const;
+
+    /**
+     * See if a low level address object is a member of this cidr's net.
+     *
+     * @param inaddr object to test.
+     * @return true if member of cidr.
+     */
+    bool isMember(const struct in_addr &inaddr) const;
+
+    inline bool operator==(const struct sockaddr *a) const
+        {return isMember(a);};
+
+    inline bool operator==(const struct in_addr &a) const
+        {return isMember(a);};
+};
+
+#ifdef  CCXX_IPV6
+/**
+ * The CIDR class is used to support routing tables and validate address
+ * policies.
+ *
+ * @author David Sugar <dyfet@gnutelephony.org>
+ * @short Classless Internet Domain Routing
+ */
+class __EXPORT IPV6Cidr
+{
+protected:
+    struct in6_addr netmask, network;
+
+    unsigned getMask(const char *cp) const;
+public:
+    /**
+     * Get network address associated with this cidr.
+     *
+     * @return system binary coded address.
+     */
+    inline struct in6_addr getNetwork(void) const
+        {return network;};
+
+    /**
+     * Get network mask associated with this cidr.
+     *
+     * @return system binary coded network mask.
+     */
+    inline struct in6_addr getNetmask(void) const
+        {return netmask;};
+
+    /**
+     * Compute the broadcast address associated with this cidr.
+     *
+     * @return system binary coded network address.
+     */
+    struct in6_addr getBroadcast(void) const;
+
+    /**
+     * Set the cidr from a full or partial hostname, or from a
+     * host/bits specification.
+     *
+     * @param cidr string to use.
+     */
+    void set(const char *cidr);
+
+    /**
+     * Construct a new cidr from a string.
+     *
+     * @param cidr string to use.
+     */
+    IPV6Cidr(const char *cidr);
+
+    /**
+     * Construct an empty cidr.
+     */
+    IPV6Cidr();
+
+    /**
+     * Construct a copy of a cidr.
+     *
+     * @param cidr to copy from.
+     */
+    IPV6Cidr(IPV6Cidr &);
+
+    /**
+     * See if a socket address is a member of this cidr's network.
+     *
+     * @param saddr pointer to test.
+     * @return true if member of cidr.
+     */
+    bool isMember(const struct sockaddr *saddr) const;
+
+    /**
+     * See if a low level address object is a member of this cidr's net.
+     *
+     * @param inaddr object to test.
+     * @return true if member of cidr.
+     */
+    bool isMember(const struct in6_addr &inaddr) const;
+
+    inline bool operator==(const struct sockaddr *sa) const
+        {return isMember(sa);};
+
+    inline bool operator==(const struct in6_addr &a) const
+        {return isMember(a);};
+};
+
+#endif
+
+/**
+ *  The network name and address objects are all derived from a common
+ * IPV4Address base class. Specific classes, such as IPV4Host,
+ * IPV4Mask, etc, are defined from IPV4Address entirely so that the
+ * manner a network address is being used can easily be documented and
+ * understood from the code and to avoid common errors and accidental misuse
+ * of the wrong address object.  For example, a "connection" to something
+ * that is declared as a "IPV4Host" can be kept type-safe from a
+ * "connection" accidently being made to something that was declared a
+ * "IPV4Broadcast".
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Internet Address binary data type.
+ */
+class __EXPORT IPV4Address
+{
+private:
+    // The validator given to an IPV4Address object must not be a
+    // transient object, but that must exist at least until the
+    // last address object of its kind is deleted. This is an
+    // artifact to be able to do specific checks for derived
+    // classes inside constructors.
+    const InetAddrValidator *validator;
+
+protected:
+    struct in_addr * ipaddr;
+    size_t addr_count;
+    mutable char* hostname;  // hostname for ipaddr[0]. Used by getHostname
+#if defined(_MSWINDOWS_)
+    static MutexCounter counter;
+#else
+    static Mutex mutex;
+#endif
+    /**
+     * Sets the IP address from a string representation of the
+     * numeric address, ie "127.0.0.1"
+     *
+     * @param host The string representation of the IP address
+     * @return true if successful
+     */
+    bool setIPAddress(const char *host);
+
+    /**
+     * Used to specify a host name or numeric internet address.
+     *
+     * @param host The string representation of the IP address or
+     *  a hostname, , if NULL, it will default to INADDR_ANY
+     */
+    void setAddress(const char *host);
+
+public:
+    /**
+     * Create an Internet Address object with an empty (0.0.0.0)
+     * address.
+     *
+     * @param validator optional validator function object, intended for
+     *        derived classes.
+     */
+    IPV4Address(const InetAddrValidator *validator = NULL);
+
+    /**
+     * Convert the system internet address data type (struct in_addr)
+     * into a Common C++ IPV4Address object.
+     *
+     * @param addr struct of system used binary internet address.
+     * @param validator optional validator function object, intended for
+     *        derived classes.
+     */
+    IPV4Address(struct in_addr addr, const InetAddrValidator *validator = NULL);
+
+    /**
+     * Convert a null terminated ASCII host address string
+     * (example: "127.0.0.1") or host address name (example:
+     * "www.voxilla.org") directly into a Common C++ IPV4Address
+     * object.
+     *
+     * @param address null terminated C string.
+     * @param validator optional validator function object, intended for
+     *        derived classes.
+     */
+    IPV4Address(const char *address, const InetAddrValidator *validator = NULL);
+
+    /**
+     * Copy constructor
+     */
+    IPV4Address(const IPV4Address &rhs);
+
+    /**
+     * Destructor
+     */
+    virtual ~IPV4Address();
+
+    /**
+     * Provide a string representation of the value (Internet Address)
+     * held in the IPV4Address object.
+     *
+     * @return string representation of IPV4Address.
+     */
+    const char *getHostname(void) const;
+
+    /**
+     * May be used to verify if a given IPV4Address returned
+     * by another function contains a "valid" address, or "0.0.0.0"
+     * which is often used to mark "invalid" IPV4Address values.
+     *
+     * @return true if address != 0.0.0.0.
+     */
+    bool isInetAddress(void) const;
+
+    /**
+     * Provide a low level system usable struct in_addr object from
+     * the contents of IPV4Address.  This is needed for services such
+     * as bind() and connect().
+     *
+     * @return system binary coded internet address.
+     */
+    struct in_addr getAddress(void) const;
+
+    /**
+     * Provide a low level system usable struct in_addr object from
+     * the contents of IPV4Address.  This is needed for services such
+     * as bind() and connect().
+     *
+     * @param i for IPV4Addresses with multiple addresses, returns the
+     *  address at this index.  User should call getAddressCount()
+     *  to determine the number of address the object contains.
+     * @return system binary coded internet address.  If parameter i is
+     *  out of range, the first address is returned.
+     */
+    struct in_addr getAddress(size_t i) const;
+
+    /**
+     * Returns the number of internet addresses that an IPV4Address object
+     * contains.  This usually only happens with IPV4Host objects
+     * where multiple IP addresses are returned for a DNS lookup
+     */
+    size_t getAddressCount() const { return addr_count; }
+
+    IPV4Address &operator=(const char *str);
+    IPV4Address &operator=(struct in_addr addr);
+    IPV4Address &operator=(const IPV4Address &rhs);
+
+    /**
+     * Allows assignment from the return of functions like
+     * inet_addr() or htonl()
+     */
+    IPV4Address &operator=(unsigned long addr);
+
+    inline IPV4Address &operator=(unsigned int addr)
+        {return *this = (unsigned long) addr; }
+
+    inline bool operator!() const
+        {return !isInetAddress();};
+
+    /**
+     * Compare two internet addresses to see if they are equal
+     * (if they specify the physical address of the same internet host).
+     *
+     * If there is more than one IP address in either IPV4Address object,
+     * this will return true if all of the IP addresses in the smaller
+     * are in the larger in any order.
+     */
+    bool operator==(const IPV4Address &a) const;
+
+    /**
+     * Compare two internet addresses to see if they are not
+     * equal (if they each refer to unique and different physical
+     * ip addresses).
+     *
+     * This is implimented in terms of operator==
+     */
+    bool operator!=(const IPV4Address &a) const;
+};
+
+/**
+ * Internet addresses used specifically as masking addresses (such as "
+ * 255.255.255.0") are held in the IPV4Mask derived object.  The
+ * seperate class is used so that C++ type casting can automatically
+ * determine when an IPV4Address object is really a mask address object
+ * rather than simply using the base class.  This also allows manipulative
+ * operators for address masking to operate only when presented with a
+ * Masked address as well as providing cleaner and safer source.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Internet Address Mask such as subnet masks.
+ */
+class __EXPORT IPV4Mask : public IPV4Address
+{
+public:
+    /**
+     * Create the mask from a null terminated ASCII string such as
+     * "255.255.255.128".
+     *
+     * @param mask null terminated ASCII mask string.
+     */
+    IPV4Mask(const char *mask);
+
+    /**
+     * Masks are usually used to coerce host addresses into a specific
+     * router or class domain.  This can be done by taking the Inet
+     * Host Address object and "and"ing it with an address mask.  This
+     * operation can be directly expressed in C++ through the & operator.
+     *
+     * @return a internet host address that has been masked.
+     * @param addr host address to be masked by subnet.
+     * @param mask inetnet mask address object to mask by.
+     */
+    friend __EXPORT IPV4Host operator&(const IPV4Host &addr,
+                     const IPV4Mask &mask);
+
+    /**
+     * Allows assignment from the return of functions like
+     * inet_addr() or htonl()
+     */
+    IPV4Address &operator=(unsigned long addr)
+        { return IPV4Address::operator =(addr); }
+};
+
+/**
+ * This object is used to hold the actual and valid internet address of a
+ * specific host machine that will be accessed through a socket.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Address of a specific Internet host machine.
+ */
+class __EXPORT IPV4Host : public IPV4Address
+{
+private:
+    static IPV4Host _host_;
+
+public:
+    /**
+     * Create a new host address for a specific internet host.  The
+     * internet host can be specified in a null terminated ASCII
+     * string and include either the physical host address or the
+     * DNS name of a host machine.  Hence, an IPV4Host
+     * ("www.voxilla.org") can be directly declaired in this manner.
+     *
+     * Defaults to the IP address that represents the interface matching
+     * "gethostname()".
+     *
+     * @param host dns or physical address of an Internet host.
+     */
+    IPV4Host(const char *host = NULL);
+
+    /**
+     * Convert a system socket binary address such as may be
+     * returned through the accept() call or getsockpeer() into
+     * an internet host address object.
+     *
+     * @param addr binary address of internet host.
+     */
+    IPV4Host(struct in_addr addr);
+
+    /**
+     * Allows assignment from the return of functions like
+     * inet_addr() or htonl()
+     */
+    IPV4Address &operator=(unsigned long addr)
+    { return IPV4Address::operator =(addr); }
+
+    /**
+     * Mask the internet host address object with a network mask address.
+     * This is commonly used to coerce an address by subnet.
+     */
+    IPV4Host &operator&=(const IPV4Mask &mask);
+
+    friend class IPV4Mask;
+    friend __EXPORT IPV4Host operator&(const IPV4Host &addr,
+                     const IPV4Mask &mask);
+};
+
+/**
+ * The broadcast address object is used to store the broadcast address for
+ * a specific subnet.  This is commonly used for UDP broadcast operations.
+ */
+class __EXPORT IPV4Broadcast : public IPV4Address
+{
+public:
+    /**
+     * Specify the physical broadcast address to use and create a new
+     * broadcast address object based on a null terminated ASCII
+     * string.
+     *
+     * @param net null terminated ASCII network address.
+     */
+    IPV4Broadcast(const char *net = "255.255.255.255");
+};
+
+/**
+ * A specialization of IPV4Address that provides address validation
+ * for multicast addresses. Whenever its value changes the new value
+ * is checked to be in the range from 224.0.0.1 through
+ * 239.255.255.255. If it is not, an exception is thrown.
+ *
+ * @short A multicast network address.
+ * @author Federico Montesino <p5087@quintero.fie.us.es>
+ */
+class __EXPORT IPV4Multicast: public IPV4Address
+{
+public:
+    /**
+     * Create an Internet Multicast Address object with an empty
+     * (0.0.0.0) address.
+     */
+    IPV4Multicast();
+
+    /**
+     * Convert the system internet address data type (struct in_addr)
+     * into a Common C++ IPV4Multicast object.
+     *
+     * @param address struct of system used binary internet address.
+     */
+    IPV4Multicast(const struct in_addr address);
+
+    /**
+     * Convert a null terminated ASCII multicast address string
+     * (example: "224.0.0.1") or multicast name string (example:
+     * "sap.mcast.net") directly into a Common C++
+     * IPV4Multicast object. Works like IPV4Address(const
+     * char*).
+     *
+     * @param address null terminated C string.
+     */
+    IPV4Multicast(const char *address);
+
+private:
+    /**
+     * Check the address in <code>addr<code> is a valid multicast
+     * address. In case not, throws an exception.
+     *
+     * @param address a system network address
+     * @return true if validation succeeded
+     */
+    static const IPV4MulticastValidator validator;
+};
+
+extern __EXPORT std::ostream& operator<<(std::ostream &os, const IPV4Address &ia);
+
+inline struct in_addr getaddress(const IPV4Address &ia)
+    {return ia.getAddress();}
+
+
+#ifdef  CCXX_IPV6
+
+class IPV6Host;
+
+/**
+ * Classes derived from IPV6Address would require an specific
+ * validator to pass to the IPV6Address constructor. This is a base
+ * class for classes of function objects used by such derived classes.
+ *
+ * @author Federico Montesino <p5087@quintero.fie.us.es>
+ * @short Abstract base class for derived inet addresses validators.
+ */
+class __EXPORT IPV6Validator
+{
+public:
+    /**
+     * Constructor. Does not deal with any state.
+     */
+    IPV6Validator() { };
+
+    /**
+     * Keeps compilers happy.
+     */
+    virtual ~IPV6Validator() {};
+
+    /**
+     * Pure virtual application operator. Apply the validation
+     * algorithm specific to derived classes.
+     */
+    virtual void operator()(const in6_addr address) const = 0;
+};
+
+/**
+ * Class for the function object that validates multicast addresses.
+ * Implements a specific application operator to validate multicast
+ * addresses.
+ *
+ * @author Federico Montesino <p5087@quintero.fie.us.es>
+ * @short Validating class specialized for multicast addresses.
+ */
+class __EXPORT IPV6MulticastValidator: public IPV6Validator
+{
+public:
+    /**
+     * Constructor. Does not deal with any state.
+     */
+    IPV6MulticastValidator(){};
+
+    /**
+     * Keeps compilers happy...
+     */
+    virtual ~IPV6MulticastValidator(){};
+
+    /**
+     * Application operator. Apply the validation algorithm
+     * specific to multicast addresses
+     */
+    void operator()(const in6_addr address) const;
+};
+
+/**
+ *  The network name and address objects are all derived from a common
+ * IPV6Address base class. Specific classes, such as IPV4Host,
+ * IPV6Mask, etc, are defined from IPV6Address entirely so that the
+ * manner a network address is being used can easily be documented and
+ * understood from the code and to avoid common errors and accidental misuse
+ * of the wrong address object.  For example, a "connection" to something
+ * that is declared as a "IPV6Host" can be kept type-safe from a
+ * "connection" accidently being made to something that was declared a
+ * "IPV6Broadcast".
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Internet Address binary data type.
+ */
+class __EXPORT IPV6Address
+{
+private:
+    // The validator given to an IPV4Address object must not be a
+    // transient object, but that must exist at least until the
+    // last address object of its kind is deleted. This is an
+    // artifact to be able to do specific checks for derived
+    // classes inside constructors.
+    const IPV6Validator *validator;
+
+protected:
+    struct in6_addr * ipaddr;
+    size_t addr_count;
+    mutable char* hostname;  // hostname for ipaddr[0]. Used by getHostname
+#if defined(_MSWINDOWS_)
+    static MutexCounter counter;
+#else
+    static Mutex mutex;
+#endif
+    /**
+     * Sets the IP address from a string representation of the
+     * numeric address, ie "127.0.0.1"
+     *
+     * @param host The string representation of the IP address
+     * @return true if successful
+     */
+    bool setIPAddress(const char *host);
+
+    /**
+     * Used to specify a host name or numeric internet address.
+     *
+     * @param host The string representation of the IP address or
+     *  a hostname, , if NULL, it will default to INADDR_ANY
+     */
+    void setAddress(const char *host);
+
+public:
+    /**
+     * Create an Internet Address object with an empty (0.0.0.0)
+     * address.
+     *
+     * @param validator optional validator function object, intended for
+     *        derived classes.
+     */
+    IPV6Address(const IPV6Validator *validator = NULL);
+
+    /**
+     * Convert the system internet address data type (struct in_addr)
+     * into a Common C++ IPV6Address object.
+     *
+     * @param addr struct of system used binary internet address.
+     * @param validator optional validator function object, intended for
+     *        derived classes.
+     */
+    IPV6Address(struct in6_addr addr, const IPV6Validator *validator = NULL);
+
+    /**
+     * Convert a null terminated ASCII host address string
+     * (example: "127.0.0.1") or host address name (example:
+     * "www.voxilla.org") directly into a Common C++ IPV6Address
+     * object.
+     *
+     * @param address null terminated C string.
+     * @param validator optional validator function object, intended for
+     *        derived classes.
+     */
+    IPV6Address(const char *address, const IPV6Validator *validator = NULL);
+
+    /**
+     * Copy constructor
+     */
+    IPV6Address(const IPV6Address &rhs);
+
+    /**
+     * Destructor
+     */
+    virtual ~IPV6Address();
+
+    /**
+     * Provide a string representation of the value (Internet Address)
+     * held in the IPV6Address object.
+     *
+     * @return string representation of IPV6Address.
+     */
+    const char *getHostname(void) const;
+
+    /**
+     * May be used to verify if a given IPV6Address returned
+     * by another function contains a "valid" address, or "0.0.0.0"
+     * which is often used to mark "invalid" IPV6Address values.
+     *
+     * @return true if address != 0.0.0.0.
+     */
+    bool isInetAddress(void) const;
+
+    /**
+     * Provide a low level system usable struct in_addr object from
+     * the contents of IPV6Address.  This is needed for services such
+     * as bind() and connect().
+     *
+     * @return system binary coded internet address.
+     */
+    struct in6_addr getAddress(void) const;
+
+    /**
+     * Provide a low level system usable struct in_addr object from
+     * the contents of IPV6Address.  This is needed for services such
+     * as bind() and connect().
+     *
+     * @param i for IPV6Addresses with multiple addresses, returns the
+     *  address at this index.  User should call getAddressCount()
+     *  to determine the number of address the object contains.
+     * @return system binary coded internet address.  If parameter i is
+     *  out of range, the first address is returned.
+     */
+    struct in6_addr getAddress(size_t i) const;
+
+    /**
+     * Returns the number of internet addresses that an IPV6Address object
+     * contains.  This usually only happens with IPV6Host objects
+     * where multiple IP addresses are returned for a DNS lookup
+     */
+    size_t getAddressCount() const { return addr_count; }
+
+    IPV6Address &operator=(const char *str);
+    IPV6Address &operator=(struct in6_addr addr);
+    IPV6Address &operator=(const IPV6Address &rhs);
+
+    inline bool operator!() const
+        {return !isInetAddress();};
+
+    /**
+     * Compare two internet addresses to see if they are equal
+     * (if they specify the physical address of the same internet host).
+     *
+     * If there is more than one IP address in either IPV6Address object,
+     * this will return true if all of the IP addresses in the smaller
+     * are in the larger in any order.
+     */
+    bool operator==(const IPV6Address &a) const;
+
+    /**
+     * Compare two internet addresses to see if they are not
+     * equal (if they each refer to unique and different physical
+     * ip addresses).
+     *
+     * This is implimented in terms of operator==
+     */
+    bool operator!=(const IPV6Address &a) const;
+};
+
+/**
+ * Internet addresses used specifically as masking addresses (such as "
+ * 255.255.255.0") are held in the IPV6Mask derived object.  The
+ * seperate class is used so that C++ type casting can automatically
+ * determine when an IPV6Address object is really a mask address object
+ * rather than simply using the base class.  This also allows manipulative
+ * operators for address masking to operate only when presented with a
+ * Masked address as well as providing cleaner and safer source.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Internet Address Mask such as subnet masks.
+ */
+class __EXPORT IPV6Mask : public IPV6Address
+{
+public:
+    /**
+     * Create the mask from a null terminated ASCII string such as
+     * "255.255.255.128".
+     *
+     * @param mask null terminated ASCII mask string.
+     */
+    IPV6Mask(const char *mask);
+
+    /**
+     * Masks are usually used to coerce host addresses into a specific
+     * router or class domain.  This can be done by taking the Inet
+     * Host Address object and "and"ing it with an address mask.  This
+     * operation can be directly expressed in C++ through the & operator.
+     *
+     * @return a internet host address that has been masked.
+     * @param addr host address to be masked by subnet.
+     * @param mask inetnet mask address object to mask by.
+     */
+    friend __EXPORT IPV6Host operator&(const IPV6Host &addr,
+                     const IPV6Mask &mask);
+};
+
+/**
+ * This object is used to hold the actual and valid internet address of a
+ * specific host machine that will be accessed through a socket.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Address of a specific Internet host machine.
+ */
+class __EXPORT IPV6Host : public IPV6Address
+{
+public:
+    /**
+     * Create a new host address for a specific internet host.  The
+     * internet host can be specified in a null terminated ASCII
+     * string and include either the physical host address or the
+     * DNS name of a host machine.  Hence, an IPV6Host
+     * ("www.voxilla.org") can be directly declaired in this manner.
+     *
+     * Defaults to the IP address that represents the interface matching
+     * "gethostname()".
+     *
+     * @param host dns or physical address of an Internet host.
+     */
+    IPV6Host(const char *host = NULL);
+
+    /**
+     * Convert a system socket binary address such as may be
+     * returned through the accept() call or getsockpeer() into
+     * an internet host address object.
+     *
+     * @param addr binary address of internet host.
+     */
+    IPV6Host(struct in6_addr addr);
+
+    /**
+     * Mask the internet host address object with a network mask address.
+     * This is commonly used to coerce an address by subnet.
+     */
+    IPV6Host &operator&=(const IPV6Mask &mask);
+
+    friend class IPV6Mask;
+    friend __EXPORT IPV6Host operator&(const IPV6Host &addr, const IPV6Mask &mask);
+};
+
+/**
+ * The broadcast address object is used to store the broadcast address for
+ * a specific subnet.  This is commonly used for UDP broadcast operations.
+ */
+class __EXPORT IPV6Broadcast : public IPV6Address
+{
+public:
+    /**
+     * Specify the physical broadcast address to use and create a new
+     * broadcast address object based on a null terminated ASCII
+     * string.
+     *
+     * @param net null terminated ASCII network address.
+     */
+    IPV6Broadcast(const char *net = "255.255.255.255");
+};
+
+/**
+ * A specialization of IPV6Address that provides address validation
+ * for multicast addresses. Whenever its value changes the new value
+ * is checked to be in the range from 224.0.0.1 through
+ * 239.255.255.255. If it is not, an exception is thrown.
+ *
+ * @short A multicast network address.
+ * @author Federico Montesino <p5087@quintero.fie.us.es>
+ */
+class __EXPORT IPV6Multicast: public IPV6Address
+{
+public:
+    /**
+     * Create an Internet Multicast Address object with an empty
+     * (0.0.0.0) address.
+     */
+    IPV6Multicast();
+
+    /**
+     * Convert the system internet address data type (struct in_addr)
+     * into a Common C++ IPV4Multicast object.
+     *
+     * @param address struct of system used binary internet address.
+     */
+    IPV6Multicast(const struct in6_addr address);
+
+    /**
+     * Convert a null terminated ASCII multicast address string
+     * (example: "224.0.0.1") or multicast name string (example:
+     * "sap.mcast.net") directly into a Common C++
+     * IPV6Multicast object. Works like IPV6Address(const
+     * char*).
+     *
+     * @param address null terminated C string.
+     */
+    IPV6Multicast(const char *address);
+
+private:
+    /**
+     * Check the address in <code>addr<code> is a valid multicast
+     * address. In case not, throws an exception.
+     *
+     * @param address a system network address
+     * @return true if validation succeeded
+     */
+    static const IPV6MulticastValidator validator;
+};
+
+extern __EXPORT std::ostream& operator<<(std::ostream &os, const IPV6Address &ia);
+
+inline struct in6_addr getaddress(const IPV6Address &ia)
+    {return ia.getAddress();}
+
+
+#endif
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/commoncpp/applog.h b/jni/libucommon/sources/inc/commoncpp/applog.h
new file mode 100644
index 0000000..b254a70
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/applog.h
@@ -0,0 +1,585 @@
+// Copyright (C) 2005-2010 Angelo Naselli, Penta Engineering s.r.l.
+//
+// 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.
+//
+// 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+/**
+ * @file commoncpp/applog.h
+ * @short Application logging facilities abstraction.
+ **/
+
+
+#ifndef COMMONCPP_APPLOG_H_
+#define COMMONCPP_APPLOG_H_
+
+#ifndef COMMONCPP_SLOG_H_
+#include <commoncpp/slog.h>
+#endif
+
+#ifndef COMMONCPP_EXCEPTION_H_
+#include <commoncpp/exception.h>
+#endif
+
+#include <string>
+#include <sstream>
+#include <iostream>
+#include <map>
+
+NAMESPACE_COMMONCPP
+using namespace std;
+/**
+ * Produces a dump of a buffer in a hexdump way with its
+ * code Ascii translation and relative buffer address.
+ *
+ * For instance:
+ * 0000000 - 77 98 21 49 0e 00 05 00 40 1c 01 1c 2f 00 00 00 w.!I....@.../...
+ *
+ */
+class __EXPORT HEXdump
+{
+  protected:
+    /**
+     * output string
+     */
+    std::string _str;
+
+  public:
+    // max_len: max number of bytes to be printed. 0 prints all.
+    /**
+     * HEXdump constructor.
+     *
+     * @param buffer    buffer to be "hexdumped"
+     * @param buff_len  buffer length
+     * @param max_len   max number of bytes to be "hexdumped". Usefull to
+     *                  truncate output. mas_len=0 does prints all.
+     */
+    HEXdump(const unsigned char *buffer, int buff_len, int max_len = 200);
+
+    /**
+     * HEXdump destructor.
+     */
+    virtual ~HEXdump() { _str = string();}
+
+    /**
+     * const char* cast provided for conveneince.
+     */
+
+    const char * c_str() const
+    {
+      return _str.c_str();
+    }
+
+    /**
+     * string cast provided for conveneince.
+     */
+    std::string str()
+    {
+      return _str;
+    }
+
+    /**
+    * operator <<
+    * @param hd hexdump.
+    * @return application logger stream
+    */
+    friend std::ostream& operator<< (std::ostream& out, const HEXdump &hd)
+    {
+      out << hd.c_str();
+      return out;
+    }
+
+};
+
+#ifdef  CCXX_EXCEPTIONS
+/**
+ * Applog exception, used for memory problems at the moment
+ *
+ */
+class __EXPORT AppLogException : public ost::Exception
+{
+  public:
+    /**
+     * Constructor.
+     * @param what_arg exception string
+     */
+    AppLogException(String &what_arg) : ost::Exception(what_arg) {};
+
+};
+#endif
+
+class AppLogPrivate;
+
+/**
+ * Application logger is a class that implements a logger that can be used
+ * by applications to save log file somewhere on the system.
+ *
+ * It uses ost::slog to write to syslog and std::clog to write to standard
+ * output.
+ *
+ * It provides either a stream oriented logger or a old printf style one.
+ *
+ * It can be used to log directly on a file or in a spooler like way. Latter
+ * uses a ost::ThreadQueue to implement a thread safe access to logger.
+ *
+ * It provides a global stream variable called ost::alog.
+ *
+ * It provides an AppLog::Ident class that represents a module name for
+ * instance that can be used to tag logs. Logging levels are the same
+ * defined into ost::Slog:
+ * Slog::levelEmergency
+ * Slog::levelAlert
+ * Slog::levelCritical
+ * Slog::levelError
+ * Slog::levelWarning
+ * Slog::levelNotice
+ * Slog::levelInfo
+ * Slog::levelDebugfrom.
+ *
+ * Example of usage: alog << mod_name << debug << "Hello world!" << std::endl;
+ */
+class __EXPORT AppLog : protected streambuf, public ostream
+{
+  protected:
+    // d pointer
+    AppLogPrivate *d;
+    void writeLog(bool endOfLine = true);
+    static std::map<string, Slog::Level> *assoc;
+
+  public:
+    /**
+     * Ident class that represents module name.
+     */
+    class __EXPORT Ident
+    {
+      private:
+        std::string _ident;
+      public:
+
+        /**
+         * Constructor.
+         */
+        Ident() {};
+
+        /**
+         * Desctructor.
+         */
+        ~Ident() {};
+
+        /**
+         * Copy constructor.
+         */
+        Ident(Ident& id) {_ident = id._ident;}
+
+        /**
+         * const char* constructor, provided for convenience.
+         */
+        Ident(const char *str) : _ident(str) {};
+
+        /**
+         * std::string cast.
+         */
+        std::string& str() {return _ident;}
+
+        /**
+         * Assignment operator (string).
+         */
+        Ident& operator= (std::string &st) {_ident = st; return *this;}
+
+        /**
+         * Assignment operator (const char[]), provided for convenience.
+         */
+        Ident& operator= (const char str[]) {_ident = str; return *this;}
+
+        /**
+         * const char* cast provided for conveneince.
+         */
+        const char* c_str() {return _ident.c_str();}
+    };
+
+#ifndef _MSWINDOWS_
+    /**
+     * Constructor for a customized logger.
+     * @param logFileName log file name.
+     * @param logDirectly true to write directly to file, false to use
+     *                    a spooler like logger.
+     * @param usePipe     true to use pipe instead of file, false otherwise
+     */
+    AppLog(const char* logFileName = NULL, bool logDirectly = false , bool usePipe = false);
+#else
+    /**
+    * Constructor for a customized logger.
+    * @param logFileName log file name.
+    * @param logDirectly true to write directly to file, false to use
+    *                    a spooler like logger.
+    */
+    AppLog(const char* logFileName = NULL, bool logDirectly = false);
+#endif
+    /**
+     * Destructor
+     */
+    virtual ~AppLog();
+
+    /**
+     * Subscribes the current thread to logger, it reserves thread safe
+     * buffer for it.
+     */
+    void subscribe();
+
+    /**
+     * Unsubscribes the current thread from logger.
+     */
+    void unsubscribe();
+
+#ifndef _MSWINDOWS_
+    /**
+     * Allows to set up ost::alog parameters.
+     * @param FileName log file name.
+     * @param logDirectly true to write directly to file, false to use
+     *                    a spooler like logger.
+     * @param usePipe     true to use pipe instead of file, false otherwise
+     */
+    void logFileName(const char* FileName, bool logDirectly = false, bool usePipe = false);
+#else
+    /**
+     * Allows to set up ost::alog parameters.
+     * @param FileName log file name.
+     * @param logDirectly true to write directly to file, false to use
+     *                    a spooler like logger.
+     */
+    void logFileName(const char* FileName, bool logDirectly = false);
+#endif
+    /**
+     * if logDirectly is set it closes the file.
+     */
+    void close(void);
+
+    /**
+     * Sets the log level.
+     * @param enable log level.
+     */
+    void level(Slog::Level enable);
+
+    /**
+     * Enables clog output.
+     * @param en true to enable clog output.
+     */
+    void clogEnable(bool en = true);
+
+    /**
+     * Enables slog output for error level messages.
+     * @param en true to enable slog output.
+     */
+    void slogEnable(bool en = true);
+
+    /**
+     * Sets the level for that ident.
+     * @param ident ident (module name for instance).
+     * @param level level
+     */
+    void identLevel(const char *ident, Slog::Level level);
+
+    /**
+     * Opens the file if not already and sets ident
+     * @param ident module name for instance.
+     */
+    void open(const char *ident);
+
+    /**
+     * stream overflow() overload.
+     * @param c character to be managed
+     * @return c
+     */
+    virtual int overflow(int c);
+
+    /**
+     * stream sync() overload
+     */
+    virtual int sync();
+
+    /**
+     * emerg level printf style method, provided for convenience.
+     * @param format printf format
+     */
+    void emerg(const char *format, ...);
+
+    /**
+     * alert level printf style method, provided for convenience.
+     * @param format printf format
+     */
+    void alert(const char *format, ...);
+
+    /**
+     * critical level printf style method, provided for convenience.
+     * @param format printf format
+     */
+    void critical(const char *format, ...);
+
+    /**
+     * error level printf style method, provided for convenience.
+     * @param format printf format
+     */
+    void error(const char *format, ...);
+
+    /**
+     * warn level printf style method, provided for convenience.
+     * @param format printf format
+     */
+    void warn(const char *format, ...);
+
+    /**
+     * notice level printf style method, provided for convenience.
+     * @param format printf format
+     */
+    void notice(const char *format, ...);
+
+    /**
+     * info level printf style method, provided for convenience.
+     * @param format printf format
+     */
+    void info(const char *format, ...);
+
+    /**
+     * debug level printf style method, provided for convenience.
+     * @param format printf format
+     */
+    void debug(const char *format, ...);
+
+    /**
+     * operator to change ident and log level
+     * @param ident ident (module name for instance)
+     * @param level new log level
+     * @return application logger stream
+     */
+    AppLog &operator()(const char *ident, Slog::Level level = Slog::levelError);
+
+    /**
+     * operator to change ident
+     * @param ident ident (module name for instance)
+     * @return application logger stream
+     */
+    inline AppLog& operator()(Ident &ident)
+    {
+      open(ident.c_str());
+      return *this;
+    }
+
+    /**
+     * operator to change logging level
+     * @param level new log level
+     * @return application logger stream
+     */
+    AppLog &operator()(Slog::Level level);
+
+    /**
+     * manipulator operator, to change print levels.
+     * @param (* pfManipulator)(AppLog &)
+     * @return application logger stream
+     */
+    AppLog& operator<< (AppLog& (*pfManipulator)(AppLog&));
+
+    /**
+     * manipulator operator, to use ostream manipulators (i.e. std::endl,...)
+     * @param (* pfManipulator)(AppLog &)
+     * @return application logger stream
+     */
+    AppLog& operator<< (ostream& (*pfManipulator)(ostream&));
+
+    friend  ostream& operator << (ostream &os, AppLog & al)
+    {
+      return al;
+    }
+
+    /**
+     * operator <<
+     * @param ident module name for instance.
+     * @return application logger stream
+     */
+    inline AppLog& operator<< (Ident &ident)
+    {
+      open(ident.c_str());
+      return *this;
+    }
+
+
+    /**
+     * warn level
+     * @return application logger stream
+     */
+    inline AppLog &warn(void)
+    {return operator()(Slog::levelWarning);}
+
+    /**
+     * error level
+     * @return application logger stream
+     */
+    AppLog &error(void)
+    { return operator()(Slog::levelError);}
+
+    /**
+     * debug level
+     * @return application logger stream
+     */
+    inline AppLog &debug(void)
+    {return operator()(Slog::levelDebug);}
+
+    /**
+     * emerg level
+     * @return application logger stream
+     */
+    inline AppLog &emerg(void)
+    {return operator()(Slog::levelEmergency);}
+
+    /**
+     * alert level
+     * @return application logger stream
+     */
+    inline AppLog &alert(void)
+    {return operator()(Slog::levelAlert);}
+
+    /**
+     * critical level
+     * @return application logger stream
+     */
+    inline AppLog &critical(void)
+    {return operator()(Slog::levelCritical);}
+
+    /**
+     * notice level
+     * @return application logger stream
+     */
+    inline AppLog &notice(void)
+    {return operator()(Slog::levelNotice);}
+
+    /**
+     * info level
+     * @return application logger stream
+     */
+    inline AppLog &info(void)
+    {return operator()(Slog::levelInfo);}
+
+    /**
+     * Translates level from string to Slog::Level, useful for
+     * configuration files for instance.
+     * Valid level names are:
+     * "emerg" for Slog::levelEmergency
+     * "alert" for Slog::levelAlert
+     * "critical" for Slog::levelCritical
+     * "error" for Slog::levelError
+     * "warn" for Slog::levelWarning
+     * "notice" for Slog::levelNotice
+     * "info" for Slog::levelInfo
+     * "debug" for Slog::levelDebug
+     * @param name Slog Level name
+     * @return Slog level value
+     */
+    static Slog::Level levelTranslate(string name)
+    {
+	std::map<string, Slog::Level>::iterator  it = assoc->find(name);
+	return (it != assoc->end()) ? it->second : Slog::levelEmergency;
+    }
+
+};
+
+/**
+ * Manipulator for debug level
+ * @param sl application logger stream
+ * @return application logger stream
+ */
+__EXPORT inline AppLog &debug(AppLog& sl)
+{return sl.operator()(Slog::levelDebug);}
+
+/**
+ * Manipulator for warn level
+ * @param sl application logger stream
+ * @return application logger stream
+ */
+__EXPORT inline AppLog &warn(AppLog& sl)
+{return sl.operator()(Slog::levelWarning);}
+
+/**
+ * Manipulator for error level
+ * @param sl application logger stream
+ * @return application logger stream
+ */
+__EXPORT inline AppLog &error(AppLog& sl)
+{ return sl.operator()(Slog::levelError);}
+
+/**
+ * Manipulator for emerg level
+ * @param sl application logger stream
+ * @return application logger stream
+ */
+__EXPORT inline AppLog &emerg(AppLog& sl)
+{return sl.operator()(Slog::levelEmergency);}
+
+/**
+ * Manipulator for alert level
+ * @param sl application logger stream
+ * @return application logger stream
+ */
+__EXPORT inline AppLog &alert(AppLog& sl)
+{return sl.operator()(Slog::levelAlert);}
+
+/**
+ * Manipulator for critical level
+ * @param sl application logger stream
+ * @return application logger stream
+ */
+__EXPORT inline AppLog &critical(AppLog& sl)
+{return sl.operator()(Slog::levelCritical);}
+
+/**
+  * Manipulator for notice level
+  * @param sl application logger stream
+  * @return application logger stream
+  */
+__EXPORT inline AppLog &notice(AppLog& sl)
+{return sl.operator()(Slog::levelNotice);}
+
+/**
+ * Manipulator for info level
+ * @param sl application logger stream
+ * @return application logger stream
+ */
+__EXPORT inline AppLog &info(AppLog& sl)
+{return sl.operator()(Slog::levelInfo);}
+
+/**
+ * alog global log stream definition
+ */
+__EXPORT extern AppLog alog;
+
+END_NAMESPACE
+
+#endif //___APPLOG_H___
diff --git a/jni/libucommon/sources/inc/commoncpp/commoncpp.h b/jni/libucommon/sources/inc/commoncpp/commoncpp.h
new file mode 100644
index 0000000..d38c9e3
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/commoncpp.h
@@ -0,0 +1,28 @@
+#ifndef COMMONCPP_COMMONCPP_H_
+#define COMMONCPP_COMMONCPP_H_
+
+#include <commoncpp/config.h>
+#include <commoncpp/pointer.h>
+#include <commoncpp/string.h>
+#include <commoncpp/exception.h>
+#include <commoncpp/thread.h>
+#include <commoncpp/slog.h>
+#include <commoncpp/address.h>
+#include <commoncpp/socket.h>
+#include <commoncpp/udp.h>
+#include <commoncpp/tcp.h>
+#include <commoncpp/dccp.h>
+#include <commoncpp/numbers.h>
+#include <commoncpp/process.h>
+#include <commoncpp/file.h>
+#include <commoncpp/mime.h>
+#include <commoncpp/serial.h>
+#include <commoncpp/tokenizer.h>
+#include <commoncpp/object.h>
+
+#ifdef  NEW_STDCPP
+#include <commoncpp/applog.h>
+#endif
+
+#endif
+
diff --git a/jni/libucommon/sources/inc/commoncpp/config.h b/jni/libucommon/sources/inc/commoncpp/config.h
new file mode 100644
index 0000000..9e6e7b6
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/config.h
@@ -0,0 +1,70 @@
+#ifndef COMMONCPP_CONFIG_H_
+#define COMMONCPP_CONFIG_H_
+
+#ifndef _UCOMMON_UCOMMON_H_
+#include <ucommon/ucommon.h>
+#endif
+
+#ifdef  __EXPORT
+#undef  __EXPORT
+#endif
+
+#define __EXPORT    __SHARED
+
+// #include <streambuf>
+#include <iostream>
+
+#define COMMONCPP_HEADERS
+#define CCXX_NAMESPACES
+#define COMMONCPP_NAMESPACE ost
+#define NAMESPACE_COMMONCPP namespace ost {
+#define TIMEOUT_INF ucommon::Timer::inf
+
+#ifdef  _UCOMMON_EXTENDED_
+#define CCXX_EXCEPTIONS
+#endif
+
+#ifdef  AF_INET6
+#define CCXX_IPV6
+#endif
+
+#ifdef  AF_INET
+#define CCXX_IPV4
+#endif
+
+typedef pthread_t   cctid_t;
+typedef int8_t      int8;
+typedef uint8_t     uint8;
+typedef int16_t     int16;
+typedef uint16_t    uint16;
+typedef int32_t     int32;
+typedef uint32_t    uint32;
+typedef int64_t     int64;
+typedef uint64_t    uint64;
+
+#if !defined(_MSWINDOWS_) && !defined(__QNX__)
+
+/**
+ * Convenience function for case insensitive null terminated string compare.
+ * @param string1 to compare.
+ * @param string2 to compare.
+ * @return 0 if equal, > 0 if s2 > s1, < 0 if s2 < s1.
+ */
+extern "C" inline int stricmp(const char *string1, const char *string2)
+    {return ucommon::String::case_compare(string1, string2);}
+
+/**
+ * Convenience function for case insensitive null terminated string compare.
+ * @param string1 to compare.
+ * @param string2 to compare.
+ * @param max size of string to compare.
+ * @return 0 if equal, > 0 if s2 > s1, < 0 if s2 < s1.
+ */
+extern "C" inline int strnicmp(const char *string1, const char *string2, size_t max)
+    {return ucommon::String::case_compare(string1, string2, max);}
+
+#endif
+
+
+
+#endif
diff --git a/jni/libucommon/sources/inc/commoncpp/dccp.h b/jni/libucommon/sources/inc/commoncpp/dccp.h
new file mode 100644
index 0000000..e6ce8e9
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/dccp.h
@@ -0,0 +1,227 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+/**
+ * @file commoncpp/udp.h
+ * @short udp derived socket classes.
+ **/
+
+#ifndef COMMONCPP_DCCP_H_
+#define COMMONCPP_DCCP_H_
+
+#include <cstdio>
+
+#ifndef COMMONCPP_CONFIG_H_
+#include <commoncpp/config.h>
+#endif
+
+#ifndef COMMONCPP_STRING_H_
+#include <commoncpp/string.h>
+#endif
+
+#ifndef COMMONCPP_ADDRESS_H_
+#include <commoncpp/address.h>
+#endif
+
+#ifndef COMMONCPP_SOCKET_H_
+#include <commoncpp/socket.h>
+#endif
+
+NAMESPACE_COMMONCPP
+
+/**
+ * DCCP sockets are used for stream based connected sessions between two
+ * sockets.  Both error recovery and flow control operate transparently
+ * for a DCCP socket connection.  The DCCP socket base class is used both
+ * for client connections and to bind a DCCP "server" for accepting DCCP
+ * streams.
+ *
+ * An implicit and unique DCCPSocket object exists in Common C++ to represent
+ * a bound DCCP socket acting as a "server" for receiving connection requests.
+ * This class is not part of DCCPStream because such objects normally perform
+ * no physical I/O (read or write operations) other than to specify a listen
+ * backlog queue and perform "accept" operations for pending connections.
+ * The Common C++ DCCPSocket offers a Peek method to examine where the next
+ * pending connection is coming from, and a Reject method to flush the next
+ * request from the queue without having to create a session.
+ *
+ * The DCCPSocket also supports a "OnAccept" method which can be called when a
+ * DCCPStream related object is created from a DCCPSocket.  By creating a
+ * DCCPStream from a DCCPSocket, an accept operation automatically occurs, and
+ * the DCCPSocket can then still reject the client connection through the
+ * return status of it's OnAccept method.
+ *
+ * @author Leandro Sales <leandroal@gmail.com>
+ * @author Heverton Stuart <hevertonsns@gmail.com>
+ * @short bound server for DCCP streams and sessions.
+ */
+class __EXPORT DCCPSocket : public Socket
+{
+    union {
+        struct sockaddr_in ipv4;
+#ifdef  CCXX_IPV6
+        struct sockaddr_in6 ipv6;
+#endif
+    }   peer;
+
+    Family family;
+
+public:
+    /**
+     * A method to call in a derived DCCPSocket class that is acting
+     * as a server when a connection request is being accepted.  The
+     * server can implement protocol specific rules to exclude the
+     * remote socket from being accepted by returning false.  The
+     * Peek method can also be used for this purpose.
+     *
+     * @return true if client should be accepted.
+     * @param ia internet host address of the client.
+     * @param port number of the client.
+     */
+    virtual bool onAccept(const IPV4Host &ia, tpport_t port);
+#ifdef  CCXX_IPV6
+    virtual bool onAccept(const IPV6Host &ia, tpport_t port);
+#endif
+
+    virtual IPV4Host getIPV4Sender(tpport_t *port = NULL) const;
+
+#ifdef  CCXX_IPV6
+    virtual IPV6Host getIPV6Sender(tpport_t *port = NULL) const;
+#endif
+
+    /**
+     * A DCCP "server" is created as a DCCP socket that is bound
+     * to a hardware address and port number on the local machine
+     * and that has a backlog queue to listen for remote connection
+     * requests.  If the server cannot be created, an exception is
+     * thrown.
+     *
+     * @param bind local ip address or interface to use.
+     * @param port number to bind socket under.
+     * @param backlog size of connection request queue.
+     */
+    DCCPSocket(const IPV4Address &bind, tpport_t port, unsigned backlog = 5);
+#ifdef  CCXX_IPV6
+    DCCPSocket(const IPV6Address &bind, tpport_t port, unsigned backlog = 5);
+#endif
+
+    /**
+     * Create a named dccp socket by service and/or interface id.
+     * For IPV4 we use [host:]svc or [host/]svc for the string.
+     * If we have getaddrinfo, we use that to obtain the addr to
+     * bind for.
+     *
+     * @param name of host interface and service port to bind.
+     * @param backlog size of connection request queue.
+     */
+    DCCPSocket(const char *name, Family family = IPV4, unsigned backlog = 5);
+
+    /**
+     * Create an unconnected ephemeral DCCP client socket.
+     */
+    DCCPSocket(Family family = IPV4);
+
+    /**
+     * Create a server session by accepting a DCCP Socket.
+     */
+    DCCPSocket(DCCPSocket& server, timeout_t timeout = 0);
+
+    /**
+     * Used to reject the next incoming connection request.
+     */
+    void reject(void);
+
+    /**
+     * Disconnect active dccp connection (client use).
+     */
+    void disconnect(void);
+
+    /**
+     * Set CCID DCCP.
+     */
+    bool setCCID(uint8_t ccid);
+
+    /**
+     * Get TX CCID DCCP.
+     */
+    int getTxCCID();
+
+    /**
+     * Get RX CCID DCCP.
+     */
+    int getRxCCID();
+
+    /**
+     * Return number of bytes to be read
+     */
+    size_t available();
+
+    /**
+     * Create a DCCP client connection to a DCCP socket (on
+     * a remote machine).
+     *
+     * @param host address of remote DCCP server.
+     * @param port number to connect.
+     */
+    void connect(const IPV4Host &host, tpport_t port, timeout_t timeout = 0);
+#ifdef  CCXX_IPV6
+    void connect(const IPV6Host &host, tpport_t port, timeout_t timeout = 0);
+#endif
+
+    /**
+     * Connect to a named client.
+     */
+    void connect(const char *name);
+
+    /**
+     * Used to wait for pending connection requests.
+     * @return true if data packets available.
+     * @param timeout in milliseconds. TIMEOUT_INF if not specified.
+     */
+    inline bool isPendingConnection(timeout_t timeout = TIMEOUT_INF) /* not const -- jfc */
+        {return Socket::isPending(Socket::pendingInput, timeout);}
+
+    /**
+     * Use base socket handler for ending this socket.
+     */
+    virtual ~DCCPSocket();
+};
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/commoncpp/exception.h b/jni/libucommon/sources/inc/commoncpp/exception.h
new file mode 100644
index 0000000..244e7a5
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/exception.h
@@ -0,0 +1,140 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+/**
+ * @file commoncpp/exception.h
+ * @short GNU Common C++ exception model base classes.
+ **/
+
+#ifndef COMMONCPP_EXCEPTION_H_
+#define COMMONCPP_EXCEPTION_H_
+
+#ifndef COMMONCPP_CONFIG_H_
+#include <commoncpp/config.h>
+#endif
+
+#ifndef COMMONCPP_STRING_H_
+#include <commoncpp/string.h>
+#endif
+
+// see if we support useful and std exception handling, else we ignore
+// it for the rest of the system.
+
+#if defined(CCXX_EXCEPTIONS)
+#define COMMONCPP_EXCEPTIONS
+
+#include <exception>
+#include <stdexcept>
+
+NAMESPACE_COMMONCPP
+
+/**
+ * Mainline exception handler, this is the root for all Common C++
+ * exceptions and assures the ansi C++ exception class hierarchy is both
+ * followed and imported into the gnu Common C++ class hierarchy.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Base exception class for all Common C++ exceptions.
+ */
+class __EXPORT Exception : public std::exception
+{
+private:
+    String _what;
+
+public:
+    Exception(const String& what_arg) throw();
+    virtual ~Exception() throw();
+    virtual const char *getString() const;
+    virtual const char *what() const throw();
+};
+
+/**
+ * A sub-hierarchy for all Common C++ I/O related classes.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short I/O operation exception hierarchy.
+ */
+class __EXPORT IOException : public Exception
+{
+private:
+    long _systemError;
+    mutable char* _systemErrorString;
+
+public:
+    IOException(const String &what_arg, long systemError = 0) throw();
+    virtual ~IOException() throw();
+
+    virtual long getSystemError() const throw();
+    virtual const char* getSystemErrorString() const throw();
+};
+
+/**
+ * A sub-hierarchy for thread exceptions.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short thread exception hierarchy.
+ */
+class __EXPORT ThrException : public Exception
+{
+public:
+    inline ThrException(const String &what_arg) : Exception(what_arg) {};
+};
+
+/**
+ * A sub-hierarchy for all task synchronizion related exceptions.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Synchronization object exception hierarchy.
+ */
+class __EXPORT SyncException : public ThrException
+{
+public:
+    inline SyncException(const String &what_arg) : ThrException(what_arg) {};
+};
+
+class __EXPORT InterruptException : public ThrException
+{
+public:
+    inline InterruptException() : ThrException("interrupted") {};
+};
+
+END_NAMESPACE
+
+#endif
+
+#endif
diff --git a/jni/libucommon/sources/inc/commoncpp/export.h b/jni/libucommon/sources/inc/commoncpp/export.h
new file mode 100644
index 0000000..ed861f6
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/export.h
@@ -0,0 +1,42 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Export interfaces for library interfaces.
+ * This is a special header used when we have to build DLL's for dumb
+ * platforms which require explicit declaration of imports and exports.
+ * The real purpose is to include our local headers in a new library
+ * module with external headers referenced as imports, and then to define
+ * our own interfaces in our new library as exports.  This allows native
+ * construction of new DLL's based on/that use ucommon on Microsoft Windows
+ * and perhaps for other similarly defective legacy platforms.  Otherwise
+ * this header is not used at all, and not when building applications.
+ * @file commoncpp/export.h
+ */
+
+#if defined(_MSC_VER) || defined(WIN32) || defined(_WIN32) || defined(_MSWINDOWS_)
+#ifdef  __EXPORT
+#undef  __EXPORT
+#endif
+
+#if defined(UCOMMON_STATIC) || defined(UCOMMON_RUNTIME)
+#define __EXPORT
+#else
+#define __EXPORT __declspec(dllexport)
+#endif
+#endif
+
diff --git a/jni/libucommon/sources/inc/commoncpp/file.h b/jni/libucommon/sources/inc/commoncpp/file.h
new file mode 100644
index 0000000..4e2dd6d
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/file.h
@@ -0,0 +1,901 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+/**
+ * @file file.h
+ * @short Files and dynamic loader services.
+ **/
+
+#ifndef COMMONCPP_FILE_H_
+#define COMMONCPP_FILE_H_
+
+#ifndef COMMONCPP_CONFIG_H_
+#include <commoncpp/config.h>
+#endif
+
+#ifndef COMMONCPP_THREAD_H_
+#include <commoncpp/thread.h>
+#endif
+
+#ifndef COMMONCPP_EXCEPTION_H_
+#include <commoncpp/exception.h>
+#endif
+
+#ifndef WIN32
+# ifdef __BORLANDC__
+#  include <stdio.h>
+#  include <sys/types.h>
+# else
+#  include <fcntl.h>
+#  include <cstdio>
+# endif
+# include <dirent.h>
+# include <sys/stat.h>
+# include <sys/mman.h>
+#else
+# if __BORLANDC__ >= 0x0560
+#  include <dirent.h>
+#  include <sys/stat.h>
+# else
+#  include <direct.h>
+# endif
+#endif
+
+NAMESPACE_COMMONCPP
+
+typedef unsigned long pos_t;
+#ifndef _MSWINDOWS_
+// use a define so that if the sys/types.h header already defines caddr_t
+// as it may on BSD systems, we do not break it by redefining again.
+#undef  caddr_t
+#define caddr_t char *
+typedef size_t ccxx_size_t;
+#else
+typedef DWORD ccxx_size_t;
+#endif
+
+#ifndef PATH_MAX
+#define PATH_MAX    256
+#endif
+
+#ifndef NAME_MAX
+#define NAME_MAX    64
+#endif
+
+class __EXPORT File
+{
+public:
+    enum Error {
+        errSuccess = 0,
+        errNotOpened,
+        errMapFailed,
+        errInitFailed,
+        errOpenDenied,
+        errOpenFailed,
+        errOpenInUse,
+        errReadInterrupted,
+        errReadIncomplete,
+        errReadFailure,
+        errWriteInterrupted,
+        errWriteIncomplete,
+        errWriteFailure,
+        errLockFailure,
+        errExtended
+    };
+    typedef enum Error Error;
+
+    enum Access {
+#ifndef _MSWINDOWS_
+        accessReadOnly = O_RDONLY,
+        accessWriteOnly= O_WRONLY,
+        accessReadWrite = O_RDWR
+#else
+        accessReadOnly = GENERIC_READ,
+        accessWriteOnly = GENERIC_WRITE,
+        accessReadWrite = GENERIC_READ | GENERIC_WRITE
+#endif
+    };
+    typedef enum Access Access;
+
+protected:
+    typedef struct _fcb {
+        struct _fcb *next;
+        caddr_t address;
+        ccxx_size_t len;
+        off_t pos;
+        bool locked;
+    } fcb_t;
+
+public:
+#ifdef  _MSWINDOWS_
+    enum Open {
+        openReadOnly, // = FILE_OPEN_READONLY,
+        openWriteOnly, // = FILE_OPEN_WRITEONLY,
+        openReadWrite, // = FILE_OPEN_READWRITE,
+        openAppend, // = FILE_OPEN_APPEND,
+        openTruncate // = FILE_OPEN_TRUNCATE
+    };
+#else
+    enum Open {
+        openReadOnly = O_RDONLY,
+        openWriteOnly = O_WRONLY,
+        openReadWrite = O_RDWR,
+        openAppend = O_WRONLY | O_APPEND,
+#ifdef  O_SYNC
+        openSync = O_RDWR | O_SYNC,
+#else
+        openSync = O_RDWR,
+#endif
+        openTruncate = O_RDWR | O_TRUNC
+    };
+    typedef enum Open Open;
+
+/* to be used in future */
+
+#ifndef S_IRUSR
+#define S_IRUSR 0400
+#define S_IWUSR 0200
+#define S_IRGRP 0040
+#define S_IWGRP 0020
+#define S_IROTH 0004
+#define S_IWOTH 0002
+#endif
+
+#endif // !WIN32
+
+#ifndef _MSWINDOWS_
+    enum Attr {
+        attrInvalid = 0,
+        attrPrivate = S_IRUSR | S_IWUSR,
+        attrGroup = attrPrivate | S_IRGRP | S_IWGRP,
+        attrPublic = attrGroup | S_IROTH | S_IWOTH
+    };
+#else // defined WIN32
+    enum Attr {
+        attrInvalid=0,
+        attrPrivate,
+        attrGroup,
+        attrPublic
+    };
+#endif // !WIN32
+    typedef enum Attr Attr;
+
+#ifdef  _MSWINDOWS_
+    enum Complete {
+        completionImmediate, // = FILE_COMPLETION_IMMEDIATE,
+        completionDelayed, // = FILE_COMPLETION_DELAYED,
+        completionDeferred // = FILE_COMPLETION_DEFERRED
+    };
+
+    enum Mapping {
+        mappedRead,
+        mappedWrite,
+        mappedReadWrite
+    };
+#else
+    enum Mapping {
+        mappedRead = accessReadOnly,
+        mappedWrite = accessWriteOnly,
+        mappedReadWrite = accessReadWrite
+    };
+    enum Complete {
+        completionImmediate,
+        completionDelayed,
+        completionDeferred
+    };
+#endif
+    typedef enum Complete Complete;
+    typedef enum Mapping Mapping;
+
+public:
+    static const char *getExtension(const char *path);
+    static const char *getFilename(const char *path);
+    static char *getFilename(const char *path, char *buffer, size_t size = NAME_MAX);
+    static char *getDirname(const char *path, char *buffer, size_t size = PATH_MAX);
+    static char *getRealpath(const char *path, char *buffer, size_t size = PATH_MAX);
+};
+
+/**
+ * A low level portable directory class.  Used to support ccstd Directory
+ * container.  This provides a basic mechanism for allocating and
+ * accessing file entries.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short low level directory access class.
+ */
+class __EXPORT Dir : public File
+{
+private:
+#ifndef _MSWINDOWS_
+    DIR *dir;
+    struct dirent *save;
+    char save_space[sizeof(struct dirent) + PATH_MAX + 1];
+    struct dirent *entry;
+#else
+    HANDLE hDir;
+    WIN32_FIND_DATA data, fdata;
+    char *name;
+#endif
+
+public:
+    Dir(const char *name = NULL);
+
+    static bool create(const char *path, Attr attr = attrGroup);
+    static bool remove(const char *path);
+    static bool setPrefix(const char *path);
+    static bool getPrefix(char *path, size_t size = PATH_MAX);
+
+    void open(const char *name);
+    void close(void);
+
+    virtual ~Dir();
+
+    const char *getName(void);
+
+    const char *operator++()
+        {return getName();};
+
+    const char *operator++(int)
+        {return getName();};
+
+    const char *operator*();
+
+    bool rewind(void);
+
+    bool operator!()
+#ifndef _MSWINDOWS_
+        {return !dir;};
+#else
+        {return hDir != INVALID_HANDLE_VALUE;};
+#endif
+
+    bool isValid(void);
+};
+
+/**
+ * A generic class to walk a hierarchical directory structure.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Directory tree walking.
+ */
+class __EXPORT  DirTree
+{
+private:
+    char path[PATH_MAX + 1];
+    Dir *dir;
+    unsigned max, current, prefixpos;
+
+protected:
+    /**
+     * Virtual method to filter results.  Virtual override methods
+     * should call baseclass method to assure . and .. names are
+     * stripped out.
+     *
+     * @return true if current filename is accepted.
+     * @param file path to examine
+     * @param ino info of type, date, etc.
+     */
+    virtual bool filter(const char *file, struct stat *ino);
+
+public:
+    /**
+     * Construct a directory tree walk starting at the specified
+     * prefix.  A maximum subdirectory depth is also specified.
+     *
+     * @param prefix to start walk.
+     * @param maxdepth subdirectory depth to examine.
+     */
+    DirTree(const char *prefix, unsigned maxdepth);
+
+    /**
+     * Construct an un-opened directory tree of a known maximum depth
+     *
+     * @param maxdepth subdirectory subdirectory depth.
+     */
+    DirTree(unsigned maxdepth);
+
+    virtual ~DirTree();
+
+    /**
+     * Open a directory tree path.
+     *
+     * @param prefix directory path to open.
+     */
+    void open(const char *prefix);
+
+    /**
+     * Close the directory path.
+     */
+    void close(void);
+
+    /**
+     * Extract the next full pathname from the directory walk.
+     * When returning directories, a '/' is appended.  The
+     * returned string is a buffer of MAX_PATH size.
+     *
+     * @return path of next subdirectory entry or NULL.
+     */
+    char *getPath(void);
+
+    /**
+     * This is used to step through the filter virtual for an
+     * entire subtree, and is used for cases where a derived
+     * DirTree class performs it's primary operations through
+     * filter rather than externally by calling getPath().
+     *
+     * @return number of files and directories examined.
+     * @param prefix directory path to examine.
+     */
+    unsigned perform(const char *prefix);
+};
+
+/**
+ * The purpose of this class is to define a base class for low level
+ * random file access that is portable between Win32 and Posix systems.
+ * This class is a foundation both for optimized thread shared and
+ * traditional locked file access that is commonly used to build
+ * database services, rather than the standard C++ streaming file classes.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Portable random disk file access.
+ */
+class __EXPORT RandomFile : protected Mutex, public File
+{
+private:
+    Error errid;
+    char *errstr;
+
+protected:
+#ifndef _MSWINDOWS_
+    int fd;
+    // FIXME: WIN32 as no access member
+    Access access;
+#else
+    HANDLE fd;
+#endif
+    char *pathname;
+
+    struct {
+        unsigned count : 16;
+        bool thrown : 1;
+        bool initial : 1;
+#ifndef _MSWINDOWS_
+        bool immediate : 1;
+#endif
+        bool temp : 1;
+    } flags;
+
+    /**
+     * Create an unopened random access file.
+     */
+    RandomFile(const char *name = NULL);
+
+    /**
+     * Default copy constructor.
+     */
+    RandomFile(const RandomFile &rf);
+
+    /**
+     * Post an error event.
+     *
+     * @return error code.
+     * @param errid error code.
+     * @param errstr error message string.
+     */
+    Error error(Error errid, char *errstr = NULL);
+
+    /**
+     * Post an extended string error message.
+     *
+     * @return errExtended.
+     * @param err error string.
+     */
+    inline Error error(char *err)
+        {return error(errExtended, err);};
+
+    /**
+     * Used to enable or disable throwing of exceptions on
+     * errors.
+     *
+     * @param enable true if errors will be thrown.
+     */
+    inline void setError(bool enable)
+        {flags.thrown = !enable;};
+
+#ifndef _MSWINDOWS_
+    /**
+     * Used to set file completion modes.
+     *
+     * @return errSuccess if okay.
+     * @param mode completion mode.
+     * @todo implement in win32
+     */
+    Error setCompletion(Complete mode);
+#endif
+
+    /**
+     * Used to set the temporary attribute for the file.  Temporary
+     * files are automatically deleted when closed.
+     *
+     * @param enable true for marking as temporary.
+     */
+    inline void setTemporary(bool enable)
+        {flags.temp = enable;};
+
+    /**
+     * This method is used to initialize a newly created file as
+     * indicated by the "initial" flag.  This method also returns
+     * the file access permissions that should be associated with
+     * the file.  This method should never be called directly, but
+     * is instead used to impliment the "Initial" method.  Typically
+     * one would use this to build an empty database shell when a
+     * previously empty database file is created.
+     *
+     * @return access, or attrInvalid if should be removed.
+     */
+    virtual Attr initialize(void);
+
+    /**
+     * Close the file.
+     */
+    void final(void);
+
+public:
+    /**
+     * Destroy a random access file or it's derived class.
+     */
+    virtual ~RandomFile();
+
+    /**
+     * This method should be called right after a RandomFile derived
+     * object has been created.  This method will invoke initialize
+     * if the object is newly created, and set file access permissions
+     * appropriately.
+     *
+     * @return true if file had to be initialized.
+     */
+    bool initial(void);
+
+    /**
+     * Get current file capacity.
+     *
+     * @return total file size.
+     */
+    off_t getCapacity(void);
+
+    /**
+     * This method is commonly used to close and re-open an existing
+     * database.  This may be used when the database has been unlinked
+     * and an external process provides a new one to use.
+     */
+    virtual Error restart(void);
+
+    /**
+     * Return current error id.
+     *
+     * @return last error identifier set.
+     */
+    inline Error getErrorNumber(void)
+        {return errid;};
+
+    /**
+     * Return current error string.
+     *
+     * @return last error string set.
+     */
+    inline char *getErrorString(void)
+        {return errstr;};
+
+    bool operator!(void);
+};
+
+/**
+ * This class defines a database I/O file service that can be shared
+ * by multiple processes.  Each thread should access a dup of the database
+ * object, and mutex locks can be used to preserve transaction
+ * integrety if multiple threads are used.
+ *
+ * SharedFile is used when a database may be shared between multiple
+ * processes.  SharedFile automatically applies low level byte-range "file
+ * locks", and provides an interface to fetch and release byte-range locked
+ * portions of a file.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short This class defines a database I/O file service that can be shared by multiple processes.
+ */
+class __EXPORT SharedFile : public RandomFile
+{
+private:
+    fcb_t fcb;
+    Error open(const char *path);
+
+public:
+    /**
+     * Open or create a new database file.  You should also use
+     * Initial.
+     *
+     * @param path pathname of database to open.
+     */
+    SharedFile(const char *path);
+
+    /**
+     * Create a shared file as a duplicate of an existing shared
+     * file.
+     *
+     * @param file original file.
+     */
+    SharedFile(const SharedFile &file);
+
+    /**
+     * Close and finish a database file.
+     */
+    virtual ~SharedFile();
+
+    /**
+     * Restart an existing database; close and re-open.
+     *
+     * @return errSuccess if successful.
+     */
+    Error restart(void)
+        {return open(pathname);};
+
+    /**
+     * Lock and Fetch a portion of the file into physical memory.
+     * This can use state information to fetch the current record
+     * multiple times.
+     *
+     * @return errSuccess on success.
+     * @param address  address to use, or NULL if same as last I/O.
+     * @param length   length to use, or 0 if same as last I/O.
+     * @param position file position to use -1 if same as last I/O.
+     */
+    Error fetch(caddr_t address = NULL, ccxx_size_t length = 0, off_t position = -1);
+
+    /**
+     * Update a portion of a file from physical memory.  This can use
+     * state information to commit the last read record.  The current
+     * lock is also cleared.
+     *
+     * @return errSuccess on success.
+     * @param address  address to use, or NULL if same as last I/O.
+     * @param length   length to use, or 0 if same as last I/O.
+     * @param position file position to use or -1 if same as last I/O.
+     */
+    Error update(caddr_t address = NULL, ccxx_size_t length = 0, off_t position = -1);
+
+    /**
+     * Clear a lock held from a previous fetch operation without
+     * updating.
+     *
+     * @return errSuccess on success.
+     * @param length length to use, or 0 if same as last I/O.
+     * @param pos    file position to use or -1 if same as last I/O.
+     */
+    Error clear(ccxx_size_t length = 0, off_t pos = -1);
+
+    /**
+     * Add new data to the end of the file.  Locks file during append.
+     *
+     * @param address address to use, or NULL if same as last I/O.
+     * @param length  length to use, or 0 if same as last I/O.
+     */
+    Error append(caddr_t address = NULL, ccxx_size_t length = 0);
+
+    /**
+     * Fetch the current file position marker for this thread.
+     *
+     * @return file position offset.
+     */
+    off_t getPosition(void);
+
+    bool operator++(void);
+    bool operator--(void);
+};
+
+/**
+ * Create and map a disk file into memory.  This portable class works
+ * under both Posix via mmap and under the win32 API. A mapped file
+ * can be referenced directly by it's memory segment. One can map
+ * and unmap portions of a file on demand, and update
+ * changed memory pages mapped from files immediately through sync().
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Map a named disk file into memory.
+ */
+class __EXPORT MappedFile : public RandomFile
+{
+private:
+    fcb_t fcb;
+    int prot;
+#ifdef  _MSWINDOWS_
+    HANDLE map;
+    char mapname[64];
+#endif
+
+public:
+    /**
+     * Open a file for mapping.  More than one segment of a file
+     * may be mapped into seperate regions of memory.
+     *
+     * @param fname file name to access for mapping.
+     * @param mode  access mode to map file.
+     */
+    MappedFile(const char *fname, Access mode);
+
+    /**
+     * Create if not exists, and map a file of specified size
+     * into memory.
+     *
+     * @param fname file name to access for mapping.
+     * @param mode access mode to map file.
+     * @param size of file to map.
+     */
+    MappedFile(const char *fname, Access mode, size_t size);
+
+    /**
+     * Map a portion or all of a specified file in the specified
+     * shared memory access mode.  Valid mapping modes include
+     * mappedRead, mappedWrite, and mappedReadWrite.
+     *
+     * @param fname pathname of file to map into memory.
+     * @param offset from start of file to begin mapping in bytes.
+     * @param size of mapped area in bytes.
+     * @param mode to map file.
+     */
+    MappedFile(const char *fname, pos_t offset, size_t size, Access mode);
+
+    /**
+     * Release a mapped section of memory associated with a file.  The
+     * mapped area is updated back to disk.
+     */
+    virtual ~MappedFile();
+
+    // FIXME: not use library function in header ??
+    /**
+     * Synchronize the contents of the mapped portion of memory with
+     * the disk file and wait for completion.  This assures the memory
+     * mapped from the file is written back.
+     */
+    void sync(void);
+
+    /**
+     * Synchronize a segment of memory mapped from a segment fetch.
+     *
+     * @param address memory address to update.
+     * @param len size of segment.
+     */
+    void sync(caddr_t address, size_t len);
+
+    /**
+     * Map a portion of the memory mapped from the file back to the
+     * file and do not wait for completion.  This is useful when mapping
+     * a database file and updating a single record.
+     *
+     * @param offset offset into the mapped region of memory.
+     * @param len length of partial region (example, record length).
+     */
+    void update(size_t offset = 0, size_t len = 0);
+
+    /**
+     * Update a mapped region back to disk as specified by address
+     * and length.
+     *
+     * @param address address of segment.
+     * @param len length of segment.
+     */
+    void update(caddr_t address, size_t len);
+
+    /**
+     * Release (unmap) a memory segment.
+     *
+     * @param address address of memory segment to release.
+     * @param len length of memory segment to release.
+     */
+    void release(caddr_t address, size_t len);
+
+    /**
+     * Fetch a pointer to an offset within the memory mapped portion
+     * of the disk file.  This really is used for convience of matching
+     * operations between Update and Fetch, as one could simply have
+     * accessed the base pointer where the file was mapped directly.
+     *
+     * @param offset from start of mapped memory.
+     */
+    inline caddr_t fetch(size_t offset = 0)
+        {return ((char *)(fcb.address)) + offset;};
+
+    /**
+     * Fetch and map a portion of a disk file to a logical memory
+     * block.
+     *
+     * @return pointer to memory segment.
+     * @param pos offset of file segment to map.
+     * @param len size of memory segment to map.
+     */
+    caddr_t fetch(off_t pos, size_t len);
+
+    /**
+     * Lock the currently mapped portion of a file.
+     *
+     * @return true if pages are locked.
+     */
+    bool lock(void);
+
+    /**
+     * Unlock a locked mapped portion of a file.
+     */
+    void unlock(void);
+
+    /**
+     * Compute map size to aligned page boundry.
+     *
+     * @param size request.
+     * @return page aligned size.
+     */
+    size_t pageAligned(size_t size);
+};
+
+
+/**
+ * The DSO dynamic loader class is used to load object files.  On
+ * elf based systems this is typically done with dlopen.  A dummy
+ * stub class is generated for non-dl capable systems.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Dynamic class file loader.
+ */
+class __EXPORT DSO
+{
+private:
+    const char *err;
+    static Mutex mutex;
+    static DSO *first;
+    static DSO *last;
+    DSO *next, *prev;
+    const char *id;
+    void *image;
+
+    typedef ucommon::dso::addr_t addr_t;
+
+protected:
+    void loader(const char *filename, bool resolve);
+
+public:
+    /**
+     * Construct and load a DSO object file.
+     *
+     * @param filename pathname of object file to load.
+     */
+    DSO(const char *filename)
+        {loader(filename, true);};
+
+    DSO(const char *filename, bool resolve)
+        {loader(filename, resolve);};
+
+    /**
+     * Retrieve error indicator associated with DSO failure.  This
+     * is often used in catch handlers.
+     */
+    inline const char *getError(void)
+        {return err;};
+
+    /**
+     * Detach a DSO object from running memory.
+     */
+    virtual ~DSO();
+
+    /**
+     * Lookup a symbol in the loaded file.
+     */
+    addr_t operator[](const char *sym);
+
+    static void dynunload(void);
+
+    /**
+     * Find a specific DSO object by filename.
+     *
+     * @param name of DSO object file (partial).
+     */
+    static DSO *getObject(const char *name);
+
+    /**
+     * See if DSO object is valid.
+     *
+     * @return true if valid.
+     */
+    bool isValid(void);
+
+    /**
+     * Install debug handler...
+     */
+    static void setDebug(void);
+};
+
+/** @relates RandomFile */
+bool __EXPORT isDir(const char *path);
+/** @relates RandomFile */
+bool __EXPORT isFile(const char *path);
+#ifndef WIN32
+/** @relates RandomFile */
+bool __EXPORT isDevice(const char *path);
+#else
+/** @relates RandomFile */
+inline bool isDevice(const char *path)
+{ return false; }
+#endif
+/** @relates RandomFile */
+bool __EXPORT canAccess(const char *path);
+/** @relates RandomFile */
+bool __EXPORT canModify(const char *path);
+/** @relates RandomFile */
+time_t __EXPORT lastModified(const char *path);
+/** @relates RandomFile */
+time_t __EXPORT lastAccessed(const char *path);
+
+#ifdef  COMMON_STD_EXCEPTION
+
+class DirException : public IOException
+{
+public:
+    DirException(const String &str) : IOException(str) {};
+};
+
+class __EXPORT DSOException : public IOException
+{
+public:
+    DSOException(const String &str) : IOException(str) {};
+};
+
+class __EXPORT FileException : public IOException
+{
+public:
+    FileException(const String &str) : IOException(str) {};
+};
+
+#endif
+
+END_NAMESPACE
+
+#endif
+
+/** EMACS **
+ * Local variables:
+ * mode: c++
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/jni/libucommon/sources/inc/commoncpp/mime.h b/jni/libucommon/sources/inc/commoncpp/mime.h
new file mode 100644
index 0000000..136a83f
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/mime.h
@@ -0,0 +1,223 @@
+// Copyright (C) 2001-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+/**
+ * @file mime.h
+ * @short MIME document abstractions.
+ **/
+
+#ifndef COMMONCPP_MIME_H_
+#define COMMONCPP_MIME_H_
+
+#ifndef COMMONCPP_CONFIG_H_
+#include <commoncpp/config.h>
+#endif
+
+#ifndef COMMONCPP_SOCKET_H_
+#include <commoncpp/socket.h>
+#endif
+
+NAMESPACE_COMMONCPP
+
+class MIMEMultipart;
+class MIMEItemPart;
+
+/**
+ * A container class for multi-part MIME document objects which can
+ * be streamed to a std::ostream destination.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short container for streamable multi-part MIME documents.
+ */
+class __EXPORT MIMEMultipart
+{
+protected:
+    friend class MIMEItemPart;
+    char boundry[8];
+    char mtype[80];
+    char *header[16];
+    MIMEItemPart *first, *last;
+
+    virtual ~MIMEMultipart();
+
+public:
+    /**
+     * Contruct a multi-part document, and describe it's type.
+     *
+     * @param document (content) type.
+     */
+    MIMEMultipart(const char *document);
+
+    /**
+     * Stream the headers of the multi-part document.  The headers
+     * of individual entities are streamed as part of the body.
+     *
+     * @param output to stream document header into.
+     */
+    virtual void head(std::ostream *output);
+
+    /**
+     * Stream the "body" of the multi-part document.  This involves
+     * streaming the headers and body of each document part.
+     *
+     * @param output to stream document body into.
+     */
+    virtual void body(std::ostream *output);
+
+    /**
+     * Get a string array of the headers to use.  This is used to
+     * assist URLStream::post.
+     *
+     * @return array of headers.
+     */
+    char **getHeaders(void)
+        {return header;};
+};
+
+/**
+ * The Multipart form is a MIME multipart document specific for the
+ * construction and delivery of form data to a web server through a
+ * post method.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short deliver form results as multipart document.
+ */
+class __EXPORT MIMEMultipartForm : public MIMEMultipart
+{
+protected:
+    virtual ~MIMEMultipartForm();
+
+public:
+    /**
+     * Construct a form result.  This is a MIMEMultipart of type
+     * multipart/form-data.
+     */
+    MIMEMultipartForm();
+};
+
+/**
+ * This is used to attach an item part to a MIME multipart document
+ * that is being streamed.  The base item part class is used by all
+ * derived items.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short item or part of a multi-part object.
+ */
+class __EXPORT MIMEItemPart
+{
+protected:
+    friend class MIMEMultipart;
+
+    MIMEMultipart *base;
+    MIMEItemPart *next;
+    const char *ctype;
+
+    /**
+     * Stream the header(s) for the current document part.
+     *
+     * @param output to stream header into.
+     */
+    virtual void head(std::ostream *output);
+
+    /**
+     * Stream the content of this document part.
+     *
+     * @param output to stream document body into.
+     */
+    virtual void body(std::ostream *output) = 0;
+
+    /**
+     * Construct and attach a document part to a multipart document.
+     *
+     * @param top multipart document to attach to.
+     * @param ct Content-Type to use.
+     */
+    MIMEItemPart(MIMEMultipart *top, const char *ct);
+
+    virtual ~MIMEItemPart();
+};
+
+/**
+ * This is a document part type for use in submitting multipart form
+ * data to a web server.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short multipart document part for web form data field.
+ */
+class __EXPORT MIMEFormData : public MIMEItemPart
+{
+protected:
+    const char *content;
+    const char *name;
+
+    virtual ~MIMEFormData();
+
+public:
+    /**
+     * Stream header, Content-Disposition form-data.
+     *
+     * @param output stream to send header to.
+     */
+    void head(std::ostream *output);
+
+    /**
+     * Stream content (value) of this form data field.
+     *
+     * @param output stream to send body to.
+     */
+    void body(std::ostream *output);
+
+    /**
+     * Construct form data field part of multipart form.
+     *
+     * @param top multipart form this is part of
+     * @param name of form data field
+     * @param content of form data field
+     */
+    MIMEFormData(MIMEMultipartForm *top, const char *name, const char *content);
+};
+
+END_NAMESPACE
+
+#endif
+/** EMACS **
+ * Local variables:
+ * mode: c++
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/jni/libucommon/sources/inc/commoncpp/missing.h b/jni/libucommon/sources/inc/commoncpp/missing.h
new file mode 100644
index 0000000..9be89cf
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/missing.h
@@ -0,0 +1,119 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+/**
+ * @file missing.h
+ * @short substitute functions which may be missing in target platform libc.
+ **/
+
+#ifndef CCXX_MISSING_H_
+#define CCXX_MISSING_H_
+
+#include <ctime>
+
+#ifdef  MACOSX
+#undef  HAVE_LOCKF
+#endif
+
+#ifdef  WIN32
+#ifndef HAVE_LOCKF
+#define HAVE_LOCKF
+#endif
+#endif
+
+#include <fstream>
+#include <iostream>
+#include <ctime>
+
+#ifdef  HAVE_SSTREAM
+#include <sstream>
+#else
+#include <strstream>
+#endif
+
+#if defined(__KCC)
+#define ostream ostream_withassign
+#endif
+
+#ifdef __BORLANDC__
+#include <time.h>
+#endif
+
+#ifdef  CCXX_NAMESPACES
+namespace ost {
+#endif
+
+#ifndef HAVE_GETTIMEOFDAY
+#ifdef  WIN32
+#define HAVE_GETTIMEOFDAY
+__EXPORT int gettimeofday(struct timeval *tv_,  void *tz_);
+#endif
+#endif
+
+#ifdef  HAVE_GETTIMEOFDAY
+#ifdef  WIN32
+__EXPORT DWORD getTicks(void);
+#else
+__EXPORT unsigned long getTicks(void);
+#endif
+#endif
+
+#ifndef HAVE_MEMMOVE
+__EXPORT void *memmove(char *dest, const char *source, size_t length);
+#endif
+
+#ifndef HAVE_STRDUP
+__EXPORT char *strdup(const char *str);
+#endif
+
+#ifndef HAVE_LOCKF
+__EXPORT int lockf(int fd, int mode, long offset);
+#endif
+
+#ifndef HAVE_STRTOK_R
+
+inline char *strtok_r(char *s, const char *d, char **x) \
+    {return strtok(s, d);};
+
+#endif
+
+#ifdef  CCXX_NAMESPACES
+}
+#endif
+
+#endif
diff --git a/jni/libucommon/sources/inc/commoncpp/numbers.h b/jni/libucommon/sources/inc/commoncpp/numbers.h
new file mode 100644
index 0000000..eec4bc6
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/numbers.h
@@ -0,0 +1,156 @@
+#ifndef COMMONCPP_NUMBERS_H_
+#define COMMONCPP_NUMBERS_H_
+
+#ifndef COMMONCPP_CONFIG_H_
+#include <commoncpp/config.h>
+#endif
+
+#ifndef COMMONCPP_STRING_H_
+#include <commoncpp/string.h>
+#endif
+
+typedef ucommon::DateTimeString DateTimeString;
+typedef ucommon::DateNumber DateNumber;
+
+class __EXPORT Date : public ucommon::Date
+{
+protected:
+    inline void toJulian(long year, long month, long day)
+        {ucommon::Date::set(year, month, day);}
+
+    inline void fromJulian(char *buf) const
+        {put(buf);}
+
+public:
+    inline Date(time_t value) : ucommon::Date(value) {};
+
+    inline Date(struct tm *object) : ucommon::Date(object) {};
+
+    inline Date(const char *ptr, size_t size = 0) : ucommon::Date(ptr, size) {};
+
+    inline Date(int y, unsigned m, unsigned d) : ucommon::Date(y, m, d) {};
+
+    inline Date(const Date& object) : ucommon::Date(object) {};
+
+    inline Date() : ucommon::Date() {};
+
+    inline int getYear(void) const
+        {return year();}
+
+    inline unsigned getMonth(void) const
+        {return month();}
+
+    inline unsigned getDay(void) const
+        {return day();}
+
+    inline unsigned getDayOfWeek(void) const
+        {return dow();}
+
+    inline long getJulian(void) const
+        {return julian;}
+
+    inline const char *get(char *buffer) const
+        {return put(buffer);}
+
+    inline time_t getTime(void) const
+        {return timeref();}
+
+    inline bool isValid(void) const
+        {return is_valid();}
+};
+
+class __EXPORT Time : public ucommon::Time
+{
+protected:
+    inline void toSeconds(int h, int m = 0, int s = 0)
+        {set(h, m, s);}
+
+    inline void fromSeconds(char *buf) const
+        {put(buf);}
+
+public:
+    inline Time(time_t value) : ucommon::Time(value) {};
+
+    inline Time(tm_t *object) : ucommon::Time(object) {};
+
+    inline Time(const char *ptr, size_t size) : ucommon::Time(ptr, size) {};
+
+    inline Time(int h, int m, int s) : ucommon::Time(h, m, s) {};
+
+    inline Time() : ucommon::Time() {};
+
+    inline int getHour(void) const
+        {return hour();}
+
+    inline int getMinute(void) const
+        {return minute();}
+
+    inline int getSecond(void) const
+        {return second();}
+
+    inline const char *get(char *buffer) const
+        {return put(buffer);}
+
+    inline bool isValid(void) const
+        {return is_valid();}
+
+};
+
+class __EXPORT DateTime : public ucommon::DateTime
+{
+public:
+    inline DateTime(time_t time) : ucommon::DateTime(time) {};
+
+    inline DateTime(struct tm *dt) : ucommon::DateTime(dt) {};
+
+
+    inline DateTime(int year, unsigned month, unsigned day,
+        int hour = 0, int minute = 0, int second = 0) :
+            ucommon::DateTime(year, month, day, hour, minute, second) {};
+
+    inline DateTime(const char *ptr, size_t size) :
+        ucommon::DateTime(ptr, size) {};
+
+    inline DateTime(const DateTime& obj) : ucommon::DateTime(obj) {};
+
+    inline DateTime() : ucommon::DateTime() {};
+
+    inline int getYear(void) const
+        {return year();}
+
+    inline unsigned getMonth(void) const
+        {return month();}
+
+    inline unsigned getDay(void) const
+        {return day();}
+
+    inline unsigned getDayOfWeek(void) const
+        {return dow();}
+
+    inline long getJulian(void) const
+        {return julian;}
+
+    inline const char *get(char *buffer) const
+        {return ucommon::DateTime::put(buffer);}
+
+    inline time_t getTime(void) const
+        {return ucommon::DateTime::timeref();}
+
+    inline bool isValid(void) const
+        {return ucommon::DateTime::is_valid();}
+
+    inline int getHour(void) const
+        {return hour();}
+
+    inline int getMinute(void) const
+        {return minute();}
+
+    inline int getSecond(void) const
+        {return second();}
+
+    inline static tm_t *glt(time_t *time = NULL)
+        {return ucommon::DateTime::local(time);}
+};
+
+#endif
+
diff --git a/jni/libucommon/sources/inc/commoncpp/object.h b/jni/libucommon/sources/inc/commoncpp/object.h
new file mode 100644
index 0000000..3c16808
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/object.h
@@ -0,0 +1,587 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+/**
+ * @file object.h
+ * @short Some object manipulation classes for smart pointers, linked lists,
+ * etc.
+ **/
+
+#ifndef COMMONCPP_OBJECT_H_
+#define COMMONCPP_OBJECT_H_
+
+#ifndef COMMONCPP_CONFIG_H_
+#include <commoncpp/config.h>
+#endif
+
+NAMESPACE_COMMONCPP
+
+class MapObject;
+class MapIndex;
+
+/**
+ * A reference countable object.  This is used in association with smart
+ * pointers (RefPointer).
+ *
+ * @author David Sugar <dyfet@gnutelephony.org>
+ * @short Object managed by smart pointer reference count.
+ */
+class __EXPORT RefObject
+{
+protected:
+    friend class RefPointer;
+
+    unsigned refCount;
+
+    /**
+     * The constructor simply initializes the count.
+     */
+    inline RefObject()
+        {refCount = 0;};
+
+    /**
+     * The destructor is called when the reference count returns
+     * to zero.  This is done through a virtual destructor.
+     */
+    virtual ~RefObject();
+
+public:
+    /**
+     * The actual object being managed can be returned by this
+     * method as a void and then recast to the actual type.  This
+     * removes the need to dynamic cast from RefObject and the
+     * dependence on rtti this implies.
+     *
+     * @return underlying object being referenced.
+     */
+    virtual void *getObject(void) = 0;
+};
+
+/**
+ * Pointer to reference counted objects.  This is a non-template form
+ * of a reference count smart pointer, and so uses common code.  This
+ * can be subclassed to return explicit object types.
+ *
+ * @author David Sugar <dyfet@gnutelephony.org>
+ * @short Pointer to reference count managed objects.
+ */
+class __EXPORT RefPointer
+{
+protected:
+    RefObject *ref;
+
+    /**
+     * Detach current object, for example, when changing pointer.
+     */
+    void detach(void);
+
+    /**
+     * Patch point for mutex in derived class.  This may often
+     * be a single static mutex shared by a managed type.
+     */
+    virtual void enterLock(void);
+
+    /**
+     * Patch point for a mutex in derived class.  This may often
+     * be a single static mutex shared by a managed type.
+     */
+    virtual void leaveLock(void);
+
+public:
+    /**
+     * Create an unattached pointer.
+     */
+    inline RefPointer()
+        {ref = NULL;};
+
+    /**
+     * Create a pointer attached to a reference counted object.
+     *
+     * Object being referenced.
+     */
+    RefPointer(RefObject *obj);
+
+    /**
+     * A copy constructor.
+     *
+     * Pointer being copied.
+     */
+    RefPointer(const RefPointer &ptr);
+
+    virtual ~RefPointer();
+
+    RefPointer& operator=(const RefObject &ref);
+
+    inline void *operator*() const
+        {return getObject();};
+
+    inline void *operator->() const
+        {return getObject();};
+
+    void *getObject(void) const;
+
+    bool operator!() const;
+};
+
+/**
+ * Self managed single linked list object chain.  This is used for
+ * accumulating lists by using as a base class for a derived subclass.
+ *
+ * @author David Sugar <dyfet@gnutelephony.org>
+ * @short Accumulating single linked list.
+ */
+class __EXPORT LinkedSingle
+{
+protected:
+    LinkedSingle *nextObject;
+
+    inline LinkedSingle()
+        {nextObject = NULL;};
+
+    virtual ~LinkedSingle();
+
+public:
+    /**
+     * Get first linked object in list.  This may be dynamically
+     * recast, and may refer to a master static bookmark pointer
+     * in a derived class.  Otherwise it simply returns the current
+     * object.  In a "free" list, this may not only return the first
+     * object, but also set the first to next.
+     *
+     * @return pointer to first object in list.
+     */
+    virtual LinkedSingle *getFirst(void);
+
+    /**
+     * Gets the last object in the list.  This normally follows the
+     * links to the end.  This is a virtual because derived class
+     * may include a static member bookmark for the current end.
+     *
+     * @return pointer to last object in list.
+     */
+    virtual LinkedSingle *getLast(void);
+
+    /**
+     * Get next object, for convenience.  Derived class may use
+     * this with a dynamic cast.
+     *
+     * @return next object in list.
+     */
+    inline LinkedSingle *getNext(void)
+        {return nextObject;};
+
+    /**
+     * Insert object into chain.  This is a virtual because
+     * derived class may choose instead to perform an insert
+     * at head or tail, may manage bookmarks, and may add mutex lock.
+     *
+     * @param object being inserted.
+     */
+    virtual void insert(LinkedSingle& obj);
+
+    LinkedSingle &operator+=(LinkedSingle &obj);
+};
+
+/**
+ * Self managed double linked list object chain.  This is used for
+ * accumulating lists by using as a base class for a derived subclass.
+ *
+ * @author David Sugar <dyfet@gnutelephony.org>
+ * @short Accumulating double linked list.
+ */
+class __EXPORT LinkedDouble
+{
+protected:
+    LinkedDouble *nextObject, *prevObject;
+
+    inline LinkedDouble()
+        {nextObject = prevObject = NULL;};
+
+    virtual ~LinkedDouble();
+
+    virtual void enterLock(void);
+
+    virtual void leaveLock(void);
+
+    virtual LinkedDouble *firstObject();
+
+    virtual LinkedDouble *lastObject();
+
+public:
+
+  /**
+   * Requested in overloaded insert() method to indicate how to insert
+   * data into list
+   */
+  enum InsertMode
+  {
+    modeAtFirst,  /**< insert at first position in list pointed by current object */
+    modeAtLast,   /**< insert at last position in list pointed by current object */
+    modeBefore,   /**< insert in list before current object */
+    modeAfter     /**< insert in list after current object */
+  };
+
+    /**
+     * Get first linked object in list.  This may be dynamically
+     * recast, and may refer to a master static bookmark pointer
+     * in a derived class.  Otherwise it follows list to front.
+     *
+     * @return pointer to first object in list.
+     */
+    virtual LinkedDouble *getFirst(void);
+
+    /**
+     * Gets the last object in the list.  This normally follows the
+     * links to the end.  This is a virtual because derived class
+     * may include a static member bookmark for the current end.
+     *
+     * @return pointer to last object in list.
+     */
+    virtual LinkedDouble *getLast(void);
+
+    /**
+     * Virtual to get the insert point to use when adding new members.  This
+     * may be current, or always head or always tail.  As a virtual, this allows
+     * derived class to establish "policy".
+     *
+     * @return pointer to insertion point in list.
+     */
+    virtual LinkedDouble *getInsert(void);
+
+    /**
+     * Get next object, for convenience.  Derived class may use
+     * this with a dynamic cast.
+     *
+     * @return next object in list.
+     */
+    inline LinkedDouble *getNext(void)
+        {return nextObject;};
+
+    /**
+     * Get prev object in the list.
+     *
+     * @return pointer to previous object.
+     */
+    inline LinkedDouble *getPrev(void)
+        {return prevObject;};
+
+  /**
+   * Insert object into chain at given position, as indicated by \ref InsertMode;
+   * If no position is given, it defaults to \ref modeAtLast, inserting element
+   * at list's end.
+   *
+   * @param object being inserted.
+   * @param position where object is inserted.
+   */
+  virtual void insert(LinkedDouble& obj, InsertMode position = modeAtLast);
+
+    /**
+     * Remove object from chain.
+     */
+    virtual void detach(void);
+
+    LinkedDouble &operator+=(LinkedDouble &obj);
+
+    LinkedDouble &operator--();
+};
+
+/**
+ * A map table allows for entities to be mapped (hash index) onto it.
+ * Unlike with Assoc, This form of map table also allows objects to be
+ * removed from the table.  This table also includes a mutex lock for
+ * thread safety.  A free list is also optionally maintained for reusable
+ * maps.
+ *
+ * @author David Sugar <dyfet@gnutelephony.org>
+ * @short Table to hold hash indexed objects.
+ */
+class __EXPORT MapTable : public Mutex
+{
+protected:
+    friend class MapObject;
+    friend class MapIndex;
+    unsigned range;
+  unsigned count;
+    MapObject **map;
+
+    void cleanup(void);
+
+public:
+    /**
+     * Create a map table with a specified number of slots.
+     *
+     * @param number of slots.
+     */
+    MapTable(unsigned size);
+
+    /**
+     * Destroy the table, calls cleanup.
+     */
+    virtual ~MapTable();
+
+    /**
+     * Get index value from id string.  This function can be changed
+     * as needed to provide better collision avoidence for specific
+     * tables.
+     *
+     * @param id string
+     * @return index slot in table.
+     */
+    virtual unsigned getIndex(const char *id);
+
+    /**
+     * Return range of this table.
+     *
+     * @return table range.
+     */
+    inline unsigned getRange(void)
+        {return range;};
+
+    /**
+     * Return the number of object stored in this table.
+     *
+     * @return table size.
+     */
+    inline unsigned getSize(void)
+        {return count;};
+
+    /**
+     * Lookup an object by id key.  It is returned as void * for
+     * easy re-cast.
+     *
+     * @param key to find.
+     * @return pointer to found object or NULL.
+     */
+    void *getObject(const char *id);
+
+    /**
+     * Map an object to our table.  If it is in another table
+     * already, it is removed there first.
+     *
+     * @param object to map.
+     */
+    void addObject(MapObject &obj);
+    /**
+     * Get the first element into table, it is returned as void * for
+     * easy re-cast.
+     *
+     * @return pointer to found object or NULL.
+     */
+    void *getFirst();
+
+    /**
+     * Get the last element into table, it is returned as void * for
+     * easy re-cast.
+     *
+     * @return pointer to found object or NULL.
+     */
+    void *getLast();
+
+    /**
+     * Get table's end, useful for cycle control; it is returned as void * for
+     * easy re-cast.
+     *
+     * @return pointer to found object or NULL.
+     */
+    void *getEnd()
+        {   return NULL;    };
+
+    /**
+     * Get next object from managed free list.  This returns as a
+     * void so it can be recast into the actual type being used in
+     * derived MapObject's.  A derived version of MapTable may well
+     * offer an explicit type version of this.  Some derived
+     * MapObject's may override new to use managed list.
+     *
+     * @return next object on free list.
+     */
+    void *getFree(void);
+
+    /**
+     * Add an object to the managed free list.  Some MapObject's
+     * may override delete operator to detach and do this.
+     *
+     * @param object to add.
+     */
+    void addFree(MapObject *obj);
+
+    /**
+     * An operator to map an object to the table.
+     *
+     * @return table being used.
+     * @param object being mapped.
+     */
+    MapTable &operator+=(MapObject &obj);
+
+    /**
+     * This operator is virtual in case it must also add the object to a
+     * managed free list.
+     *
+     * @return current table.
+     * @param object entity to remove.
+     */
+    virtual MapTable &operator-=(MapObject &obj);
+};
+
+/**
+ * The MapIndex allows linear access into a MapTable, that otherwise could have
+ * its elements being retrieved only by key.
+ * It can be increased, checked and dereferenced like a pointer, by means of
+ * suitable operators.
+ *
+ * @author Sergio Repetto <s.repetto@pentaengineering.it>
+ * @short Index object to access MapTable elements
+ */
+class __EXPORT MapIndex
+{
+    MapObject*  thisObject;
+
+public :
+
+    /**
+     * Creates an empty map index (pointing to nothing).
+     */
+    MapIndex() : thisObject(NULL)
+    {};
+
+    /**
+     * Creates a map index pointing to a specific map object
+     *
+     * @param the indexed object
+     */
+    MapIndex(MapObject* theObject) : thisObject(theObject)
+    {};
+
+    /**
+     * Creates a copy of a given map index
+     *
+     * @param the source index object
+     */
+    MapIndex(const MapIndex& theIndex) : thisObject(theIndex.thisObject)
+    {};
+
+    /**
+     * Dereference operator: the pointed object it is returned as void * for
+     * easy re-cast.
+     *
+     * @return pointer to indexed object.
+     */
+  void* operator*() const
+  { return (void*)thisObject;   }
+
+    /**
+     * Assignment operator to avoid implicit cast.
+     *
+     * @return the object itself, as changed.
+     */
+    MapIndex& operator=(MapObject *theObject);
+
+    /**
+     * Prefix increment operator, to be used in loops and such.
+     *
+     * @return the object itself, as changed.
+     */
+  MapIndex& operator++();           // prefix
+
+    /**
+     * Postfix increment operator, to be used in loops and such.
+     *
+     * @return the object itself, as changed.
+     */
+  MapIndex  operator++(int)     // postfix
+    {   return this->operator++();  }
+
+    /**
+     * Comparison operator, between two MapIndex's.
+     *
+     * @return the object itself, as changed.
+     */
+    bool operator==(const MapIndex& theIndex) const
+    {   return thisObject == theIndex.thisObject;   };
+
+    bool operator!=(const MapIndex& theIndex) const
+    {   return !(*this == theIndex);    };
+
+    /**
+     * Comparison operator, between the MapIndex and a MapObject, useful to avoid
+   * casts for sake of clearness.
+     *
+     * @return the object itself, as changed.
+     */
+    bool operator==(const MapObject* theObject) const
+    {   return thisObject == theObject; };
+
+    bool operator!=(const MapObject* theObject) const
+    {   return !(*this == theObject);   };
+};
+
+/**
+ * The MapObject is a base class which can be used to make a derived
+ * class operate on a MapTable.  Derived classes may override new and
+ * delete operators to use managed free list from a MapTable.
+ *
+ * @author David Sugar <dyfet@gnutelephony.org>
+ * @short Mappable object.
+ */
+class __EXPORT MapObject
+{
+protected:
+    friend class MapTable;
+    friend class MapIndex;
+    MapObject *nextObject;
+    const char *idObject;
+    MapTable *table;
+
+public:
+
+    /**
+     * Remove the object from it's current table.
+     */
+    void detach(void);
+
+    /**
+     * Save id, mark as not using any table.
+     *
+     * @param id string for this object.
+     */
+    MapObject(const char *id);
+};
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/commoncpp/pointer.h b/jni/libucommon/sources/inc/commoncpp/pointer.h
new file mode 100644
index 0000000..7eb5db4
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/pointer.h
@@ -0,0 +1,135 @@
+// Copyright (C) 2001-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception to the GNU General Public License, permission is
+// granted for additional uses of the text contained in its release
+// of Common C++.
+//
+// The exception is that, if you link the Common C++ library with other
+// files to produce an executable, this does not by itself cause the
+// resulting executable to be covered by the GNU General Public License.
+// Your use of that executable is in no way restricted on account of
+// linking the Common C++ library code into it.
+//
+// This exception does not however invalidate any other reasons why
+// the executable file might be covered by the GNU General Public License.
+//
+// This exception applies only to the code released under the
+// name Common C++.  If you copy code from other releases into a copy of
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+
+/**
+ * @file commoncpp/pointer.h
+ * @short Template for creating reference count managed smart pointers.
+ **/
+
+#ifndef COMMONCPP_POINTER_H_
+#define COMMONCPP_POINTER_H_
+
+#ifndef COMMONCPP_CONFIG_H_
+#include <commoncpp/config.h>
+#endif
+
+NAMESPACE_COMMONCPP
+
+/**
+ * Used to create and manage referece counted pointers.
+ *
+ * @author David Sugar <dyfet@gnutelephony.org>
+ * @short reference counted pointer template.
+ */
+template <class T>
+class Pointer
+{
+protected:
+    unsigned *ptrCount;
+    T *ptrObject;
+
+    void ptrDetach(void)
+    {
+        if(ptrCount && --(*ptrCount)==0) {
+            delete ptrObject;
+            delete ptrCount;
+        }
+        ptrObject = NULL;
+        ptrCount = NULL;
+    }
+
+public:
+    explicit Pointer(T* ptr = NULL) : ptrObject(ptr)
+    {
+        ptrCount = new unsigned;
+        *ptrCount = 1;
+    }
+
+    Pointer(const Pointer<T> &ref)
+    {
+        ptrObject = ref.ptrObject;
+        ptrCount = ref.ptrCount;
+        ++(*ptrCount);
+    }
+
+    inline virtual ~Pointer()
+        {ptrDetach();}
+
+
+    Pointer& operator=(const Pointer<T> &ref)
+    {
+        if(this != &ref) {
+            ptrDetach();
+            ptrObject = ref.ptrObject;
+            ptrCount = ref.ptrCount;
+            ++(*ptrCount);
+        }
+        return *this;
+    }
+
+    inline T& operator*() const
+        {return *ptrObject;};
+
+    inline T* getObject() const
+        {return ptrObject;};
+
+    inline T* operator->() const
+        {return ptrObject;};
+
+    inline bool operator!() const
+        {return (*ptrCount == 1);};
+
+    inline int operator++() const
+        {return ++(*ptrCount);};
+
+    int operator--() const
+    {
+        if(*ptrCount == 1) {
+            delete this;
+            return 0;
+        }
+        return --(*ptrCount);
+    }
+};
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/commoncpp/process.h b/jni/libucommon/sources/inc/commoncpp/process.h
new file mode 100644
index 0000000..e111575
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/process.h
@@ -0,0 +1,311 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+/**
+ * @file commoncpp/process.h
+ * @short Process services.
+ **/
+
+#ifndef COMMONCPP_PROCESS_H_
+#define COMMONCPP_PROCESS_H_
+
+#ifndef COMMONCPP_CONFIG_H_
+#include <commoncpp/config.h>
+#endif
+
+#ifndef COMMONCPP_THREAD_H_
+#include <commoncpp/thread.h>
+#endif
+
+NAMESPACE_COMMONCPP
+
+/**
+ * A class for containing portable process related functions
+ * that help create portable code.  These are typically
+ * referenced thru Process::xxx static member functions.
+ * Many of these members are used both for win32 and posix
+ * systems although some may be platform specific.
+ *
+ * @short Peocess wrapper class.
+ * @author David Sugar <dyfet@ostel.com>
+ */
+class __EXPORT Process
+{
+private:
+    static bool rtflag;
+
+public:
+#ifndef _MSWINDOWS_
+    typedef void (*Trap)(int);
+
+    /**
+     * Detach current process into a daemon, posix
+     * only.  Perhaps a similar method can be used
+     * for creating win32 "services"?
+     */
+    static void detach(void);
+
+    /**
+     * Attach the current process to another device
+     * or i/o session.  It is deamonified and dissasociated
+     * with the prior parent process and controlling terminal.
+     *
+     * @param devname path to attach to.
+     */
+    static void attach(const char *devname);
+
+    /**
+     * Set a posix compliant signal handler.
+     *
+     * @return previous handler.
+     * @param signo signal no.
+     * @param handler trap handler.
+     */
+    static Trap setPosixSignal(int signo, Trap handler);
+
+    /**
+     * Set system call interuptable signal handler.
+     *
+     * #return previous handler.
+     * @param signo   signal no.
+     * @param handler trap handler.
+     */
+    static Trap setInterruptSignal(int signo, Trap handler);
+#endif
+    /**
+     * Lock a process in memory.  Ideally you should be deep enough
+     * where additional memallocs for functions will not kill you,
+     * or use false for future.
+     *
+     * @return true if successful.
+     * @param future pages as well...
+     */
+    bool lock(bool future = true);
+
+    /**
+     * Unlock process pages.
+     */
+    void unlock(void);
+
+    /**
+     * Spawn a process and wait for it's exit code.  In win32
+     * this is done with the spawn system call.  In posix,
+     * this is done with a fork, an execvp, and a waitpid.
+     *
+     * @warning The implementation differences between posix and
+     * win32 systems may cause side effects. For instance, if you
+     * use atexit() and this spawn method, on posix systems the
+     * function set up with atexit() will be called when the
+     * parent process of the fork exits, which will not happen on
+     * Win32 systems.
+     *
+     * @return error code from process.
+     * @param exec name of executable.
+     * @param argv list of command arguments.
+     * @param wait for process to exit before return.
+     */
+    static int spawn(const char *exec, const char **argv, bool wait = true);
+
+    /**
+     * Get the exit status of another process, waiting for it
+     * to exit.
+     *
+     * @return exit code from process.
+     * @param pid process id.
+     */
+    static int join(int pid);
+
+    /**
+     * Cancel a running child process.
+     *
+     * @return 0 on success.
+     * @param pid process id.
+     * @param sig cancel signal to apply.
+     */
+    static bool cancel(int pid, int sig = 0);
+
+    /**
+     * Get system environment.
+     *
+     * @return system environ symbol.
+     * @param name of symbol.
+     */
+    static const char *getEnv(const char *name);
+
+    /**
+     * Set system environment in a standard manner.
+     *
+     * @param name of environment symbol to set.
+     * @param value of environment symbol.
+     * @param overwrite true if replace existing symbol.
+     */
+    static void setEnv(const char *name, const char *value, bool overwrite);
+
+    /**
+     * Get etc prefix path.
+     *
+     * @return etc prefix.
+     */
+    static const char *getConfigDir(void);
+
+    /**
+     * Get home directory.
+     *
+     * @return user home directory.
+     */
+    static const char *getHomeDir(void);
+
+    /**
+     * Get user name.
+     *
+     * @return user login id.
+     */
+    static const char *getUser(void);
+
+    /**
+     * Set user id by name.
+     *
+     * @return true if successful.
+     */
+    static bool setUser(const char *id, bool grp = true);
+
+    /**
+     * Set the effective group id by name.
+     *
+     * @return true if successful.
+     */
+    static bool setGroup(const char *id);
+
+    /**
+     * Return the effective operating system page size.
+     *
+     * @return system page size.
+     */
+    static size_t getPageSize(void);
+
+    /**
+     * Used to set process priority and optionally enable realtime.
+     */
+    static void setPriority(int pri);
+
+    /**
+     * Used to set process scheduling policy.
+     */
+    static void setScheduler(const char *policy);
+
+    /**
+     * Portable shortcut for setting realtime...
+     */
+    static void setRealtime(int pri = 0);
+
+    /**
+     * Return true if scheduler settable.
+     */
+    static bool isScheduler(void);
+
+    /**
+     * Return true if realtime scheduling.
+     */
+    static inline bool isRealtime(void)
+        {return rtflag;};
+};
+
+/**
+ * This class is used to create a "named" lock entity that can be used
+ * to control access to a resource between multiple processes.  The
+ * posix implimentation uses a pidfile and the win32 version uses a
+ * globally visible mutex.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short System-wide named lock
+ */
+class __EXPORT Lockfile
+{
+private:
+#ifdef  _MSWINDOWS_
+    HANDLE  _mutex;
+    bool    _flagged;
+#else
+    char *_path;
+#endif
+
+public:
+    /**
+     * Create a lock under a known name.
+     *
+     * @param name of system-wide lock to create.
+     */
+    Lockfile(const char *name);
+
+    /**
+     * Create a new lock object that can be used to make locks.
+     */
+    Lockfile();
+
+    /**
+     * Destroy the current lock and release it.
+     */
+    ~Lockfile()
+        {unlock();};
+
+    /**
+     * Lock a system-wide name for this process.  If the lock
+     * is successful, return true.  If an existing lock was
+     * already acquired, release it first.
+     *
+     * @return true if lock successful.
+     * @param name system-wide lock to use.
+     */
+    bool lock(const char *name);
+
+    /**
+     * Release an acquired lock.
+     */
+    void unlock(void);
+
+    /**
+     * Flag if the current process has aqcuired a lock.
+     *
+     * @return true if we have the lock.
+     */
+    bool isLocked(void);
+};
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/commoncpp/serial.h b/jni/libucommon/sources/inc/commoncpp/serial.h
new file mode 100644
index 0000000..3c48aab
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/serial.h
@@ -0,0 +1,872 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+/**
+ * @file serial.h
+ * @short Serial I/O services.
+ **/
+
+#ifndef COMMONCPP_SERIAL_H_
+#define COMMONCPP_SERIAL_H_
+
+#ifndef COMMONCPP_CONFIG_H_
+#include <commoncpp/config.h>
+#endif
+
+#ifndef COMMONCPP_THREAD_H_
+#include <commoncpp/thread.h>
+#endif
+
+#ifndef COMMMONCPP_EXCEPTION_H_
+#include <commoncpp/exception.h>
+#endif
+
+NAMESPACE_COMMONCPP
+
+/**
+ * The Serial class is used as the base for all serial I/O services
+ * under APE.  A serial is a system serial port that is used either
+ * for line or packet based data input.  Serial ports may also be
+ * "streamable" in a derived form.
+ *
+ *  Common C++ serial I/O classes are used to manage serial devices and
+ *  implement serial device protocols.  From the point of view of Common C++,
+ *  serial devices are supported by the underlying Posix specified "termios"
+ *  call interface.
+ *
+ *  The serial I/O base class is used to hold a descriptor to a serial device
+ *  and to provide an exception handling interface for all serial I/O classes.
+ *  The base class is also used to specify serial I/O properties such as
+ *  communication speed, flow control, data size, and parity.  The "Serial"
+ *  base class is not itself directly used in application development,
+ *  however.
+ *
+ *  Common C++ Serial I/O is itself divided into two conceptual modes; frame
+ *  oriented and line oriented I/O.  Both frame and line oriented I/O makes
+ *  use of the ability of the underlying tty driver to buffer data and return
+ *  "ready" status from when select either a specified number of bytes or
+ *  newline record has been reached by manipulating termios c_cc fields
+ *  appropriately.  This provides some advantage in that a given thread
+ *  servicing a serial port can block and wait rather than have to continually
+ *  poll or read each and every byte as soon as it appears at the serial port.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short base class for all serial I/O services.
+ */
+class __EXPORT Serial
+{
+public:
+    enum Error {
+        errSuccess = 0,
+        errOpenNoTty,
+        errOpenFailed,
+        errSpeedInvalid,
+        errFlowInvalid,
+        errParityInvalid,
+        errCharsizeInvalid,
+        errStopbitsInvalid,
+        errOptionInvalid,
+        errResourceFailure,
+        errOutput,
+        errInput,
+        errTimeout,
+        errExtended
+    };
+    typedef enum Error Error;
+
+    enum Flow {
+        flowNone,
+        flowSoft,
+        flowHard,
+        flowBoth
+    };
+    typedef enum Flow Flow;
+
+    enum Parity {
+        parityNone,
+        parityOdd,
+        parityEven
+    };
+    typedef enum Parity Parity;
+
+    enum Pending {
+        pendingInput,
+        pendingOutput,
+        pendingError
+    };
+    typedef enum Pending Pending;
+
+private:
+    Error errid;
+    char *errstr;
+
+    struct {
+        bool thrown: 1;
+        bool linebuf: 1;
+    } flags;
+
+    void    *   original;
+    void    *   current;
+
+    /**
+     * Used to properly initialize serial object.
+     */
+    void initSerial(void);
+
+protected:
+
+    fd_t    dev;
+
+    int bufsize;
+
+    /**
+     * Opens the serial device.
+     *
+     * @param fname Pathname of device to open
+     */
+    void        open(const char *fname);
+
+    /**
+     * Closes the serial device.
+     *
+     */
+    void        close(void);
+
+    /**
+     * Reads from serial device.
+     *
+     * @param Data  Point to character buffer to receive data.  Buffers MUST
+     *              be at least Length + 1 bytes in size.
+     * @param Length Number of bytes to read.
+     */
+    virtual int aRead(char * Data, const int Length);
+
+    /**
+     * Writes to serial device.
+     *
+     * @param Data  Point to character buffer containing data to write.  Buffers MUST
+     * @param Length Number of bytes to write.
+     */
+    virtual int aWrite(const char * Data, const int Length);
+
+    /**
+     * This service is used to throw all serial errors which usually
+     * occur during the serial constructor.
+     *
+     * @param error defined serial error id.
+     * @param errstr string or message to optionally pass.
+     */
+    Error error(Error error, char *errstr = NULL);
+
+    /**
+     * This service is used to thow application defined serial
+     * errors where the application specific error code is a string.
+     *
+     * @param err string or message to pass.
+     */
+    inline void error(char *err)
+        {error(errExtended, err);};
+
+
+    /**
+     * This method is used to turn the error handler on or off for
+     * "throwing" execptions by manipulating the thrown flag.
+     *
+     * @param enable true to enable handler.
+     */
+    inline void setError(bool enable)
+        {flags.thrown = !enable;};
+
+    /**
+     * Set packet read mode and "size" of packet read buffer.
+     * This sets VMIN to x.  VTIM is normally set to "0" so that
+     * "isPending()" can wait for an entire packet rather than just
+     * the first byte.
+     *
+     * @return actual buffer size set.
+     * @param size of packet read request.
+     * @param btimer optional inter-byte data packet timeout.
+     */
+    int setPacketInput(int size, unsigned char btimer = 0);
+
+    /**
+     * Set "line buffering" read mode and specifies the newline
+     * character to be used in seperating line records.  isPending
+     * can then be used to wait for an entire line of input.
+     *
+     * @param newline newline character.
+     * @param nl1 EOL2 control character.
+     * @return size of conical input buffer.
+     */
+    int setLineInput(char newline = 13, char nl1 = 0);
+
+    /**
+     * Restore serial device to the original settings at time of open.
+     */
+    void restore(void);
+
+    /**
+     * Used to flush the input waiting queue.
+     */
+    void flushInput(void);
+
+    /**
+     * Used to flush any pending output data.
+     */
+    void flushOutput(void);
+
+    /**
+     * Used to wait until all output has been sent.
+     */
+    void waitOutput(void);
+
+    /**
+     * Used as the default destructor for ending serial I/O
+     * services.  It will restore the port to it's original state.
+     */
+    void endSerial(void);
+
+    /**
+     * Used to initialize a newly opened serial file handle.  You
+     * should set serial properties and DTR manually before first
+     * use.
+     */
+    void initConfig(void);
+
+    /**
+     * This allows later ttystream class to open and close a serial
+     * device.
+     */
+    Serial()
+        {initSerial();};
+
+    /**
+     * A serial object may be constructed from a named file on the
+     * file system.  This named device must be "isatty()".
+     *
+     * @param name of file.
+     */
+    Serial(const char *name);
+
+
+public:
+
+    /**
+     * The serial base class may be "thrown" as a result on an error,
+     * and the "catcher" may then choose to destory the object.  By
+     * assuring the socket base class is a virtual destructor, we
+     * can assure the full object is properly terminated.
+     */
+    virtual ~Serial();
+
+    /**
+     * Serial ports may also be duplecated by the assignment
+     * operator.
+     */
+    Serial &operator=(const Serial &from);
+
+    /**
+     * Set serial port speed for both input and output.
+     *
+     * @return 0 on success.
+     * @param speed to select. 0 signifies modem "hang up".
+     */
+    Error setSpeed(unsigned long speed);
+
+    /**
+     * Set character size.
+     *
+     * @return 0 on success.
+     * @param bits character size to use (usually 7 or 8).
+     */
+    Error setCharBits(int bits);
+
+    /**
+     * Set parity mode.
+     *
+     * @return 0 on success.
+     * @param parity mode.
+     */
+    Error setParity(Parity parity);
+
+    /**
+     * Set number of stop bits.
+     *
+     * @return 0 on success.
+     * @param bits stop bits.
+     */
+    Error setStopBits(int bits);
+
+    /**
+     * Set flow control.
+     *
+     * @return 0 on success.
+     * @param flow control mode.
+     */
+    Error setFlowControl(Flow flow);
+
+    /**
+     * Set the DTR mode off momentarily.
+     *
+     * @param millisec number of milliseconds.
+     */
+    void toggleDTR(timeout_t millisec);
+
+    /**
+     * Send the "break" signal.
+     */
+    void sendBreak(void);
+
+    /**
+     * Often used by a "catch" to fetch the last error of a thrown
+     * serial.
+     *
+     * @return error numbr of last Error.
+     */
+    inline Error getErrorNumber(void)
+        {return errid;};
+
+    /**
+     * Often used by a "catch" to fetch the user set error string
+     * of a thrown serial.
+     *
+     * @return string for error message.
+     */
+    inline char *getErrorString(void)
+        {return errstr;};
+
+    /**
+     * Get the "buffer" size for buffered operations.  This can
+     * be used when setting packet or line read modes to determine
+     * how many bytes to wait for in a given read call.
+     *
+     * @return number of bytes used for buffering.
+     */
+    inline int getBufferSize(void)
+        {return bufsize;};
+
+    /**
+     * Get the status of pending operations.  This can be used to
+     * examine if input or output is waiting, or if an error has
+     * occured on the serial device.
+     *
+     * @return true if ready, false if timeout.
+     * @param pend ready check to perform.
+     * @param timeout in milliseconds.
+     */
+    virtual bool isPending(Pending pend, timeout_t timeout = TIMEOUT_INF);
+};
+
+/**
+ * TTY streams are used to represent serial connections that are fully
+ * "streamable" objects using C++ stream classes and friends.
+ *
+ * The first application relevant serial I/O class is the TTYStream class.
+ * TTYStream offers a linearly buffered "streaming" I/O session with the
+ * serial device.  Furthermore, traditional C++ "stream" operators (<< and
+ * >>) may be used with the serial device.  A more "true" to ANSI C++ library
+ * format "ttystream" is also available, and this supports an "open" method
+ * in which one can pass initial serial device parameters immediately
+ * following the device name in a single string, as in
+ * "/dev/tty3a:9600,7,e,1", as an example.
+ *
+ * The TTYSession aggragates a TTYStream and a Common C++ Thread which is
+ * assumed to be the execution context that will be used to perform actual
+ * I/O operations.  This class is very anagolous to TCPSession.
+ *
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short streamable tty serial I/O class.
+ */
+class __EXPORT TTYStream : protected std::streambuf, public Serial, public std::iostream
+{
+private:
+    int doallocate();
+
+    friend TTYStream& crlf(TTYStream&);
+    friend TTYStream& lfcr(TTYStream&);
+
+protected:
+    char *gbuf, *pbuf;
+    timeout_t timeout;
+
+    /**
+     * This constructor is used to derive "ttystream", a more
+     * C++ style version of the TTYStream class.
+     */
+    TTYStream();
+
+    /**
+     * Used to allocate the buffer space needed for iostream
+     * operations.  This is based on MAX_INPUT.
+     */
+    void allocate(void);
+
+    /**
+     * Used to terminate the buffer space and clean up the tty
+     * connection.  This function is called by the destructor.
+     */
+    void endStream(void);
+
+    /**
+     * This streambuf method is used to load the input buffer
+     * through the established tty serial port.
+     *
+     * @return char from get buffer, EOF also possible.
+     */
+    int underflow(void);
+
+    /**
+     * This streambuf method is used for doing unbuffered reads
+     * through the establish tty serial port when in interactive mode.
+     * Also this method will handle proper use of buffers if not in
+     * interative mode.
+     *
+     * @return char from tty serial port, EOF also possible.
+     */
+    int uflow(void);
+
+    /**
+     * This streambuf method is used to write the output
+     * buffer through the established tty port.
+     *
+     * @param ch char to push through.
+     * @return char pushed through.
+     */
+    int overflow(int ch);
+
+public:
+    /**
+     * Create and open a tty serial port.
+     *
+     * @param filename char name of device to open.
+     * @param to default timeout.
+     */
+    TTYStream(const char *filename, timeout_t to = 0);
+
+    /**
+     * End the tty stream and cleanup.
+     */
+    virtual ~TTYStream();
+
+    /**
+     * Set the timeout control.
+     *
+     * @param to timeout to use.
+     */
+    inline void setTimeout(timeout_t to)
+        {timeout = to;};
+
+    /**
+     * Set tty mode to buffered or "interactive".  When interactive,
+     * all streamed I/O is directly sent to the serial port
+     * immediately.
+     *
+     * @param flag bool set to true to make interactive.
+     */
+    void interactive(bool flag);
+
+    /**
+     * Flushes the stream input and out buffers, writes
+     * pending output.
+     *
+     * @return 0 on success.
+     */
+    int sync(void);
+
+    /**
+     * Get the status of pending operations.  This can be used to
+     * examine if input or output is waiting, or if an error has
+     * occured on the serial device.  If read buffer contains data
+     * then input is ready and if write buffer contains data it is
+     * first flushed then checked.
+     *
+     * @return true if ready, false if timeout.
+     * @param pend ready check to perform.
+     * @param timeout in milliseconds.
+     */
+    bool isPending(Pending pend, timeout_t timeout = TIMEOUT_INF);
+};
+
+/**
+ * A more natural C++ "ttystream" class for use by non-threaded
+ * applications.  This class behaves a lot more like fstream and
+ * similar classes.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short C++ "fstream" style ttystream class.
+ */
+
+class __EXPORT ttystream : public TTYStream
+{
+public:
+    /**
+     * Construct an unopened "ttystream" object.
+     */
+    ttystream();
+
+    /**
+     * Construct and "open" a tty stream object.  A filename in
+     * the form "device:options[,options]" may be used to pass
+     * device options as part of the open.
+     *
+     * @param name of file and serial options.
+     */
+    ttystream(const char *name);
+
+    /**
+     * Open method for a tty stream.
+     *
+     * @param name filename to open.
+     */
+    void open(const char *name);
+
+    /**
+     * Close method for a tty stream.
+     */
+    void close(void);
+
+    /**
+     * Test to see if stream is opened.
+     */
+    inline bool operator!()
+        {return (dev < 0);};
+};
+
+/**
+ *
+ * The TTYSession aggragates a TTYStream and a Common C++ Thread which is
+ * assumed to be the execution context that will be used to perform actual
+ * I/O operations.  This class is very anagolous to TCPSession.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short This class is very anagolous to TCPSession.
+ */
+
+class __EXPORT TTYSession : public Thread, public TTYStream
+{
+public:
+    /**
+     * Create TTY stream that will be managed by it's own thread.
+     *
+     * @param name of tty device to open.
+     * @param pri execution priority.
+     * @param stack allocation needed on some platforms.
+     */
+    TTYSession(const char *name, int pri = 0, int stack = 0);
+
+    virtual ~TTYSession();
+};
+
+#ifndef _MSWINDOWS_
+
+//  Not support this right now.......
+//
+class SerialPort;
+class SerialService;
+
+/**
+ * The serial port is an internal class which is attached to and then
+ * serviced by a specified SerialService thread.  Derived versions of
+ * this class offer specific functionality such as serial integration
+ * protocols.
+ *
+ * The TTYPort and TTYService classes are used to form thread-pool serviced
+ * serial I/O protocol sets.  These can be used when one has a large number
+ * of serial devices to manage, and a single (or limited number of) thread(s)
+ * can then be used to service the tty port objects present.  Each tty port
+ * supports a timer control and several virtual methods that the service
+ * thread can call when events occur.  This model provides for "callback"
+ * event management, whereby the service thread performs a "callback" into
+ * the port object when events occur.  Specific events supported include the
+ * expiration of a TTYPort timer, pending input data waiting to be read, and
+ * "sighup" connection breaks.
+ *
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short base class for thread pool serviced serial I/O.
+ */
+class __EXPORT SerialPort: public Serial, public TimerPort
+{
+private:
+    SerialPort *next, *prev;
+    SerialService *service;
+#ifdef  USE_POLL
+    struct pollfd *ufd;
+#endif
+    bool detect_pending;
+    bool detect_output;
+    bool detect_disconnect;
+
+    friend class SerialService;
+
+protected:
+    /**
+     * Construct a tty serial port for a named serial device.
+     *
+     * @param svc pool thread object.
+     * @param name of tty port.
+     */
+    SerialPort(SerialService *svc, const char *name);
+
+    /**
+     * Disconnect the Serial Port from the service pool thread
+     * and shutdown the port.
+     */
+    virtual ~SerialPort();
+
+    /**
+     * Used to indicate if the service thread should monitor pending
+     * data for us.
+     */
+    void setDetectPending( bool );
+
+    /**
+     * Get the current state of the DetectPending flag.
+     */
+    inline bool getDetectPending( void ) const
+        { return detect_pending; }
+
+    /**
+     * Used to indicate if output ready monitoring should be performed
+     * by the service thread.
+     */
+    void setDetectOutput( bool );
+
+    /**
+     * Get the current state of the DetectOutput flag.
+     */
+    inline bool getDetectOutput( void ) const
+        { return detect_output; }
+
+    /**
+     * Called by the service thread when the objects timer
+     * has expired.
+     */
+    virtual void expired(void);
+
+    /**
+     * Called by the service thread when input data is pending
+     * for this tty port.  Effected by setPacketInput and by
+     * setLineInput.
+     */
+    virtual void pending(void);
+
+    /**
+     * Called by the service thread when an exception has occured
+     * such as a hangup.
+     */
+    virtual void disconnect(void);
+
+    /**
+     * Transmit "send" data to the serial port.  This is not public
+     * since it's meant to support internal protocols rather than
+     * direct public access to the device.
+     *
+     * @return number of bytes send.
+     * @param buf address of buffer to send.
+     * @param len of bytes to send.
+     */
+    inline int output(void *buf, int len)
+        {return aWrite((char *)buf, len);};
+
+    /**
+     * Perform when output is available for sending data.
+     */
+    virtual void output(void);
+
+    /**
+     * Receive "input" for pending data from the serial port.  This
+     * is not a public member since it's meant to support internal
+     * protocols rather than direct external access to the device.
+     *
+     * @return number of bytes received.
+     * @param buf address of buffer to input.
+     * @param len of input buffer used.
+     */
+    inline int input(void *buf, int len)
+        {return aRead((char *)buf, len);};
+public:
+    /**
+     * Derived setTimer to notify the service thread pool of changes
+     * in expected timeout.  This allows SerialService to
+     * reschedule all timers.
+     *
+     * @param timeout in milliseconds.
+     */
+    void setTimer(timeout_t timeout = 0);
+
+    /**
+     * Derived incTimer to notify the service thread pool of a
+     * change in expected timeout.  This allows SerialService to
+     * reschedule all timers.
+     */
+    void incTimer(timeout_t timeout);
+};
+
+/**
+ * The SerialService is a thead service object that is meant to service
+ * attached serial ports.  Multiple pool objects may be created and
+ * multiple serial ports may be attached to the same thread of
+ * of execution.  This allows one to balance threads and the serial ports
+ * they service.
+ *
+ *  The TTYPort and TTYService classes are used to form thread-pool serviced
+ *  serial I/O protocol sets.  These can be used when one has a large number
+ *  of serial devices to manage, and a single (or limited number of) thread(s)
+ *  can then be used to service the tty port objects present.  Each tty port
+ *  supports a timer control and several virtual methods that the service
+ *  thread can call when events occur.  This model provides for "callback"
+ *  event management, whereby the service thread performs a "callback" into
+ *  the port object when events occur.  Specific events supported include the
+ *  expiration of a TTYPort timer, pending input data waiting to be read, and
+ *  "sighup" connection breaks.
+ *
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Thread pool service for serial ports.
+ */
+class __EXPORT SerialService : public Thread, private Mutex
+{
+private:
+    fd_set connect;
+    int iosync[2];
+    int hiwater;
+    int count;
+    SerialPort *first, *last;
+
+    /**
+     * Attach a new serial port to this service thread.
+     *
+     * @param port of SerialPort derived object to attach.
+     */
+    void attach(SerialPort *port);
+
+    /**
+     * Detach a serial port from this service thread.
+     *
+     * @param port of SerialPort derived object to remove.
+     */
+    void detach(SerialPort *port);
+
+    /**
+     * The service thread itself.
+     */
+    void run(void);
+
+    friend class SerialPort;
+
+protected:
+    /**
+     * A virtual handler for processing user defined update
+     * requests (1-254) which have been posted through Update.
+     *
+     * @param flag of update request.
+     */
+    virtual void onUpdate(unsigned char flag);
+
+    /**
+     * A virtual handler for event loop calls.  This can be
+     * used to extend event loop processing.
+     */
+    virtual void onEvent(void);
+
+    /**
+     * A virtual handler for adding support for additional
+     * callback events into SerialPort.
+     *
+     * @param port serial port currently being evaluated.
+     */
+    virtual void onCallback(SerialPort *port);
+
+public:
+    /**
+     * Notify service thread that a port has been added or
+     * removed, or a timer changed, so that a new schedule
+     * can be computed for expiring attached ports.  This
+     * can also be used to pass requests to the OnUpdate()
+     * event handler.
+     *
+     * @param flag event for OnUpdate, termination, or reschedule.
+     */
+    void update(unsigned char flag = 0xff);
+
+    /**
+     * Create a service thread for attaching serial ports.  The
+     * thread begins execution with the first attached port.
+     *
+     * @param pri of this thread to run under.
+     * @param stack stack size.
+     * @param id stack ID.
+     */
+    SerialService(int pri = 0, size_t stack = 0, const char *id = NULL);
+
+    /**
+     * Terminate the service thread and update attached objects.
+     */
+    virtual ~SerialService();
+
+    /**
+     * Get current reference count.  This can be used when selecting
+     * the lead used service handler from a pool.
+     *
+     * @return count of active ports.
+     */
+    inline int getCount(void)
+        {return count;};
+};
+
+#endif
+
+#ifdef  CCXX_EXCEPTIONS
+class __EXPORT SerException : public IOException
+{
+public:
+    SerException(const String &str) : IOException(str) {};
+};
+#endif
+
+END_NAMESPACE
+
+#endif
+/** EMACS **
+ * Local variables:
+ * mode: c++
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/jni/libucommon/sources/inc/commoncpp/slog.h b/jni/libucommon/sources/inc/commoncpp/slog.h
new file mode 100644
index 0000000..233a3b4
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/slog.h
@@ -0,0 +1,294 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+/**
+ * @file commoncpp/slog.h
+ * @short System logging facilities abstraction.
+ **/
+
+#ifndef COMMONCPP_SLOG_H_
+#define COMMONCPP_SLOG_H_
+
+#include <cstdio>
+
+#ifndef COMMONCPP_CONFIG_H_
+#include <commoncpp/config.h>
+#endif
+
+#ifndef COMMONCPP_STRING_H_
+#include <commoncpp/string.h>
+#endif
+
+#ifndef COMMONCPP_THREAD_H_
+#include <commoncpp/thread.h>
+#endif
+
+NAMESPACE_COMMONCPP
+
+/**
+ * The slog class is used to stream messages to the system's logging facility (syslogd).
+ * A default <code>slog</code> object is used to avoid confusion with the native syslog
+ * facility and to imply a logical relationship to the C++ <code>clog()</code>.
+ *
+ * The key difference is that the <code>slog</code> object sends it's output to the
+ * system logging daemon (typically syslogd) rather than through stderr.
+ * <code>slog</code> can be streamed with the <code><<</code> operator just
+ * like <code>clog</code>; a default slog object is pre-initialized, and you stream
+ * character data to it.
+ *
+ * The <code>slog</code> allows one to specify logging levels and other properties through the <code>()</code> operators.
+ * Hence, once can do:
+ *
+ * <code><pre>
+ * slog("mydaemon", SLOG_DAEMON, SLOG_EMERGENCY) << I just died << endl; </pre></code>
+ *
+ * or things like:
+ *
+ * <code><pre>
+ * slog("mydaemon", SLOG_DAEMON);
+ * slog(SLOG_INFO) << "daemon initalized" << endl; </pre></code>
+ *
+ * The intent is to be as common-place and as convenient to use as the stderr based clog facility
+ * found in C++, and this is especially useful for C++ daemons.
+ *
+ * The <code>std::flush</code> manipulator doesn't work.  Either the
+ * <code>std::endl</code> or <code>std::ends</code> manipulators
+ * must be used to cause the output to be sent to the daemon.
+ *
+ * When this class is used on a system that doesn't have the syslog headers
+ * (i.e. a non-posix win32 box), the output goes to the a file with the same name
+ * as the syslog identifier string with '.log' appended to it.  If the identifier string ends in
+ * '.exe', the '.exe' is removed before the '.log' is appened. (e.g. the identifier foo.exe will
+ * generate a log file named foo.log)
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * <br>Minor docs & hacks by Jon Little <littlej@arlut.utexas.edu>
+ *
+ * @short system logging facility class.
+ */
+class __EXPORT Slog : protected std::streambuf, public std::ostream
+{
+public:
+    typedef enum Class {
+        classSecurity,
+        classAudit,
+        classDaemon,
+        classUser,
+        classDefault,
+        classLocal0,
+        classLocal1,
+        classLocal2,
+        classLocal3,
+        classLocal4,
+        classLocal5,
+        classLocal6,
+        classLocal7
+    } Class;
+
+    typedef enum Level {
+        levelEmergency = 1,
+        levelAlert,
+        levelCritical,
+        levelError,
+        levelWarning,
+        levelNotice,
+        levelInfo,
+        levelDebug
+    } Level;
+
+private:
+    pthread_mutex_t lock;
+    FILE *syslog;
+    int priority;
+    Level  _level;
+    bool _enable;
+    bool _clogEnable;
+
+protected:
+    /**
+     * This is the streambuf function that actually outputs the data
+     * to the device.  Since all output should be done with the standard
+     * ostream operators, this function should never be called directly.
+     */
+    int overflow(int c);
+
+public:
+    /**
+     * Default (and only) constructor.  The default log level is set to
+     * SLOG_DEBUG.  There is no default log facility set.  One should be
+     * set before attempting any output.  This is done by the <code>open()</code> or the
+     * <code>operator()(const char*, Class, Level)</code>
+     * functions.
+     */
+    Slog(void);
+
+    virtual ~Slog(void);
+
+    void close(void);
+
+    /**
+     * (re)opens the output stream.
+     * @param ident The identifier portion of the message sent to the syslog daemon.
+     * @param grp The log facility the message is sent to
+     */
+    void open(const char *ident, Class grp = classUser);
+
+    /**
+     * Sets the log identifier, level, and class to use for subsequent output
+     * @param ident The identifier portion of the message
+     * @param grp The log facility the message is sent to
+     * @param level The log level of the message
+     */
+    Slog &operator()(const char *ident, Class grp = classUser,
+             Level level = levelError);
+
+    /**
+     * Changes the log level and class to use for subsequent output
+     * @param level The log level of the message
+     * @param grp The log facility the message is sent to
+     */
+    Slog &operator()(Level level, Class grp = classDefault);
+
+    /**
+     * Does nothing except return *this.
+     */
+    Slog &operator()(void);
+
+    /**
+     * Print a formatted syslog string.
+     *
+     * @param format string.
+     */
+    void error(const char *format, ...);
+
+    /**
+     * Print a formatted syslog string.
+     *
+     * @param format string.
+     */
+    void warn(const char *format, ...);
+
+    /**
+     * Print a formatted syslog string.
+     *
+     * @param format string.
+     */
+    void debug(const char *format, ...);
+
+    /**
+     * Print a formatted syslog string.
+     *
+     * @param format string.
+     */
+    void emerg(const char *format, ...);
+
+    /**
+     * Print a formatted syslog string.
+     *
+     * @param format string.
+     */
+    void alert(const char *format, ...);
+
+    /**
+     * Print a formatted syslog string.
+     *
+     * @param format string.
+     */
+    void critical(const char *format, ...);
+
+    /**
+     * Print a formatted syslog string.
+     *
+     * @param format string.
+     */
+    void notice(const char *format, ...);
+
+    /**
+     * Print a formatted syslog string.
+     *
+     * @param format string.
+     */
+    void info(const char *format, ...);
+
+    /**
+     * Sets the logging level.
+     * @param enable is the logging level to use for further output
+     */
+    inline void level(Level enable)
+        {_level = enable;};
+
+    /**
+     * Enables or disables the echoing of the messages to clog in addition
+     * to the syslog daemon.  This is enabled by the default class constructor.
+     * @param f true to enable, false to disable clog output
+     */
+    inline void clogEnable(bool f=true)
+        {_clogEnable = f;};
+
+    inline Slog &warn(void)
+        {return operator()(Slog::levelWarning);};
+
+    inline Slog &error(void)
+        {return operator()(Slog::levelError);};
+
+    inline Slog &debug(void)
+        {return operator()(Slog::levelDebug);};
+
+    inline Slog &emerg(void)
+        {return operator()(Slog::levelEmergency);};
+
+    inline Slog &alert(void)
+        {return operator()(Slog::levelAlert);};
+
+    inline Slog &critical(void)
+        {return operator()(Slog::levelCritical);};
+
+    inline Slog &notice(void)
+        {return operator()(Slog::levelNotice);};
+
+    inline Slog &info(void)
+        {return operator()(Slog::levelInfo);};
+
+};
+
+extern __EXPORT Slog    slog;
+
+END_NAMESPACE
+
+#endif
+
diff --git a/jni/libucommon/sources/inc/commoncpp/socket.h b/jni/libucommon/sources/inc/commoncpp/socket.h
new file mode 100644
index 0000000..58663dc
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/socket.h
@@ -0,0 +1,647 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+/**
+ * @file commoncpp/socket.h
+ * @short socket operations.
+ **/
+
+#ifndef COMMONCPP_SOCKET_H_
+#define COMMONCPP_SOCKET_H_
+
+#include <cstdio>
+
+#ifndef COMMONCPP_CONFIG_H_
+#include <commoncpp/config.h>
+#endif
+
+#ifndef COMMONCPP_STRING_H_
+#include <commoncpp/string.h>
+#endif
+
+#ifndef COMMONCPP_ADDRESS_H_
+#include <commoncpp/address.h>
+#endif
+
+#ifndef COMMONCPP_EXCEPTION_H_
+#include <commoncpp/exception.h>
+#endif
+
+#ifndef MSG_DONTWAIT
+#define MSG_DONTWAIT    0
+#endif
+
+#ifndef MSG_NOSIGNAL
+#define MSG_NOSIGNAL    0
+#endif
+
+#ifndef SOCK_DCCP
+#define SOCK_DCCP       6
+#endif
+#ifndef IPPROTO_DCCP
+#define IPPROTO_DCCP    33
+#endif
+#ifndef SOL_DCCP
+#define SOL_DCCP       269
+#endif
+#define DCCP_SOCKOPT_AVAILABLE_CCIDS    12
+#define DCCP_SOCKOPT_CCID               13
+#define DCCP_SOCKOPT_TX_CCID            14
+#define DCCP_SOCKOPT_RX_CCID            15
+
+NAMESPACE_COMMONCPP
+
+typedef socket_t    SOCKET;
+
+class __EXPORT Socket : protected ucommon::Socket
+{
+public:
+    enum State {
+        INITIAL,
+        AVAILABLE,
+        BOUND,
+        CONNECTED,
+        CONNECTING,
+        STREAM
+    };
+    typedef enum State State;
+
+    enum Family {
+#ifdef  CCXX_IPV6
+        IPV6 = AF_INET6,
+#endif
+        IPV4 = AF_INET
+    };
+
+    typedef enum Family Family;
+
+    enum Error {
+        errSuccess = 0,
+        errCreateFailed,
+        errCopyFailed,
+        errInput,
+        errInputInterrupt,
+        errResourceFailure,
+        errOutput,
+        errOutputInterrupt,
+        errNotConnected,
+        errConnectRefused,
+        errConnectRejected,
+        errConnectTimeout,
+        errConnectFailed,
+        errConnectInvalid,
+        errConnectBusy,
+        errConnectNoRoute,
+        errBindingFailed,
+        errBroadcastDenied,
+        errRoutingDenied,
+        errKeepaliveDenied,
+        errServiceDenied,
+        errServiceUnavailable,
+        errMulticastDisabled,
+        errTimeout,
+        errNoDelay,
+        errExtended,
+        errLookupFail,
+        errSearchErr,
+        errInvalidValue
+    };
+
+    typedef enum Error Error;
+
+    enum Tos {
+        tosLowDelay = 0,
+        tosThroughput,
+        tosReliability,
+        tosMinCost,
+        tosInvalid
+    };
+    typedef enum Tos Tos;
+
+    enum Pending {
+        pendingInput,
+        pendingOutput,
+        pendingError
+    };
+    typedef enum Pending Pending;
+
+private:
+    // used by exception handlers....
+    mutable Error errid;
+    mutable const char *errstr;
+    mutable long syserr;
+
+    void setSocket(void);
+
+protected:
+    static socket_t dupSocket(socket_t s,Socket::State state);
+
+    static Mutex mutex;
+
+    mutable struct {
+        bool thrown: 1;
+        bool broadcast: 1;
+        bool route: 1;
+        bool keepalive: 1;
+        bool loopback: 1;
+        bool multicast: 1;
+        bool completion: 1;
+        bool linger: 1;
+        unsigned ttl: 8;
+    } flags;
+
+    State volatile state;
+
+    /**
+     * This service is used to throw all socket errors which usually
+     * occur during the socket constructor.
+     *
+     * @param error defined socket error id.
+     * @param err string or message to pass.
+     * @param systemError the system error# that caused the error
+     */
+    Error error(Error error, const char *err = NULL, long systemError = 0) const;
+
+    /**
+     * This service is used to throw application defined socket errors
+     * where the application specific error code is a string.
+     *
+     * @param err string or message to pass.
+     */
+    inline void error(const char *err) const
+        {error(errExtended, err);};
+
+    /**
+     * This service is used to turn the error handler on or off for
+     * "throwing" exceptions by manipulating the thrown flag.
+     *
+     * @param enable true to enable handler.
+     */
+    inline void setError(bool enable)
+        {flags.thrown = !enable;};
+
+    /**
+     * Used as the default destructor for ending a socket.  This
+     * will cleanly terminate the socket connection.  It is provided
+     * for use in derived virtual destructors.
+     */
+    void endSocket(void);
+
+    /**
+     * Used as a common handler for connection failure processing.
+     *
+     * @return correct failure code to apply.
+     */
+    Error connectError(void);
+
+    /**
+     * Set the send limit.
+     */
+    Error sendLimit(int limit = 2048);
+
+    /**
+     * Set thr receive limit.
+     */
+    Error receiveLimit(int limit = 1);
+
+    /**
+     * Set the send timeout for sending raw network data.
+     *
+     * @return errSuccess if set.
+     * @param timer value in millisec.
+     */
+    Error sendTimeout(timeout_t timer);
+
+    /**
+     * Receive timeout for receiving raw network data.
+     *
+     * @return errSuccess if set.
+     * @param timer value in milliseconds.
+     */
+    Error receiveTimeout(timeout_t timer);
+
+    /**
+     * Set the protocol stack network kernel send buffer size
+     * associated with the socket.
+     *
+     * @return errSuccess on success, or error.
+     * @param size of buffer in bytes.
+     */
+    Error sendBuffer(unsigned size);
+
+    /**
+     * Set the protocol stack network kernel receive buffer size
+     * associated with the socket.
+     *
+     * @return errSuccess on success, or error.
+     * @param size of buffer in bytes.
+     */
+    Error receiveBuffer(unsigned size);
+
+    /**
+     * Set the total protocol stack network kernel buffer size
+     * for both send and receive together.
+     *
+     * @return errSuccess on success
+     * @param size of buffer.
+     */
+    Error bufferSize(unsigned size);
+
+    /**
+     * Set the subnet broadcast flag for the socket.  This enables
+     * sending to a subnet and may require special image privileges
+     * depending on the operating system.
+     *
+     * @return 0 (errSuccess) on success, else error code.
+     * @param enable when set to true.
+     */
+    Error setBroadcast(bool enable);
+
+    /**
+     * Setting multicast binds the multicast interface used for
+     * the socket to the interface the socket itself has been
+     * implicitly bound to.  It is also used as a check flag
+     * to make sure multicast is enabled before multicast
+     * operations are used.
+     *
+     * @return 0 (errSuccess) on success, else error code.
+     * @param enable when set to true.
+     * @param family of protocol.
+     */
+    Error setMulticastByFamily(bool enable, Family family = IPV4);
+
+    /**
+     * Set the multicast loopback flag for the socket.  Loopback
+     * enables a socket to hear what it is sending.
+     *
+     * @return 0 (errSuccess) on success, else error code.
+     * @param enable when set to true.
+     * @param family of protocol.
+     */
+    Error setLoopbackByFamily(bool enable, Family family = IPV4);
+
+    /**
+     * Set the multicast time to live for a multicast socket.
+     *
+     * @return 0 (errSuccess) on success, else error code.
+     * @param ttl time to live.
+     * @param fam family of protocol.
+     */
+    Error setTimeToLiveByFamily(unsigned char ttl, Family fam = IPV4);
+
+    /**
+     * Join a multicast group.
+     *
+     * @return 0 (errSuccess) on success, else error code.
+     * @param ia address of multicast group to join.
+     */
+    Error join(const IPV4Multicast &ia);
+#ifdef  CCXX_IPV6
+    Error join(const IPV6Multicast &ia);
+#endif
+
+    /**
+     * Drop membership from a multicast group.
+     *
+     * @return 0 (errSuccess) on success, else error code.
+     * @param ia address of multicast group to drop.
+     */
+    Error drop(const IPV4Multicast &ia);
+#ifdef  CCXX_IPV6
+    Error drop(const IPV6Multicast &ia);
+#endif
+
+    /**
+     * Set the socket routing to indicate if outgoing messages
+     * should bypass normal routing (set false).
+     *
+     * @return 0 on success.
+     * @param enable normal routing when set to true.
+     */
+    Error setRouting(bool enable);
+
+    /**
+     * Enable/disable delaying packets (Nagle algorithm)
+     *
+     * @return 0 on success.
+     * @param enable disable Nagle algorithm when set to true.
+     */
+    Error setNoDelay(bool enable);
+
+    /**
+     * An unconnected socket may be created directly on the local
+     * machine.  Sockets can occupy both the internet domain (AF_INET)
+     * and UNIX socket domain (AF_UNIX) under unix.  The socket type
+     * (SOCK_STREAM, SOCK_DGRAM) and protocol may also be specified.
+     * If the socket cannot be created, an exception is thrown.
+     *
+     * @param domain socket domain to use.
+     * @param type base type and protocol family of the socket.
+     * @param protocol specific protocol to apply.
+     */
+    Socket(int domain, int type, int protocol = 0);
+
+    /**
+     * A socket object may be created from a file descriptor when that
+     * descriptor was created either through a socket() or accept()
+     * call.  This constructor is mostly for internal use.
+     *
+     * @param fd file descriptor of an already existing socket.
+     */
+    Socket(socket_t fd);
+
+    /**
+     * Create an inactive socket object for base constructors.
+     */
+    Socket();
+
+    /**
+     * A socket can also be constructed from an already existing
+     * Socket object. On POSIX systems, the socket file descriptor
+     * is dup()'d. On Win32, DuplicateHandle() is used.
+     *
+     * @param source of existing socket to clone.
+     */
+    Socket(const Socket &source);
+
+    /**
+     * Process a logical input line from a socket descriptor
+     * directly.
+     *
+     * @param buf pointer to string.
+     * @param len maximum length to read.
+     * @param timeout for pending data in milliseconds.
+     * @return number of bytes actually read.
+     */
+    ssize_t readLine(char *buf, size_t len, timeout_t timeout = 0);
+
+    /**
+     * Read in a block of len bytes with specific separator.  Can
+     * be zero, or any other char.  If \\n or \\r, it's treated just
+     * like a readLine().  Otherwise it looks for the separator.
+     *
+     * @param buf pointer to byte allocation.
+     * @param len maximum length to read.
+     * @param separator separator for a particular ASCII character
+     * @param t timeout for pending data in milliseconds.
+     * @return number of bytes actually read.
+     */
+    virtual ssize_t readData(void * buf,size_t len,char separator=0,timeout_t t=0);
+
+    /**
+     * Write a block of len bytes to socket.
+     *
+     * @param buf pointer to byte allocation.
+     * @param len maximum length to write.
+     * @param t timeout for pending data in milliseconds.
+     * @return number of bytes actually written.
+     */
+    virtual ssize_t writeData(const void* buf,size_t len,timeout_t t=0);
+
+public:
+    ~Socket();
+
+    /**
+     * Often used by a "catch" to fetch the last error of a thrown
+     * socket.
+     *
+     * @return error number of Error error.
+     */
+    inline Error getErrorNumber(void) const {return errid;}
+
+    /**
+     * Often used by a "catch" to fetch the user set error string
+     * of a thrown socket, but only if EXTENDED error codes are used.
+     *
+     * @return string for error message.
+     */
+    inline const char *getErrorString(void) const {return errstr;}
+
+    inline long getSystemError(void) const {return syserr;}
+
+    const char *getSystemErrorString(void) const;
+
+    /**
+     * Get the status of pending operations.  This can be used to
+     * examine if input or output is waiting, or if an error has
+     * occured on the descriptor.
+     *
+     * @return true if ready, false on timeout.
+     * @param pend ready check to perform.
+     * @param timeout in milliseconds, inf. if not specified.
+     */
+    virtual bool isPending(Pending pend, timeout_t timeout = TIMEOUT_INF);
+
+    /**
+     * See if a specific protocol family is available in the
+     * current runtime environment.
+     *
+     * @return true if family available.
+     */
+    static bool check(Family fam);
+
+    /**
+     * Operator based testing to see if a socket is currently
+     * active.
+     */
+    bool operator!() const;
+
+    operator bool() const;
+
+    /**
+     * Sockets may also be duplicated by the assignment operator.
+     */
+    Socket &operator=(const Socket &from);
+
+    /**
+     * May be used to examine the origin of data waiting in the
+     * socket receive queue.  This can tell a TCP server where pending
+     * "connect" requests are coming from, or a UDP socket where it's
+     * next packet arrived from.
+     *
+     * @param port ptr to port number of sender.
+     * @return host address, test with "isInetAddress()".
+     */
+    virtual IPV4Host getIPV4Sender(tpport_t *port = NULL) const;
+
+    inline IPV4Host getSender(tpport_t *port = NULL) const
+        {return getIPV4Sender(port);}
+
+#ifdef  CCXX_IPV6
+    virtual IPV6Host getIPV6Sender(tpport_t *port = NULL) const;
+#endif
+
+    /**
+     * Get the host address and port of the socket this socket
+     * is connected to.  If the socket is currently not in a
+     * connected state, then a host address of 0.0.0.0 is
+     * returned.
+     *
+     * @param port ptr to port number of remote socket.
+     * @return host address of remote socket.
+     */
+    IPV4Host getIPV4Peer(tpport_t *port = NULL) const;
+
+    inline IPV4Host getPeer(tpport_t *port = NULL) const
+        {return getIPV4Peer(port);}
+
+#ifdef  CCXX_IPV6
+    IPV6Host getIPV6Peer(tpport_t *port = NULL) const;
+#endif
+
+    /**
+     * Get the local address and port number this socket is
+     * currently bound to.
+     *
+     * @param port ptr to port number on local host.
+     * @return host address of interface this socket is bound to.
+     */
+    IPV4Host getIPV4Local(tpport_t *port = NULL) const;
+
+    inline IPV4Host getLocal(tpport_t *port = NULL) const
+        {return getIPV4Local(port);}
+
+#ifdef  CCXX_IPV6
+    IPV6Host getIPV6Local(tpport_t *port = NULL) const;
+#endif
+
+    /**
+     * Used to specify blocking mode for the socket.  A socket
+     * can be made non-blocking by setting setCompletion(false)
+     * or set to block on all access with setCompletion(true).
+     * I do not believe this form of non-blocking socket I/O is supported
+     * in winsock, though it provides an alternate asynchronous set of
+     * socket services.
+     *
+     * @param immediate mode specify socket I/O call blocking mode.
+     */
+    void setCompletion(bool immediate);
+
+    /**
+     * Enable lingering sockets on close.
+     *
+     * @param linger specify linger enable.
+     */
+    Error setLinger(bool linger);
+
+    /**
+     * Set the keep-alive status of this socket and if keep-alive
+     * messages will be sent.
+     *
+     * @return 0 on success.
+     * @param enable keep alive messages.
+     */
+    Error setKeepAlive(bool enable);
+
+    /**
+     * Set packet scheduling on platforms which support ip quality
+     * of service conventions.  This effects how packets in the
+     * queue are scheduled through the interface.
+     *
+     * @return 0 on success, error code on failure.
+     * @param service type of service enumerated type.
+     */
+    Error setTypeOfService(Tos service);
+
+    /**
+     * Can test to see if this socket is "connected", and hence
+     * whether a "catch" can safely call getPeer().  Of course,
+     * an unconnected socket will return a 0.0.0.0 address from
+     * getPeer() as well.
+     *
+     * @return true when socket is connected to a peer.
+     */
+    bool isConnected(void) const;
+
+    /**
+     * Test to see if the socket is at least operating or if it
+     * is mearly initialized.  "initialized" sockets may be the
+     * result of failed constructors.
+     *
+     * @return true if not in initial state.
+     */
+    bool isActive(void) const;
+
+    /**
+     * Return if broadcast has been enabled for the specified
+     * socket.
+     *
+     * @return true if broadcast socket.
+     */
+    inline bool isBroadcast(void) const
+        {return flags.broadcast;};
+
+    /**
+     * Return if socket routing is enabled.
+     *
+     * @return true if routing enabled.
+     */
+    inline bool isRouted(void) const
+        {return flags.route;};
+
+
+    inline struct in_addr getaddress(const IPV4Address &ia)
+        {return ia.getAddress();}
+
+#ifdef  CCXX_IPV6
+    inline struct in6_addr getaddress(const IPV6Address &ia)
+        {return ia.getAddress();}
+#endif
+
+};
+
+#if defined(CCXX_EXCEPTIONS)
+
+class __EXPORT SockException : public IOException
+{
+private:
+    Socket::Error _socketError;
+
+public:
+    inline SockException(const String &str, Socket::Error socketError, long systemError = 0) :
+        IOException(str, systemError), _socketError(socketError) {};
+
+    inline Socket::Error getSocketError() const
+    { return _socketError; }
+};
+
+#endif
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/commoncpp/string.h b/jni/libucommon/sources/inc/commoncpp/string.h
new file mode 100644
index 0000000..4ce822f
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/string.h
@@ -0,0 +1,62 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// 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, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/**
+ * @file commoncpp/string.h
+ * @short Common C++ generic string class
+ **/
+
+#ifndef COMMONCPP_STRING_H_
+#define COMMONCPP_STRING_H_
+
+#ifndef COMMONCPP_CONFIG_H_
+#include <commoncpp/config.h>
+#endif
+
+NAMESPACE_COMMONCPP
+
+typedef ucommon::String String;
+
+__EXPORT char *lsetField(char *target, size_t size, const char *src, const char fill = 0);
+__EXPORT char *rsetField(char *target, size_t size, const char *src, const char fill = 0);
+__EXPORT char *newString(const char *src, size_t size = 0);
+__EXPORT void delString(char *str);
+__EXPORT char *setUpper(char *string, size_t size);
+__EXPORT char *setLower(char *string, size_t size);
+
+inline char *setString(char *target, size_t size, const char *str)
+    {return String::set(target, size, str);}
+
+inline char *addString(char *target, size_t size, const char *str)
+    {return String::add(target, size, str);}
+
+inline char *dupString(const char *src, size_t size = 0)
+    {return newString(src, size);}
+
+/*
+__EXPORT char *find(const char *cs, char *str, size_t len = 0);
+__EXPORT char *rfind(const char *cs, char *str, size_t len = 0);
+__EXPORT char *ifind(const char *cs, char *str, size_t len = 0);
+__EXPORT char *strip(const char *cs, char *str, size_t len = 0);
+__EXPORT size_t strchop(const char *cs, char *str, size_t len = 0);
+__EXPORT size_t strtrim(const char *cs, char *str, size_t len = 0);
+
+*/
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/commoncpp/tcp.h b/jni/libucommon/sources/inc/commoncpp/tcp.h
new file mode 100644
index 0000000..335aa04
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/tcp.h
@@ -0,0 +1,613 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+/**
+ * @file commoncpp/tcp.h
+ * @short tcp derived socket classes.
+ **/
+
+#ifndef COMMONCPP_TCP_H_
+#define COMMONCPP_TCP_H_
+
+#include <cstdio>
+
+#ifndef COMMONCPP_CONFIG_H_
+#include <commoncpp/config.h>
+#endif
+
+#ifndef COMMONCPP_STRING_H_
+#include <commoncpp/string.h>
+#endif
+
+#ifndef COMMONCPP_ADDRESS_H_
+#include <commoncpp/address.h>
+#endif
+
+#ifndef COMMONCPP_SOCKET_H_
+#include <commoncpp/socket.h>
+#endif
+
+NAMESPACE_COMMONCPP
+
+/**
+ * TCP sockets are used for stream based connected sessions between two
+ * sockets.  Both error recovery and flow control operate transparently
+ * for a TCP socket connection.  The TCP socket base class is primary used
+ * to bind a TCP "server" for accepting TCP streams.
+ *
+ * An implicit and unique TCPSocket object exists in Common C++ to represent
+ * a bound TCP socket acting as a "server" for receiving connection requests.
+ * This class is not part of TCPStream because such objects normally perform
+ * no physical I/O (read or write operations) other than to specify a listen
+ * backlog queue and perform "accept" operations for pending connections.
+ * The Common C++ TCPSocket offers a Peek method to examine where the next
+ * pending connection is coming from, and a Reject method to flush the next
+ * request from the queue without having to create a session.
+ *
+ * The TCPSocket also supports a "OnAccept" method which can be called when a
+ * TCPStream related object is created from a TCPSocket.  By creating a
+ * TCPStream from a TCPSocket, an accept operation automatically occurs, and
+ * the TCPSocket can then still reject the client connection through the
+ * return status of it's OnAccept method.
+ *
+ * @author David Sugar <dyfet@tycho.com>
+ * @short bound server for TCP streams and sessions.
+ */
+class __EXPORT TCPSocket : protected Socket
+{
+protected:
+    int segsize;
+    void setSegmentSize(unsigned mss);
+
+public:
+    /**
+     * A method to call in a derived TCPSocket class that is acting
+     * as a server when a connection request is being accepted.  The
+     * server can implement protocol specific rules to exclude the
+     * remote socket from being accepted by returning false.  The
+     * Peek method can also be used for this purpose.
+     *
+     * @return true if client should be accepted.
+     * @param ia internet host address of the client.
+     * @param port number of the client.
+     */
+    virtual bool onAccept(const IPV4Host &ia, tpport_t port);
+
+    /**
+     * Fetch out the socket.
+     */
+    inline SOCKET getSocket(void)
+        {return so;};
+
+    /**
+     * Get the buffer size for servers.
+     */
+    inline int getSegmentSize(void)
+        {return segsize;};
+
+    /**
+     * A TCP "server" is created as a TCP socket that is bound
+     * to a hardware address and port number on the local machine
+     * and that has a backlog queue to listen for remote connection
+     * requests.  If the server cannot be created, an exception is
+     * thrown.
+     *
+     * @param bind local ip address or interface to use.
+     * @param port number to bind socket under.
+     * @param backlog size of connection request queue.
+     * @param mss maximum segment size for accepted streams.
+     */
+    TCPSocket(const IPV4Address &bind, tpport_t port, unsigned backlog = 5, unsigned mss = 536);
+
+    /**
+     * Create a named tcp socket by service and/or interface id.
+     * For IPV4 we use [host:]svc or [host/]svc for the string.
+     * If we have getaddrinfo, we use that to obtain the addr to
+     * bind for.
+     *
+     * @param name of host interface and service port to bind.
+     * @param backlog size of connection request queue.
+     * @param mss maximum segment size for streaming buffers.
+     */
+    TCPSocket(const char *name, unsigned backlog = 5, unsigned mss = 536);
+
+    /**
+     * Return address and port of next connection request.  This
+     * can be used instead of OnAccept() to pre-evaluate connection
+     * requests.
+     *
+     * @return host requesting a connection.
+     * @param port number of requestor.
+     */
+    inline IPV4Host getRequest(tpport_t *port = NULL) const
+        {return Socket::getIPV4Sender(port);}
+
+    /**
+     * Used to reject the next incoming connection request.
+     */
+    void reject(void);
+
+    /**
+     * Used to get local bound address.
+     */
+    inline IPV4Host getLocal(tpport_t *port = NULL) const
+        {return Socket::getIPV4Local(port);}
+
+    /**
+     * Used to wait for pending connection requests.
+     * @return true if data packets available.
+     * @param timeout in milliseconds. TIMEOUT_INF if not specified.
+     */
+    inline bool isPendingConnection(timeout_t timeout = TIMEOUT_INF) /* not const -- jfc */
+        {return Socket::isPending(Socket::pendingInput, timeout);}
+
+    /**
+     * Use base socket handler for ending this socket.
+     */
+    virtual ~TCPSocket();
+};
+
+#ifdef  CCXX_IPV6
+/**
+ * TCPV6 sockets are used for stream based connected sessions between two
+ * ipv6 sockets.  Both error recovery and flow control operate transparently
+ * for a TCP socket connection.  The TCP socket base class is primary used
+ * to bind a TCP "server" for accepting TCP streams.
+ *
+ * An implicit and unique TCPV6Socket object exists in Common C++ to represent
+ * a bound ipv6 TCP socket acting as a "server" for receiving connection requests.
+ * This class is not part of TCPStream because such objects normally perform
+ * no physical I/O (read or write operations) other than to specify a listen
+ * backlog queue and perform "accept" operations for pending connections.
+ * The Common C++ TCPV6Socket offers a Peek method to examine where the next
+ * pending connection is coming from, and a Reject method to flush the next
+ * request from the queue without having to create a session.
+ *
+ * The TCPV6Socket also supports a "OnAccept" method which can be called when a
+ * TCPStream related object is created from a TCPSocket.  By creating a
+ * TCPStream from a TCPV6Socket, an accept operation automatically occurs, and
+ * the TCPV6Socket can then still reject the client connection through the
+ * return status of it's OnAccept method.
+ *
+ * @author David Sugar <dyfet@tycho.com>
+ * @short bound server for TCP streams and sessions.
+ */
+class __EXPORT TCPV6Socket : protected Socket
+{
+private:
+    int segsize;
+    void setSegmentSize(unsigned mss);
+
+public:
+    /**
+     * A method to call in a derived TCPSocket class that is acting
+     * as a server when a connection request is being accepted.  The
+     * server can implement protocol specific rules to exclude the
+     * remote socket from being accepted by returning false.  The
+     * Peek method can also be used for this purpose.
+     *
+     * @return true if client should be accepted.
+     * @param ia internet host address of the client.
+     * @param port number of the client.
+     */
+    virtual bool onAccept(const IPV6Host &ia, tpport_t port);
+
+    /**
+     * Fetch out the socket.
+     */
+    inline SOCKET getSocket(void)
+        {return so;};
+
+    inline int getSegmentSize(void)
+        {return segsize;};
+
+    /**
+     * A TCP "server" is created as a TCP socket that is bound
+     * to a hardware address and port number on the local machine
+     * and that has a backlog queue to listen for remote connection
+     * requests.  If the server cannot be created, an exception is
+     * thrown.
+     *
+     * @param bind local ip address or interface to use.
+     * @param port number to bind socket under.
+     * @param backlog size of connection request queue.
+     * @param mss maximum segment size of streaming buffer.
+     */
+    TCPV6Socket(const IPV6Address &bind, tpport_t port, unsigned backlog = 5, unsigned mss = 536);
+
+    /**
+     * Create a TCP server for a named host interface and service
+     * port.  We use [host/]port for specifying the optional host
+     * name and service port since ':' is a valid char for ipv6
+     * addresses.
+     *
+     * @param name of host interface and service to use.
+     * @param backlog size of connection request queue.
+     * @param mss maximum segment size of streaming buffers.
+     */
+    TCPV6Socket(const char *name, unsigned backlog = 5, unsigned mss = 536);
+
+    /**
+     * Return address and port of next connection request.  This
+     * can be used instead of OnAccept() to pre-evaluate connection
+     * requests.
+     *
+     * @return host requesting a connection.
+     * @param port number of requestor.
+     */
+    inline IPV6Host getRequest(tpport_t *port = NULL) const
+        {return Socket::getIPV6Sender(port);}
+
+    /**
+     * Used to reject the next incoming connection request.
+     */
+    void reject(void);
+
+    /**
+     * Used to get local bound address.
+     */
+    inline IPV6Host getLocal(tpport_t *port = NULL) const
+        {return Socket::getIPV6Local(port);}
+
+    /**
+     * Used to wait for pending connection requests.
+     * @return true if data packets available.
+     * @param timeout in milliseconds. TIMEOUT_INF if not specified.
+     */
+    inline bool isPendingConnection(timeout_t timeout = TIMEOUT_INF) /* not const -- jfc */
+        {return Socket::isPending(Socket::pendingInput, timeout);}
+
+    /**
+     * Use base socket handler for ending this socket.
+     */
+    virtual ~TCPV6Socket();
+};
+#endif
+
+/**
+ * TCP streams are used to represent TCP client connections to a server
+ * by TCP protocol servers for accepting client connections.  The TCP
+ * stream is a C++ "stream" class, and can accept streaming of data to
+ * and from other C++ objects using the << and >> operators.
+ *
+ *  TCPStream itself can be formed either by connecting to a bound network
+ *  address of a TCP server, or can be created when "accepting" a
+ *  network connection from a TCP server.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short streamable TCP socket connection.
+ */
+class __EXPORT TCPStream : protected std::streambuf, public Socket, public std::iostream
+{
+private:
+    int doallocate();
+
+    void segmentBuffering(unsigned mss);
+
+    friend TCPStream& crlf(TCPStream&);
+    friend TCPStream& lfcr(TCPStream&);
+
+    // no copy constructor...
+    TCPStream(const TCPStream &source);
+
+
+protected:
+    timeout_t timeout;
+    size_t bufsize;
+    Family family;
+    char *gbuf, *pbuf;
+
+public:
+    /**
+     * The constructor required for building other classes or to
+     * start an unconnected TCPStream for connect.
+     */
+    TCPStream(Family family = IPV4, bool throwflag = true, timeout_t to = 0);
+
+    /**
+     * Disconnect the current session and prepare for a new one.
+     */
+    void disconnect(void);
+
+    /**
+     * Get protocol segment size.
+     */
+    int getSegmentSize(void);
+
+protected:
+    /**
+     * Used to allocate the buffer space needed for iostream
+     * operations.  This function is called by the constructor.
+     *
+     * @param size of stream buffers from constructor.
+     */
+    void allocate(size_t size);
+
+    /**
+     * Used to terminate the buffer space and cleanup the socket
+     * connection.  This fucntion is called by the destructor.
+     */
+    void endStream(void);
+
+    /**
+     * This streambuf method is used to load the input buffer
+     * through the established tcp socket connection.
+     *
+     * @return char from get buffer, EOF if not connected.
+     */
+    int underflow();
+
+    /**
+     * This streambuf method is used for doing unbuffered reads
+     * through the establish tcp socket connection when in interactive mode.
+     * Also this method will handle proper use of buffers if not in
+     * interative mode.
+     *
+     * @return char from tcp socket connection, EOF if not connected.
+     */
+    int uflow();
+
+    /**
+     * This streambuf method is used to write the output
+     * buffer through the established tcp connection.
+     *
+     * @param ch char to push through.
+     * @return char pushed through.
+     */
+    int overflow(int ch);
+
+    /**
+     * Create a TCP stream by connecting to a TCP socket (on
+     * a remote machine).
+     *
+     * @param host address of remote TCP server.
+     * @param port number to connect.
+     * @param mss maximum segment size of streaming buffers.
+     */
+    void connect(const IPV4Host &host, tpport_t port, unsigned mss = 536);
+#ifdef  CCXX_IPV6
+    void connect(const IPV6Host &host, tpport_t port, unsigned mss = 536);
+#endif
+
+    /**
+     * Connect a TCP stream to a named destination host and port
+     * number, using getaddrinfo interface if available.
+     *
+     * @param name of host and service to connect
+     * @param mss maximum segment size of stream buffer
+     */
+    void connect(const char *name, unsigned mss = 536);
+
+    /**
+     * Used in derived classes to refer to the current object via
+     * it's iostream.  For example, to send a set of characters
+     * in a derived method, one might use *tcp() << "test".
+     *
+     * @return stream pointer of this object.
+     */
+    std::iostream *tcp(void)
+        {return ((std::iostream *)this);};
+
+public:
+    /**
+     * Create a TCP stream by accepting a connection from a bound
+     * TCP socket acting as a server.  This performs an "accept"
+     * call.
+     *
+     * @param server socket listening
+     * @param throwflag flag to throw errors.
+     * @param timeout for all operations.
+     */
+    TCPStream(TCPSocket &server, bool throwflag = true, timeout_t timeout = 0);
+#ifdef  CCXX_IPV6
+    TCPStream(TCPV6Socket &server, bool throwflag = true, timeout_t timeout = 0);
+#endif
+
+    /**
+     * Accept a connection from a TCP Server.
+     *
+     * @param server socket listening
+     */
+    void connect(TCPSocket &server);
+#ifdef  CCXX_IPV6
+    void connect(TCPV6Socket &server);
+#endif
+
+    /**
+     * Create a TCP stream by connecting to a TCP socket (on
+     * a remote machine).
+     *
+     * @param host address of remote TCP server.
+     * @param port number to connect.
+     * @param mss maximum segment size of streaming buffers.
+     * @param throwflag flag to throw errors.
+     * @param timeout for all operations.
+     */
+    TCPStream(const IPV4Host &host, tpport_t port, unsigned mss = 536, bool throwflag = true, timeout_t timeout = 0);
+#ifdef  CCXX_IPV6
+    TCPStream(const IPV6Host &host, tpport_t port, unsigned mss = 536, bool throwflag = true, timeout_t timeout = 0);
+#endif
+
+    /**
+     * Construct a named TCP Socket connected to a remote machine.
+     *
+     * @param name of remote service.
+     * @param family of protocol.
+     * @param mss maximum segment size of streaming buffers.
+     * @param throwflag flag to throw errors.
+     * @param timer for timeout for all operations.
+     */
+    TCPStream(const char *name, Family family = IPV4, unsigned mss = 536, bool throwflag = false, timeout_t timer = 0);
+
+    /**
+     * Set the I/O operation timeout for socket I/O operations.
+     *
+     * @param timer to change timeout.
+     */
+    inline void setTimeout(timeout_t timer)
+        {timeout = timer;};
+
+
+    /**
+     * Flush and empty all buffers, and then remove the allocated
+     * buffers.
+     */
+    virtual ~TCPStream();
+
+    /**
+     * Flushes the stream input and output buffers, writes
+     * pending output.
+     *
+     * @return 0 on success.
+     */
+    int sync(void);
+
+    /**
+     * Print content into a socket.
+     *
+     * @return count of bytes sent.
+     * @param format string
+     */
+    size_t printf(const char *format, ...);
+
+    /**
+     * Get the status of pending stream data.  This can be used to
+     * examine if input or output is waiting, or if an error or
+     * disconnect has occured on the stream.  If a read buffer
+     * contains data then input is ready and if write buffer
+     * contains data it is first flushed and then checked.
+     */
+    bool isPending(Pending pend, timeout_t timeout = TIMEOUT_INF);
+
+    /**
+      * Examine contents of next waiting packet.
+      *
+      * @param buf pointer to packet buffer for contents.
+      * @param len of packet buffer.
+      * @return number of bytes examined.
+      */
+     inline ssize_t peek(void *buf, size_t len)
+         {return ::recv(so, (char *)buf, len, MSG_PEEK);};
+
+    /**
+     * Return the size of the current stream buffering used.
+     *
+     * @return size of stream buffers.
+     */
+    inline size_t getBufferSize(void) const
+        {return bufsize;};
+};
+
+/**
+ * The TCP session is used to primarily to represent a client connection
+ * that can be managed on a seperate thread.  The TCP session also supports
+ * a non-blocking connection scheme which prevents blocking during the
+ * constructor and moving the process of completing a connection into the
+ * thread that executes for the session.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Threaded streamable socket with non-blocking constructor.
+ */
+class __EXPORT TCPSession : public Thread, public TCPStream
+{
+private:
+    TCPSession(const TCPSession &rhs); // not defined
+protected:
+    /**
+     * Normally called during the thread Initial() method by default,
+     * this will wait for the socket connection to complete when
+     * connecting to a remote socket.  One might wish to use
+     * setCompletion() to change the socket back to blocking I/O
+     * calls after the connection completes.  To implement the
+     * session one must create a derived class which implements
+     * run().
+     *
+     * @return 0 if successful, -1 if timed out.
+     * @param timeout to wait for completion in milliseconds.
+     */
+    int waitConnection(timeout_t timeout = TIMEOUT_INF);
+
+    /**
+     * The initial method is used to esablish a connection when
+     * delayed completion is used.  This assures the constructor
+     * terminates without having to wait for a connection request
+     * to complete.
+     */
+    void initial(void);
+
+public:
+    /**
+     * Create a TCP socket that will be connected to a remote TCP
+     * server and that will execute under it's own thread.
+     *
+     * @param host internet address of remote TCP server.
+     * @param port number of remote server.
+     * @param size of streaming buffer.
+     * @param pri execution priority relative to parent.
+     * @param stack allocation needed on some platforms.
+     */
+    TCPSession(const IPV4Host &host,
+        tpport_t port, size_t size = 536, int pri = 0, size_t stack = 0);
+#ifdef  CCXX_IPV6
+    TCPSession(const IPV6Host &host,
+        tpport_t port, size_t size = 536, int pri = 0, size_t stack = 0);
+#endif
+
+    /**
+     * Create a TCP socket from a bound TCP server by accepting a pending
+     * connection from that server and execute a thread for the accepted
+     * connection.
+     *
+     * @param server tcp socket to accept a connection from.
+     * @param pri execution priority relative to parent.
+     * @param stack allocation needed on some platforms.
+     */
+    TCPSession(TCPSocket &server, int pri = 0, size_t stack = 0);
+#ifdef  CCXX_IPV6
+    TCPSession(TCPV6Socket &server, int pri = 0, size_t stack = 0);
+#endif
+
+    /**
+     * Make sure destruction happens through a virtual...
+     */
+    virtual ~TCPSession();
+};
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/commoncpp/thread.h b/jni/libucommon/sources/inc/commoncpp/thread.h
new file mode 100644
index 0000000..9f72c5c
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/thread.h
@@ -0,0 +1,881 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// 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, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/**
+ * @file commoncpp/thread.h
+ * @short Common C++ thread class and sychronization objects
+ **/
+
+#ifndef COMMONCPP_THREAD_H_
+#define COMMONCPP_THREAD_H_
+
+#ifndef COMMONCPP_CONFIG_H_
+#include <commoncpp/config.h>
+#endif
+
+#ifndef COMMONCPP_STRING_H_
+#include <commoncpp/string.h>
+#endif
+
+#define ENTER_CRITICAL  enterMutex();
+#define LEAVE_CRITICAL  leaveMutex();
+
+NAMESPACE_COMMONCPP
+
+class __EXPORT Mutex : protected ucommon::RecursiveMutex
+{
+public:
+    inline Mutex() : RecursiveMutex() {};
+
+    inline void enterMutex(void)
+        {RecursiveMutex::lock();};
+
+    inline void leaveMutex(void)
+        {RecursiveMutex::release();};
+
+    inline bool tryEnterMutex(void)
+        {return RecursiveMutex::lock(0l);};
+
+    inline void enter(void)
+        {RecursiveMutex::lock();};
+
+    inline void leave(void)
+        {RecursiveMutex::release();};
+
+    inline bool test(void)
+        {return RecursiveMutex::lock(0l);};
+
+};
+
+/**
+ * The Mutex Counter is a counter variable which can safely be incremented
+ * or decremented by multiple threads.  A Mutex is used to protect access
+ * to the counter variable (an integer).  An initial value can be specified
+ * for the counter, and it can be manipulated with the ++ and -- operators.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Thread protected integer counter.
+ */
+class __EXPORT MutexCounter : public Mutex
+{
+protected:
+    volatile int    counter;
+
+public:
+    /**
+     * Create and optionally name a mutex protected counter.
+     */
+    MutexCounter();
+
+    /**
+     * Create and optionally name a mutex protected counter with
+     * an initial value.
+     *
+     * @param initial value of counter.
+     */
+    MutexCounter(int initial);
+
+    int operator++();
+    int operator--();
+};
+
+/**
+ * The MutexLock class is used to protect a section of code so that at any
+ * given time only a single thread can perform the protected operation.
+ *
+ * It use Mutex to protect operation. Using this class is usefull and
+ * exception safe.  The mutex that has been locked is automatically
+ * released when the function call stack falls out of scope, so one doesnt
+ * have to remember to unlock the mutex at each function return.
+ *
+ * A common use is
+ *
+ * void func_to_protect()
+ * {
+ *   MutexLock lock(mutex);
+ *   ... operation ...
+ * }
+ *
+ * NOTE: do not declare variable as "MutexLock (mutex)", the mutex will be
+ * released at statement end.
+ *
+ * @author Frediano Ziglio <freddy77@angelfire.com>
+ * @short Mutex automatic locker for protected access.
+ */
+class __EXPORT MutexLock
+{
+private:
+    Mutex& mutex;
+
+public:
+    /**
+     * Acquire the mutex
+     *
+     * @param _mutex reference to mutex to aquire.
+     */
+    inline MutexLock( Mutex& _mutex ) : mutex( _mutex )
+        { mutex.enterMutex(); }
+
+    /**
+     * Release the mutex automatically
+     */
+    // this should be not-virtual
+    inline ~MutexLock()
+        { mutex.leaveMutex(); }
+};
+
+class __EXPORT ThreadLock : protected ucommon::ThreadLock
+{
+public:
+    inline ThreadLock() : ucommon::ThreadLock() {};
+
+    inline void readLock(void)
+        {ucommon::ThreadLock::access();};
+
+    inline void writeLock(void)
+        {ucommon::ThreadLock::modify();};
+
+    inline void tryReadLock(void)
+        {ucommon::ThreadLock::access(0);};
+
+    inline void tryWriteLock(void)
+        {ucommon::ThreadLock::modify(0);};
+
+    inline void unlock(void)
+        {ucommon::ThreadLock::release();};
+};
+
+/**
+ * The ReadLock class is used to protect a section of code through
+ * a ThreadLock for "read" access to the member function.  The
+ * ThreadLock is automatically released when the object falls out of
+ * scope.
+ *
+ * A common use is
+ *
+ * void func_to_protect()
+ * {
+ *   ReadLock lock(threadlock);
+ *   ... operation ...
+ * }
+ *
+ * NOTE: do not declare variable as "ReadLock (threadlock)", the
+ * mutex will be released at statement end.
+ *
+ * @author David Sugar <dyfet@gnu.org>
+ * @short Read mode automatic locker for protected access.
+ */
+class __EXPORT ReadLock
+{
+private:
+    ThreadLock& tl;
+
+public:
+    /**
+     * Wait for read access
+     *
+     * @param _tl reference to lock to aquire.
+     */
+    inline ReadLock( ThreadLock& _tl ) : tl( _tl )
+        { tl.readLock(); }
+    /**
+     * Post the semaphore automatically
+     */
+    // this should be not-virtual
+    inline ~ReadLock()
+        { tl.unlock(); }
+};
+
+/**
+ * The WriteLock class is used to protect a section of code through
+ * a ThreadLock for "write" access to the member function.  The
+ * ThreadLock is automatically released when the object falls out of
+ * scope.
+ *
+ * A common use is
+ *
+ * void func_to_protect()
+ * {
+ *   WriteLock lock(threadlock);
+ *   ... operation ...
+ * }
+ *
+ * NOTE: do not declare variable as "WriteLock (threadlock)", the
+ * mutex will be released at statement end.
+ *
+ * @author David Sugar <dyfet@gnu.org>
+ * @short Read mode automatic locker for protected access.
+ */
+class __EXPORT WriteLock
+{
+private:
+    ThreadLock& tl;
+
+public:
+    /**
+     * Wait for write access
+     *
+     * @param _tl reference to threadlock to aquire.
+     */
+    inline WriteLock( ThreadLock& _tl ) : tl( _tl )
+        { tl.writeLock(); }
+    /**
+     * Post the semaphore automatically
+     */
+    // this should be not-virtual
+    inline ~WriteLock()
+        { tl.unlock(); }
+};
+
+class __EXPORT Conditional : private ucommon::Conditional
+{
+public:
+    inline Conditional() : ucommon::Conditional() {};
+
+    bool wait(timeout_t timeout, bool locked = false);
+
+    void signal(bool broadcast);
+
+    inline void enterMutex(void)
+        {ucommon::Conditional::lock();};
+
+    inline void leaveMutex(void)
+        {ucommon::Conditional::unlock();};
+};
+
+class __EXPORT Semaphore : private ucommon::Semaphore
+{
+public:
+    inline Semaphore(unsigned size=0) : ucommon::Semaphore(size) {};
+
+    inline bool wait(timeout_t timeout = 0)
+        {return ucommon::Semaphore::wait(timeout);};
+
+    inline void post(void)
+        {ucommon::Semaphore::release();};
+};
+
+/**
+ * The SemaphoreLock class is used to protect a section of code through
+ * a semaphore so that only x instances of the member function may
+ * execute concurrently.
+ *
+ * A common use is
+ *
+ * void func_to_protect()
+ * {
+ *   SemaphoreLock lock(semaphore);
+ *   ... operation ...
+ * }
+ *
+ * NOTE: do not declare variable as "SemaohoreLock (semaphore)", the
+ * mutex will be released at statement end.
+ *
+ * @author David Sugar <dyfet@gnu.org>
+ * @short Semaphore automatic locker for protected access.
+ */
+class __EXPORT SemaphoreLock
+{
+private:
+    Semaphore& sem;
+
+public:
+    /**
+     * Wait for the semaphore
+     */
+    inline SemaphoreLock( Semaphore& _sem ) : sem( _sem )
+        { sem.wait(); }
+    /**
+     * Post the semaphore automatically
+     */
+    // this should be not-virtual
+    inline ~SemaphoreLock()
+        { sem.post(); }
+};
+
+class __EXPORT Event : private ucommon::TimedEvent
+{
+public:
+    inline Event() : TimedEvent() {};
+
+    inline void wait(void)
+        {ucommon::TimedEvent::wait(Timer::inf);};
+
+    inline bool wait(timeout_t timeout)
+        {return ucommon::TimedEvent::wait(timeout);};
+
+    inline void signal(void)
+        {ucommon::TimedEvent::signal();};
+
+    inline void reset(void)
+        {ucommon::TimedEvent::reset();};
+};
+
+class __EXPORT Thread : protected ucommon::JoinableThread
+{
+public:
+    /**
+     * How to raise error
+     */
+    typedef enum Throw {
+        throwNothing,  /**< continue without throwing error */
+        throwObject,   /**< throw object that cause error (throw this) */
+        throwException /**< throw an object relative to error */
+    } Throw;
+
+private:
+    friend class Slog;
+
+    Throw exceptions;
+    bool detached, terminated;
+    Thread *parent;
+    size_t msgpos;
+    char msgbuf[128];
+
+public:
+    Thread(int pri = 0, size_t stack = 0);
+
+    virtual ~Thread();
+
+    inline void map(void)
+        {JoinableThread::map();};
+
+    virtual void initial(void);
+    virtual void notify(Thread *thread);
+    virtual void final(void);
+    virtual void run(void) = 0;
+
+    void terminate(void);
+    void finalize(void);
+
+    void detach(void);
+    void start(void);
+    void exit(void);
+
+    inline void join(void)
+        {JoinableThread::join();};
+
+    inline void sync(void)
+        {Thread::exit();};
+
+    static inline Thread *get(void)
+        {return (Thread *)JoinableThread::get();};
+
+    inline static void yield(void)
+        {ucommon::Thread::yield();};
+
+    inline static void sleep(timeout_t msec = TIMEOUT_INF)
+        {ucommon::Thread::sleep(msec);};
+
+    bool isRunning(void);
+
+    bool isThread(void);
+
+    /**
+     * Get exception mode of the current thread.
+     *
+     * @return exception mode.
+     */
+    static Throw getException(void);
+
+    /**
+     * Set exception mode of the current thread.
+     *
+     * @return exception mode.
+     */
+    static void setException(Throw mode);
+
+    /**
+     * Get the thread id.
+     */
+    inline pthread_t getId(void)
+        {return tid;};
+};
+
+/**
+ * This class is used to access non-reentrant date and time functions in the
+ * standard C library.
+ *
+ * The class has two purposes:
+ * - 1 To be used internaly in CommonCpp's date and time classes to make them
+ *     thread safe.
+ * - 2 To be used by clients as thread safe replacements to the standard C
+ *     functions, much like Thread::sleep() represents a thread safe version
+ *     of the standard sleep() function.
+ *
+ * @note The class provides one function with the same name as its equivalent
+ *       standard function and one with another, unique name. For new clients,
+ *       the version with the unique name is recommended to make it easy to
+ *       grep for accidental usage of the standard functions. The version with
+ *       the standard name is provided for existing clients to sed replace their
+ *       original version.
+ *
+ * @note Also note that some functions that returned pointers have been redone
+ *       to take that pointer as an argument instead, making the caller
+ *       responsible for memory allocation/deallocation. This is almost
+ *       how POSIX specifies *_r functions (reentrant versions of the
+ *       standard time functions), except the POSIX functions also return the
+ *       given pointer while we do not. We don't use the *_r functions as they
+ *       aren't all generally available on all platforms yet.
+ *
+ * @author Idar Tollefsen <idar@cognita.no>
+ * @short Thread safe date and time functions.
+ */
+class __EXPORT SysTime
+{
+public:
+    static time_t getTime(time_t *tloc = NULL);
+    static time_t time(time_t *tloc)
+        { return getTime(tloc); };
+
+    static int getTimeOfDay(struct timeval *tp);
+    static int gettimeofday(struct timeval *tp, struct timezone *)
+        { return getTimeOfDay(tp); };
+
+    static struct tm *getLocalTime(const time_t *clock, struct tm *result);
+    static struct tm *locatime(const time_t *clock, struct tm *result)
+        { return getLocalTime(clock, result); };
+
+    static struct tm *getGMTTime(const time_t *clock, struct tm *result);
+    static struct tm *gmtime(const time_t *clock, struct tm *result)
+        { return getGMTTime(clock, result);};
+};
+
+/**
+ * Timer ports are used to provide synchronized timing events when managed
+ * under a "service thread" such as SocketService.  This is made into a
+ * stand-alone base class since other derived libraries (such as the
+ * serial handlers) may also use the pooled "service thread" model
+ * and hence also require this code for managing timing.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short synchronized millisecond timing for service threads.
+ */
+class __EXPORT TimerPort
+{
+#ifndef _MSWINDOWS_
+    struct timeval timer;
+#else
+    DWORD timer;
+#endif
+    bool active;
+
+public:
+    /**
+     * Create a timer, mark it as inactive, and set the initial
+     * "start" time to the creation time of the timer object.  This
+     * allows "incTimer" to initially refer to time delays relative
+     * to the original start time of the object.
+     */
+    TimerPort();
+
+    /**
+     * Set a new start time for the object based on when this call is
+     * made and optionally activate the timer for a specified number
+     * of milliseconds.  This can be used to set the starting time
+     * of a realtime session.
+     *
+     * @param timeout delay in milliseconds from "now"
+     */
+    void setTimer(timeout_t timeout = 0);
+
+    /**
+     * Set a timeout based on the current time reference value either
+     * from object creation or the last setTimer().  This reference
+     * can be used to time synchronize realtime data over specified
+     * intervals and force expiration when a new frame should be
+     * released in a synchronized manner.
+     *
+     * @param timeout delay in milliseconds from reference.
+     */
+    void incTimer(timeout_t timeout);
+
+    /**
+     * Adjust a timeout based on the current time reference value either
+     * from object creation or the last setTimer().  This reference
+     * can be used to time synchronize realtime data over specified
+     * intervals and force expiration when a new frame should be
+     * released in a synchronized manner.
+     *
+     * @param timeout delay in milliseconds from reference.
+     */
+    void decTimer(timeout_t timeout);
+
+    /**
+     * Sleep until the current timer expires.  This is useful in time
+     * syncing realtime periodic tasks.
+     */
+    void sleepTimer(void);
+
+    /**
+     * This is used to "disable" the service thread from expiring
+     * the timer object.  It does not effect the reference time from
+     * either creation or a setTimer().
+     */
+    void endTimer(void);
+
+    /**
+     * This is used by service threads to determine how much time
+     * remains before the timer expires based on a timeout specified
+     * in setTimer() or incTimer().  It can also be called after
+     * setting a timeout with incTimer() to see if the current timeout
+     * has already expired and hence that the application is already
+     * delayed and should skip frame(s).
+     *
+     * return time remaining in milliseconds, or TIMEOUT_INF if
+     * inactive.
+     */
+    timeout_t getTimer(void) const;
+
+    /**
+     * This is used to determine how much time has elapsed since a
+     * timer port setTimer benchmark time was initially set.  This
+     * allows one to use setTimer() to set the timer to the current
+     * time and then measure elapsed time from that point forward.
+     *
+     * return time elapsed in milliseconds, or TIMEOUT_INF if
+     * inactive.
+     */
+    timeout_t getElapsed(void) const;
+};
+
+#ifndef _MSWINDOWS_
+struct  timespec *getTimeout(struct timespec *spec, timeout_t timeout);
+#endif
+
+inline struct tm *localtime_r(const time_t *t, struct tm *b)
+    {return SysTime::getLocalTime(t, b);}
+
+inline char *ctime_r(const time_t *t, char *buf)
+    {return ctime(t);}
+
+inline struct tm *gmtime_r(const time_t *t, struct tm *b)
+    {return SysTime::getGMTTime(t, b);}
+
+inline char *asctime_r(const struct tm *tm, char *b)
+    {return asctime(tm);}
+
+inline Thread *getThread(void)
+    {return Thread::get();}
+
+/**
+ * The buffer class represents an IPC service that is built upon a buffer
+ * of fixed capacity that can be used to transfer objects between one or
+ * more producer and consumer threads.  Producer threads post objects
+ * into the buffer, and consumer threads wait for and receive objects from
+ * the buffer.  Semaphores are used to to block the buffer from overflowing
+ * and indicate when there is data available, and mutexes are used to protect
+ * multiple consumers and producer threads from stepping over each other.
+ *
+ * The buffer class is an abstract class in that the actual data being
+ * buffered is not directly specified within the buffer class itself.  The
+ * buffer class should be used as a base class for a class that actually
+ * impliments buffering and which may be aware of the data types actually
+ * are being buffered.  A template class could be created based on buffer
+ * for this purpose.  Another possibility is to create a class derived
+ * from both Thread and Buffer which can be used to implement message passing
+ * threads.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Producer/Consumer buffer for use between threads.
+ */
+#ifdef  _MSWINDOWS_
+class __EXPORT Buffer : public Mutex
+#else
+class __EXPORT Buffer : public Conditional
+#endif
+{
+private:
+#ifdef  _MSWINDOWS_
+    HANDLE  sem_head, sem_tail;
+#endif
+    size_t _size;
+    size_t _used;
+
+protected:
+    /**
+     * Invoke derived class buffer peeking method.
+     * @return size of object found.
+     * @param buf pointer to copy contents of head of buffer to.
+     */
+    virtual size_t onPeek(void *buf) = 0;
+
+    /**
+     * Invoke derived class object request from buffer.
+     * @return size of object returned.
+     * @param buf pointer to hold object returned from the buffer.
+     */
+    virtual size_t onWait(void *buf) = 0;
+
+    /**
+     * Invoke derived class posting of object to buffer.
+     * @return size of object posted.
+     * @param buf pointer to object being posted to the buffer.
+     */
+    virtual size_t onPost(void *buf) = 0;
+
+public:
+    /**
+     * value to return when a timed operation returned with a
+     * timeout.
+     */
+    static const size_t timeout;
+
+    /**
+     * Create a buffer object of known capacity.
+     * @param capacity is the integer capacity of the buffer.
+     */
+    Buffer(size_t capacity);
+    /**
+     * In derived functions, may be used to free the actual memory
+     * used to hold buffered data.
+     */
+    virtual ~Buffer();
+
+    /**
+     * Return the capacity of the buffer as specified at creation.
+     * @return size of buffer.
+     */
+    inline size_t getSize(void)
+        {return _size;};
+
+    /**
+     * Return the current capacity in use for the buffer.  Free space
+     * is technically getSize() - getUsed().
+     * @return integer used capacity of the buffer.
+     * @see #getSize
+     */
+    inline size_t getUsed(void)
+        {return _used;};
+
+    /**
+     * Let one or more threads wait for an object to become available
+     * in the buffer.  The waiting thread(s) will wait forever if no
+     * object is ever placed into the buffer.
+     *
+     * @return size of object passed by buffer in bytes.
+     * @param buf pointer to store object retrieved from the buffer.
+     * @param timeout time to wait.
+     */
+    size_t wait(void *buf, timeout_t timeout = 0);
+
+    /**
+     * Post an object into the buffer and enable a waiting thread to
+     * receive it.
+     *
+     * @return size of object posted in bytes.
+     * @param buf pointer to object to store in the buffer.
+     * @param timeout time to wait.
+     */
+    size_t post(void *buf, timeout_t timeout = 0);
+
+    /**
+     * Peek at the current content (first object) in the buffer.
+     *
+     * @return size of object in the buffer.
+     * @param buf pointer to store object found in the buffer.
+     */
+    size_t peek(void *buf);
+
+    /**
+     * New virtual to test if buffer is a valid object.
+     * @return true if object is valid.
+     */
+    virtual bool isValid(void);
+};
+
+/**
+ * A buffer class that holds a known capacity of fixed sized objects defined
+ * during creation.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short producer/consumer buffer for fixed size objects.
+ */
+class __EXPORT FixedBuffer : public Buffer
+{
+private:
+    char *buf, *head, *tail;
+    size_t objsize;
+
+protected:
+    /**
+     * Return the first object in the buffer.
+     * @return predefined size of this buffers objects.
+     * @param buf pointer to copy contents of head of buffer to.
+     */
+    size_t onPeek(void *buf);
+
+    /**
+     * Wait for and return a fixed object in the buffer.
+     * @return predefined size of this buffers objects.
+     * @param buf pointer to hold object returned from the buffer.
+     */
+    size_t onWait(void *buf);
+
+    /**
+     * Post an object of the appropriate size into the buffer.
+     * @return predefined size of this buffers objects.
+     * @param buf pointer to data to copy into the buffer.
+     */
+    size_t onPost(void *buf);
+
+public:
+    /**
+     * Create a buffer of known capacity for objects of a specified
+     * size.
+     *
+     * @param capacity of the buffer.
+     * @param objsize for each object held in the buffer.
+     */
+    FixedBuffer(size_t capacity, size_t objsize);
+
+    /**
+     * Create a copy of an existing fixed size buffer and duplicate
+     * it's contents.
+     *
+     * @param fb existing FixedBuffer object.
+     */
+    FixedBuffer(const FixedBuffer &fb);
+
+    /**
+     * Destroy the fixed buffer and free the memory used to store objects.
+     */
+    virtual ~FixedBuffer();
+
+    FixedBuffer &operator=(const FixedBuffer &fb);
+
+    bool isValid(void);
+};
+
+/**
+ * Somewhat generic queue processing class to establish a producer
+ * consumer queue.  This may be used to buffer cdr records, or for
+ * other purposes where an in-memory queue is needed for rapid
+ * posting.  This class is derived from Mutex and maintains a linked
+ * list.  A thread is used to dequeue data and pass it to a callback
+ * method that is used in place of "run" for each item present on the
+ * queue.  The conditional is used to signal the run thread when new
+ * data is posted.
+ *
+ * This class was changed by Angelo Naselli to have a timeout on the queue
+ *
+ * @short in memory data queue interface.
+ * @author David Sugar <dyfet@ostel.com>
+ */
+class __EXPORT ThreadQueue : public Mutex, public Thread, public Semaphore
+{
+private:
+    void run(void);         // private run method
+
+protected:
+    typedef struct _data {
+        struct _data *next;
+        unsigned len;
+        char data[1];
+    }   data_t;
+
+    timeout_t timeout;
+    bool started;
+
+    data_t *first, *last;       // head/tail of list
+
+    String name;
+
+    /*
+     * Overloading of final(). It demarks Semaphore to avoid deadlock.
+     */
+    virtual void final();
+
+    /**
+     * Start of dequeing.  Maybe we need to connect a database
+     * or something, so we have a virtual...
+     */
+    virtual void startQueue(void);
+
+    /**
+     * End of dequeing, we expect the queue is empty for now.  Maybe
+     * we need to disconnect a database or something, so we have
+     * another virtual.
+     */
+    virtual void stopQueue(void);
+
+    /**
+     * A derivable method to call when the timout is expired.
+    */
+    virtual void onTimer(void);
+
+    /**
+     * Virtual callback method to handle processing of a queued
+     * data items.  After the item is processed, it is deleted from
+     * memory.  We can call multiple instances of runQueue in order
+     * if multiple items are waiting.
+     *
+     * @param data item being dequed.
+     */
+    virtual void runQueue(void *data) = 0;
+
+public:
+    /**
+     * Create instance of our queue and give it a process priority.
+     *
+     * @param id queue ID.
+     * @param pri process priority.
+     * @param stack stack size.
+     */
+    ThreadQueue(const char *id, int pri, size_t stack = 0);
+
+    /**
+     * Destroy the queue.
+     */
+    virtual ~ThreadQueue();
+
+    /**
+     * Set the queue timeout.
+     * When the timer expires, the onTimer() method is called
+     * for the thread
+     *
+     * @param timeout timeout in milliseconds.
+     */
+    void setTimer(timeout_t timeout);
+
+    /**
+     * Put some unspecified data into this queue.  A new qd
+     * structure is created and sized to contain a copy of
+     * the actual content.
+     *
+     * @param data pointer to data.
+     * @param len size of data.
+     */
+    void post(const void *data, unsigned len);
+};
+
+
+/** @relates Buffer */
+inline size_t get(Buffer &b, void *o, timeout_t t = 0)
+    {return b.wait(o, t);}
+
+/** @relates Buffer */
+inline size_t put(Buffer &b, void *o, timeout_t t = 0)
+    {return b.post(o, t);}
+
+/** @relates Buffer */
+inline size_t peek(Buffer &b, void *o)
+    {return b.peek(o);}
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/commoncpp/tokenizer.h b/jni/libucommon/sources/inc/commoncpp/tokenizer.h
new file mode 100644
index 0000000..0f076f8
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/tokenizer.h
@@ -0,0 +1,317 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+/**
+ * @file tokenizer.h
+ * @short string tokenizer.
+ **/
+
+#ifndef COMMONCPP_TOKENIZER_H_
+#define COMMONCPP_TOKENIZER_H_
+
+#ifndef COMMONCPP_CONFIG_H_
+#include <commoncpp/config.h>
+#endif
+
+#ifndef COMMONCPP_THREAD_H_
+#include <commoncpp/thread.h>
+#endif
+
+#ifndef COMMMONCPP_EXCEPTION_H_
+#include <commoncpp/exception.h>
+#endif
+
+NAMESPACE_COMMONCPP
+
+/**
+ * Splits delimited string into tokens.
+ *
+ * The StringTokenizer takes a pointer to a string and a pointer
+ * to a string containing a number of possible delimiters.
+ * The StringTokenizer provides an input forward iterator which allows
+ * to iterate through all tokens. An iterator behaves like a logical
+ * pointer to the tokens, i.e. to shift to the next token, you've
+ * to increment the iterator, you get the token by dereferencing the
+ * iterator.
+ *
+ * Memory consumption:
+ * This class operates on the original string and only allocates memory
+ * for the individual tokens actually requested, so this class
+ * allocates at maximum the space required for the longest token in the
+ * given string.
+ * Since for each iteration, memory is reclaimed for the last token,
+ * you MAY NOT store pointers to them; if you need them afterwards,
+ * copy them. You may not modify the original string while you operate
+ * on it with the StringTokenizer; the behaviour is undefined in that
+ * case.
+ *
+ * The iterator has one special method 'nextDelimiter()' which returns
+ * a character containing the next delimiter following this
+ * tokenization process or '\\0', if there are no following delimiters. In
+ * case of skipAllDelim, it returns the FIRST delimiter.
+ *
+ * With the method 'setDelimiters(const char*)' you may change the
+ * set of delimiters. It affects all running iterators.
+ *
+ * Example:
+ * <code><pre>
+ *  StringTokenizer st("mary had a little lamb;its fleece was..", " ;");
+ *  StringTokenizer::iterator i;
+ *  for (i = st.begin() ; i != st.end() ; ++i) {
+ *        cout << "Token: '" << *i << "'\t";
+ *        cout << " next Delim: '" << i.nextDelimiter() << "'" << endl;
+ *  }
+ *  </pre></code>
+ *
+ * @author Henner Zeller <H.Zeller@acm.org>
+ * @license LGPL
+ */
+class __EXPORT StringTokenizer {
+public:
+    /**
+     * a delimiter string containing all usual whitespace delimiters.
+     * These are space, tab, newline, carriage return,
+     * formfeed and vertical tab. (see isspace() manpage).
+     */
+    static const char * const SPACE;
+
+    /**
+     * Exception thrown, if someone tried to read beyond the
+     * end of the tokens.
+     * Will not happen if you use it the 'clean' way with comparison
+     * against end(), but if you skip some tokens, because you 'know'
+     * they are there. Simplifies error handling a lot, since you can
+     * just read your tokens the way you expect it, and if there is some
+     * error in the input this Exception will be thrown.
+     */
+    // maybe move more global ?
+    class NoSuchElementException { };
+
+    /**
+     * The input forward iterator for tokens.
+     * @author Henner Zeller
+     */
+    class __EXPORT iterator {
+        friend class StringTokenizer;  // access our private constructors
+    private:
+        const StringTokenizer *myTok; // my StringTokenizer
+        const char *start;      // start of current token
+        const char *tokEnd;     // end of current token (->nxDelimiter)
+        const char *endp;       // one before next token
+        char *token;            // allocated token, if requested
+
+        // for initialization of the itEnd iterator
+        iterator(const StringTokenizer &tok, const char *end)
+            : myTok(&tok),tokEnd(0),endp(end),token(0) {}
+
+        iterator(const StringTokenizer &tok)
+            : myTok(&tok),tokEnd(0),endp(myTok->str-1),token(0) {
+            ++(*this); // init first token.
+        }
+
+    public:
+        iterator() : myTok(0),start(0),tokEnd(0),endp(0),token(0) {}
+
+        // see also: comment in implementation of operator++
+        virtual ~iterator()
+            { if (token) *token='\0'; delete [] token; }
+
+        /**
+         * copy constructor.
+         */
+        // everything, but not responsible for the allocated token.
+        iterator(const iterator& i) :
+            myTok(i.myTok),start(i.start),tokEnd(i.tokEnd),
+            endp(i.endp),token(0) {}
+
+        /**
+         * assignment operator.
+         */
+        // everything, but not responsible for the allocated token.
+        iterator &operator = (const iterator &i)
+        {
+            myTok = i.myTok;
+            start = i.start; endp = i.endp; tokEnd = i.tokEnd;
+            if ( token )
+                delete [] token;
+            token = 0;
+            return *this;
+        }
+
+        /**
+         * shifts this iterator to the next token in the string.
+         */
+        iterator &operator ++ () THROWS (NoSuchElementException);
+
+        /**
+         * returns the immutable string this iterator
+         * points to or '0' if no token is available (i.e.
+         * i == end()).
+         * Do not store pointers to this token, since it is
+         * invalidated for each iteration. If you need the token,
+         * copy it (e.g. with strdup());
+         */
+        const char*  operator *  () THROWS (NoSuchElementException);
+
+        /**
+         * returns the next delimiter after the current token or
+         * '\\0', if there are no following delimiters.
+         * It returns the very next delimiter (even if
+         * skipAllDelim=true).
+         */
+        inline char nextDelimiter() const
+            {return (tokEnd) ? *tokEnd : '\0';}
+
+        /**
+         * compares to other iterator. Usually used to
+         * compare against the end() iterator.
+         */
+        // only compare the end-position. speed.
+        inline bool operator == (const iterator &other) const
+            {return (endp == other.endp);}
+
+        /**
+         * compares to other iterator. Usually used to
+         * compare against the end() iterator.
+         */
+        // only compare the end position. speed.
+        inline bool operator != (const iterator &other) const
+            {return (endp != other.endp);}
+    };
+private:
+    friend class StringTokenizer::iterator;
+    const char *str;
+    const char *delim;
+    bool skipAll, trim;
+    iterator itEnd;
+
+public:
+    /**
+     * creates a new StringTokenizer for a string
+     * and a given set of delimiters.
+     *
+     * @param  str          String to be split up. This string will
+     *                      not be modified by this StringTokenizer,
+     *                      but you may as well not modfiy this string
+     *                      while tokenizing is in process, which may
+     *                      lead to undefined behaviour.
+     *
+     * @param  delim        String containing the characters
+     *                      which should be regarded as delimiters.
+     *
+     * @param  skipAllDelim OPTIONAL.
+     *                      true, if subsequent
+     *                      delimiters should be skipped at once
+     *                      or false, if empty tokens should
+     *                      be returned for two delimiters with
+     *                      no other text inbetween. The first
+     *                      behaviour may be desirable for whitespace
+     *                      skipping, the second for input with
+     *                      delimited entry e.g. /etc/passwd like files
+     *                      or CSV input.
+     *                      NOTE, that 'true' here resembles the
+     *                      ANSI-C strtok(char *s,char *d) behaviour.
+     *                      DEFAULT = false
+     *
+     * @param trim          OPTIONAL.
+     *                      true, if the tokens returned
+     *                      should be trimmed, so that they don't have
+     *                      any whitespaces at the beginning or end.
+     *                      Whitespaces are any of the characters
+     *                      defined in StringTokenizer::SPACE.
+     *                      If delim itself is StringTokenizer::SPACE,
+     *                      this will result in a behaviour with
+     *                      skipAllDelim = true.
+     *                      DEFAULT = false
+     */
+    StringTokenizer (const char *str,
+             const char *delim,
+             bool skipAllDelim = false,
+             bool trim = false);
+
+    /**
+     * create a new StringTokenizer which splits the input
+     * string at whitespaces. The tokens are stripped from
+     * whitespaces. This means, if you change the set of
+     * delimiters in either the 'begin(const char *delim)' method
+     * or in 'setDelimiters()', you then get whitespace
+     * trimmed tokens, delimited by the new set.
+     * Behaves like StringTokenizer(s, StringTokenizer::SPACE,false,true);
+     */
+    StringTokenizer (const char *s);
+
+    /**
+     * returns the begin iterator
+     */
+    iterator begin() const
+        {return iterator(*this);}
+
+    /**
+     * changes the set of delimiters used in subsequent
+     * iterations.
+     */
+    void setDelimiters (const char *d)
+        {delim = d;}
+
+    /**
+     * returns a begin iterator with an alternate set of
+     * delimiters.
+     */
+    iterator begin(const char *d)
+    {
+        delim = d;
+        return iterator(*this);
+    }
+
+    /**
+     * the iterator marking the end.
+     */
+    const iterator& end() const
+        {return itEnd;}
+};
+
+END_NAMESPACE
+
+#endif
+
+/** EMACS **
+ * Local variables:
+ * mode: c++
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/jni/libucommon/sources/inc/commoncpp/udp.h b/jni/libucommon/sources/inc/commoncpp/udp.h
new file mode 100644
index 0000000..c0b287d
--- /dev/null
+++ b/jni/libucommon/sources/inc/commoncpp/udp.h
@@ -0,0 +1,585 @@
+// Copyright (C) 1999-2005 Open Source Telecom Corporation.
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+//
+// This exception applies only to the code released under the name GNU
+// Common C++.  If you copy code from other releases into a copy of GNU
+// Common C++, as the General Public License permits, the exception does
+// not apply to the code that you add in this way.  To avoid misleading
+// anyone as to the status of such modified files, you must delete
+// this exception notice from them.
+//
+// If you write modifications of your own for GNU Common C++, it is your choice
+// whether to permit this exception to apply to your modifications.
+// If you do not wish that, delete this exception notice.
+//
+
+/**
+ * @file commoncpp/udp.h
+ * @short udp derived socket classes.
+ **/
+
+#ifndef COMMONCPP_UDP_H_
+#define COMMONCPP_UDP_H_
+
+#include <cstdio>
+
+#ifndef COMMONCPP_CONFIG_H_
+#include <commoncpp/config.h>
+#endif
+
+#ifndef COMMONCPP_STRING_H_
+#include <commoncpp/string.h>
+#endif
+
+#ifndef COMMONCPP_ADDRESS_H_
+#include <commoncpp/address.h>
+#endif
+
+#ifndef COMMONCPP_SOCKET_H_
+#include <commoncpp/socket.h>
+#endif
+
+NAMESPACE_COMMONCPP
+
+/**
+ * UDP sockets implement the TCP SOCK_DGRAM UDP protocol.  They can be
+ * used to pass unverified messages between hosts, or to broadcast a
+ * specific message to an entire subnet.  Please note that Streaming of
+ * realtime data commonly use UDPDuplex related classes rather than
+ * UDPSocket.
+ *
+ * In addition to connected TCP sessions, Common C++ supports UDP sockets and
+ * these also cover a range of functionality.  Like a TCPSocket, A UDPSocket
+ * can be created bound to a specific network interface and/or port address,
+ * though this is not required.  UDP sockets also are usually either
+ * connected or otherwise "associated" with a specific "peer" UDP socket.
+ * Since UDP sockets operate through discreet packets, there are no streaming
+ * operators used with UDP sockets.
+ *
+ * In addition to the UDP "socket" class, there is a "UDPBroadcast" class.
+ * The UDPBroadcast is a socket that is set to send messages to a subnet as a
+ * whole rather than to an individual peer socket that it may be associated
+ * with.
+ *
+ * UDP sockets are often used for building "realtime" media  streaming
+ * protocols and full duplex messaging services.  When used in this manner,
+ * typically a pair of UDP sockets are used together; one socket is used to
+ * send and the other to receive data with an associated pair of UDP sockets
+ * on a "peer" host.  This concept is represented through the Common C++
+ * UDPDuplex object, which is a pair of sockets that communicate with another
+ * UDPDuplex pair.
+ *
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Unreliable Datagram Protocol sockets.
+ */
+class __EXPORT UDPSocket : public Socket
+{
+private:
+    inline Error setKeepAlive(bool enable)
+        {return Socket::setKeepAlive(enable);};
+
+protected:
+#ifdef  CCXX_IPV6
+    union {
+        struct sockaddr_in6 ipv6;
+        struct sockaddr_in ipv4;
+    }   peer;
+#else
+    union {
+        struct sockaddr_in ipv4;
+    }   peer;
+#endif
+
+    Family family;
+
+public:
+    /**
+     * Create an unbound UDP socket, mostly for internal use.
+     */
+    UDPSocket(Family family = IPV4);
+
+    /**
+     * Create a UDP socket bound by a service name.
+     */
+    UDPSocket(const char *name, Family family = IPV4);
+
+    /**
+     * Create a UDP socket and bind it to a specific interface
+     * and port address so that other UDP sockets on remote
+     * machines (or the same host) may find and send UDP messages
+     * to it.  On failure to bind, an exception is thrown.
+     *
+     * @param bind address to bind this socket to.
+     * @param port number to bind this socket to.
+     */
+    UDPSocket(const IPV4Address &bind, tpport_t port);
+#ifdef  CCXX_IPV6
+    UDPSocket(const IPV6Address &bind, tpport_t port);
+#endif
+
+    /**
+     * Destroy a UDP socket as a socket.
+     */
+    virtual ~UDPSocket();
+
+    /**
+     * Set the loopback.
+     */
+    inline Error setLoopback(bool enable)
+        {return Socket::setLoopbackByFamily(enable, family);}
+
+    /**
+     * Set the multicast.
+     */
+    inline Error setMulticast(bool enable)
+        {return Socket::setMulticastByFamily(enable, family);}
+
+    /**
+     * Set time to live.
+     */
+    inline Error setTimeToLive(char ttl)
+        {return Socket::setTimeToLiveByFamily(ttl, family);}
+
+    /**
+     * set the peer address to send message packets to.  This can be
+     * set before every send() call if nessisary.
+     *
+     * @param host address to send packets to.
+     * @param port number to deliver packets to.
+     */
+    void setPeer(const IPV4Host &host, tpport_t port);
+    void connect(const IPV4Host &host, tpport_t port);
+#ifdef  CCXX_IPV6
+    void setPeer(const IPV6Host &host, tpport_t port);
+    void connect(const IPV6Host &host, tpport_t port);
+#endif
+
+    /**
+     * get the interface index for a named network device
+     *
+     * @param ethX is device name, like "eth0" or "eth1"
+     * @param InterfaceIndex is the index value returned by os
+     * @todo Win32 and ipv6 specific implementation.
+     */
+    Socket::Error getInterfaceIndex(const char *ethX,int& InterfaceIndex);
+
+    /**
+     * join a multicast group on a particular interface
+     *
+     * @param ia is the multicast address to use
+     * @param InterfaceIndex is the index value returned by
+     * getInterfaceIndex
+     * @todo Win32 and ipv6 specific implementation.
+     */
+    Socket::Error join(const IPV4Multicast &ia,int InterfaceIndex);
+
+    /**
+     * Send a message packet to a peer host.
+     *
+     * @param buf pointer to packet buffer to send.
+     * @param len of packet buffer to send.
+     * @return number of bytes sent.
+     */
+    ssize_t send(const void *buf, size_t len);
+
+    /**
+     * Receive a message from any host.
+     *
+     * @param buf pointer to packet buffer to receive.
+     * @param len of packet buffer to receive.
+     * @param reply save sender address for reply if true.
+     * @return number of bytes received.
+     */
+    ssize_t receive(void *buf, size_t len, bool reply = false);
+
+    /**
+     * Examine address of sender of next waiting packet.  This also
+     * sets "peer" address to the sender so that the next "send"
+     * message acts as a "reply".  This additional behavior overides
+     * the standard socket getSender behavior.
+     *
+     * @param port pointer to hold port number.
+     */
+    IPV4Host getIPV4Peer(tpport_t *port = NULL) const;
+    inline IPV4Host getPeer(tpport_t *port = NULL) const
+        {return getIPV4Peer(port);}
+
+#ifdef  CCXX_IPV6
+    IPV6Host getIPV6Peer(tpport_t *port = NULL) const;
+#endif
+
+    /**
+     * Examine contents of next waiting packet.
+     *
+     * @param buf pointer to packet buffer for contents.
+     * @param len of packet buffer.
+     * @return number of bytes examined.
+     */
+    inline ssize_t peek(void *buf, size_t len)
+        {return ::recv(so, (char *)buf, len, MSG_PEEK);};
+
+    /**
+     * Associate socket with a named connection
+     */
+    void setPeer(const char *service);
+    void connect(const char *service);
+
+    /**
+     * Disassociate this socket from any host connection.  No data
+     * should be read or written until a connection is established.
+     */
+    Error disconnect(void);
+};
+
+/**
+ * Representing a UDP socket used for subnet broadcasts, this class
+ * provides an alternate binding and setPeer() capability for UDP
+ * sockets.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Unreliable Datagram for subnet broadcasts.
+ */
+class __EXPORT UDPBroadcast : public UDPSocket
+{
+private:
+    void setPeer(const IPV4Host &ia, tpport_t port);
+
+    Error setBroadcast(bool enable)
+        {return Socket::setBroadcast(enable);};
+
+public:
+    /**
+     * Create and bind a subnet broadcast socket.
+     *
+     * @param ia address to bind socket under locally.
+     * @param port to bind socket under locally.
+     */
+    UDPBroadcast(const IPV4Address &ia, tpport_t port);
+
+    /**
+     * Set peer by subnet rather than specific host.
+     *
+     * @param subnet of peer hosts to send to.
+     * @param port number to use.
+     */
+    void setPeer(const IPV4Broadcast &subnet, tpport_t port);
+};
+
+/**
+ * Representing half of a two-way UDP connection, the UDP transmitter
+ * can broadcast data to another selected peer host or to an entire
+ * subnet.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Unreliable Datagram Peer Associations.
+ */
+class __EXPORT UDPTransmit : protected UDPSocket
+{
+private:
+    /**
+     * Common code for diferent flavours of Connect (host, broadcast,
+     * multicast).
+     *
+     * @param ia network address to associate with
+     * @param port port number to associate with
+     */
+    Error cConnect(const IPV4Address &ia, tpport_t port);
+
+protected:
+    /**
+     * Create a UDP transmitter.
+     */
+    UDPTransmit(Family family = IPV4);
+
+    /**
+     * Create a UDP transmitter, bind it to a specific interface
+     * and port address so that other UDP sockets on remote
+     * machines (or the same host) may find and send UDP messages
+     * to it, and associate it with a given port on a peer host.
+     * On failure to bind, an exception is thrown.  This class is
+     * only used to build the UDP Duplex.
+     *
+     * @param bind address to bind this socket to.
+     * @param port number to bind this socket to.
+     */
+    UDPTransmit(const IPV4Address &bind, tpport_t port = 5005);
+#ifdef  CCXX_IPV6
+    UDPTransmit(const IPV6Address &bind, tpport_t port = 5005);
+#endif
+
+    /**
+     * Associate this socket with a specified peer host.  The port
+     * number from the constructor will be used.  All UDP packets
+     * will be sent to and received from the specified host.
+     *
+     * @return 0 on success, -1 on error.
+     * @param host address to connect socket to.
+     * @param port to connect socket to.
+     */
+    Error connect(const IPV4Host &host, tpport_t port);
+#ifdef  CCXX_IPV6
+    Error connect(const IPV6Address &host, tpport_t port);
+#endif
+
+    /**
+     * Associate this socket with a subnet of peer hosts for
+     * subnet broadcasting.  The server must be able to assert
+     * broadcast permission for the socket.
+     *
+     * @return 0 on success, -1 on error.
+     * @param subnet subnet address to broadcast into.
+     * @param port transport port to broadcast into.
+     */
+    Error connect(const IPV4Broadcast &subnet, tpport_t port);
+
+    /**
+     * Associate this socket with a multicast group.
+     *
+     * @return 0 on success, -1 on error.
+     * @param mgroup address of the multicast group to send to.
+     * @param port port number
+     */
+    Error connect(const IPV4Multicast &mgroup, tpport_t port);
+#ifdef  CCXX_IPV6
+    Error connect(const IPV6Multicast &mgroup, tpport_t port);
+#endif
+
+    /**
+     * Transmit "send" to use "connected" send rather than sendto.
+     *
+     * @return number of bytes sent.
+     * @param buf address of buffer to send.
+     * @param len of bytes to send.
+     */
+    inline ssize_t send(const void *buf, size_t len)
+        {return ::send(so, (const char *)buf, len, MSG_NOSIGNAL);}
+
+    /**
+     * Stop transmitter.
+     */
+    inline void endTransmitter(void)
+        {Socket::endSocket();}
+
+    /*
+     * Get transmitter socket.
+     *
+     * @return transmitter.
+     */
+    inline SOCKET getTransmitter(void)
+        {return so;};
+
+    inline Error setMulticast(bool enable)
+        {return Socket::setMulticastByFamily(enable, family);}
+
+    inline Error setTimeToLive(unsigned char ttl)
+        {return Socket::setTimeToLiveByFamily(ttl, family);};
+
+public:
+    /**
+     * Transmit "send" to use "connected" send rather than sendto.
+     *
+     * @note Windows does not support MSG_DONTWAIT, so it is defined
+     *   as 0 on that platform.
+     * @return number of bytes sent.
+     * @param buffer address of buffer to send.
+     * @param len of bytes to send.
+     */
+    inline ssize_t transmit(const char *buffer, size_t len)
+        {return ::send(so, buffer, len, MSG_DONTWAIT|MSG_NOSIGNAL);}
+
+    /**
+     * See if output queue is empty for sending more packets.
+     *
+     * @return true if output available.
+     * @param timeout in milliseconds to wait.
+     */
+    inline bool isOutputReady(unsigned long timeout = 0l)
+        {return Socket::isPending(Socket::pendingOutput, timeout);};
+
+
+    inline Error setRouting(bool enable)
+        {return Socket::setRouting(enable);};
+
+    inline Error setTypeOfService(Tos tos)
+        {return Socket::setTypeOfService(tos);};
+
+    inline Error setBroadcast(bool enable)
+        {return Socket::setBroadcast(enable);};
+};
+
+/**
+ * Representing half of a two-way UDP connection, the UDP receiver
+ * can receive data from another peer host or subnet.  This class is
+ * used exclusivily to derive the UDPDuplex.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Unreliable Datagram Peer Associations.
+ */
+class __EXPORT UDPReceive : protected UDPSocket
+{
+protected:
+    /**
+     * Create a UDP receiver, bind it to a specific interface
+     * and port address so that other UDP sockets on remote
+     * machines (or the same host) may find and send UDP messages
+     * to it, and associate it with a given port on a peer host.
+     * On failure to bind, an exception is thrown.
+     *
+     * @param bind address to bind this socket to.
+     * @param port number to bind this socket to.
+     */
+    UDPReceive(const IPV4Address &bind, tpport_t port);
+#ifdef  CCXX_IPV6
+    UDPReceive(const IPV6Address &bind, tpport_t port);
+#endif
+
+    /**
+     * Associate this socket with a specified peer host.  The port
+     * number from the constructor will be used.  All UDP packets
+     * will be sent received from the specified host.
+     *
+     * @return 0 on success, -1 on error.
+     * @param host host network address to connect socket to.
+     * @param port host transport port to connect socket to.
+     */
+    Error connect(const IPV4Host &host, tpport_t port);
+#ifdef  CCXX_IPV6
+    Error connect(const IPV6Host &host, tpport_t port);
+#endif
+
+    /**
+     * Check for pending data.
+     *
+     * @return true if data is waiting.
+     * @param timeout in milliseconds.
+     */
+    bool isPendingReceive(timeout_t timeout)
+        {return Socket::isPending(Socket::pendingInput, timeout);};
+
+    /**
+     * End receiver.
+     */
+    inline void endReceiver(void)
+        {Socket::endSocket();}
+
+    inline SOCKET getReceiver(void) const
+        {return so;};
+
+    inline Error setRouting(bool enable)
+        {return Socket::setRouting(enable);}
+
+    inline Error setMulticast(bool enable)
+        {return Socket::setMulticastByFamily(enable, family);}
+
+    inline Error join(const IPV4Multicast &ia)
+            {return Socket::join(ia);}
+
+#ifdef  CCXX_IPV6
+    inline Error join(const IPV6Multicast &ia)
+        {return Socket::join(ia);}
+#endif
+
+    inline Error drop(const IPV4Multicast &ia)
+            {return Socket::drop(ia);}
+
+#ifdef  CCXX_IPV6
+    inline Error drop(const IPV6Multicast &ia)
+        {return Socket::drop(ia);}
+#endif
+
+public:
+    /**
+     * Receive a data packet from the connected peer host.
+     *
+     * @return num of bytes actually received.
+     * @param buf address of data receive buffer.
+     * @param len size of data receive buffer.
+     */
+    inline ssize_t receive(void *buf, size_t len)
+        {return ::recv(so, (char *)buf, len, 0);};
+
+    /**
+     * See if input queue has data packets available.
+     *
+     * @return true if data packets available.
+     * @param timeout in milliseconds.
+     */
+    inline bool isInputReady(timeout_t timeout = TIMEOUT_INF)
+        {return Socket::isPending(Socket::pendingInput, timeout);};
+};
+
+/**
+ * UDP duplex connections impliment a bi-directional point-to-point UDP
+ * session between two peer hosts.  Two UDP sockets are typically used
+ * on alternating port addresses to assure that sender and receiver
+ * data does not collide or echo back.  A UDP Duplex is commonly used
+ * for full duplex real-time streaming of UDP data between hosts.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short Unreliable Datagram Peer Associations.
+ */
+class __EXPORT UDPDuplex : public UDPTransmit, public UDPReceive
+{
+public:
+    /**
+     * Create a UDP duplex as a pair of UDP simplex objects
+     * bound to alternating and interconnected port addresses.
+     *
+     * @param bind address to bind this socket to.
+     * @param port number to bind sender.
+     */
+    UDPDuplex(const IPV4Address &bind, tpport_t port);
+#ifdef  CCXX_IPV6
+    UDPDuplex(const IPV6Address &bind, tpport_t port);
+#endif
+
+    /**
+     * Associate the duplex with a specified peer host. Both
+     * the sender and receiver will be interconnected with
+     * the remote host.
+     *
+     * @return 0 on success, error code on error.
+     * @param host address to connect socket to.
+     * @param port number to connect socket to.
+     */
+    Error connect(const IPV4Host &host, tpport_t port);
+#ifdef  CCXX_IPV6
+    Error connect(const IPV6Host &host, tpport_t port);
+#endif
+
+    /**
+     * Disassociate this duplex from any host connection.  No data
+     * should be read or written until a connection is established.
+     *
+     * @return 0 on success, error code on error.
+     */
+    Error disconnect(void);
+};
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon.cmake b/jni/libucommon/sources/inc/ucommon.cmake
new file mode 100644
index 0000000..eafe8c5
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon.cmake
@@ -0,0 +1,76 @@
+# Copyright (C) 2009 David Sugar, Tycho Softworks
+#
+# This file is free software; as a special exception the author 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.
+
+if (NOT UCOMMON_LIBS AND NOT UCOMMON_FLAGS)
+    include(CheckCCompilerFlag)
+
+    if(CMAKE_COMPILER_IS_GNUCXX)
+        set(UCOMMON_VISIBILITY_FLAG "-fvisibility=hidden")
+        if(MINGW OR MSYS OR CMAKE_SYSTEM MATCHES "Windows")
+            set(CHECK_FLAGS -Wno-long-long -mthreads -fvisibility-inlines-hidden)
+        else()
+            if(CMAKE_SYSTEM MATCHES "SunOS.*")
+                set(CHECK_FLAGS -Wno-long-long -mt -fvisibility-inlines-hidden)
+            else()
+                set(CHECK_FLAGS -Wno-long-long -pthread -mt -fvisibility-inlines-hidden)
+            endif()
+        endif()
+    endif()
+
+    if(BUILD_RUNTIME AND WIN32)
+        set(UCOMMON_FLAGS ${UCOMMON_FLAGS} -DUCOMMON_RUNTIME)
+    else()
+        if(BUILD_STATIC)
+            set(UCOMMON_FLAGS ${UCOMMON_FLAGS} -DUCOMMON_STATIC)
+        endif()
+    endif()
+
+    # see if we are building with or without std c++ libraries...
+    if (BUILD_STDLIB)
+        # for now we assume only newer libstdc++ library
+        set(UCOMMON_FLAGS ${UCOMMON_FLAGS} -DNEW_STDCPP)
+        MESSAGE( STATUS "Configuring full ANSI C++ runtime")
+    elseif (BUILD_OLDLIB)
+        # for really old libstdc++ libraries...
+        set(UCOMMON_FLAGS ${UCOMMON_FLAGS} -DOLD_STDCPP)
+        MESSAGE( STATUS "Configuring compatible C++ runtime")
+    else()
+        MESSAGE( STATUS "Configuring minimal C++ runtime")
+        if(CMAKE_COMPILER_IS_GNUCXX)
+            set(CHECK_FLAGS ${CHECK_FLAGS} -fno-exceptions -fno-rtti -fno-enforce-eh-specs)
+            if(MINGW OR MSYS OR CMAKE_SYSTEM MATCHES "Windows")
+                set(UCOMMON_LINKING -nodefaultlibs -nostdinc++)
+            else()
+                set(UCOMMON_LINKING -nodefaultlibs -nostdinc++)
+            endif()
+        endif()
+    endif()
+
+    # check final for compiler flags
+    foreach(flag ${CHECK_FLAGS})
+        check_c_compiler_flag(${flag} CHECK_${flag})
+        if(CHECK_${flag})
+            set(UCOMMON_FLAGS ${UCOMMON_FLAGS} ${flag})
+        endif()
+    endforeach()
+
+    # visibility support for linking reduction (gcc >4.1 only so far...)
+
+    if(UCOMMON_VISIBILITY_FLAG)
+        check_c_compiler_flag(${UCOMMON_VISIBILITY_FLAG} CHECK_VISIBILITY)
+    endif()
+
+    if(CHECK_VISIBILITY)
+        set(UCOMMON_FLAGS ${UCOMMON_FLAGS} ${UCOMMON_VISIBILITY_FLAG} -DUCOMMON_VISIBILITY=1)
+    else()
+        set(UCOMMON_FLAGS ${UCOMMON_FLAGS} -DUCOMMON_VISIBILITY=0)
+    endif()
+
+endif()
diff --git a/jni/libucommon/sources/inc/ucommon/Makefile b/jni/libucommon/sources/inc/ucommon/Makefile
new file mode 100644
index 0000000..17acac2
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/Makefile
@@ -0,0 +1,599 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# inc/ucommon/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2013 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.
+
+
+
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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)/ucommon
+pkglibdir = $(libdir)/ucommon
+pkglibexecdir = $(libexecdir)/ucommon
+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 = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+target_triplet = x86_64-unknown-linux-gnu
+subdir = inc/ucommon
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(pkginclude_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+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
+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)$(pkgincludedir)"
+HEADERS = $(pkginclude_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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkgincludedir = $(includedir)/ucommon
+ACLOCAL = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing aclocal-1.13
+AMTAR = $${TAR-tar}
+AM_DEFAULT_VERBOSITY = 1
+AR = ar
+AS = as
+AUTOCONF = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoconf
+AUTOHEADER = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoheader
+AUTOMAKE = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing automake-1.13
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CHECKFLAGS = 
+COMPAT = commoncpp
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS =  -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DLLTOOL = dlltool
+DOXYGEN = /usr/bin/doxygen
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /usr/bin/grep -E
+EXEEXT = 
+FGREP = /usr/bin/grep -F
+GNUTLS_CFLAGS = 
+GNUTLS_LIBS = -lgnutls
+GREP = /usr/bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+LT_GENERIC = $(SHELL) $(top_builddir)/libtool
+LT_VERSION = 6:3:0
+MAKEINFO = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing makeinfo
+MANIFEST_TOOL = :
+MKDIR_P = /usr/bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_CFLAGS = 
+OPENSSL_LIBS = -lssl -lcrypto -lz 
+OTOOL = 
+OTOOL64 = 
+PACKAGE = ucommon
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = ucommon
+PACKAGE_STRING = ucommon 6.0.7
+PACKAGE_TARNAME = ucommon
+PACKAGE_URL = 
+PACKAGE_VERSION = 6.0.7
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PKG_CONFIG_LIBDIR = 
+PKG_CONFIG_PATH = 
+RANLIB = ranlib
+SECURE = gnutls
+SECURE_LIBS = -lgnutls
+SECURE_LOCAL = ../gnutls/libusecure.la -lgnutls
+SED = /usr/bin/sed
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = strip
+UCOMMON_CFGPATH = /etc
+UCOMMON_CLINK =  -lc
+UCOMMON_FLAGS =  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+UCOMMON_INCLUDES = /usr/local/include/ucommon
+UCOMMON_LIBC = -lc
+UCOMMON_LIBS =   -lrt  -ldl -lpthread -lc
+UCOMMON_LINKED =   -lrt  -ldl -lpthread
+UCOMMON_LOCALE = /usr/local/share/locale
+UCOMMON_MODEL = CXX
+UCOMMON_PREFIX = /usr/local
+UCOMMON_VARPATH = /var
+UCOMMON_VISIBILITY = 1
+VERSION = 6.0.7
+abs_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources/inc/ucommon
+abs_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources/inc/ucommon
+abs_top_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+abs_top_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+includes = ${includedir}/ucommon
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+libs = /usr/local/lib
+localedir = ${datarootdir}/locale
+localstatedir = /var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = /etc
+target = x86_64-unknown-linux-gnu
+target_alias = 
+target_cpu = x86_64
+target_os = linux-gnu
+target_vendor = unknown
+top_build_prefix = ../../
+top_builddir = ../..
+top_srcdir = ../..
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = $(LT_VERSION) -release $(LT_RELEASE)
+AM_CXXFLAGS = $(UCOMMON_FLAGS)
+pkginclude_HEADERS = cpr.h object.h linked.h string.h counter.h vector.h \
+	bitmap.h timers.h socket.h access.h export.h thread.h mapped.h \
+	keydata.h memory.h platform.h fsys.h xml.h ucommon.h stream.h \
+	persist.h shell.h protocols.h atomic.h buffer.h numbers.h file.h \
+	datetime.h unicode.h secure.h generics.h containers.h stl.h
+
+all: all-am
+
+.SUFFIXES:
+$(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) --gnu inc/ucommon/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu inc/ucommon/Makefile
+.PRECIOUS: 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):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-pkgincludeHEADERS: $(pkginclude_HEADERS)
+	@$(NORMAL_INSTALL)
+	@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || 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)$(pkgincludedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
+	done
+
+uninstall-pkgincludeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir)
+
+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`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(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
+
+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
+check-am: all-am
+check: check-am
+all-am: Makefile $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(pkgincludedir)"; 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:
+
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pkgincludeHEADERS
+
+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
+	-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-pkgincludeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libtool cscopelist-am ctags ctags-am distclean \
+	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-pkgincludeHEADERS install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am tags tags-am uninstall uninstall-am \
+	uninstall-pkgincludeHEADERS
+
+
+# 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/jni/libucommon/sources/inc/ucommon/Makefile.am b/jni/libucommon/sources/inc/ucommon/Makefile.am
new file mode 100644
index 0000000..ae40f6f
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/Makefile.am
@@ -0,0 +1,22 @@
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = $(LT_VERSION) -release $(LT_RELEASE)
+AM_CXXFLAGS = $(UCOMMON_FLAGS)
+
+pkgincludedir = $(includedir)/ucommon
+pkginclude_HEADERS = cpr.h object.h linked.h string.h counter.h vector.h \
+	bitmap.h timers.h socket.h access.h export.h thread.h mapped.h \
+	keydata.h memory.h platform.h fsys.h xml.h ucommon.h stream.h \
+	persist.h shell.h protocols.h atomic.h buffer.h numbers.h file.h \
+	datetime.h unicode.h secure.h generics.h containers.h stl.h
+
+
diff --git a/jni/libucommon/sources/inc/ucommon/Makefile.in b/jni/libucommon/sources/inc/ucommon/Makefile.in
new file mode 100644
index 0000000..22d7f36
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/Makefile.in
@@ -0,0 +1,599 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 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@
+
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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@
+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@
+target_triplet = @target@
+subdir = inc/ucommon
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(pkginclude_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-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__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 = 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)$(pkgincludedir)"
+HEADERS = $(pkginclude_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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+pkgincludedir = $(includedir)/ucommon
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECKFLAGS = @CHECKFLAGS@
+COMPAT = @COMPAT@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_GENERIC = @LT_GENERIC@
+LT_VERSION = @LT_VERSION@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+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@
+RANLIB = @RANLIB@
+SECURE = @SECURE@
+SECURE_LIBS = @SECURE_LIBS@
+SECURE_LOCAL = @SECURE_LOCAL@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UCOMMON_CFGPATH = @UCOMMON_CFGPATH@
+UCOMMON_CLINK = @UCOMMON_CLINK@
+UCOMMON_FLAGS = @UCOMMON_FLAGS@
+UCOMMON_INCLUDES = @UCOMMON_INCLUDES@
+UCOMMON_LIBC = @UCOMMON_LIBC@
+UCOMMON_LIBS = @UCOMMON_LIBS@
+UCOMMON_LINKED = @UCOMMON_LINKED@
+UCOMMON_LOCALE = @UCOMMON_LOCALE@
+UCOMMON_MODEL = @UCOMMON_MODEL@
+UCOMMON_PREFIX = @UCOMMON_PREFIX@
+UCOMMON_VARPATH = @UCOMMON_VARPATH@
+UCOMMON_VISIBILITY = @UCOMMON_VISIBILITY@
+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_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+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@
+includes = @includes@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libs = @libs@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = $(LT_VERSION) -release $(LT_RELEASE)
+AM_CXXFLAGS = $(UCOMMON_FLAGS)
+pkginclude_HEADERS = cpr.h object.h linked.h string.h counter.h vector.h \
+	bitmap.h timers.h socket.h access.h export.h thread.h mapped.h \
+	keydata.h memory.h platform.h fsys.h xml.h ucommon.h stream.h \
+	persist.h shell.h protocols.h atomic.h buffer.h numbers.h file.h \
+	datetime.h unicode.h secure.h generics.h containers.h stl.h
+
+all: all-am
+
+.SUFFIXES:
+$(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) --gnu inc/ucommon/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu inc/ucommon/Makefile
+.PRECIOUS: 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):
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+install-pkgincludeHEADERS: $(pkginclude_HEADERS)
+	@$(NORMAL_INSTALL)
+	@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || 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)$(pkgincludedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
+	done
+
+uninstall-pkgincludeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir)
+
+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`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(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
+
+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
+check-am: all-am
+check: check-am
+all-am: Makefile $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(pkgincludedir)"; 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:
+
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pkgincludeHEADERS
+
+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
+	-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-pkgincludeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libtool cscopelist-am ctags ctags-am distclean \
+	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-pkgincludeHEADERS install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+	ps ps-am tags tags-am uninstall uninstall-am \
+	uninstall-pkgincludeHEADERS
+
+
+# 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/jni/libucommon/sources/inc/ucommon/access.h b/jni/libucommon/sources/inc/ucommon/access.h
new file mode 100644
index 0000000..806401e
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/access.h
@@ -0,0 +1,313 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Locking protocol classes for member function automatic operations.
+ * This header covers ucommon access related classes.  These are used to
+ * provide automatic management of locks and synchronization objects through
+ * common virtual base classes which can be used with automatic objects.
+ * These classes are related to "protocols" and are used in conjunction
+ * with smart pointer/referencing classes.  The access interface supports
+ * member functions to acquire a lock when entered and automatically
+ * release the lock when the member function returns that are used in
+ * conjunction with special referencing smart pointers.
+ * @file ucommon/access.h
+ */
+
+// we do this twice because of some bizarre issue in just this file that
+// otherwise breaks doxygen and lists all items outside the namespace...
+#include <ucommon/platform.h>
+
+#ifndef _UCOMMON_ACCESS_H_
+#define _UCOMMON_ACCESS_H_
+
+#ifndef _UCOMMON_CPR_H_
+#include <ucommon/cpr.h>
+#endif
+
+#ifndef _UCOMMON_PROTOCOLS_H_
+#include <ucommon/protocols.h>
+#endif
+
+NAMESPACE_UCOMMON
+
+/**
+ * Common unlock protocol for locking protocol interface classes.
+ * This is to assure _unlock is a common base virtual method.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT UnlockAccess
+{
+public:
+    virtual ~UnlockAccess();
+
+protected:
+    virtual void _unlock(void) = 0;
+};
+
+/**
+ * An exclusive locking protocol interface base.
+ * This is an abstract class to form objects that will operate under an
+ * exclusive lock while being actively referenced by a smart pointer.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT ExclusiveAccess : public UnlockAccess
+{
+protected:
+    virtual ~ExclusiveAccess();
+
+    virtual void _lock(void) = 0;
+
+public:
+    /**
+     * Access interface to exclusive lock the object.
+     */
+    inline void exclusive_lock(void)
+        {return _lock();}
+
+    /**
+     * Access interface to release a lock.
+     */
+    inline void release_exclusive(void)
+        {return _unlock();}
+};
+
+/**
+ * An exclusive locking access interface base.
+ * This is an abstract class to form objects that will operate under an
+ * exclusive lock while being actively referenced by a smart pointer.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT SharedAccess : protected UnlockAccess
+{
+protected:
+    virtual ~SharedAccess();
+
+protected:
+    /**
+     * Access interface to share lock the object.
+     */
+    virtual void _share(void) = 0;
+
+public:
+    /**
+     * Share the lock with other referencers.  Many of our shared locking
+     * objects support the ability to switch between shared and exclusive
+     * mode.  This derived protocol member allows one to restore the lock
+     * to shared mode after it has been made exclusive.
+     */
+    virtual void share(void);
+
+    /**
+     * Convert object to an exclusive lock.  Many of our shared locking
+     * objects such as the "conditional lock" support the ability to switch
+     * between shared and exclusive locking modes.  This derived protocol
+     * member allows one to temporarily assert exclusive locking when tied
+     * to such methods.
+     */
+    virtual void exclusive(void);
+
+    inline void shared_lock(void)
+        {return _share();}
+
+    inline void release_share(void)
+        {return _unlock();}
+};
+
+/**
+ * A kind of smart pointer object to support exclusive locking protocol.
+ * This object initiates an exclusive lock for the object being referenced when
+ * it is instantiated, and releases the exclusive lock when it is destroyed.
+ * You would pass the pointer an object that has the Exclusive as a base class.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT exclusive_access
+{
+private:
+    ExclusiveAccess *lock;
+
+public:
+    /**
+     * Create an instance of an exclusive object reference.
+     * @param object containing Exclusive base class protocol to lock.
+     */
+    exclusive_access(ExclusiveAccess *object);
+
+    /**
+     * Destroy reference to exclusively locked object, release lock.
+     */
+    ~exclusive_access();
+
+    /**
+     * Test if the reference holds an active lock.
+     * @return true if is not locking an object.
+     */
+    inline bool operator!() const
+        {return lock == NULL;};
+
+    /**
+     * Test if the reference holds an active lock.
+     * @return true if locking an object.
+     */
+    inline operator bool() const
+        {return lock != NULL;};
+
+    /**
+     * Release a held lock programmatically.  This can be used to de-reference
+     * the object being exclusively locked without having to wait for the
+     * destructor to be called when the exclusive_lock falls out of scope.
+     */
+    void release(void);
+};
+
+/**
+ * A kind of smart pointer object to support shared locking protocol.
+ * This object initiates a shared lock for the object being referenced when
+ * it is instantiated, and releases the shared lock when it is destroyed.
+ * You would pass the pointer an object that has the Shared as a base class.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT shared_access
+{
+private:
+    SharedAccess *lock;
+    int state;
+    bool modify;
+
+public:
+    /**
+     * Create an instance of an exclusive object reference.
+     * @param object containing Exclusive base class protocol to lock.
+     */
+    shared_access(SharedAccess *object);
+
+    /**
+     * Destroy reference to shared locked object, release lock.
+     */
+    ~shared_access();
+
+    /**
+     * Test if the reference holds an active lock.
+     * @return true if is not locking an object.
+     */
+    inline bool operator!() const
+        {return lock == NULL;};
+
+    /**
+     * Test if the reference holds an active lock.
+     * @return true if locking an object.
+     */
+    inline operator bool() const
+        {return lock != NULL;};
+
+    /**
+     * Release a held lock programmatically.  This can be used to de-reference
+     * the object being share locked without having to wait for the
+     * destructor to be called when the shared_lock falls out of scope.
+     */
+    void release(void);
+
+    /**
+     * Call exclusive access on referenced objects protocol.
+     */
+    void exclusive(void);
+
+    /**
+     * Restore shared access on referenced objects protocol.
+     */
+    void share(void);
+};
+
+/**
+ * Convenience function to exclusively lock an object through it's protocol.
+ * @param object to lock.
+ */
+inline void lock(ExclusiveAccess& object)
+    {object.exclusive_lock();}
+
+/**
+ * Convenience function to unlock an exclusive object through it's protocol.
+ * @param object to unlock.
+ */
+inline void unlock(ExclusiveAccess& object)
+    {object.release_exclusive();}
+
+/**
+ * Convenience function to access (lock) shared object through it's protocol.
+ * @param object to share lock.
+ */
+inline void access(SharedAccess& object)
+    {object.shared_lock();}
+
+/**
+ * Convenience function to unlock shared object through it's protocol.
+ * @param object to unlock.
+ */
+inline void release(SharedAccess& object)
+    {object.release_share();}
+
+/**
+ * Convenience function to exclusive lock shared object through it's protocol.
+ * @param object to exclusive lock.
+ */
+inline void exclusive(SharedAccess& object)
+    {object.exclusive();}
+
+/**
+ * Convenience function to restore shared locking for object through it's protocol.
+ * @param object to restore shared locking.
+ */
+inline void share(SharedAccess& object)
+    {object.share();}
+
+/**
+ * Convenience type to use for object referencing an exclusive object.
+ */
+typedef exclusive_access exlock_t;
+
+/**
+ * Convenience type to use for object referencing a shared object.
+ */
+typedef shared_access shlock_t;
+
+/**
+ * Convenience function to release a reference to an exclusive lock.
+ * @param reference to object referencing exclusive locked object.
+ */
+inline void release(exlock_t &reference)
+    {reference.release();}
+
+/**
+ * Convenience function to release a reference to a shared lock.
+ * @param reference to object referencing shared locked object.
+ */
+inline void release(shlock_t &reference)
+    {reference.release();}
+
+// Special macros to allow member functions of an object with a protocol
+// to create self locking states while the member functions are called by
+// placing an exclusive_lock or shared_lock smart object on their stack
+// frame to reference their self.
+
+#define exclusive_object()  exlock_t __autolock__ = this
+#define protected_object()  shlock_t __autolock__ = this
+#define exclusive_locking(x) exlock_t __autolock__ = &x
+#define protected_locking(x) shlock_t __autolock__ = &x
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/atomic.h b/jni/libucommon/sources/inc/ucommon/atomic.h
new file mode 100644
index 0000000..0c58f91
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/atomic.h
@@ -0,0 +1,107 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Atomic pointers and locks.  These are meant to use atomic CPU operations
+ * and hence offer maximum performance.
+ * @file ucommon/atomic.h
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+
+#ifndef _UCOMMON_ATOMIC_H_
+#define _UCOMMON_ATOMIC_H_
+
+#ifndef _UCOMMON_CONFIG_H_
+#include <ucommon/platform.h>
+#endif
+
+NAMESPACE_UCOMMON
+
+/**
+ * Generic atomic class for referencing atomic objects and static functions.
+ * We have an atomic counter and spinlock, and in the future we may add
+ * other atomic classes and atomic manipulations needed to create lockfree
+ * data structures.  The atomic classes use mutexes if no suitable atomic
+ * code is available.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT atomic
+{
+public:
+    /**
+     * Set to true if atomics have to be simulated with mutexes.
+     */
+    static const bool simulated;
+
+    /**
+     * Atomic counter class.  Can be used to manipulate value of an
+     * atomic counter without requiring explicit thread locking.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+    class __EXPORT counter
+    {
+    private:
+        volatile long value;
+
+    public:
+        counter(long initial = 0);
+
+        long operator++();
+        long operator--();
+        long operator+=(long offset);
+        long operator-=(long offset);
+
+        inline operator long()
+            {return (long)(value);};
+
+        inline long operator*()
+            {return value;};
+    };
+
+    /**
+     * Atomic spinlock class.  Used as high-performance sync lock between
+     * threads.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+    class __EXPORT spinlock
+    {
+    private:
+        volatile long value;
+
+    public:
+        /**
+         * Construct and initialize spinlock.
+         */
+        spinlock();
+
+        /**
+         * Acquire the lock.  If the lock is not acquired, one "spins"
+         * by doing something else.  One suggestion is using thread::yield.
+         * @return true if acquired.
+         */
+        bool acquire(void);
+
+        /**
+         * Release an acquired spinlock.
+         */
+        void release(void);
+    };
+};
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/bitmap.h b/jni/libucommon/sources/inc/ucommon/bitmap.h
new file mode 100644
index 0000000..d08221c
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/bitmap.h
@@ -0,0 +1,131 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * A simple class to perform bitmap manipulation.
+ * Bitmaps are used to manage bit-aligned objects, such as network cidr
+ * addresses.  This header introduces a common bitmap management class
+ * for the ucommon library.
+ * @file ucommon/bitmap.h
+ */
+
+#ifndef _UCOMMON_BITMAP_H_
+#define _UCOMMON_BITMAP_H_
+
+#ifndef _UCOMMON_CONFIG_H_
+#include <ucommon/platform.h>
+#endif
+
+NAMESPACE_UCOMMON
+
+/**
+ * A class to access bit fields in external bitmaps.  The actual bitmap this
+ * object manipulates may not be stored in the object.  Bitmaps may be
+ * referenced on special memory mapped or i/o bus based devices or other
+ * structures that have varying data word sizes which may differ from the
+ * default cpu bus size.  The bitmap class can be set to the preferred memory
+ * bus size of the specific external bitmap being used.  Bitmap size may also
+ * be relevant when accessing individual bits in memory mapped device registers
+ * where performing reference and manipulations may change the state of the
+ * device and hence must be aligned with the device register being effected.
+ *
+ * This class offers only the most basic bit manipulations, getting and
+ * setting individual bits in the bitmap.  More advanced bit manipulations
+ * and other operations can be created in derived classes.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT bitmap
+{
+protected:
+    size_t size;
+
+    typedef union
+    {
+        void *a;
+        uint8_t *b;
+        uint16_t *w;
+        uint32_t *l;
+        uint64_t *d;
+    }   addr_t;
+
+    addr_t addr;
+
+public:
+    /**
+     * Specify data word size to use in accessing a bitmap.
+     */
+    typedef enum {
+        BMALLOC,    /**< Use default cpu size */
+        B8,         /**< Accessing a bitmap on 8 bit bus device */
+        B16,        /**< Accessing a bitmap on a 16 bit device */
+        B32,        /**< Accessing a bitmap on a 32 bit device */
+        B64,        /**< Accessing a bitmap on a 64 bit device */
+        BMIN = BMALLOC,
+        BMAX = B64
+    } bus_t;
+
+protected:
+    bus_t bus;
+
+    unsigned memsize(void) const;
+
+public:
+    /**
+     * Create an object to reference the specified bitmap.
+     * @param addr of the bitmap in mapped memory.
+     * @param length of the bitmap being accessed in bits.
+     * @param size of the memory bus or manipulation to use.
+     */
+    bitmap(void *addr, size_t length, bus_t size = B8);
+
+    /**
+     * Create a bitmap to manipulate locally.  This bitmap is created
+     * as part of the object itself, and uses the BMALLOC bus mode.
+     * @param length of bitmap to create in bits.
+     */
+    bitmap(size_t length);
+
+    /**
+     * Destroy bitmap manipulation object.  If a bitmap was locally
+     * created with the alternate constructor, that bitmap will also be
+     * removed from memory.
+     */
+    ~bitmap();
+
+    /**
+     * Clear (zero) all the bits in the bitmap.
+     */
+    void clear(void);
+
+    /**
+     * Get the value of a "bit" in the bitmap.
+     * @param offset to bit in map to get.
+     * @return true if bit is set.
+     */
+    bool get(size_t offset) const;
+
+    /**
+     * Set an individual bit in the bitmask.
+     * @param offset to bit in map to change.
+     * @param value to change specified bit to.
+     */
+    void set(size_t offset, bool value);
+};
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/buffer.h b/jni/libucommon/sources/inc/ucommon/buffer.h
new file mode 100644
index 0000000..6169478
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/buffer.h
@@ -0,0 +1,139 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Classes which use the buffer protocol to stream data.
+ * @file ucommon/buffer.h
+ */
+
+#ifndef _UCOMMON_BUFFER_H_
+#define _UCOMMON_BUFFER_H_
+
+#ifndef _UCOMMON_CONFIG_H_
+#include <ucommon/platform.h>
+#endif
+
+#ifndef _UCOMMON_PROTOCOLS_H_
+#include <ucommon/protocols.h>
+#endif
+
+#ifndef _UCOMMON_SOCKET_H_
+#include <ucommon/socket.h>
+#endif
+
+#ifndef _UCOMMON_STRING_H_
+#include <ucommon/string.h>
+#endif
+
+#ifndef _UCOMMON_FSYS_H_
+#include <ucommon/fsys.h>
+#endif
+
+#ifndef _UCOMMON_SHELL_H_
+#include <ucommon/shell.h>
+#endif
+
+NAMESPACE_UCOMMON
+
+/**
+ * A generic tcp socket class that offers i/o buffering.  All user i/o
+ * operations are directly inherited from the IOBuffer base class public
+ * members.  Some additional members are added for layering ssl services.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT TCPBuffer : public BufferProtocol, protected Socket
+{
+protected:
+    void _buffer(size_t size);
+
+    virtual size_t _push(const char *address, size_t size);
+    virtual size_t _pull(char *address, size_t size);
+    int _err(void) const;
+    void _clear(void);
+    bool _blocking(void);
+
+    /**
+     * Get the low level socket object.
+     * @return socket we are using.
+     */
+    inline socket_t getsocket(void) const
+        {return so;};
+
+public:
+    /**
+     * Construct an unconnected tcp client and specify our service profile.
+     */
+    TCPBuffer();
+
+    /**
+     * Construct a tcp server session from a listening socket.
+     * @param server socket we are created from.
+     * @param size of buffer and tcp fragments.
+     */
+    TCPBuffer(const TCPServer *server, size_t size = 536);
+
+    /**
+     * Construct a tcp client session connected to a specific host uri.
+     * @param host and optional :port we are connecting to.
+     * @param service identifier of our client.
+     * @param size of buffer and tcp fragments.
+     */
+    TCPBuffer(const char *host, const char *service, size_t size = 536);
+
+    /**
+     * Destroy the tcp socket and release all resources.
+     */
+    virtual ~TCPBuffer();
+
+    /**
+     * Connect a tcp socket to a client from a listener.  If the socket was
+     * already connected, it is automatically closed first.
+     * @param server we are connected from.
+     * @param size of buffer and tcp fragments.
+     */
+    void open(const TCPServer *server, size_t size = 536);
+
+    /**
+     * Connect a tcp client session to a specific host uri.  If the socket
+     * was already connected, it is automatically closed first.
+     * @param host we are connecting.
+     * @param service to connect to.
+     * @param size of buffer and tcp fragments.
+     */
+    void open(const char *host, const char *service, size_t size = 536);
+
+    /**
+     * Close active connection.
+     */
+    void close(void);
+
+protected:
+    /**
+     * Check for pending tcp or ssl data.
+     * @return true if data pending.
+     */
+    virtual bool _pending(void);
+};
+
+/**
+ * Convenience type for pure tcp sockets.
+ */
+typedef TCPBuffer tcp_t;
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/containers.h b/jni/libucommon/sources/inc/ucommon/containers.h
new file mode 100644
index 0000000..a6c6f32
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/containers.h
@@ -0,0 +1,690 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Threadsafe object containers.  This is used to better define
+ * object containers and manipulating classes which can be presumed to be
+ * fully threadsafe and thread-aware.  This has to be defined separately
+ * to assure correct order of preceeding headers as well as to better
+ * organize the library for clarity.  Most of these classes and templates
+ * work with classes derived from Object and LinkedObject and make use of
+ * conditional for time constrained acquisition of managed objects.
+ * @file ucommon/containers.h
+ */
+
+#ifndef _UCOMMON_CONTAINERS_H_
+#define _UCOMMON_CONTAINERS_H_
+
+#ifndef _UCOMMON_CONFIG_H_
+#include <ucommon/platform.h>
+#endif
+
+#ifndef _UCOMMON_PROTOCOLS_H_
+#include <ucommon/protocols.h>
+#endif
+
+#ifndef  _UCOMMON_LINKED_H_
+#include <ucommon/linked.h>
+#endif
+
+#ifndef  _UCOMMON_MEMORY_H_
+#include <ucommon/memory.h>
+#endif
+
+#ifndef  _UCOMMON_THREAD_H_
+#include <ucommon/thread.h>
+#endif
+
+NAMESPACE_UCOMMON
+
+/**
+ * Linked allocator helper for linked_allocator template.  This is used
+ * to alloc an array of typed objects tied to a free list in a single
+ * operation.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT LinkedAllocator : private Conditional
+{
+protected:
+    LinkedObject *freelist;
+
+    LinkedAllocator();
+
+    LinkedObject *get(void);
+
+    LinkedObject *get(timeout_t timeout);
+
+    void release(LinkedObject *node);
+
+public:
+    /**
+     * Test if there is still objects in the free list.
+     * @return true if there are objects.
+     */
+    operator bool();
+
+    /**
+     * Test if the free list is empty.
+     * @return true if the free list is empty.
+     */
+    bool operator!();
+};
+
+/**
+ * A thread-safe buffer for serializing and streaming class data.  While
+ * the queue and stack operate by managing lists of reference pointers to
+ * objects of various mixed kind, the buffer holds physical copies of objects
+ * that being passed through it, and all must be the same size.  For this
+ * reason the buffer is normally used through the bufferof<type> template
+ * rather than stand-alone.  The buffer is accessed in fifo order.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT Buffer : protected Conditional
+{
+private:
+    size_t bufsize, objsize;
+    caddr_t buf, head, tail;
+    unsigned objcount, limit;
+
+protected:
+    /**
+     * Create a buffer to hold a series of objects.
+     * @param size of each object in buffer.
+     * @param count of objects in the buffer.
+     */
+    Buffer(size_t typesize, size_t count);
+
+    /**
+     * Deallocate buffer and unblock any waiting threads.
+     */
+    virtual ~Buffer();
+
+    /**
+     * Get the next object from the buffer.
+     * @param timeout to wait when buffer is empty in milliseconds.
+     * @return pointer to next object in the buffer or NULL if timed out.
+     */
+    void *get(timeout_t timeout);
+
+    /**
+     * Get the next object from the buffer.  This blocks until an object
+     * becomes available.
+     * @return pointer to next object from buffer.
+     */
+    void *get(void);
+
+    /**
+     * Put (copy) an object into the buffer.  This blocks while the buffer
+     * is full.
+     * @param data to copy into the buffer.
+     */
+    void put(void *data);
+
+    /**
+     * Put (copy) an object into the buffer.
+     * @param data to copy into the buffer.
+     * @param timeout to wait if buffer is full.
+     * @return true if copied, false if timed out while full.
+     */
+    bool put(void *data, timeout_t timeout);
+
+    /**
+     * Release must be called when we get an object from the buffer.  This
+     * is because the pointer we return is a physical pointer to memory
+     * that is part of the buffer.  The object we get cannot be removed or
+     * the memory modified while the object is being used.
+     */
+    void release(void);
+
+    /**
+     * Copy the next object from the buffer.  This blocks until an object
+     * becomes available.  Buffer is auto-released.
+     * @param data pointer to copy into.
+     */
+    void copy(void *data);
+
+    /**
+     * Copy the next object from the buffer.  Buffer is auto-released.
+     * @param data pointer to copy into.
+     * @param timeout to wait when buffer is empty in milliseconds.
+     * @return true if object copied, or false if timed out.
+     */
+    bool copy(void *data, timeout_t timeout);
+
+    /**
+     * Peek at pending data in buffer.  This returns a pointer to
+     * objects relative to the head.  In effect it is the same as
+     * get() for item = 0.
+     * @param item to examine in buffer.
+     * @return pointer to item or NULL if invalid item number.
+     */
+    void *peek(unsigned item);
+
+    virtual void *invalid(void) const;
+
+public:
+    /**
+     * Get the size of the buffer.
+     * @return size of the buffer.
+     */
+    unsigned size(void);
+
+    /**
+     * Get the number of objects in the buffer currently.
+     * @return number of objects buffered.
+     */
+    unsigned count(void);
+
+    /**
+     * Test if there is data waiting in the buffer.
+     * @return true if buffer has data.
+     */
+    operator bool();
+
+    /**
+     * Test if the buffer is empty.
+     * @return true if the buffer is empty.
+     */
+    bool operator!();
+};
+
+/**
+ * Manage a thread-safe queue of objects through reference pointers.  This
+ * can be particularly interesting when used to enqueue/dequeue reference
+ * counted managed objects.  Thread-safe access is managed through a
+ * conditional.  Both lifo and fifo forms of queue access  may be used.  A
+ * pool of self-managed member objects are used to operate the queue.  This
+ * queue is optimized for fifo access; while lifo is supported, it will be
+ * slow.  If you need primarily lifo, you should use stack instead.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT Queue : protected OrderedIndex, protected Conditional
+{
+private:
+    mempager *pager;
+    LinkedObject *freelist;
+    size_t used;
+
+    class __LOCAL member : public OrderedObject
+    {
+    public:
+        member(Queue *q, ObjectProtocol *obj);
+        ObjectProtocol *object;
+    };
+
+    friend class member;
+
+protected:
+    size_t limit;
+
+    virtual ObjectProtocol *invalid(void) const;
+
+public:
+    /**
+     * Create a queue that uses a memory pager for internally managed
+     * member objects for a specified maximum number of object pointers.
+     * @param pager to use for internal member object or NULL to use heap.
+     * @param number of pointers that can be in the queue or 0 for unlimited.
+     * size limit.
+     */
+    Queue(mempager *pager = NULL, size_t number = 0);
+
+    /**
+     * Destroy queue.  If no mempager is used, then frees heap.
+     */
+    ~Queue();
+
+    /**
+     * Remove a specific object pointer for the queue.  This can remove
+     * a member from any location in the queue, whether beginning, end, or
+     * somewhere in the middle.  This also releases the object.
+     * @param object to remove.
+     * @return true if object was removed, false if not found.
+     */
+    bool remove(ObjectProtocol *object);
+
+    /**
+     * Post an object into the queue by it's pointer.  This can wait for
+     * a specified timeout if the queue is full, for example, for another
+     * thread to remove an object pointer.  This also retains the object.
+     * @param object to post.
+     * @param timeout to wait if queue is full in milliseconds.
+     * @return true if object posted, false if queue full and timeout expired.
+     */
+    bool post(ObjectProtocol *object, timeout_t timeout = 0);
+
+    /**
+     * Examine pending existing object in queue.  Does not remove it.
+     * @param number of elements back.
+     * @return object in queue or NULL if invalid value.
+     */
+    ObjectProtocol *get(unsigned offset = 0);
+
+    /**
+     * Get and remove last object posted to the queue.  This can wait for
+     * a specified timeout of the queue is empty.  The object is still
+     * retained and must be released or deleted by the receiving function.
+     * @param timeout to wait if empty in milliseconds.
+     * @return object from queue or NULL if empty and timed out.
+     */
+    ObjectProtocol *fifo(timeout_t timeout = 0);
+
+    /**
+     * Get and remove first object posted to the queue.  This can wait for
+     * a specified timeout of the queue is empty.  The object is still
+     * retained and must be released or deleted by the receiving function.
+     * @param timeout to wait if empty in milliseconds.
+     * @return object from queue or NULL if empty and timed out.
+     */
+    ObjectProtocol *lifo(timeout_t timeout = 0);
+
+    /**
+     * Get number of object points currently in the queue.
+     * @return number of objects in queue.
+     */
+    size_t count(void);
+};
+
+/**
+ * Manage a thread-safe stack of objects through reference pointers.  This
+ * Thread-safe access is managed through a conditional.  This differs from
+ * the queue in lifo mode because delinking the last object is immediate,
+ * and because it has much less overhead.  A pool of self-managed
+ * member objects are used to operate the stack.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT Stack : protected Conditional
+{
+private:
+    LinkedObject *freelist, *usedlist;
+    mempager *pager;
+    size_t used;
+
+    class __LOCAL member : public LinkedObject
+    {
+    public:
+        member(Stack *s, ObjectProtocol *obj);
+        ObjectProtocol *object;
+    };
+
+    friend class member;
+
+protected:
+    size_t limit;
+
+    virtual ObjectProtocol *invalid(void) const;
+
+public:
+    /**
+     * Create a stack that uses a memory pager for internally managed
+     * member objects for a specified maximum number of object pointers.
+     * @param pager to use for internal member object or NULL to use heap.
+     * @param number of pointers that can be in the stack or 0 if unlimited.
+     */
+    Stack(mempager *pager = NULL, size_t number = 0);
+
+    /**
+     * Destroy queue.  If no pager is used, then frees heap.
+     */
+    virtual ~Stack();
+
+    /**
+     * Remove a specific object pointer for the queue.  This can remove
+     * a member from any location in the queue, whether beginning, end, or
+     * somewhere in the middle.  This also releases the object.
+     * @param object to remove.
+     * @return true if object was removed, false if not found.
+     */
+    bool remove(ObjectProtocol *object);
+
+    /**
+     * Push an object into the stack by it's pointer.  This can wait for
+     * a specified timeout if the stack is full, for example, for another
+     * thread to remove an object pointer.  This also retains the object.
+     * @param object to push.
+     * @param timeout to wait if stack is full in milliseconds.
+     * @return true if object pushed, false if stack full and timeout expired.
+     */
+    bool push(ObjectProtocol *object, timeout_t timeout = 0);
+
+    /**
+     * Get and remove last object pushed on the stack.  This can wait for
+     * a specified timeout of the stack is empty.  The object is still
+     * retained and must be released or deleted by the receiving function.
+     * @param timeout to wait if empty in milliseconds.
+     * @return object pulled from stack or NULL if empty and timed out.
+     */
+    ObjectProtocol *pull(timeout_t timeout = 0);
+
+    /**
+     * Examine an existing object on the stack.
+     * @param offset to stack entry.
+     * @return object examined.
+     */
+    ObjectProtocol *get(unsigned offset = 0);
+
+    /**
+     * Get number of object points currently in the stack.
+     * @return number of objects in stack.
+     */
+    size_t count(void);
+
+    const ObjectProtocol *peek(timeout_t timeout = 0);
+};
+
+/**
+ * Linked allocator template to gather linked objects.  This allocates the
+ * object pool in a single array as a single heap allocation, and releases
+ * the whole pool with a single delete when done.  It is also threadsafe.
+ * The types used must be derived of LinkedObject.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <class T>
+class linked_allocator : public LinkedAllocator
+{
+private:
+    T* array;
+
+public:
+    inline linked_allocator(size_t size) : LinkedAllocator() {
+        array = new T[size];
+        for(unsigned i = 0; i < size; ++i)
+            array[i].enlist(&freelist);
+    }
+
+    ~linked_allocator()
+        {delete[] array;};
+
+    inline T *get(void)
+        {return static_cast<T *>(LinkedAllocator::get());};
+
+    inline T *get(timeout_t timeout)
+        {return static_cast<T *>(LinkedAllocator::get(timeout));};
+
+    inline void release(T *node)
+        {LinkedAllocator::release(node);};
+};
+
+/**
+ * A templated typed class for buffering of objects.  This operates as a
+ * fifo buffer of typed objects which are physically copied into the buffer.
+ * The objects that are buffered are accessed from allocated buffer space.
+ * As designed this may be used with multiple producer threads and one
+ * consumer thread.  To use multiple consumers, one can copy the typed object
+ * from the buffer through the get pointer and then call release.  The
+ * copied object can then be used safely.  This is what the copy method is
+ * used for.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template<class T>
+class bufferof : public Buffer
+{
+public:
+    /**
+     * Create a buffer to hold a series of typed objects.
+     * @param count of typed objects in the buffer.
+     */
+    inline bufferof(unsigned capacity) :
+        Buffer(sizeof(T), capacity) {};
+
+    /**
+     * Get the next typed object from the buffer.  This blocks until an object
+     * becomes available.
+     * @return pointer to next typed object from buffer.
+     */
+    inline T *get(void)
+        {return static_cast<T*>(get());};
+
+    /**
+     * Get the next typed object from the buffer.
+     * @param timeout to wait when buffer is empty in milliseconds.
+     * @return pointer to next typed object in the buffer or NULL if timed out.
+     */
+    inline T *get(timeout_t timeout)
+        {return static_cast<T*>(get(timeout));};
+
+    /**
+     * Put (copy) a typed object into the buffer.  This blocks while the buffer
+     * is full.
+     * @param object to copy into the buffer.
+     */
+    inline void put(T *object)
+        {put(object);};
+
+    /**
+     * Put (copy) an object into the buffer.
+     * @param object to copy into the buffer.
+     * @param timeout to wait if buffer is full.
+     * @return true if copied, false if timed out while full.
+     */
+    inline bool put(T *object, timeout_t timeout)
+        {return put(object, timeout);};
+
+    /**
+     * Copy the next typed object from the buffer.  This blocks until an object
+     * becomes available.
+     * @param object pointer to copy typed object into.
+     */
+    inline void copy(T *object)
+        {copy(object);};
+
+    /**
+     * Copy the next typed object from the buffer.
+     * @param object pointer to copy typed object into.
+     * @param timeout to wait when buffer is empty in milliseconds.
+     * @return true if object copied, or false if timed out.
+     */
+    inline bool get(T *object, timeout_t timeout)
+        {return copy(object, timeout);};
+
+    /**
+     * Examine past item in the buffer.  This is a typecast of the peek
+     * operation.
+     * @param item in buffer.
+     * @return item pointer if valid or NULL.
+     */
+    inline const T& at(unsigned item)
+        {return static_cast<const T&>(Buffer::peek(item));};
+
+    /**
+     * Examine past item in the buffer.  This is a typecast of the peek
+     * operation.
+     * @param item in buffer.
+     * @return item pointer if valid or NULL.
+     */
+    inline T&operator[](unsigned item)
+        {return static_cast<T&>(Buffer::peek(item));};
+
+    inline T* operator()(unsigned offset = 0)
+        {return static_cast<T*>(Buffer::peek(offset));}
+};
+
+/**
+ * A templated typed class for thread-safe stack of object pointers.  This
+ * allows one to use the stack class in a typesafe manner for a specific
+ * object type derived from Object rather than generically for any derived
+ * object class.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template<class T>
+class stackof : public Stack
+{
+public:
+    /**
+     * Create templated stack of typed objects.
+     * @param memory pool for internal use of stack.
+     * @param size of stack to construct.  Uses 0 if no size limit.
+     */
+    inline stackof(mempager *memory, size_t size = 0) : Stack(memory, size) {};
+
+    /**
+     * Remove a specific typed object pointer for the stack.  This can remove
+     * a member from any location in the stack, whether beginning, end, or
+     * somewhere in the middle.  This releases the object.
+     * @param object to remove.
+     * @return true if object was removed, false if not found.
+     */
+    inline bool remove(T *object)
+        {return Stack::remove(object);};
+
+    /**
+     * Push a typed object into the stack by it's pointer.  This can wait for
+     * a specified timeout if the queue is full, for example, for another
+     * thread to remove an object pointer.  This retains the object.
+     * @param object to push.
+     * @param timeout to wait if queue is full in milliseconds.
+     * @return true if object pushed, false if queue full and timeout expired.
+     */
+    inline bool push(T *object, timeout_t timeout = 0)
+        {return Stack::push(object);};
+
+    /**
+     * Get and remove last typed object posted to the stack.  This can wait for
+     * a specified timeout of the stack is empty.  The object is still retained
+     * and must be released or deleted by the receiving function.
+     * @param timeout to wait if empty in milliseconds.
+     * @return object from queue or NULL if empty and timed out.
+     */
+    inline T *pull(timeout_t timeout = 0)
+        {return static_cast<T *>(Stack::pull(timeout));};
+
+    /**
+     * Examine last typed object posted to the stack.  This can wait for
+     * a specified timeout of the stack is empty.
+     * @param timeout to wait if empty in milliseconds.
+     * @return object in queue or NULL if empty and timed out.
+     */
+    inline const T *peek(timeout_t timeout = 0)
+        {return static_cast<const T *>(Stack::peek(timeout));};
+
+    inline T* operator()(unsigned offset = 0)
+        {return static_cast<T*>(Stack::get(offset));}
+
+    /**
+     * Examine past item in the stack.  This is a typecast of the peek
+     * operation.
+     * @param offset in stack.
+     * @return item pointer if valid or NULL.
+     */
+    inline const T& at(unsigned offset = 0)
+        {return static_cast<const T&>(Stack::get(offset));};
+
+    /**
+     * Examine past item in the stack.  This is a typecast of the peek
+     * operation.
+     * @param offset in stack.
+     * @return item pointer if valid or NULL.
+     */
+    inline const T& operator[](unsigned offset)
+        {return static_cast<T&>(Stack::get(offset));};
+
+};
+
+/**
+ * A templated typed class for thread-safe queue of object pointers.  This
+ * allows one to use the queue class in a typesafe manner for a specific
+ * object type derived from Object rather than generically for any derived
+ * object class.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template<class T>
+class queueof : public Queue
+{
+public:
+    /**
+     * Create templated queue of typed objects.
+     * @param memory pool for internal use by queue.
+     * @param size of queue to construct.  Uses 0 if no size limit.
+     */
+    inline queueof(mempager *memory, size_t size = 0) : Queue(memory, size) {};
+
+    /**
+     * Remove a specific typed object pointer for the queue.  This can remove
+     * a member from any location in the queue, whether beginning, end, or
+     * somewhere in the middle. This releases the object.
+     * @param object to remove.
+     * @return true if object was removed, false if not found.
+     */
+    inline bool remove(T *object)
+        {return Queue::remove(object);};
+
+    /**
+     * Post a typed object into the queue by it's pointer.  This can wait for
+     * a specified timeout if the queue is full, for example, for another
+     * thread to remove an object pointer.  This retains the object.
+     * @param object to post.
+     * @param timeout to wait if queue is full in milliseconds.
+     * @return true if object posted, false if queue full and timeout expired.
+     */
+    inline bool post(T *object, timeout_t timeout = 0)
+        {return Queue::post(object);};
+
+    /**
+     * Get and remove first typed object posted to the queue.  This can wait for
+     * a specified timeut of the queue is empty.  The object is still retained
+     * and must be released or deleted by the receiving function.
+     * @param timeout to wait if empty in milliseconds.
+     * @return object from queue or NULL if empty and timed out.
+     */
+    inline T *fifo(timeout_t timeout = 0)
+        {return static_cast<T *>(Queue::fifo(timeout));};
+
+    /**
+     * Get and remove last typed object posted to the queue.  This can wait for
+     * a specified timeout of the queue is empty.  The object is still retained
+     * and must be released or deleted by the receiving function.
+     * @param timeout to wait if empty in milliseconds.
+     * @return object from queue or NULL if empty and timed out.
+     */
+    inline T *lifo(timeout_t timeout = 0)
+        {return static_cast<T *>(Queue::lifo(timeout));};
+
+    /**
+     * Examine past item in the queue.  This is a typecast of the peek
+     * operation.
+     * @param offset in queue.
+     * @return item pointer if valid or NULL.
+     */
+    inline const T& at(unsigned offset = 0)
+        {return static_cast<const T&>(Queue::get(offset));};
+
+    /**
+     * Examine past item in the queue.  This is a typecast of the peek
+     * operation.
+     * @param offset in queue.
+     * @return item pointer if valid or NULL.
+     */
+    inline T& operator[](unsigned offset)
+        {return static_cast<T&>(Queue::get(offset));};
+
+    inline T* operator()(unsigned offset = 0)
+        {return static_cast<T*>(Queue::get(offset));}
+};
+
+/**
+ * Convenience type for using thread-safe object stacks.
+ */
+typedef Stack stack_t;
+
+/**
+ * Convenience type for using thread-safe object fifo (queue).
+ */
+typedef Queue fifo_t;
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/counter.h b/jni/libucommon/sources/inc/ucommon/counter.h
new file mode 100644
index 0000000..25c9751
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/counter.h
@@ -0,0 +1,212 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Support for various automatic counting objects.
+ * This header defines templates for various kinds of automatic counting
+ * and sequencing objects.  Templates are used to allow manipulation of
+ * various numerical-like types.
+ * @file ucommon/counter.h
+ */
+
+#ifndef _UCOMMON_COUNTER_H_
+#define _UCOMMON_COUNTER_H_
+
+#ifndef _UCOMMON_CONFIG_H_
+#include <ucommon/platform.h>
+#endif
+
+NAMESPACE_UCOMMON
+
+/**
+ * Automatic integer counting class.  This is an automatic counting object
+ * that is used to retrieve a new integer value between 0 and n each time
+ * the object is referenced.  When reaching the last n value, the object
+ * restarts at 0, and so is used to retrieve a sequence of values in order.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT counter
+{
+private:
+    unsigned value, cycle;
+
+public:
+    /**
+     * Initialize integer counter of unknown size.
+     */
+    counter();
+
+    /**
+     * Initialize integer counter for a range of values.
+     * @param limit before recycling to zero.
+     */
+    counter(unsigned limit);
+
+    /**
+     * Get the next counter value.
+     * @return next counter value.
+     */
+    unsigned get(void);
+
+    /**
+     * Get the range of values before recycling.
+     * @return counter limit.
+     */
+    inline unsigned range(void)
+        {return cycle;};
+
+    /**
+     * Reference next counter value through pointer operation.
+     * @return next counter value.
+     */
+    inline unsigned operator*()
+        {return get();};
+
+    /**
+     * Reference next counter value by casting to integer.
+     * @return next counter value.
+     */
+    inline operator unsigned()
+        {return get();};
+
+    /**
+     * Assign the value of the counter.
+     * @param value to assign.
+     */
+    void operator=(unsigned value);
+};
+
+/**
+ * Automatically return a sequence of untyped objects.  This is an automatic
+ * counter based class which returns the next pointer in an array of pointers
+ * and restarts the list when reaching the end.  This is used to support the
+ * sequence template.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT SeqCounter : protected counter
+{
+private:
+    void *item;
+    size_t offset;
+
+protected:
+    SeqCounter(void *start, size_t size, unsigned count);
+
+    void *get(void);
+
+    void *get(unsigned idx);
+
+public:
+    /**
+     * Used to directly assign sequence position in template.
+     * @param inc_offset in sequence to reset sequencing to.
+     */
+    inline void operator=(unsigned inc_offset)
+        {counter::operator=(inc_offset);};
+};
+
+/**
+ * Automatically toggle a bool on each reference.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT toggle
+{
+private:
+    bool value;
+
+public:
+    inline toggle()
+        {value = false;};
+
+    bool get(void);
+
+    inline bool operator*()
+        {return get();};
+
+    inline void operator=(bool v)
+        {value = v;};
+
+    inline operator bool()
+        {return get();};
+
+};
+
+/**
+ * A template to return a sequence of objects of a specified type.
+ * This is used to return a different member in a sequence of objects of
+ * a specified type during each reference to the sequencer.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <class T>
+class sequence : public SeqCounter
+{
+protected:
+    inline T *get(unsigned idx)
+        {return static_cast<T *>(SeqCounter::get(idx));};
+
+public:
+    /**
+     * Create a template auto-sequence from a list of typed pointers.
+     * @param array of typed values to sequence on reference.
+     * @param size of list of typed values.
+     */
+    inline sequence(T *array, unsigned size) :
+        SeqCounter(array, sizeof(T), size) {};
+
+    /**
+     * Return next typed member of the sequence.
+     * @return next typed member of sequence.
+     */
+    inline T* get(void)
+        {return static_cast<T *>(SeqCounter::get());};
+
+    /**
+     * Return next typed member of the sequence by pointer reference.
+     * @return next typed member of sequence.
+     */
+    inline T& operator*()
+        {return *get();};
+
+    /**
+     * Return next typed member of the sequence by casted reference.
+     * @return next typed member of sequence.
+     */
+    inline operator T&()
+        {return *get();};
+
+    /**
+     * Return a specific typed member from the sequence list.
+     * @param offset of member to return.
+     * @return typed value at the specified offset.
+     */
+    inline T& operator[](unsigned offset)
+        {return *get(offset);};
+};
+
+/**
+ * A convenience typecast for integer counters.
+ */
+typedef counter counter_t;
+
+/**
+ * A convenience typecast for auto-toggled bools.
+ */
+typedef toggle toggle_t;
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/cpr.h b/jni/libucommon/sources/inc/ucommon/cpr.h
new file mode 100644
index 0000000..0776ce5
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/cpr.h
@@ -0,0 +1,178 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Runtime functions.  This includes common runtime library functions we
+ * may need portably.
+ * @file ucommon/cpr.h
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+
+#ifndef _UCOMMON_CONFIG_H_
+#include <ucommon/platform.h>
+#endif
+
+#ifndef _UCOMMON_CPR_H_
+#define _UCOMMON_CPR_H_
+
+#ifdef  _MSWINDOWS_
+
+extern "C" {
+    __EXPORT int cpr_setenv(const char *s, const char *v, int p);
+
+    inline int setenv(const char *s, const char *v, int overwrite)
+        {return cpr_setenv(s, v, overwrite);}
+}
+
+#endif
+
+
+/**
+ * Function to handle runtime errors.  When using the standard C library,
+ * runtime errors are handled by a simple abort.  When using the stdc++
+ * library with stdexcept, then std::runtime_error will be thrown.
+ * @param text of runtime error.
+ */
+__EXPORT void cpr_runtime_error(const char *text);
+
+/**
+ * Portable memory allocation helper function.  Handles out of heap error
+ * as a runtime error.
+ * @param size of memory block to allocate from heap.
+ * @return memory address of allocated heap space.
+ */
+extern "C" __EXPORT void *cpr_memalloc(size_t size) __MALLOC;
+
+/**
+ * Portable memory placement helper function.  This is used to process
+ * "placement" new operators where a new object is constructed over a
+ * pre-allocated area of memory.  This handles invalid values through
+ * runtime error.
+ * @param size of object being constructed.
+ * @param address where the object is being placed.
+ * @param known size of the location we are constructing the object in.
+ */
+extern "C" __EXPORT void *cpr_memassign(size_t size, caddr_t address, size_t known) __MALLOC;
+
+/**
+ * Portable swap code.
+ * @param mem1 to swap.
+ * @param mem2 to swap.
+ * @param size of swap area.
+ */
+extern "C" __EXPORT void cpr_memswap(void *mem1, void *mem2, size_t size);
+
+#ifndef _UCOMMON_EXTENDED_
+/**
+ * Our generic new operator.  Uses our heap memory allocator.
+ * @param size of object being constructed.
+ * @return memory allocated from heap.
+ */
+inline void *operator new(size_t size)
+    {return cpr_memalloc(size);}
+
+/**
+ * Our generic new array operator.  Uses our heap memory allocator.
+ * @param size of memory needed for object array.
+ * @return memory allocated from heap.
+ */
+inline void *operator new[](size_t size)
+    {return cpr_memalloc(size);}
+#endif
+
+#ifndef _UCOMMON_EXTENDED_
+/**
+ * A placement new array operator where we assume the size of memory is good.
+ * We construct the array at a specified place in memory which we assume is
+ * valid for our needs.
+ * @param size of memory needed for object array.
+ * @param address where to place object array.
+ * @return memory we placed object array.
+ */
+inline void *operator new[](size_t size, caddr_t address)
+    {return cpr_memassign(size, address, size);}
+
+/**
+ * A placement new array operator where we know the allocated size.  We
+ * find out how much memory is needed by the new and can prevent arrayed
+ * objects from exceeding the available space we are placing the object.
+ * @param size of memory needed for object array.
+ * @param address where to place object array.
+ * @param known size of location we are placing array.
+ * @return memory we placed object array.
+ */
+inline void *operator new[](size_t size, caddr_t address, size_t known)
+    {return cpr_memassign(size, address, known);}
+#endif
+
+/**
+ * Overdraft new to allocate extra memory for object from heap.  This is
+ * used for objects that must have a known class size but store extra data
+ * behind the class.  The last member might be an unsized or 0 element
+ * array, and the actual size needed from the heap is hence not the size of
+ * the class itself but is known by the routine allocating the object.
+ * @param size of object.
+ * @param extra heap space needed for data.
+ */
+inline void *operator new(size_t size, size_t extra)
+    {return cpr_memalloc(size + extra);}
+
+/**
+ * A placement new operator where we assume the size of memory is good.
+ * We construct the object at a specified place in memory which we assume is
+ * valid for our needs.
+ * @param size of memory needed for object.
+ * @param address where to place object.
+ * @return memory we placed object.
+ */
+inline void *operator new(size_t size, caddr_t address)
+    {return cpr_memassign(size, address, size);}
+
+/**
+ * A placement new operator where we know the allocated size.  We
+ * find out how much memory is needed by the new and can prevent the object
+ * from exceeding the available space we are placing the object.
+ * @param size of memory needed for object.
+ * @param address where to place object.
+ * @param known size of location we are placing object.
+ * @return memory we placed object.
+ */
+
+inline void *operator new(size_t size, caddr_t address, size_t known)
+    {return cpr_memassign(size, address, known);}
+
+#ifndef _UCOMMON_EXTENDED_
+
+
+#ifdef  __GNUC__
+extern "C" __EXPORT void __cxa_pure_virtual(void);
+#endif
+#endif
+
+extern "C" {
+    __EXPORT uint16_t lsb_getshort(uint8_t *b);
+    __EXPORT uint32_t lsb_getlong(uint8_t *b);
+    __EXPORT uint16_t msb_getshort(uint8_t *b);
+    __EXPORT uint32_t msb_getlong(uint8_t *b);
+
+    __EXPORT void lsb_setshort(uint8_t *b, uint16_t v);
+    __EXPORT void lsb_setlong(uint8_t *b, uint32_t v);
+    __EXPORT void msb_setshort(uint8_t *b, uint16_t v);
+    __EXPORT void msb_setlong(uint8_t *b, uint32_t v);
+}
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/datetime.h b/jni/libucommon/sources/inc/ucommon/datetime.h
new file mode 100644
index 0000000..e9ebcbd
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/datetime.h
@@ -0,0 +1,1027 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Basic classes for manipulating time and date based data, particularly
+ * that may be in strings.
+ * @file ucommon/datetime.h
+ */
+
+/**
+ * Example of date & time manipulation.
+ * @example datetime.cpp
+ */
+
+#ifndef _UCOMMON_DATETIME_H_
+#define _UCOMMON_DATETIME_H_
+
+#ifndef _UCOMMON_CONFIG_H_
+#include <ucommon/platform.h>
+#endif
+
+#ifndef _UCOMMON_NUMBERS_H_
+#include <ucommon/numbers.h>
+#endif
+
+#ifndef _UCOMMON_STRING_H_
+#include <ucommon/string.h>
+#endif
+
+#ifndef _MSWINDOWS_
+#include <unistd.h>
+#include <sys/time.h>
+#endif
+
+#include <time.h>
+
+#define DATE_STRING_SIZE        10
+#define DATE_BUFFER_SIZE        11
+#define TIME_STRING_SIZE        8
+#define TIME_BUFFER_SIZE        9
+#define DATETIME_STRING_SIZE    19
+#define DATETIME_BUFFER_SIZE    20
+
+/**
+ * Convenience type for struct tm.
+ */
+typedef struct tm   tm_t;
+
+NAMESPACE_UCOMMON
+
+#ifdef __BORLANDC__
+    using std::tm;
+    using std::time_t;
+#endif
+
+/**
+ * The Date class uses a julian date representation of the current
+ * year, month, and day.  This is then manipulated in several forms
+ * and may be exported as needed.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short julian number based date class.
+ */
+class __EXPORT Date
+{
+protected:
+    long julian;
+
+    void set(long year, long month, long day);
+
+    /**
+     * A method to use to "post" any changed values when shadowing
+     * a mixed object class.  This is used by DateNumber and string classes.
+     */
+    virtual void update(void);
+
+public:
+    /**
+     * Size of date string field.
+     */
+    static const size_t sz_string;
+
+    /**
+     * Create a julian date from a time_t type.
+     * @param value from time()
+     */
+    Date(time_t value);
+
+    /**
+     * Create a julian date from a local or gmt date and time.
+     * @param object from DateTime::glt() or gmt().
+     */
+    Date(struct tm *object);
+
+    /**
+     * Create a julian date from a ISO date string of a specified size.
+     * @param pointer to ISO date string.
+     * @param size of date field if not null terminated.
+     */
+    Date(const char *pointer, size_t size = 0);
+
+    /**
+     * Create a julian date from an arbitrary year, month, and day.
+     * @param year of date.
+     * @param month of date (1-12).
+     * @param day of month (1-31).
+     */
+    Date(int year, unsigned month, unsigned day);
+
+    /**
+     * Create a julian date object from another object.
+     * @param object to copy.
+     */
+    Date(const Date& object);
+
+    /**
+     * Construct a new julian date with today's date.
+     */
+    Date();
+
+    /**
+     * Destroy julian date object.
+     */
+    virtual ~Date();
+
+    /**
+     * Get the year of the date.
+     * @return year of the date
+     */
+    int year(void) const;
+
+    /**
+     * Get the month of the date (1-12).
+     * @return month of year
+     */
+    unsigned month(void) const;
+
+    /**
+     * Get the day of the month of the date.
+     * @return day of month
+     */
+    unsigned day(void) const;
+
+    /**
+     * Get the day of the week (0-7).
+     * @return day of week
+     */
+    unsigned dow(void) const;
+
+    /**
+     * Get a ISO string representation of the date (yyyy-mm-dd).
+     * @param buffer to store string.
+     * @return string representation.
+     */
+    const char *put(char *buffer) const;
+
+    /**
+     * Get a time_t for the julian date if in time_t epoch.
+     * @return time_t or -1 if out of range.
+     */
+    time_t timeref(void) const;
+
+    /**
+     * Get the date as a number for the object or 0 if invalid.
+     * @return date as number.
+     */
+    long get(void) const;
+
+    /**
+     * Set (update) the date with current date.
+     */
+    void set(void);
+
+    /**
+     * Set the julian date based on an ISO date string of specified size.
+     * @param pointer to date string field.
+     * @param size of field if not null terminated.
+     */
+    void set(const char *pointer, size_t size = 0);
+
+    /**
+     * Check if date is valid.
+     * @return true if julian date is valid.
+     */
+    bool is_valid(void) const;
+
+    /**
+     * Casting operator to return date as number.
+     * @return julian number.
+     */
+    inline operator long() const
+        {return get();};
+
+    /**
+     * Access julian value.
+     * @return julian number of object.
+     */
+    inline long operator*() const
+        {return get();};
+
+    /**
+     * Expression operator to return an ISO date string for the current
+     * julian date.
+     * @return ISO date string.
+     */
+    String operator()() const;
+
+    /**
+     * Increment date by one day.
+     * @return instance of current date object.
+     */
+    Date& operator++();
+
+    /**
+     * Decrement date by one day.
+     * @return instance of current date object.
+     */
+    Date& operator--();
+
+    /**
+     * Increment date by offset.
+     * @param offset to add to julian date.
+     * @return instance of current date object.
+     */
+    Date& operator+=(long offset);
+
+    /**
+     * Decrement date by offset.
+     * @param offset to subtract from julian date.
+     * @return instance of current date object.
+     */
+    Date& operator-=(long offset);
+
+    /**
+     * Add days to julian date in an expression.
+     * @param days to add.
+     * @return new date object with modified days.
+     */
+    Date operator+(long days);
+
+    /**
+     * Subtract days from a julian date in an expression.
+     * @param days to subtract.
+     * @return new date object with modified days.
+     */
+    Date operator-(long days);
+
+    /**
+     * Operator to compute number of days between two dates.
+     * @param date offset for computation.
+     * @return number of days difference.
+     */
+    inline long operator-(const Date &date)
+        {return (julian - date.julian);};
+
+    /**
+     * Assign date from another date object.
+     * @param date object to assign from.
+     * @return current modified date object.
+     */
+    Date& operator=(const Date& date);
+
+    /**
+     * Compare julian dates if same date.
+     * @param date to compare with.
+     * @return true if same.
+     */
+    bool operator==(const Date& date) const;
+
+    /**
+     * Compare julian dates if not same date.
+     * @param date to compare with.
+     * @return true if not same.
+     */
+    bool operator!=(const Date& date) const;
+
+    /**
+     * Compare julian date if earlier than another date.
+     * @param date to compare with.
+     * @return true if earlier.
+     */
+    bool operator<(const Date& date) const;
+
+    /**
+     * Compare julian date if earlier than or equal to another date.
+     * @param date to compare with.
+     * @return true if earlier or same.
+     */
+    bool operator<=(const Date& date) const;
+
+    /**
+     * Compare julian date if later than another date.
+     * @param date to compare with.
+     * @return true if later.
+     */
+    bool operator>(const Date& date) const;
+
+    /**
+     * Compare julian date if later than or equal to another date.
+     * @param date to compare with.
+     * @return true if later or same.
+     */
+    bool operator>=(const Date& date) const;
+
+    /**
+     * Check if julian date is not valid.
+     * @return true if date is invalid.
+     */
+    inline bool operator!() const
+        {return !is_valid();};
+
+    /**
+     * Check if julian date is valid for is() expression.
+     * @return true if date is valid.
+     */
+    inline operator bool() const
+        {return is_valid();};
+};
+
+/**
+ * The Time class uses a integer representation of the current
+ * time.  This is then manipulated in several forms and may be
+ * exported as needed.  The time object can represent an instance in
+ * time (hours, minutes, and seconds) in a 24 hour period or can
+ * represent a duration.  Millisecond accuracy can be offered.
+ *
+ * @author Marcelo Dalmas <mad@brasmap.com.br> and David Sugar <dyfet@gnutelephony.org>
+ * @short Integer based time class.
+ */
+
+class __EXPORT Time
+{
+protected:
+    long seconds;
+
+protected:
+    virtual void update(void);
+
+public:
+    void set(int hour, int minute = 0, int second = 0);
+
+    /**
+     * Constant for number of seconds in a day.
+     */
+    static const long c_day;
+
+    /**
+     * Constant for number of seconds in a hour.
+     */
+    static const long c_hour;
+
+    /**
+     * Constant for number of seconds in a week.
+     */
+    static const long c_week;
+
+    /**
+     * Size of time string field.
+     */
+    static const size_t sz_string;
+
+    /**
+     * Create a time from the time portion of a time_t.
+     * @param value of time_t to use.
+     */
+    Time(time_t value);
+
+    /**
+     * Create a time from the time portion of a date and time object.
+     * @param object from DateTime::glt() or gmt().
+     */
+    Time(tm_t *object);
+
+    /**
+     * Create a time from a hh:mm:ss formatted time string.
+     * @param pointer to formatted time field.
+     * @param size of field if not null terminated.
+     */
+    Time(const char *pointer, size_t size = 0);
+
+    /**
+     * Create a time from hours (0-23), minutes (0-59), and seconds (0-59).
+     * @param hour of time.
+     * @param minute of time.
+     * @param second of time.
+     */
+    Time(int hour, int minute, int second);
+
+    /**
+     * Create a time object from another object.
+     * @param object to copy.
+     */
+    Time(const Time& object);
+
+    /**
+     * Create a time from current time.
+     */
+    Time();
+
+    /**
+     * Destroy time object.
+     */
+    virtual ~Time();
+
+    /**
+     * Get current time in seconds from midnight.
+     * @return seconds from midnight.
+     */
+    long get(void) const;
+
+    /**
+     * Get hours from midnight.
+     * @return hours from midnight.
+     */
+    int hour(void) const;
+
+    /**
+     * Get minutes from current hour.
+     * @return minutes from current hour.
+     */
+    int minute(void) const;
+
+    /**
+     * Get seconds from current minute.
+     * @return seconds from current minute.
+     */
+    int second(void) const;
+
+    /**
+     * Get a hh:mm:ss formatted string for current time.
+     * @param buffer to store time string in.
+     * @return time string buffer or NULL if invalid.
+     */
+    const char *put(char *buffer) const;
+
+    /**
+     * Set (update) the time with current time.
+     */
+    void set(void);
+
+    /**
+     * Set time from a hh:mm:ss formatted string.
+     * @param pointer to time field.
+     * @param size of field if not null terminated.
+     */
+    void set(const char *pointer, size_t size = 0);
+
+    /**
+     * Check if time object had valid value.
+     * @return true if object is valid.
+     */
+    bool is_valid(void) const;
+
+    /**
+     * Check if time object has valid value for is() operator.
+     * @return true if object is valid.
+     */
+    inline operator bool() const
+        {return is_valid();};
+
+    /**
+     * Check if time object has valid value for ! operator.
+     * @return true if object is not valid.
+     */
+    inline bool operator!() const
+        {return !is_valid();};
+
+    /**
+     * Get difference (in seconds) between two times.
+     * @param reference time to get difference from.
+     * @return difference in seconds.
+     */
+    long operator-(const Time &reference);
+
+    /**
+     * Add seconds to the current time, wrap if 24 hours.
+     * @param seconds to add.
+     * @return new time object with modified value.
+     */
+    Time operator+(long seconds);
+
+    /**
+     * Subtract seconds to the current time, wrap if 24 hours.
+     * @param seconds to subtract.
+     * @return new time object with modified value.
+     */
+    Time operator-(long seconds);
+
+    /**
+     * Get time in seconds.
+     * @return seconds.
+     */
+    inline operator long()
+        {return get();};
+
+    /**
+     * Get object time in seconds.
+     * @return time in seconds.
+     */
+    inline long operator*() const
+        {return get();};
+
+    /**
+     * Convert to standard 24 hour time string.
+     * @return time string.
+     */
+    String operator()() const;
+
+    /**
+     * Incrememnt time by 1 second, wrap on 24 hour period.
+     * @return modified instance of current time object.
+     */
+    Time& operator++();
+
+    /**
+     * Decrement time by 1 second, wrap on 24 hour period.
+     * @return modified instance of current time object.
+     */
+    Time& operator--();
+
+    /**
+     * Assign a time as a copy of another time.
+     * @param time to assign from.
+     * @return time object that was assigned.
+     */
+    Time& operator=(const Time& time);
+
+    /**
+     * Increment time by specified seconds.  Wraps on 24 hour period.
+     * @param seconds to add to current time.
+     * @return modified instance of current time object.
+     */
+    Time& operator+=(long seconds);
+
+    /**
+     * Decrement time by specified seconds.  Wraps on 24 hour period.
+     * @param seconds to subtract from current time.
+     * @return modified instance of current time object.
+     */
+    Time& operator-=(long seconds);
+
+    /**
+     * Compare time with another time to see if same time.
+     * @param time to compare with.
+     * @return true if same time.
+     */
+    bool operator==(const Time &time) const;
+
+    /**
+     * Compare time with another time to see if not same time.
+     * @param time to compare with.
+     * @return true if not same time.
+     */
+    bool operator!=(const Time &time) const;
+
+    /**
+     * Compare time if earlier than another time.
+     * @param time object to compare with.
+     * @return true if earlier than object.
+     */
+    bool operator<(const Time &time) const;
+
+    /**
+     * Compare time if earlier than or equal to another time.
+     * @param time object to compare with.
+     * @return true if earlier or same as object.
+     */
+    bool operator<=(const Time &time) const;
+
+    /**
+     * Compare time if later than another time.
+     * @param time object to compare with.
+     * @return true if later than object.
+     */
+    bool operator>(const Time &time) const;
+
+    /**
+     * Compare time if later than or equal to another time.
+     * @param time object to compare with.
+     * @return true if later than or same as object.
+     */
+    bool operator>=(const Time &time) const;
+};
+
+/**
+ * The Datetime class uses a julian date representation of the current
+ * year, month, and day and a integer representation of the current
+ * time.  This is then manipulated in several forms
+ * and may be exported as needed.
+ *
+ * @author Marcelo Dalmas <mad@brasmap.com.br>
+ * @short Integer based time class.
+ */
+class __EXPORT DateTime : public Date, public Time
+{
+protected:
+    void update(void);
+
+public:
+    /**
+     * Size of datetime string field.
+     */
+    static const size_t sz_string;
+
+    /**
+     * Construct a date and time from C library time_t type.
+     * @param time type to make date and time from.
+     */
+    DateTime(time_t time);
+
+    /**
+     * Construct a date and time from C library time structure.
+     * @param tm structure from C library (from glt or gmt).
+     */
+    DateTime(tm_t *tm);
+
+    /**
+     * Construct a date and time from ISO string buffer.
+     * @param pointer to string field holding date and time.
+     * @param size of field if not null terminated string.
+     */
+    DateTime(const char *pointer, size_t size = 0);
+
+    /**
+     * Construct a date and time object from explicit date and time values.
+     * @param year of object.
+     * @param month of object (1-12).
+     * @param day of month of object (1-31).
+     * @param hour of object (0-23).
+     * @param minute of object (0-59).
+     * @param second of object (0-59).
+     */
+    DateTime(int year, unsigned month, unsigned day,
+         int hour = 0, int minute = 0, int second = 0);
+
+    /**
+     * Create a datetime object from another object.
+     * @param object to copy.
+     */
+    DateTime(const DateTime& object);
+
+    /**
+     * Construct a new date and time object with current date and time.
+     */
+    DateTime();
+
+    /**
+     * Destroy date and time object.
+     */
+    virtual ~DateTime();
+
+    /**
+     * Get a ISO formatted date and time string for current object.
+     * @param buffer to store date and time in (yyyy-mm-dd hh:mm:ss).
+     * @return string buffer if object is valid.
+     */
+    const char *put(char *buffer) const;
+
+    /**
+     * Get C library time_t type if object in C library epoch range.
+     * @return time in seconds from epoch or ~0l if out of range.
+     */
+    time_t get(void) const;
+
+    /**
+     * Test if object is valid.
+     * @return true if object is valid.
+     */
+    bool is_valid(void) const;
+
+    /**
+     * Operator to compute number of days between two dates.
+     * @param datetime to offset from for computation.
+     * @return number of days difference.
+     */
+    long operator-(const DateTime &datetime);
+
+    /**
+     * Assign date and time from another datetime object.
+     * @param datetime object to assign from.
+     * @return assigned datetime object.
+     */
+    DateTime& operator=(const DateTime& datetime);
+
+    /**
+     * Add seconds to the current datetime object.  Day overflows update
+     * julian date.
+     * @param seconds to add to object.
+     * @return modified datetime object.
+     */
+    DateTime& operator+=(long seconds);
+
+    /**
+     * Subtract seconds from current datetime object.  Day underflows
+     * update julian date.
+     * @param seconds to subtract from object.
+     * @return modified datetime object.
+     */
+    DateTime& operator-=(long seconds);
+
+    /**
+     * Add seconds to datetime in an expression.  Day overflows update
+     * julian date.
+     * @param seconds to add to datetime.
+     * @return new modified datetime object.
+     */
+    DateTime operator+(long seconds);
+
+    /**
+     * Subtract seconds from datetime in an expression.  Day underflows
+     * update julian date.
+     * @param seconds to subtract from datetime.
+     * @return new modified datetime object.
+     */
+    DateTime operator-(long seconds);
+
+    /**
+     * Add a day from the current date and time.
+     * @return datetime object reference that was modified.
+     */
+    DateTime& operator++();
+
+    /**
+     * Subtract a day from the current date and time.
+     * @return datetime object reference that was modified.
+     */
+    DateTime& operator--();
+
+    /**
+     * Compare date and time with another date and time to see if the same.
+     * @param datetime to compare with.
+     * @return true if equal.
+     */
+    bool operator==(const DateTime& datetime) const;
+
+    /**
+     * Compare date and time with another date and time to see if not same.
+     * @param datetime to compare with.
+     * @return true if not equal.
+     */
+    bool operator!=(const DateTime& datetime) const;
+
+    /**
+     * Compare date and time with another date and time to see if earlier.
+     * @param datetime to compare with.
+     * @return true if earlier.
+     */
+    bool operator<(const DateTime& datetime) const;
+
+    /**
+     * Compare date and time with another date and time to see if earlier or
+     * the same.
+     * @param datetime to compare with.
+     * @return true if earlier or equal.
+     */
+    bool operator<=(const DateTime& datetime) const;
+
+    /**
+     * Compare date and time with another date and time to see if later.
+     * @param datetime to compare with.
+     * @return true if later.
+     */
+    bool operator>(const DateTime& datetime) const;
+
+    /**
+     * Compare date and time with another date and time to see if later or
+     * the same.
+     * @param datetime to compare with.
+     * @return true if later or equal.
+     */
+    bool operator>=(const DateTime& datetime) const;
+
+    /**
+     * Check if date and time is not valid.
+     * @return true if not valid.
+     */
+    bool operator!() const;
+
+    /**
+     * Test is date and time is valid for is() operator.
+     * @return true if object is valid.
+     */
+    operator bool() const;
+
+    /**
+     * Casting operator to return date as number.
+     * @return date as a number.
+     */
+    inline operator long() const
+        {return Date::get();};
+
+    /**
+     * Set (update) the date and time with current date and time.
+     */
+    void set(void);
+
+    /**
+     * Convert date and time to julian day number.
+     * @return julian day number as a double.
+     */
+    operator double() const;
+
+    /**
+     * Return date and time formatted using strftime format values.
+     * @param strftime format to use.
+     * @return String object with formatted time.
+     */
+    String format(const char *strftime) const;
+
+    /**
+     * Fetch an instance of time converted to local time.  If the localtime
+     * abi is not re-entrant, than a lock is held, otherwise a unique
+     * object is returned.  In either case, when you are done, you must
+     * release the object.
+     * @param time object or NULL if using current time.
+     * @return locked instance of struct tm object.
+     */
+    static tm_t *local(time_t *time = NULL);
+
+    /**
+     * Fetch an instance of time converted to gmt.  If the gmtime abi
+     * is not re-entrant, than a lock is held, otherwise a unique
+     * object is returned.  In either case, when you are done, you must
+     * release the object.
+     * @param time object or NULL if using current time.
+     * @return locked instance of struct tm object.
+     */
+    static tm_t *gmt(time_t *time = NULL);
+
+    /**
+     * Release a struct tm object from glt or gmt.
+     * @param object to release.
+     */
+    static void release(tm_t *object);
+};
+
+/**
+ * A DateTime string class.  This can be used to access the date and time
+ * as a standard string without requiring an external buffer.
+ *
+ * @author David Sugar <dyfet@gnutelephony.org>
+ * @short a datetime class that returns strings.
+ */
+class __EXPORT DateTimeString : public DateTime
+{
+public:
+    /**
+     * Specify string buffer mode.  By default we form a string with date
+     * and time.
+     */
+    typedef enum {
+        DATE, TIME, BOTH} mode_t;
+
+private:
+    char buffer[DATETIME_BUFFER_SIZE];
+    mode_t mode;
+
+protected:
+    void update(void);
+
+public:
+    /**
+     * Construct a date and time from C libraray time_t type.
+     * @param time type to make date and time from.
+     */
+    DateTimeString(time_t time);
+
+    /**
+     * Construct a date and time from C library time structure.
+     * @param tm structure from C library (from glt or gmt).
+     */
+    DateTimeString(tm_t *tm);
+
+    /**
+     * Construct a date and time from ISO string buffer.
+     * @param pointer to string field holding date and time.
+     * @param size of field if not null terminated string.
+     */
+    DateTimeString(const char *pointer, size_t size = 0);
+
+    /**
+     * Construct a date and time object from explicit date and time values.
+     * @param year of object.
+     * @param month of object (1-12).
+     * @param day of month of object (1-31).
+     * @param hour of object (0-23).
+     * @param minute of object (0-59).
+     * @param second of object (0-59).
+     */
+    DateTimeString(int year, unsigned month, unsigned day,
+         int hour = 0, int minute = 0, int second = 0);
+
+    /**
+     * Create a datetime object from another object.
+     * @param object to copy.
+     */
+    DateTimeString(const DateTimeString& object);
+
+    /**
+     * Construct a new date and time object with current date and time.
+     */
+    DateTimeString(mode_t string = DateTimeString::BOTH);
+
+    /**
+     * Destroy date time string.
+     */
+    virtual ~DateTimeString();
+
+    /**
+     * Extract char from string.
+     *
+     * @return string of datetime.
+     */
+    inline const char *c_str(void)
+        {return buffer;};
+
+    /**
+     * Cast to string.
+     *
+     * @return string of datetime.
+     */
+    inline operator const char *(void)
+        {return buffer;};
+
+    /**
+     * Set (update) the date and time with current date and time.
+     */
+    void set(void);
+
+    /**
+     * Set the string mode.
+     * @param string mode to use.
+     */
+    void set(mode_t string);
+};
+
+/**
+ * A number class that manipulates a string buffer that is also a date.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short a number that is also a date string.
+ */
+class __EXPORT DateNumber : public Number, public Date
+{
+protected:
+    void update(void);
+
+public:
+    /**
+     * Create a date number tied to a refreshed string buffer.
+     * @param pointer to string buffer to rewrite.
+     */
+    DateNumber(char *pointer);
+
+    /**
+     * Release a datenumber object.
+     */
+    virtual ~DateNumber();
+
+    /**
+     * Set date number to current date.
+     */
+    void set(void);
+};
+
+class __EXPORT isotime : public PrintProtocol, public InputProtocol
+{
+private:
+    Date *d;
+    Time *t;
+
+    enum {DATE, TIME, DATETIME} mode;
+    char buf[32];
+    unsigned pos;
+
+protected:
+    const char *_print(void) const;
+
+    int _input(int code);
+
+public:
+    isotime(Date& date, Time& time);
+    isotime(Date& date);
+    isotime(Time& time);
+};
+
+/**
+ * Convenience type for using DateTime object.
+ */
+typedef DateTime    datetime_t;
+
+/**
+ * Convenience type for using DateTimeString object.
+ */
+typedef DateTimeString  datetimestring_t;
+
+/**
+ * Convenience type for using Date object.
+ */
+typedef Date        date_t;
+
+/**
+ * Convenience type for using Time object.
+ */
+typedef Time        tod_t;
+
+extern "C" {
+    __EXPORT long tzoffset(struct timezone *tz = NULL);
+}
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/export.h b/jni/libucommon/sources/inc/ucommon/export.h
new file mode 100644
index 0000000..de93623
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/export.h
@@ -0,0 +1,53 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Export interfaces for library interfaces.
+ * This is a special header used when we have to build DLL's for dumb
+ * platforms which require explicit declaration of imports and exports.
+ * The real purpose is to include our local headers in a new library
+ * module with external headers referenced as imports, and then to define
+ * our own interfaces in our new library as exports.  This allows native
+ * construction of new DLL's based on/that use ucommon on Microsoft Windows
+ * and perhaps for other similarly defective legacy platforms.  Otherwise
+ * this header is not used at all, and not when building applications.
+ * @file ucommon/export.h
+ */
+
+#if defined(_MSC_VER) || defined(WIN32) || defined(_WIN32)
+#ifdef  __EXPORT
+#undef  __EXPORT
+#endif
+
+#ifdef  __SHARED
+#undef  __SHARED
+#endif
+
+#ifdef  UCOMMON_STATIC
+#define __EXPORT
+#else
+#define __EXPORT __declspec(dllexport)
+#endif
+
+#if defined(UCOMMON_STATIC) || defined(UCOMMON_RUNTIME)
+#define __SHARED
+#else
+#define __SHARED __declspec(dllexport)
+#endif
+
+#endif
+
diff --git a/jni/libucommon/sources/inc/ucommon/file.h b/jni/libucommon/sources/inc/ucommon/file.h
new file mode 100644
index 0000000..624434a
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/file.h
@@ -0,0 +1,245 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Adaption of C runtime FILE processing.
+ * @file ucommon/file.h
+ */
+
+#ifndef _UCOMMON_FILE_H_
+#define _UCOMMON_FILE_H_
+
+#ifndef _UCOMMON_CONFIG_H_
+#include <ucommon/platform.h>
+#endif
+
+#ifndef _UCOMMON_PROTOCOLS_H_
+#include <ucommon/protocols.h>
+#endif
+
+#ifndef _UCOMMON_THREAD_H_
+#include <ucommon/thread.h>
+#endif
+
+#ifndef _UCOMMON_STRING_H_
+#include <ucommon/string.h>
+#endif
+
+#ifndef _UCOMMON_MEMORY_H_
+#include <ucommon/memory.h>
+#endif
+
+#ifndef _UCOMMON_FSYS_H_
+#include <ucommon/fsys.h>
+#endif
+
+#include <stdio.h>
+
+NAMESPACE_UCOMMON
+
+/**
+ * Access standard files through character protocol.  This can also be
+ * used as an alternative means to access files that manages file pointers.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT file : public CharacterProtocol
+{
+private:
+    FILE *fp;
+#ifdef _MSWINDOWS_
+    HANDLE pid;
+#else
+    pid_t pid;
+#endif
+    char *tmp;
+
+    int _putch(int code);
+
+    int _getch(void);
+
+public:
+    typedef ::fpos_t bookmark_t;
+
+    static file cin, cout, cerr;
+
+    /**
+     * Construct a file from an existing FILE pointer.
+     * @param file to use.
+     */
+    file(FILE *file);
+
+    /**
+     * Construct an open file based on a path and mode.
+     * @param path of file to open.
+     * @param mode of file.
+     * @param size of buffer, 0 = none, 1 = line mode, 2 = default
+     */
+    file(const char *path, const char *mode, size_t size = 2);
+
+    /**
+     * Construct an open file based on a pipe.
+     * @param path of file to pipe.
+     * @param argv of executable.
+     * @param mode of file.
+     * @param envp to give executable.
+     */
+    file(const char *path, char **argv, const char *mode, char **envp = NULL);
+
+    /**
+     * Construct an unopened file.
+     */
+    file();
+
+    /**
+     * Destroy object and close associated file.
+     */
+    ~file();
+
+    /**
+     * Test if file is opened.
+     * @return true if opened.
+     */
+    inline operator bool()
+        {return fp != NULL;}
+
+    /**
+     * Test if file is not opened.
+     * @return true if not opened.
+     */
+    inline bool operator !()
+        {return fp == NULL;}
+
+    inline operator FILE *()
+        {return fp;}
+
+    /**
+     * Open file path.  If a file is already opened, it is closed.
+     * @param path of file to open.
+     * @param mode of file to open.
+     * @param size of buffering, 0 = none, 1 = line mode.
+     */
+    void open(const char *path, const char *mode, size_t size = 2);
+
+    /**
+     * Open an executable path.
+     * @param path of executable.
+     * @param argv to pass to executable.
+     * @param mode of pipe (only "r" and "w" are valid).
+     */
+    void open(const char *path, char **argv, const char *mode, char **envp = NULL);
+
+    /**
+     * Close an open file.
+     * @return process exit code if pipe.
+     */
+    int close(void);
+
+    /**
+     * Clear error state.
+     */
+    inline void clear(void)
+        {if(fp) clearerr(fp);}
+
+    /**
+     * Check if file is good, no error or eof...
+     * @return bool if file stream is good.
+     */
+    bool good(void);
+
+    /**
+     * Cancel pipe and close file.
+     * @return process exit code if pipe.
+     */
+    int cancel(void);
+
+    inline size_t put(const void *data, size_t size)
+        { return fp == NULL ? 0 : fwrite(data, 1, size, fp);}
+
+    inline size_t get(void *data, size_t size)
+        { return fp == NULL ? 0 : fread(data, 1, size, fp);}
+
+    inline int put(char value)
+        { return fp == NULL ? EOF : fputc(value, fp);}
+
+    inline int get(void)
+        { return fp == NULL ? EOF : fgetc(fp);}
+
+    inline int push(char value)
+        { return fp == NULL ? EOF : ungetc(value, fp);}
+
+    inline int puts(const char *data)
+        { return fp == NULL ? 0 : fputs(data, fp);}
+
+    inline char *gets(char *data, size_t size)
+        { return fp == NULL ? NULL : fgets(data, size, fp);}
+
+    template<typename T> inline size_t read(T* data, size_t count)
+        { return fp == NULL ? 0 : fread(data, sizeof(T), count, fp);}
+
+    template<typename T> inline size_t write(const T* data, size_t count)
+        { return fp == NULL ? 0 : fwrite(data, sizeof(T), count, fp);}
+
+    template<typename T> inline size_t read(T& data)
+        { return fp == NULL ? 0 : fread(data, sizeof(T), 1, fp);}
+
+    template<typename T> inline size_t write(const T& data)
+        { return fp == NULL ? 0 : fwrite(data, sizeof(T), 1, fp);}
+
+    inline void get(bookmark_t& pos)
+        { if(fp) fsetpos(fp, &pos);}
+
+    inline void set(bookmark_t& pos)
+        { if(fp) fgetpos(fp, &pos);}
+
+    int err(void) const;
+
+    bool eof(void) const;
+
+    template<typename T> inline void offset(long pos)
+        {if(fp) fseek(fp, sizeof(const T) * pos, SEEK_CUR);}
+
+    inline void seek(long offset)
+        {if(fp) fseek(fp, offset, SEEK_SET);}
+
+    inline void move(long offset)
+        {if(fp) fseek(fp, offset, SEEK_CUR);}
+
+    inline void append(void)
+        {if (fp) fseek(fp, 0l, SEEK_END);}
+
+    inline void rewind(void)
+        {if(fp) ::rewind(fp);}
+
+    inline void flush(void)
+        {if(fp) ::fflush(fp);}
+
+    size_t printf(const char *format, ...) __PRINTF(2, 3);
+
+    size_t scanf(const char *format, ...) __SCANF(2, 3);
+
+    bool is_tty(void) const;
+};
+
+/**
+ * Convience type for file.
+ */
+typedef file file_t;
+
+END_NAMESPACE
+
+#endif
+
diff --git a/jni/libucommon/sources/inc/ucommon/fsys.h b/jni/libucommon/sources/inc/ucommon/fsys.h
new file mode 100644
index 0000000..549c92e
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/fsys.h
@@ -0,0 +1,834 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Thread-aware file system manipulation class.  This is used to provide
+ * generic file operations that are OS independent and thread-safe in
+ * behavior.  This is used in particular to wrap posix calls internally
+ * to pth, and to create portable code between MSWINDOWS and Posix low-level
+ * file I/O operations.
+ * @file ucommon/fsys.h
+ */
+
+#ifndef _UCOMMON_FSYS_H_
+#define _UCOMMON_FSYS_H_
+
+#ifndef _UCOMMON_CONFIG_H_
+#include <ucommon/platform.h>
+#endif
+
+#ifndef _UCOMMON_PROTOCOLS_H_
+#include <ucommon/protocols.h>
+#endif
+
+#ifndef _UCOMMON_THREAD_H_
+#include <ucommon/thread.h>
+#endif
+
+#ifndef _UCOMMON_STRING_H_
+#include <ucommon/string.h>
+#endif
+
+#ifndef _UCOMMON_MEMORY_H_
+#include <ucommon/memory.h>
+#endif
+
+#ifndef _MSWINDOWS_
+#include <sys/stat.h>
+#else
+#include <io.h>
+#ifndef R_OK
+#define F_OK 0
+#define X_OK 1
+#define W_OK 2
+#define R_OK 4
+#endif
+#endif
+
+#include <errno.h>
+#include <stdio.h>
+
+#ifndef __S_ISTYPE
+#define __S_ISTYPE(mode, mask)  (((mode) & S_IFMT) == (mask))
+#endif
+
+#if !defined(S_ISDIR) && defined(S_IFDIR)
+#define S_ISDIR(mode)   __S_ISTYPE((mode), S_IFDIR)
+#endif
+
+#if !defined(S_ISCHR) && defined(S_IFCHR)
+#define S_ISCHR(mode)   __S_ISTYPE((mode), S_IFCHR)
+#elif !defined(S_ISCHR)
+#define S_ISCHR(mode)   0
+#endif
+
+#if !defined(S_ISBLK) && defined(S_IFBLK)
+#define S_ISBLK(mode)   __S_ISTYPE((mode), S_IFBLK)
+#elif !defined(S_ISBLK)
+#define S_ISBLK(mode)   0
+#endif
+
+#if !defined(S_ISREG) && defined(S_IFREG)
+#define S_ISREG(mode)   __S_ISTYPE((mode), S_IFREG)
+#elif !defined(S_ISREG)
+#define S_ISREG(mode)   1
+#endif
+
+#if !defined(S_ISSOCK) && defined(S_IFSOCK)
+#define S_ISSOCK(mode)  __S_ISTYPE((mode), S_IFSOCK)
+#elif !defined(S_ISSOCK)
+#define S_ISSOCK(mode)  (0)
+#endif
+
+#if !defined(S_ISFIFO) && defined(S_IFIFO)
+#define S_ISFIFO(mode)  __S_ISTYPE((mode), S_IFIFO)
+#elif !defined(S_ISFIFO)
+#define S_ISFIFO(mode)  (0)
+#endif
+
+#if !defined(S_ISLNK) && defined(S_IFLNK)
+#define S_ISLNK(mode)   __S_ISTYPE((mode), S_IFLNK)
+#elif !defined(S_ISLNK)
+#define S_ISLNK(mode)   (0)
+#endif
+
+NAMESPACE_UCOMMON
+
+/**
+ * Convenience type for loader operations.
+ */
+typedef void *mem_t;
+
+/**
+ * A container for generic and o/s portable threadsafe file system functions.
+ * These are based roughly on their posix equivilents.  For libpth, the
+ * system calls are wrapped.  The native file descriptor or handle may be
+ * used, but it is best to use "class fsys" instead because it can capture
+ * the errno of a file operation in a threadsafe and platform independent
+ * manner, including for mswindows targets.
+ */
+class __EXPORT fsys
+{
+protected:
+    fd_t    fd;
+    int     error;
+
+public:
+    /**
+     * Most of the common chmod values are predefined.
+     */
+    enum {
+        OWNER_READONLY = 0400,
+        GROUP_READONLY = 0440,
+        PUBLIC_READONLY = 0444,
+        OWNER_PRIVATE = 0600,
+        OWNER_PUBLIC = 0644,
+        GROUP_PRIVATE = 0660,
+        GROUP_PUBLIC = 0664,
+        EVERYONE = 0666,
+        DIR_TEMPORARY = 01777
+    };
+
+    typedef struct stat fileinfo_t;
+
+#ifdef  _MSWINDOWS_
+    static int remapError(void);
+#else
+    inline static int remapError(void)
+        {return errno;};
+#endif
+
+    /**
+     * Enumerated file access modes.
+     */
+    typedef enum {
+        RDONLY,
+        WRONLY,
+        REWRITE,
+        RDWR = REWRITE,
+        APPEND,
+        SHARED,
+        EXCLUSIVE,
+        DEVICE,
+        STREAM,
+        RANDOM
+    } access_t;
+
+    /**
+     * File offset type.
+     */
+    typedef long offset_t;
+
+    /**
+     * Used to mark "append" in set position operations.
+     */
+    static const offset_t end;
+
+    /**
+     * Construct an unattached fsys descriptor.
+     */
+    fsys();
+
+    /**
+     * Contruct fsys from raw file handle.
+     */
+    fsys(fd_t handle);
+
+    /**
+     * Copy (dup) an existing fsys descriptor.
+     * @param descriptor to copy from.
+     */
+    fsys(const fsys& descriptor);
+
+    /**
+     * Create a fsys descriptor by opening an existing file or directory.
+     * @param path of file to open for created descriptor.
+     * @param access mode of file.
+     */
+    fsys(const char *path, access_t access);
+
+    /**
+     * Create a fsys descriptor by creating a file.
+     * @param path of file to create for descriptor.
+     * @param access mode of file access.
+     * @param permission mode of file.
+     */
+    fsys(const char *path, unsigned permission, access_t access);
+
+    /**
+     * Close and release a file descriptor.
+     */
+    ~fsys();
+
+    /**
+     * Get the descriptor from the object by pointer reference.
+     * @return low level file handle.
+     */
+    inline fd_t operator*() const
+        {return fd;};
+
+    /**
+     * Get the descriptor from the object by casting reference.
+     * @return low level file handle.
+     */
+    inline operator fd_t() const
+        {return fd;}
+
+    /**
+     * Reset error flag.
+     */
+    inline void reset(void)
+        {error = 0;}
+
+    /**
+     * Test if file descriptor is open.
+     * @return true if open.
+     */
+    inline operator bool() const
+        {return fd != INVALID_HANDLE_VALUE;}
+
+    /**
+     * Test if file descriptor is closed.
+     * @return true if closed.
+     */
+    inline bool operator!() const
+        {return fd == INVALID_HANDLE_VALUE;}
+
+    /**
+     * Assign file descriptor by duplicating another descriptor.
+     * @param descriptor to dup from.
+     */
+    void operator=(const fsys& descriptor);
+
+    /**
+     * Replace current file descriptor with an external descriptor.  This
+     * does not create a duplicate.  The external descriptor object is
+     * marked as invalid.
+     */
+    void operator*=(fd_t& descriptor);
+
+    /**
+     * Assing file descriptor from system descriptor.
+     * @param descriptor to dup from.
+     */
+    void operator=(fd_t descriptor);
+
+    /**
+     * Get the native system descriptor handle of the file descriptor.
+     * @return native os descriptor.
+     */
+    inline fd_t handle(void) const
+        {return fd;};
+
+    /**
+     * Set with external descriptor.  Closes existing file if open.
+     * @param descriptor of open file.
+     */
+    void set(fd_t descriptor);
+
+    /**
+     * Release descriptor, do not close.
+     * @return handle being released.
+     */
+    fd_t release(void);
+
+    /**
+     * Set the position of a file descriptor.
+     * @param offset from start of file or "end" to append.
+     * @return error number or 0 on success.
+     */
+    int seek(offset_t offset);
+
+    /**
+     * Drop cached data from start of file.
+     * @param size of region to drop or until end of file.
+     * @return error number or 0 on success.
+     */
+    int drop(offset_t size = 0);
+
+    /**
+     * See if current file stream is a tty device.
+     * @return true if device.
+     */
+    bool is_tty(void);
+
+    /**
+     * See if the file handle is a tty device.
+     * @return true if device.
+     */
+    static bool is_tty(fd_t fd);
+
+    /**
+     * Read data from descriptor or scan directory.
+     * @param buffer to read into.
+     * @param count of bytes to read.
+     * @return bytes transferred, -1 if error.
+     */
+    ssize_t read(void *buffer, size_t count);
+
+    /**
+     * Write data to descriptor.
+     * @param buffer to write from.
+     * @param count of bytes to write.
+     * @return bytes transferred, -1 if error.
+     */
+    ssize_t write(const void *buffer, size_t count);
+
+    /**
+     * Get status of open descriptor.
+     * @param buffer to save status info in.
+     * @return error number or 0 on success.
+     */
+    int info(fileinfo_t *buffer);
+
+    /**
+     * Truncate file to specified length.  The file pointer is positioned
+     * to the new end of file.
+     * @param offset to truncate to.
+     * @return true if truncate successful.
+     */
+    int trunc(offset_t offset);
+
+    /**
+     * Commit changes to the filesystem.
+     * @return error number or 0 on success.
+     */
+    int sync(void);
+
+    /**
+     * Set directory prefix (chdir).
+     * @param path to change to.
+     * @return error number or 0 on success.
+     */
+    static int prefix(const char *path);
+
+    /**
+     * Get current directory prefix (pwd).
+     * @param path to save directory into.
+     * @param size of path we can save.
+     * @return error number or 0 on success.
+     */
+    static int prefix(char *path, size_t size);
+
+    static string_t prefix(void);
+
+    /**
+     * Stat a file.
+     * @param path of file to stat.
+     * @param buffer to save stat info.
+     * @return error number or 0 on success.
+     */
+    static int info(const char *path, fileinfo_t *buffer);
+
+    /**
+     * Erase (remove) a file only.
+     * @param path of file.
+     * @return error number or 0 on success.
+     */
+    static int erase(const char *path);
+
+    /**
+     * Copy a file.
+     * @param source file.
+     * @param target file.
+     * @param size of buffer.
+     * @return error number or 0 on success.
+     */
+    static int copy(const char *source, const char *target, size_t size = 1024);
+
+    /**
+     * Rename a file.
+     * @param oldpath to rename from.
+     * @param newpath to rename to.
+     * @return error number or 0 on success.
+     */
+    static int rename(const char *oldpath, const char *newpath);
+
+    /**
+     * Change file access mode.
+     * @param path to change.
+     * @param value of mode to assign.
+     * @return error number or 0 on success.
+     */
+    static int mode(const char *path, unsigned value);
+
+    /**
+     * Test if path exists.
+     * @param path to test.
+     * @return if true.
+     */
+    static bool is_exists(const char *path);
+
+    /**
+     * Test if path readable.
+     * @param path to test.
+     * @return if true.
+     */
+    static bool is_readable(const char *path);
+
+    /**
+     * Test if path writable.
+     * @param path to test.
+     * @return if true.
+     */
+    static bool is_writable(const char *path);
+
+    /**
+     * Test if path is executable.
+     * @param path to test.
+     * @return if true.
+     */
+    static bool is_executable(const char *path);
+
+    /**
+     * Test if path is a file.
+     * @param path to test.
+     * @return true if exists and is file.
+     */
+    static bool is_file(const char *path);
+
+    /**
+     * Test if path is a directory.
+     * @param path to test.
+     * @return true if exists and is directory.
+     */
+    static bool is_dir(const char *path);
+
+    /**
+     * Test if path is a symlink.
+     * @param path to test.
+     * @return true if exists and is symlink.
+     */
+    static bool is_link(const char *path);
+
+    /**
+     * Test if path is a device path.
+     * @param path to test.
+     * @return true of is a device path.
+     */
+    static bool is_device(const char *path);
+
+    /**
+     * Test if path is a hidden file.
+     * @param path to test.
+     * @return true if exists and is hidden.
+     */
+    static bool is_hidden(const char *path);
+
+    /**
+     * Open a file or directory.
+     * @param path of file to open.
+     * @param access mode of descriptor.
+     */
+    void open(const char *path, access_t access);
+
+    /**
+     * Assign descriptor directly.
+     * @param descriptor to assign.
+     */
+    inline void assign(fd_t descriptor)
+        {close(); fd = descriptor;};
+
+    /**
+     * Assign a descriptor directly.
+     * @param object to assign descriptor to.
+     * @param descriptor to assign.
+     */
+    inline static void assign(fsys& object, fd_t descriptor)
+        {object.close(); object.fd = descriptor;};
+
+    /**
+     * Open a file descriptor directly.
+     * @param path of file to create.
+     * @param access mode of descriptor.
+     * @param mode of file if created.
+     */
+    void open(const char *path, unsigned mode, access_t access);
+
+    /**
+     * Remove a symbolic link explicitly.  Other kinds of files are also
+     * deleted.  This should be used when uncertain about symlinks requiring
+     * special support.
+     * @param path to remove.
+     * @return error number or 0 on success.
+     */
+    static int unlink(const char *path);
+
+    /**
+     * Create a symbolic link.
+     * @param path to create.
+     * @param target of link.
+     * @return error number or 0 on success.
+     */
+    static int link(const char *path, const char *target);
+
+    /**
+     * Create a hard link.
+     * @param path to create link to.
+     * @param target of link.
+     * @return error number or 0 on success.
+     */
+    static int hardlink(const char *path, const char *target);
+
+    /**
+     * Read a symbolic link to get it's target.
+     * @param path of link.
+     * @param buffer to save target into.
+     * @param size of buffer.
+     */
+    static int linkinfo(const char *path, char *buffer, size_t size);
+
+    /**
+     * Close a fsys resource.
+     * @return error code as needed.
+     */
+    int close(void);
+
+    /**
+     * Get last error.
+     * @return error number.
+     */
+    inline int err(void) const
+        {return error;}
+
+    /**
+     * Direct means to open a read-only file path and return a descriptor.
+     * @param path to open.
+     * @return descriptor on success, invalid handle on failure.
+     */
+    static fd_t input(const char *path);
+
+    /**
+     * Direct means to create or access a writable path and return descriptor.
+     * @param path to create.
+     * @return descriptor on success, invalid handle on failure.
+     */
+    static fd_t output(const char *path);
+
+    /**
+     * Direct means to create or append a writable path and return descriptor.
+     * @param path to create.
+     * @return descriptor on success, invalid handle on failure.
+     */
+    static fd_t append(const char *path);
+
+    /**
+     * Release a file descriptor.
+     * @param descriptor to release.
+     */
+    static void release(fd_t descriptor);
+
+    /**
+     * Create pipe.  These are created inheritable by default.
+     * @param input descriptor.
+     * @param output descriptor.
+     * @param size of buffer if supported.
+     * @return 0 or error code.
+     */
+    static int pipe(fd_t& input, fd_t& output, size_t size = 0);
+
+    /**
+     * Changle inheritable handle.  On windows this is done by creating a
+     * duplicate handle and then closing the original.  Elsewhere this
+     * is done simply by setting flags.
+     * @param descriptor to modify.
+     * @param enable child process inheritence.
+     * @return 0 on success, error on failure.
+     */
+    static int inherit(fd_t& descriptor, bool enable);
+
+    /**
+     * Create inheritable /dev/null handle.
+     * @return null device handle.
+     */
+    static fd_t null(void);
+
+    /**
+     * Load a library into memory.
+     * @param path to plugin.
+     * @return 0 on success, else error.
+     */
+    static int load(const char *path);
+
+    /**
+     * Execute a process and get exit code.
+     * @param path to execute.
+     * @param argv list.
+     * @param optional env.
+     * @return exit code.
+     */
+    static int exec(const char *path, char **argv, char **envp = NULL);
+
+    static inline bool is_file(struct stat *inode)
+        {return S_ISREG(inode->st_mode);}
+
+    static inline bool is_dir(struct stat *inode)
+        {return S_ISDIR(inode->st_mode);}
+
+    static inline bool is_link(struct stat *inode)
+        {return S_ISLNK(inode->st_mode);}
+
+    static inline bool is_dev(struct stat *inode)
+        {return S_ISBLK(inode->st_mode) || S_ISCHR(inode->st_mode);}
+
+    static inline bool is_char(struct stat *inode)
+        {return S_ISCHR(inode->st_mode);}
+
+    static inline bool is_disk(struct stat *inode)
+        {return S_ISBLK(inode->st_mode);}
+
+    static inline bool is_sys(struct stat *inode)
+        {return S_ISSOCK(inode->st_mode) || S_ISFIFO(inode->st_mode);}
+};
+
+/**
+ * Convenience class for library plugins.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT dso
+{
+private:
+    friend class fsys;
+
+#ifdef  _MSWINDOWS_
+    HINSTANCE   ptr;
+#else
+    void    *ptr;
+#endif
+    int     error;
+
+public:
+#ifdef  _MSWINDOWS_
+    typedef int (FAR WINAPI *addr_t)();
+#else
+    typedef void *addr_t;
+#endif
+
+    /**
+     * Create dso object for use by load functions.
+     */
+    dso();
+
+    /**
+     * Create and map a dso object.
+     * @param path of library to map.
+     */
+    dso(const char *path);
+
+    /**
+     * Destroy dso and release library.
+     */
+    ~dso();
+
+    /**
+     * Map library object with library.
+     * @param name of library to load.
+     */
+    void map(const char *path);
+
+    /**
+     * Release loaded library.
+     */
+    void release(void);
+
+    /**
+     * Find symbol in loaded module.
+     * @param module to search.
+     * @param symbol to search for.
+     * @return address of symbol or NULL if not found.
+     */
+    addr_t find(const char *symbol) const;
+
+    inline int err(void) const
+        {return error;}
+
+    inline addr_t operator[](const char *symbol) const
+        {return find(symbol);}
+
+    inline addr_t operator()(const char *symbol) const
+        {return find(symbol);}
+
+    inline operator bool()
+        {return ptr != NULL;}
+
+    inline bool operator!()
+        {return ptr == NULL;}
+};
+
+/**
+ * Convenience class for directories.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT dir : private fsys
+{
+private:
+#ifdef  _MSWINDOWS_
+    WIN32_FIND_DATA *ptr;
+    HINSTANCE   mem;
+#else
+    void    *ptr;
+#endif
+
+public:
+    /**
+     * Construct and open a directory path.
+     * @param path of directory.
+     */
+    dir(const char *path);
+
+    /**
+     * Construct an unopened directory.
+     */
+    dir();
+
+    /**
+     * Close and release directory.
+     */
+    ~dir();
+
+    /**
+     * Simple direct method to create a directory.
+     * @param path of directory to create.
+     * @param mode of directory.
+     * @return error number or 0 on success.
+     */
+    static int create(const char *path, unsigned mode);
+
+    /**
+     * Remove an empty directory.
+     * @param path of directory.
+     * @return error number or 0 on success.
+     */
+    static int remove(const char *path);
+
+    /**
+     * Open a directory path for reading.
+     * @param path to open.
+     */
+    void open(const char *path);
+
+    /**
+     * Read data from directory.
+     * @param buffer to read into.
+     * @param count of bytes to read.
+     * @return bytes transferred, -1 if error.
+     */
+    ssize_t read(char *buffer, size_t count);
+
+    /**
+     * Close and release directory object.
+     */
+    void close(void);
+
+    inline int err(void) const
+        {return fsys::err();}
+
+    inline void reset(void)
+        {fsys::reset();}
+
+    /**
+     * Test if file descriptor is open.
+     * @return true if open.
+     */
+    inline operator bool() const
+        {return ptr != NULL;};
+
+    /**
+     * Test if file descriptor is closed.
+     * @return true if closed.
+     */
+    inline bool operator!() const
+        {return ptr == NULL;};
+};
+
+/**
+ * Convience type for fsys.
+ */
+typedef fsys fsys_t;
+
+typedef dir dir_t;
+
+typedef dso dso_t;
+
+inline bool is_exists(const char *path)
+    {return fsys::is_exists(path);}
+
+inline bool is_readable(const char *path)
+    {return fsys::is_readable(path);}
+
+inline bool is_writable(const char *path)
+    {return fsys::is_writable(path);}
+
+inline bool is_executable(const char *path)
+    {return fsys::is_executable(path);}
+
+inline bool is_file(const char *path)
+    {return fsys::is_file(path);}
+
+inline bool is_dir(const char *path)
+    {return fsys::is_dir(path);}
+
+inline bool is_link(const char *path)
+    {return fsys::is_link(path);}
+
+inline bool is_device(const char *path)
+    {return fsys::is_device(path);}
+
+END_NAMESPACE
+
+#endif
+
diff --git a/jni/libucommon/sources/inc/ucommon/generics.h b/jni/libucommon/sources/inc/ucommon/generics.h
new file mode 100644
index 0000000..28a4d0b
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/generics.h
@@ -0,0 +1,575 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Generic templates for C++.  These are templates that do not depend
+ * on any ucommon classes.  They can be used for generic C++ programming.
+ * @file ucommon/generics.h
+ */
+
+#ifndef _UCOMMON_GENERICS_H_
+#define _UCOMMON_GENERICS_H_
+
+#ifndef _UCOMMON_CPR_H_
+#include <ucommon/cpr.h>
+#endif
+
+#include <cstdlib>
+#include <string.h>
+
+#ifdef  NEW_STDLIB
+#include <stdexcept>
+#endif
+
+#if defined(NEW_STDLIB) || defined(OLD_STDLIB)
+#define THROW(x)    throw x
+#define THROWS(x)   throw(x)
+#define THROWS_ANY  throw()
+#else
+#define THROW(x)    ::abort()
+#define THROWS(x)
+#define THROWS_ANY
+#endif
+
+NAMESPACE_UCOMMON
+
+/**
+ * Generic smart pointer class.  This is the original Common C++ "Pointer"
+ * class with a few additions.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <typename T>
+class pointer
+{
+protected:
+    unsigned *counter;
+    T *object;
+
+public:
+    inline void release(void) {
+        if(counter && --(*counter)==0) {
+            delete counter;
+            delete object;
+        }
+        object = NULL;
+        counter = NULL;
+    }
+
+    inline void retain(void) {
+        if(counter)
+            ++*counter;
+    }
+
+    inline void set(T* ptr) {
+        if(object != ptr) {
+            release();
+            counter = new unsigned;
+            *counter = 1;
+            object = ptr;
+        }
+    }
+
+    inline void set(const pointer<T> &ref) {
+        if(object == ref.object)
+            return;
+
+        if(counter && --(*counter)==0) {
+            delete counter;
+            delete object;
+        }
+        object = ref.object;
+        counter = ref.counter;
+        if(counter)
+            ++(*counter);
+    }
+
+    inline pointer() {
+        counter = NULL;
+        object = NULL;
+    }
+
+    inline explicit pointer(T* ptr = NULL) : object(ptr) {
+        if(object) {
+            counter = new unsigned;
+            *counter = 1;
+        }
+        else
+            counter = NULL;
+    }
+
+    inline pointer(const pointer<T> &ref) {
+        object = ref.object;
+        counter = ref.counter;
+        if(counter)
+            ++(*counter);
+    }
+
+    inline pointer& operator=(const pointer<T> &ref) {
+        this->set(ref);
+        return *this;
+    }
+
+    inline pointer& operator=(T *ptr) {
+        this->set(ptr);
+        return *this;
+    }
+
+    inline ~pointer()
+        {release();}
+
+    inline T& operator*() const
+        {return *object;};
+
+    inline T* operator->() const
+        {return object;};
+
+    inline bool operator!() const
+        {return (counter == NULL);};
+
+    inline operator bool() const
+        {return counter != NULL;};
+};
+
+/**
+ * Generic smart array class.  This is the original Common C++ "Pointer" class
+ * with a few additions for arrays.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <typename T>
+class array_pointer
+{
+protected:
+    unsigned *counter;
+    T *array;
+
+public:
+    inline void release(void) {
+        if(counter && --(*counter)==0) {
+            delete counter;
+            delete[] array;
+        }
+        array = NULL;
+        counter = NULL;
+    }
+
+    inline void retain(void) {
+        if(counter)
+            ++*counter;
+    }
+
+    inline void set(T* ptr) {
+        if(array != ptr) {
+            release();
+            counter = new unsigned;
+            *counter = 1;
+            array = ptr;
+        }
+    }
+
+    inline void set(const array_pointer<T> &ref) {
+        if(array == ref.array)
+            return;
+
+        if(counter && --(*counter)==0) {
+            delete counter;
+            delete[] array;
+        }
+        array = ref.array;
+        counter = ref.counter;
+        if(counter)
+            ++(*counter);
+    }
+
+    inline array_pointer() {
+        counter = NULL;
+        array = NULL;
+    }
+
+    inline explicit array_pointer(T* ptr = NULL) : array(ptr) {
+        if(array) {
+            counter = new unsigned;
+            *counter = 1;
+        }
+        else
+            counter = NULL;
+    }
+
+    inline array_pointer(const array_pointer<T> &ref) {
+        array = ref.array;
+        counter = ref.counter;
+        if(counter)
+            ++(*counter);
+    }
+
+    inline array_pointer& operator=(const array_pointer<T> &ref) {
+        this->set(ref);
+        return *this;
+    }
+
+    inline array_pointer& operator=(T *ptr) {
+        this->set(ptr);
+        return *this;
+    }
+
+    inline ~array_pointer()
+        {release();}
+
+    inline T* operator*() const
+        {return array;};
+
+    inline T& operator[](size_t offset) const
+        {return array[offset];};
+
+    inline T* operator()(size_t offset) const
+        {return &array[offset];};
+
+    inline bool operator!() const
+        {return (counter == NULL);};
+
+    inline operator bool() const
+        {return counter != NULL;};
+};
+
+/**
+ * Manage temporary object stored on the heap.  This is used to create a
+ * object on the heap who's scope is controlled by the scope of a member
+ * function call.  Sometimes we have data types and structures which cannot
+ * themselves appear as auto variables.  We may also have a limited stack
+ * frame size in a thread context, and yet have a dynamic object that we
+ * only want to exist during the life of the method call.  Using temporary
+ * allows any type to be created from the heap but have a lifespan of a
+ * method's stack frame.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <typename T>
+class temporary
+{
+protected:
+    T *object;
+public:
+    /**
+     * Construct a temporary object, create our stack frame reference.
+     */
+    inline temporary()
+        {object = NULL;};
+
+    /**
+     * Disable copy constructor.
+     */
+    temporary(const temporary<T>&)
+        {::abort();};
+
+    /**
+     * Construct an assigned pointer.
+     */
+    inline temporary(T *ptr)
+        {object = ptr;};
+
+    /**
+     * Assign a temporary object.  This adds a pointer to an existing
+     * type to the current temporary pointer.  If the temporary was
+     * already assigned, then it is deleted.
+     * @param temp object to assign.
+     */
+    inline T& operator=(T *temp) {
+        if(object)
+            delete object;
+        object = temp;
+        return *this;
+    }
+
+    /**
+     * Assign a temporary object.  This adds a pointer to an existing
+     * type to the current temporary pointer.  If the temporary was
+     * already assigned, then it is deleted.
+     * @param temp object to assign.
+     */
+    inline void set(T *temp) {
+        if(object)
+            delete object;
+        object = temp;
+    }
+
+    /**
+     * Access heap object through our temporary directly.
+     * @return reference to heap resident object.
+     */
+    inline T& operator*() const
+        {return *object;};
+
+    /**
+     * Access members of our heap object through our temporary.
+     * @return member reference of heap object.
+     */
+    inline T* operator->() const
+        {return object;};
+
+    inline operator bool() const
+        {return object != NULL;};
+
+    inline bool operator!() const
+        {return object == NULL;};
+
+    inline ~temporary() {
+        if(object)
+            delete object;
+        object = NULL;
+    }
+};
+
+/**
+ * Manage temporary array stored on the heap.   This is used to create an
+ * array on the heap who's scope is controlled by the scope of a member
+ * function call.  Sometimes we have data types and structures which cannot
+ * themselves appear as auto variables.  We may also have a limited stack
+ * frame size in a thread context, and yet have a dynamic object that we
+ * only want to exist during the life of the method call.  Using temporary
+ * allows any type to be created from the heap but have a lifespan of a
+ * method's stack frame.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <typename T>
+class temp_array
+{
+protected:
+    T *array;
+    size_t size;
+
+public:
+    /**
+     * Construct a temporary object, create our stack frame reference.
+     */
+    inline temp_array(size_t s)
+        {array =  new T[s]; size = s;};
+
+    /**
+     * Construct a temporary object with a copy of some initial value.
+     * @param initial object value to use.
+     */
+    inline temp_array(const T& initial, size_t s) {
+        array = new T[s];
+        size = s;
+        for(size_t p = 0; p < s; ++p)
+            array[p] = initial;
+    }
+
+    inline void reset(size_t s)
+        {delete[] array; array = new T[s]; size = s;};
+
+    inline void reset(const T& initial, size_t s) {
+        if(array)
+            delete[] array;
+        array = new T[s];
+        size = s;
+        for(size_t p = 0; p < s; ++p)
+            array[p] = initial;
+    }
+
+    inline void set(const T& initial) {
+        for(size_t p = 0; p < size; ++p)
+            array[p] = initial;
+    }
+
+    /**
+     * Disable copy constructor.
+     */
+    temp_array(const temp_array<T>&)
+        {::abort();};
+
+    inline operator bool() const
+        {return array != NULL;};
+
+    inline bool operator!() const
+        {return array == NULL;};
+
+    inline ~temp_array() {
+        if(array)
+            delete[] array;
+        array = NULL;
+        size = 0;
+    }
+
+    inline T& operator[](size_t offset) const {
+        crit(offset < size, "array out of bound");
+        return array[offset];
+    }
+
+    inline T* operator()(size_t offset) const {
+        crit(offset < size, "array out of bound");
+        return &array[offset];
+    }
+};
+
+/**
+ * Save and restore global objects in function call stack frames.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template<typename T>
+class save_restore
+{
+private:
+    T *original;
+    T temp;
+
+public:
+    /**
+     * Save object into local copy and keep reference to the original object.
+     * @param object to save.
+     */
+    inline save_restore(T& object)
+        {original = &object; temp = object;};
+
+    /**
+     * Restore original when stack frame is released.
+     */
+    inline ~save_restore()
+        {*original = temp;};
+};
+
+/**
+ * Convenience function to validate object assuming it is castable to bool.
+ * @param object we are testing.
+ * @return true if object valid.
+ */
+template<class T>
+inline bool is(T& object)
+    {return object.operator bool();}
+
+/**
+ * Convenience function to test pointer object.  This solves issues where
+ * some compilers get confused between bool and pointer operators.
+ * @param object we are testing.
+ * @return true if object points to NULL.
+ */
+template<typename T>
+inline bool isnull(T& object)
+    {return (bool)(object.operator*() == NULL);}
+
+/**
+ * Convenience function to test pointer-pointer object.  This solves issues
+ * where some compilers get confused between bool and pointer operators.
+ * @param object we are testing.
+ * @return true if object points to NULL.
+ */
+template<typename T>
+inline bool isnullp(T *object)
+    {return (bool)(object->operator*() == NULL);}
+
+/**
+ * Convenience function to duplicate object pointer to heap.
+ * @param object we are duping.
+ * @return heap pointer instance.
+ */
+template<typename T>
+inline T* dup(const T& object)
+    {return new T(object);}
+
+template<typename T>
+inline void dupfree(T object)
+    {delete object;}
+
+template<>
+inline char *dup<char>(const char& object)
+    {return strdup(&object);}
+
+template<>
+inline void dupfree<char*>(char* object)
+    {::free(object);}
+
+/**
+ * Convenience function to reset an existing object.
+ * @param object type to reset.
+ */
+template<typename T>
+inline void reset_unsafe(T& object)
+    {new((caddr_t)&object) T;}
+
+/**
+ * Convenience function to zero an object and restore type info.
+ * @param object to zero in memory.
+ */
+template<typename T>
+inline void zero_unsafe(T& object)
+    {memset((void *)&object, 0, sizeof(T)); new((caddr_t)&object) T;}
+
+/**
+ * Convenience function to copy class.
+ * @param target to copy into.
+ * @param source to copy from.
+ */
+template<typename T>
+inline void copy_unsafe(T* target, const T* source)
+    {memcpy((void *)target, (void *)source, sizeof(T));}
+
+/**
+ * Convenience function to store object pointer into object.
+ * @param target to copy into.
+ * @param source to copy from.
+ */
+template<typename T>
+inline void store_unsafe(T& target, const T* source)
+    {memcpy((void *)&target, (void *)source, sizeof(T));}
+
+/**
+ * Convenience function to swap objects.
+ * @param o1 to swap.
+ * @param o2 to swap.
+ */
+template<typename T>
+inline void swap(T& o1, T& o2)
+    {cpr_memswap(&o1, &o2, sizeof(T));}
+
+/**
+ * Convenience function to return max of two objects.
+ * @param o1 to check.
+ * @param o2 to check.
+ * @return max object.
+ */
+template<typename T>
+inline T& (max)(T& o1, T& o2)
+{
+    return o1 > o2 ? o1 : o2;
+}
+
+/**
+ * Convenience function to return min of two objects.
+ * @param o1 to check.
+ * @param o2 to check.
+ * @return min object.
+ */
+template<typename T>
+inline T& (min)(T& o1, T& o2)
+{
+    return o1 < o2 ? o1 : o2;
+}
+
+/**
+ * Convenience macro to range restrict values.
+ * @param value to check.
+ * @param low value.
+ * @param high value.
+ * @return adjusted value.
+ */
+template<typename T>
+inline T& (limit)(T& value, T& low, T& high)
+{
+    return (value < low) ? low : ((value > high) ? high : value);
+}
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/keydata.h b/jni/libucommon/sources/inc/ucommon/keydata.h
new file mode 100644
index 0000000..e6e7e1b
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/keydata.h
@@ -0,0 +1,259 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Parsing of config files that have keyword/value pairs.  This includes
+ * supporting classes to extract basic config data from files that are stored
+ * as []'s, and uses several supporting classes.
+ * @file ucommon/keydata.h
+ */
+
+/**
+ * Some exercise of keydata routines.
+ * @example keydata.cpp
+ */
+
+#ifndef _UCOMMON_KEYDATA_H_
+#define _UCOMMON_KEYDATA_H_
+
+#ifndef _UCOMMON_CONFIG_H_
+#include <ucommon/platform.h>
+#endif
+
+#ifndef  _UCOMMON_LINKED_H_
+#include <ucommon/linked.h>
+#endif
+
+#ifndef  _UCOMMON_MEMORY_H_
+#include <ucommon/memory.h>
+#endif
+
+NAMESPACE_UCOMMON
+
+class keyfile;
+
+/**
+ * Data keys parsed from a keyfile.  This is a specific [] section from a
+ * fully loaded keyfile, and offers common means to access data members.
+ * This is related to the original GNU Common C++ keydata object, although
+ * it is formed in a keyfile class which is loaded from a config file all
+ * at once.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT keydata : public OrderedObject
+{
+private:
+    friend class keyfile;
+    OrderedIndex index;
+    keydata(keyfile *file);
+    keydata(keyfile *file, const char *id);
+    const char *name;
+    keyfile *root;
+
+public:
+    /**
+     * A key value set is used for iterative access.  Otherwise this class
+     * is normally not used as we usually request the keys directly.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+    class __LOCAL keyvalue : public OrderedObject
+    {
+    private:
+        friend class keydata;
+        friend class keyfile;
+        keyvalue(keyfile *allocator, keydata *section, const char *key, const char *data);
+    public:
+        const char *id;
+        const char *value;
+    };
+
+    friend class keyvalue;
+
+    /**
+     * Lookup a key value by it's id.
+     * @param id to look for.
+     * @return value string or NULL if not found.
+     */
+    const char *get(const char *id) const;
+
+    /**
+     * Lookup a key value by it's id.
+     * @param id to look for.
+     * @return value string or NULL if not found.
+     */
+    inline const char *operator()(const char *id) const
+        {return get(id);};
+
+    /**
+     * Set a keyword and value in the keydata structure.  If the keyword
+     * already exists, it is replaced.  Removed items still use pager
+     * allocated memory.
+     * @param id to set.
+     * @param value for the id.
+     */
+    void set(const char *id, const char *value);
+
+    /**
+     * Remove a keyword id from the keydata structure.  Removed items
+     * still use pager allocated memory.
+     * @param id to remove.
+     */
+    void clear(const char *id);
+
+    /**
+     * Get the name of this section.  Useful in iterative examinations.
+     * @return name of keydata section.
+     */
+    inline const char *get(void) const
+        {return name;};
+
+    /**
+     * Get first value object, for iterative examinations.
+     * @return first key value in chain.
+     */
+    inline keyvalue *begin(void) const
+        {return (keyvalue *)index.begin();};
+
+    /**
+     * Get last value object, for iterative examinations.
+     * @return first key value in chain.
+     */
+    inline keyvalue *end(void) const
+        {return (keyvalue*)index.end();};
+
+    /**
+     * Convenience typedef for iterative pointer.
+     */
+    typedef linked_pointer<keyvalue> iterator;
+};
+
+/**
+ * Traditional keypair config file parsing class.  This is used to get
+ * generic config data either from a /etc/xxx.conf, a windows style
+ * xxx.ini file, or a ~/.xxxrc file, and parses [] sections from the
+ * entire file at once.
+ */
+class __EXPORT keyfile : public memalloc
+{
+private:
+    friend class keydata;
+    OrderedIndex index;
+    keydata *defaults;
+    int errcode;
+
+protected:
+    keydata *create(const char *section);
+
+#ifdef  _MSWINDOWS_
+    void load(HKEY root, keydata *section = NULL, const char *path = NULL);
+    bool save(HKEY root, keydata *section = NULL, const char *path = NULL);
+#endif
+
+public:
+    /**
+     * Create an empty key file ready for loading.
+     * @param pagesize for memory paging.
+     */
+    keyfile(size_t pagesize = 0);
+
+    /**
+     * Create a key file object from an existing config file.
+     * @param path to load from.
+     * @param pagesize for memory paging.
+     */
+    keyfile(const char *path, size_t pagesize = 0);
+
+    keyfile(const keyfile &copy, size_t pagesize = 0);
+
+    /**
+     * Load (overlay) another config file over the currently loaded one.
+     * This is used to merge key data, such as getting default values from
+     * a global config, and then overlaying a local home config file.
+     * @param path to load keys from into current object.
+     */
+    void load(const char *path);
+
+    /**
+     * Save (write) a set of config keys to dist.
+     * @param path of file to save keys to.
+     * @return true on success.
+     */
+    bool save(const char *path);
+
+    /**
+     * Load from an existing keyfile object.
+     * @param source to copy from.
+     */
+    void load(const keyfile *source);
+
+    /**
+     * Load a single set of keys.
+     * @param source of keys to copy.
+     */
+    void load(const keydata *source);
+
+    /**
+     * Release and re-initialize keyfile.
+     */
+    void release(void);
+
+    /**
+     * Get a keydata section name.
+     * @param section name to look for.
+     * @return keydata section object if found, NULL if not.
+     */
+    keydata *get(const char *section) const;
+
+    inline keydata *operator()(const char *section) const
+        {return get(section);};
+
+    inline keydata *operator[](const char *section) const
+        {return get(section);};
+
+    /**
+     * Get the non-sectioned defaults if there are any.
+     * @return default key section.
+     */
+    inline keydata *get(void) const
+        {return defaults;};
+
+    /**
+     * Get first keydata object, for iterative examinations.
+     * @return first key value in chain.
+     */
+    inline keydata *begin(void) const
+        {return (keydata *)index.begin();};
+
+    /**
+     * Get last keydata object, for iterative examinations.
+     * @return first key value in chain.
+     */
+    inline keydata *end(void) const
+        {return (keydata *)index.end();};
+
+    /**
+     * Convenience typedef for iterative pointer.
+     */
+    typedef linked_pointer<keydata> iterator;
+
+    inline int err(void)
+        {return errcode;}
+};
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/linked.h b/jni/libucommon/sources/inc/ucommon/linked.h
new file mode 100644
index 0000000..1232cff
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/linked.h
@@ -0,0 +1,1969 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Linked objects, lists, templates, and containers.
+ * Common support for objects that might be organized as single and double
+ * linked lists, rings and queues, and tree oriented data structures.  These
+ * generic classes may be used to help form anything from callback
+ * registration systems and indexed memory hashes to xml parsed tree nodes.
+ * @file ucommon/linked.h
+ */
+
+/**
+ * An example of the linked object classes and their use.
+ * @example linked.cpp
+ */
+
+#ifndef _UCOMMON_LINKED_H_
+#define _UCOMMON_LINKED_H_
+
+#ifndef _UCOMMON_CONFIG_H_
+#include <ucommon/platform.h>
+#endif
+
+#ifndef _UCOMMON_OBJECT_H_
+#include <ucommon/object.h>
+#endif
+
+NAMESPACE_UCOMMON
+
+class OrderedObject;
+
+/**
+ * Common base class for all objects that can be formed into a linked list.
+ * This base class is used directly for objects that can be formed into a
+ * single linked list.  It is also used directly as a type for a pointer to the
+ * start of list of objects that are linked together as a list.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT LinkedObject : public ObjectProtocol
+{
+protected:
+    friend class OrderedIndex;
+    friend class LinkedRing;
+    friend class NamedObject;
+    friend class ObjectStack;
+
+    LinkedObject *Next;
+
+    /**
+     * Construct base class attached to a chain of objects.
+     * @param root pointer to chain of objects we are part of.
+     */
+    LinkedObject(LinkedObject **root);
+
+    /**
+     * Construct base class unattached to anyone.  This might be
+     * used to construct intermediary base classes that may form
+     * lists through indexing objects.
+     */
+    LinkedObject();
+
+public:
+    static const LinkedObject *nil; /**< Marker for end of linked list. */
+    static const LinkedObject *inv; /**< Marker for invalid list pointer */
+
+    virtual ~LinkedObject();
+
+    /**
+     * Release list, mark as no longer linked.  Inherited from base Object.
+     */
+    virtual void release(void);
+
+    /**
+     * Retain by marking as self referenced list. Inherited from base Object.
+     */
+    virtual void retain(void);
+
+    /**
+     * Add our object to an existing linked list through a pointer.  This
+     * forms a container sorted in lifo order since we become the head
+     * of the list, and the previous head becomes our next.
+     * @param root pointer to list we are adding ourselves to.
+     */
+    void enlist(LinkedObject **root);
+
+    /**
+     * Locate and remove ourselves from a list of objects.  This searches
+     * the list to locate our object and if found relinks the list around
+     * us.
+     * @param root pointer to list we are removing ourselves from.
+     */
+    void delist(LinkedObject **root);
+
+    /**
+     * Search to see if we are a member of a specific list.
+     * @return true if we are member of the list.
+     */
+    bool is_member(LinkedObject *list) const;
+
+    /**
+     * Release all objects from a list.
+     * @param root pointer to list we are purging.
+     */
+    static void purge(LinkedObject *root);
+
+    /**
+     * Count the number of linked objects in a list.
+     * @param root pointer to list we are counting.
+     */
+    static unsigned count(const LinkedObject *root);
+
+    /**
+     * Get member by index.
+     * @return indexed member in linked list.
+     * @param root pointer to list we are indexing.
+     * @param index member to find.
+     */
+    static LinkedObject *getIndexed(LinkedObject *root, unsigned index);
+
+    /**
+     * Get next effective object when iterating.
+     * @return next linked object in list.
+     */
+    inline LinkedObject *getNext(void) const
+        {return Next;};
+};
+
+/**
+ * Reusable objects for forming private heaps.  Reusable objects are
+ * linked objects that may be allocated in a private heap, and are
+ * returned to a free list when they are no longer needed so they can
+ * be reused without having to be re-allocated.  The free list is the
+ * root of a linked object chain.  This is used as a base class for those
+ * objects that will be managed through reusable heaps.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT ReusableObject : public LinkedObject
+{
+    friend class ReusableAllocator;
+
+protected:
+    virtual void release(void);
+
+public:
+    /**
+     * Get next effective reusable object when iterating.
+     * @return next reusable object in list.
+     */
+    inline ReusableObject *getNext(void)
+        {return static_cast<ReusableObject*>(LinkedObject::getNext());};
+};
+
+/**
+ * An index container for maintaining an ordered list of objects.
+ * This index holds a pointer to the head and tail of an ordered list of
+ * linked objects.  Fundamental methods for supporting iterators are
+ * also provided.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT OrderedIndex
+{
+protected:
+    friend class OrderedObject;
+    friend class DLinkedObject;
+    friend class LinkedList;
+    friend class NamedObject;
+
+    OrderedObject *head, *tail;
+
+    void copy(const OrderedIndex& source);
+
+public:
+    /**
+     * Create and initialize an empty index.
+     */
+    OrderedIndex();
+
+    inline OrderedIndex(const OrderedIndex& source)
+        {copy(source);}
+
+    /**
+     * Destroy index.
+     */
+    virtual ~OrderedIndex();
+
+    /**
+     * Find a specific member in the ordered list.
+     * @param offset to member to find.
+     */
+    LinkedObject *find(unsigned offset) const;
+
+    /**
+     * Count of objects this list manages.
+     * @return number of objects in the list.
+     */
+    unsigned count(void) const;
+
+    /**
+     * Purge the linked list and then set the index to empty.
+     */
+    void purge(void);
+
+    /**
+     * Reset linked list to empty without purging.
+     */
+    void reset(void);
+
+    /**
+     * Used to synchronize lists managed by multiple threads.  A derived
+     * locking method would be invoked.
+     */
+    virtual void lock_index(void);
+
+    /**
+     * Used to synchronize lists managed by multiple threads.  A derived
+     * unlocking method would be invoked.
+     */
+    virtual void unlock_index(void);
+
+    /**
+     * Return a pointer to the head of the list.  This allows the head
+     * pointer to be used like a simple root list pointer for pure
+     * LinkedObject based objects.
+     * @return LinkedIndex style object.
+     */
+    LinkedObject **index(void) const;
+
+    /**
+     * Get (pull) object off the list.  The start of the list is advanced to
+     * the next object.
+     * @return LinkedObject based object that was head of the list.
+     */
+    LinkedObject *get(void);
+
+    /**
+     * Add an object into the ordered index.
+     * @param ordered object to add to the index.
+     */
+    void add(OrderedObject *ordered);
+
+    /**
+     * Get an indexed member from the ordered index.
+     * @param index of member to fetch.
+     * @return LinkedObject member of index.
+     */
+    inline LinkedObject *getIndexed(unsigned index) const
+        {return LinkedObject::getIndexed((LinkedObject*)head, index);};
+
+    /**
+     * Return first object in list for iterators.
+     * @return first object in list.
+     */
+    inline LinkedObject *begin(void) const
+        {return (LinkedObject*)(head);};
+
+    /**
+     * Return last object in list for iterators.
+     * @return last object in list.
+     */
+    inline LinkedObject *end(void) const
+        {return (LinkedObject*)(tail);};
+
+    /**
+     * Return head object pointer.
+     * @return head pointer.
+     */
+    inline LinkedObject *operator*() const
+        {return (LinkedObject*)(head);};
+
+    /**
+     * Assign ordered index.
+     * @param object to copy from.
+     */
+    OrderedIndex& operator=(const OrderedIndex& object)
+        {copy(object); return *this;}
+
+    /**
+     * Add object to our list.
+     * @param object to add.
+     */
+    void operator*=(OrderedObject *object);
+};
+
+/**
+ * A linked object base class for ordered objects.  This is used for
+ * objects that must be ordered and listed through the OrderedIndex
+ * class.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT OrderedObject : public LinkedObject
+{
+protected:
+    friend class LinkedList;
+    friend class OrderedIndex;
+    friend class DLinkedObject;
+    friend class ObjectQueue;
+
+    /**
+     * Construct an ordered object aot end of a an index.
+     * @param index we are listed on.
+     */
+    OrderedObject(OrderedIndex *index);
+
+    /**
+     * Construct an ordered object unattached.
+     */
+    OrderedObject();
+
+public:
+    /**
+     * List our ordered object at end of a linked list on an index.
+     * @param index we are listing on.
+     */
+    void enlistTail(OrderedIndex *index);
+
+    /**
+     * List our ordered object at start of a linked list on an index.
+     * @param index we are listing on.
+     */
+    void enlistHead(OrderedIndex *index);
+
+    /**
+     * List our ordered object in default strategy mode.  The default
+     * base class uses enlistTail.
+     * @param index we are listing on.
+     */
+    virtual void enlist(OrderedIndex *index);
+
+    /**
+     * Remove our ordered object from an existing index.
+     * @param index we are listed on.
+     */
+    void delist(OrderedIndex *index);
+
+    /**
+     * Get next ordered member when iterating.
+     * @return next ordered object.
+     */
+    inline OrderedObject *getNext(void) const
+        {return static_cast<OrderedObject *>(LinkedObject::getNext());};
+};
+
+/**
+ * A double-linked Object, used for certain kinds of lists.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT DLinkedObject : public OrderedObject
+{
+public:
+    friend class ObjectQueue;
+
+    /**
+     * Construct an empty object.
+     */
+    DLinkedObject();
+
+protected:
+    /**
+     * Remove a cross-linked list from itself.
+     */
+    void delist(void);
+
+private:
+    DLinkedObject *Prev;
+};
+
+/**
+ * A linked object base class with members found by name.  This class is
+ * used to help form named option lists and other forms of name indexed
+ * associative data structures.  The id is assumed to be passed from a
+ * dupped or dynamically allocated string.  If a constant string is used
+ * then you must not call delete for this object.
+ *
+ * Named objects are either listed on an ordered list or keyed through an
+ * associate hash map table.  When using a hash table, the name id string is
+ * used to determine the slot number to use in a list of n sized linked
+ * object lists.  Hence, a hash index refers to a specific sized array of
+ * object indexes.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT NamedObject : public OrderedObject
+{
+protected:
+    char *Id;
+
+    /**
+     * Create an empty unnamed cell object.
+     */
+    NamedObject();
+
+    /**
+     * Create a named object and add to hash indexed list.
+     * @param hash map table to list node on.
+     * @param name of the object we are listing.
+     * @param size of hash map table used.
+     */
+    NamedObject(NamedObject **hash, char *name, unsigned size = 1);
+
+    /**
+     * Created a named object on an ordered list.  This is commonly used
+     * to form attribute lists.
+     * @param index to list object on.
+     * @param name of the object we are listing.
+     */
+    NamedObject(OrderedIndex *index, char *name);
+
+    /**
+     * Destroy named object.  We do not always destroy named objects, since
+     * we may use them in reusable pools or we may initialize a list that we
+     * keep permanently.  If we do invoke delete for something based on
+     * NamedObject, then be aware the object id is assumed to be formed from
+     * a dup'd string which will also be freed unless clearId is overridden.
+     */
+    ~NamedObject();
+
+    /**
+     * The behavior of clearing id's can be overridden if they are not
+     * assigned as strdup's from the heap...
+     */
+    virtual void clearId(void);
+
+public:
+    /**
+     * Add object to hash indexed list.
+     * @param hash map table to list node on.
+     * @param name of the object we are listing.
+     * @param size of hash map table used.
+     */
+    void add(NamedObject **hash, char *name, unsigned size = 1);
+
+    /**
+     * Purge a hash indexed table of named objects.
+     * @param hash map table to purge.
+     * @param size of hash map table used.
+     */
+    static void purge(NamedObject **hash, unsigned size);
+
+    /**
+     * Convert a hash index into a linear object pointer array.  The
+     * object pointer array is created from the heap and must be deleted
+     * when no longer used.
+     * @param hash map table of objects to index.
+     * @param size of hash map table used.
+     * @return array of named object pointers.
+     */
+    static NamedObject **index(NamedObject **hash, unsigned size);
+
+    /**
+     * Count the total named objects in a hash table.
+     * @param hash map table of objects to index.
+     * @param size of hash map table used.
+     */
+    static unsigned count(NamedObject **hash, unsigned size);
+
+    /**
+     * Find a named object from a simple list.  This may also use the
+     * begin() member of an ordered index of named objects.
+     * @param root node of named object list.
+     * @param name of object to find.
+     * @return object pointer or NULL if not found.
+     */
+    static NamedObject *find(NamedObject *root, const char *name);
+
+    /**
+     * Remove a named object from a simple list.
+     * @param root node of named object list.
+     * @param name of object to find.
+     * @return object pointer or NULL if not found.
+     */
+    static NamedObject *remove(NamedObject **root, const char *name);
+
+    /**
+     * Find a named object through a hash map table.
+     * @param hash map table of objects to search.
+     * @param name of object to find.
+     * @param size of hash map table.
+     * @return object pointer or NULL if not found.
+     */
+    static NamedObject *map(NamedObject **hash, const char *name, unsigned size);
+
+    /**
+     * Remove an object from a hash map table.
+     * @param hash map table of object to remove from.
+     * @param name of object to remove.
+     * @param size of hash map table.
+     * @return object that is removed or NULL if not found.
+     */
+    static NamedObject *remove(NamedObject **hash, const char *name, unsigned size);
+
+    /**
+     * Iterate through a hash map table.
+     * @param hash map table to iterate.
+     * @param current named object we iterated or NULL to find start of list.
+     * @param size of map table.
+     * @return next named object in hash map or NULL if no more objects.
+     */
+    static NamedObject *skip(NamedObject **hash, NamedObject *current, unsigned size);
+
+    /**
+     * Internal function to convert a name to a hash index number.
+     * @param name to convert into index.
+     * @param size of map table.
+     */
+    static unsigned keyindex(const char *name, unsigned size);
+
+    /**
+     * Sort an array of named objects in alphabetical order.  This would
+     * typically be used to sort a list created and returned by index().
+     * @param list of named objects to sort.
+     * @param count of objects in the list or 0 to find by NULL pointer.
+     * @return list in sorted order.
+     */
+    static NamedObject **sort(NamedObject **list, size_t count = 0);
+
+    /**
+     * Get next effective object when iterating.
+     * @return next linked object in list.
+     */
+    inline NamedObject *getNext(void) const
+        {return static_cast<NamedObject*>(LinkedObject::getNext());};
+
+    /**
+     * Get the named id string of this object.
+     * @return name id.
+     */
+    inline char *getId(void) const
+        {return Id;};
+
+    /**
+     * Compare the name of our object to see if equal.  This is a virtual
+     * so that it can be overridden when using named lists or hash lookups
+     * that must be case insensitive.
+     * @param name to compare our name to.
+     * @return 0 if effectivily equal, used for sorting keys.
+     */
+    virtual int compare(const char *name) const;
+
+    /**
+     * Equal function which calls compare.
+     * @param name to compare our name to.
+     * @return true if equal.
+     */
+    inline bool equal(const char *name) const
+        {return (compare(name) == 0);};
+
+    /**
+     * Comparison operator between our name and a string.
+     * @param name to compare with.
+     * @return true if equal.
+     */
+    inline bool operator==(const char *name) const
+        {return compare(name) == 0;};
+
+    /**
+     * Comparison operator between our name and a string.
+     * @param name to compare with.
+     * @return true if not equal.
+     */
+    inline bool operator!=(const char *name) const
+        {return compare(name) != 0;};
+};
+
+/**
+ * The named tree class is used to form a tree oriented list of associated
+ * objects.  Typical uses for such data structures might be to form a
+ * parsed XML document, or for forming complex configuration management
+ * systems or for forming system resource management trees.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT NamedTree : public NamedObject
+{
+protected:
+    NamedTree *Parent;
+    OrderedIndex Child;
+
+    /**
+     * Create a stand-alone or root tree node, with an optional name.
+     * @param name for this node.
+     */
+    NamedTree(char *name = NULL);
+
+    /**
+     * Create a tree node as a child of an existing node.
+     * @param parent node we are listed under.
+     * @param name of our node.
+     */
+    NamedTree(NamedTree *parent, char *name);
+
+    /**
+     * Construct a copy of the tree.
+     * @param source object to copy from.
+     */
+    NamedTree(const NamedTree& source);
+
+    /**
+     * Delete node in a tree.  If we delete a node, we must delist it from
+     * it's parent.  We must also delink any child nodes.  This is done by
+     * calling the purge() member.
+     */
+    virtual ~NamedTree();
+
+    /**
+     * Performs object destruction.  Note, if we delete a named tree object
+     * the name of our member object is assumed to be a dynamically allocated
+     * string that will also be free'd.
+     */
+    void purge(void);
+
+public:
+    /**
+     * Find a child node of our object with the specified name.  This will
+     * also recursivily search all child nodes that have children until
+     * the named node can be found.  This seeks a child node that has
+     * children.
+     * @param name to search for.
+     * @return tree object found or NULL.
+     */
+    NamedTree *find(const char *name) const;
+
+    /**
+     * Find a subnode by a dot separated list of node names.  If one or
+     * more lead dots are used, then the search will go through parent
+     * node levels of our node.  The dot separated list could be thought
+     * of as a kind of pathname where dot is used like slash.  This implies
+     * that individual nodes can never use names which contain dot's if
+     * the path function will be used.
+     * @param path name string being sought.
+     * @return tree node object found at the path or NULL.
+     */
+    NamedTree *path(const char *path) const;
+
+    /**
+     * Find a child leaf node of our object with the specified name.  This
+     * will recursively search all our child nodes until it can find a leaf
+     * node containing the specified id but that holds no further children.
+     * @param name of leaf node to search for.
+     * @return tree node object found or NULL.
+     */
+    NamedTree *leaf(const char *name) const;
+
+    /**
+     * Find a direct child of our node which matches the specified name.
+     * @param name of child node to find.
+     * @return tree node object of child or NULL.
+     */
+    NamedTree *getChild(const char *name) const;
+
+    /**
+     * Find a direct leaf node on our node.  A leaf node is a node that has
+     * no children of it's own.  This does not perform a recursive search.
+     * @param name of leaf child node to find.
+     * @return tree node object of leaf or NULL.
+     */
+    NamedTree *getLeaf(const char *name) const;
+
+    /**
+     * Get first child node in our ordered list of children.  This might
+     * be used to iterate child nodes.  This may also be used to get
+     * unamed child nodes.
+     * @return first child node or NULL if no children.
+     */
+    inline NamedTree *getFirst(void) const
+        {return static_cast<NamedTree *>(Child.begin());};
+
+    /**
+     * Get parent node we are listed as a child on.
+     * @return parent node or NULL if none.
+     */
+    inline NamedTree *getParent(void) const
+        {return Parent;};
+
+    /**
+     * Get child by index number.
+     * @param index of child to fetch.
+     * @return indexed child node.
+     */
+    inline NamedTree *getIndexed(unsigned index) const
+        {return static_cast<NamedTree *>(Child.getIndexed(index));};
+
+    /**
+     * Get the ordered index of our child nodes.
+     * @return ordered index of our children.
+     */
+    inline OrderedIndex *getIndex(void) const
+        {return const_cast<OrderedIndex*>(&Child);};
+
+    /**
+     * Test if this node has a name.
+     * @return true if name is set.
+     */
+    inline operator bool() const
+        {return (Id != NULL);};
+
+    /**
+     * Test if this node is unnamed.
+     * @return false if name is set.
+     */
+    inline bool operator!() const
+        {return (Id == NULL);};
+
+    /**
+     * Set or replace the name id of this node.  This will free the string
+     * if a name had already been set.
+     * @param name for this node to set.
+     */
+    void setId(char *name);
+
+    /**
+     * Remove our node from our parent list.  The name is set to NULL to
+     * keep delete from freeing the name string.
+     */
+    void remove(void);
+
+    /**
+     * Test if node has children.
+     * @return true if node contains child nodes.
+     */
+    inline bool is_leaf(void) const
+        {return (Child.begin() == NULL);};
+
+    /**
+     * Test if node is root node.
+     * @return true if node is root node.
+     */
+    inline bool is_root(void) const
+        {return (Parent == NULL);};
+
+    /**
+     * Add leaf to a trunk, by order.  If NULL, just remove.
+     * @param trunk we add leaf node to.
+     */
+    void relistTail(NamedTree *trunk);
+
+    /**
+     * Add leaf to a trunk, by reverse order.  If NULL, just remove.
+     * @param trunk we add leaf node to.
+     */
+    void relistHead(NamedTree *trunk);
+
+    /**
+     * Default relist is by tail...
+     * @param trunk we add leaf node to, NULL to delist.
+     */
+    inline void relist(NamedTree *trunk = NULL)
+        {relistTail(trunk);};
+};
+
+/**
+ * A double linked list object.  This is used as a base class for objects
+ * that will be organized through ordered double linked lists which allow
+ * convenient insertion and deletion of list members anywhere in the list.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT LinkedList : public OrderedObject
+{
+protected:
+    friend class ObjectQueue;
+
+    LinkedList *Prev;
+    OrderedIndex *Root;
+
+    /**
+     * Construct and add our object to an existing double linked list at end.
+     * @param index of linked list we are listed in.
+     */
+    LinkedList(OrderedIndex *index);
+
+    /**
+     * Construct an unlinked object.
+     */
+    LinkedList();
+
+    /**
+     * Delete linked list object.  If it is a member of a list of objects,
+     * then the list is reformed around us.
+     */
+    virtual ~LinkedList();
+
+public:
+    /**
+     * Remove our object from the list it is currently part of.
+     */
+    void delist(void);
+
+    /**
+     * Attach our object to the start of a linked list though an ordered index.
+     * If we are already attached to a list we are delisted first.
+     * @param index of linked list we are joining.
+     */
+    void enlistHead(OrderedIndex *index);
+
+    /**
+     * Attach our object to the end of a linked list though an ordered index.
+     * If we are already attached to a list we are delisted first.
+     * @param index of linked list we are joining.
+     */
+    void enlistTail(OrderedIndex *index);
+
+    /**
+     * Attach our object to a linked list.  The default strategy is to add
+     * to tail.
+     * @param index of linked list we are joining.
+     */
+    void enlist(OrderedIndex *index);
+
+    /**
+     * Test if we are at the head of a list.
+     * @return true if we are the first node in a list.
+     */
+    inline bool is_head(void) const
+        {return Root->head == (OrderedObject *)this;};
+
+    /**
+     * Test if we are at the end of a list.
+     * @return true if we are the last node in a list.
+     */
+    inline bool is_tail(void) const
+        {return Root->tail == (OrderedObject *)this;};
+
+    /**
+     * Get previous node in the list for reverse iteration.
+     * @return previous node in list.
+     */
+    inline LinkedList *getPrev(void) const
+        {return Prev;};
+
+    /**
+     * Get next node in the list when iterating.
+     * @return next node in list.
+     */
+    inline LinkedList *getNext(void) const
+        {return static_cast<LinkedList*>(LinkedObject::getNext());};
+
+    /**
+     * Insert object behind our object.
+     * @param object to add to list.
+     */
+    void insertTail(LinkedList *object);
+
+    /**
+     * Insert object in front of our object.
+     * @param object to add to list.
+     */
+    void insertHead(LinkedList *object);
+
+    /**
+     * Insert object, method in derived object.
+     * @param object to add to list.
+     */
+    virtual void insert(LinkedList *object);
+
+    /**
+     * Insert object behind our object.
+     * @param object to add to list.
+     */
+    inline void operator+=(LinkedList *object)
+        {insertTail(object);};
+
+    /**
+     * Insert object in front of our object.
+     * @param object to add to list.
+     */
+    inline void operator-=(LinkedList *object)
+        {insertHead(object);};
+
+    /**
+     * Insert object in list with our object.
+     * @param object to add to list.
+     */
+    inline void operator*=(LinkedList *object)
+        {insert(object);};
+};
+
+/**
+ * A queue of double linked object.  This uses the linkedlist class to
+ * form a basic queue of objects.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT ObjectQueue : public OrderedIndex
+{
+public:
+    /**
+     * Create an empty object queue.
+     */
+    ObjectQueue();
+
+    /**
+     * Add an object to the end of the queue.
+     * @param object to add.
+     */
+    void add(DLinkedObject *object);
+
+    /**
+     * Push an object to the front of the queue.
+     * @param object to push.
+     */
+    void push(DLinkedObject *object);
+
+    /**
+     * Pull an object from the front of the queue.
+     * @return object pulled or NULL if empty.
+     */
+    DLinkedObject *pull(void);
+
+    /**
+     * Pop an object from the end of the queue.
+     * @return object popped or NULL if empty.
+     */
+    DLinkedObject *pop(void);
+};
+
+class __EXPORT ObjectStack
+{
+protected:
+    LinkedObject *root;
+
+public:
+    /**
+     * Create an empty stack.
+     */
+    ObjectStack();
+
+    /**
+     * Create a stack from an existing list of objects.
+     * @param list of already linked objects.
+     */
+    ObjectStack(LinkedObject *list);
+
+    /**
+     * Push an object onto the stack.
+     * @param object to push.
+     */
+    void push(LinkedObject *object);
+
+    /**
+     * Pull an object from the stack.
+     * @return object popped from stack or NULL if empty.
+     */
+    LinkedObject *pull(void);
+
+    /**
+     * Pop an object from the stack.
+     * @return object popped from stack or NULL if empty.
+     */
+    inline LinkedObject *pop(void)
+        {return ObjectStack::pull();};
+};
+
+
+/**
+ * A multipath linked list where membership is managed in multiple
+ * lists.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT MultiMap : public ReusableObject
+{
+private:
+    typedef struct {
+        const char *key;
+        size_t keysize;
+        MultiMap *next;
+        MultiMap **root;
+    }   link_t;
+
+    unsigned paths;
+    link_t *links;
+
+protected:
+    /**
+     * Initialize a multilist object.
+     * @param count of link paths.
+     */
+    MultiMap(unsigned count);
+
+    /**
+     * Destroy a multilist object.
+     */
+    virtual ~MultiMap();
+
+    /**
+     * Modifiable interface for key matching.
+     * @param path to check.
+     * @param key to check.
+     * @param size of key to check or 0 if NULL terminated string.
+     * @return true if matches key.
+     */
+    virtual bool equal(unsigned path, caddr_t key, size_t size) const;
+
+public:
+    /**
+     * Enlist on a single linked list.
+     * @param path to attach through.
+     * @param root of list to attach.
+     */
+    void enlist(unsigned path, MultiMap **root);
+
+    /**
+     * Enlist binary key on a single map path.
+     * @param path to attach through.
+     * @param index to attach to.
+     * @param key value to use.
+     * @param size of index.
+     * @param keysize of key or 0 if NULL terminated string.
+     */
+    void enlist(unsigned path, MultiMap **index, caddr_t key, unsigned size, size_t keysize = 0);
+
+    /**
+     * De-list from a single map path.
+     * @param path to detach from.
+     */
+    void delist(unsigned path);
+
+    /**
+     * Get next node from single chain.
+     * @param path to follow.
+     */
+    MultiMap *next(unsigned path) const;
+
+    /**
+     * Compute binary key index.
+     * @param key memory to compute.
+     * @param max size of index.
+     * @param size of key or 0 if NULL terminated string.
+     * @return associated hash value.
+     */
+    static unsigned keyindex(caddr_t key, unsigned max, size_t size = 0);
+
+    /**
+     * Find a multikey node.
+     * @return node that is found or NULL if none.
+     * @param path of table.
+     * @param index of hash table.
+     * @param key to locate.
+     * @param max size of index.
+     * @param size of key or 0 if NULL terminated string.
+     */
+    static MultiMap *find(unsigned path, MultiMap **index, caddr_t key, unsigned max, size_t size = 0);
+};
+
+/**
+ * Template value class to embed data structure into a named list.
+ * This is used to form a class which can be searched by name and that
+ * contains a member value object.  Most of the core logic for this
+ * template is found in and derived from the object_value template.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <typename T, class O=NamedObject>
+class named_value : public object_value<T, O>
+{
+public:
+    /**
+     * Construct embedded named object on a linked list.
+     * @param root node or pointer for list.
+     * @param name of our object.
+     */
+    inline named_value(LinkedObject **root, char *name)
+        {LinkedObject::enlist(root); O::id = name;};
+
+    /**
+     * Assign embedded value from related type.
+     * @param typed_value to assign.
+     */
+    inline void operator=(const T& typed_value)
+        {this->set(typed_value);};
+
+    /**
+     * Find embedded object in chain by name.
+     * @param first object in list to search from.
+     * @param name to search for.
+     * @return composite object found by name or NULL if not found.
+     */
+    inline static named_value find(named_value *first, const char *name)
+        {return static_cast<named_value *>(NamedObject::find(first, name));};
+};
+
+/**
+ * Template value class to embed data structure into a linked list.
+ * This is used to form a class which can be linked together using
+ * either an ordered index or simple linked pointer chain and that
+ * contains a member value object.  Most of the core logic for this
+ * template is found in and derived from the object_value template.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <typename T, class O=OrderedObject>
+class linked_value : public object_value<T, O>
+{
+public:
+    /**
+     * Create embedded value object unlinked.
+     */
+    inline linked_value() {};
+
+    /**
+     * Construct embedded object on a linked list.
+     * @param root node or pointer for list.
+     */
+    inline linked_value(LinkedObject **root)
+        {LinkedObject::enlist(root);};
+
+    /**
+     * Construct embedded object on an ordered list.
+     * @param index pointer for the ordered list.
+     */
+    inline linked_value(OrderedIndex *index)
+        {O::enlist(index);};
+
+    /**
+     * Assign embedded value from related type and link to list.
+     * @param root node or pointer for list.
+     * @param typed_value to assign.
+     */
+    inline linked_value(LinkedObject **root, const T& typed_value)
+        {LinkedObject::enlist(root); this->set(typed_value);};
+
+    /**
+     * Assign embedded value from related type and add to list.
+     * @param index to list our object on.
+     * @param typed_value to assign.
+     */
+    inline linked_value(OrderedIndex *index, const T& typed_value)
+        {O::enlist(index); this->set(typed_value);};
+
+    /**
+     * Assign embedded value from related type.
+     * @param typed_value to assign.
+     */
+    inline void operator=(const T& typed_value)
+        {this->set(typed_value);};
+};
+
+/**
+ * Template for typesafe basic object stack container.  The object type, T,
+ * that is contained in the stack must be derived from LinkedObject.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <class T>
+class objstack : public ObjectStack
+{
+public:
+    /**
+     * Create a new object stack.
+     */
+    inline objstack() : ObjectStack() {}
+
+    /**
+     * Create an object stack from a list of objects.
+     */
+    inline objstack(T *list) : ObjectStack(list) {}
+
+    /**
+     * Push an object onto the object stack.
+     * @param object of specified type to push.
+     */
+    inline void push(T *object)
+        {ObjectStack::push(object);}
+
+    /**
+     * Add an object onto the object stack.
+     * @param object of specified type to push.
+     */
+    inline void add(T *object)
+        {ObjectStack::push(object);}
+
+    /**
+     * Pull an object from the object stack.
+     * @return object of specified type or NULL if empty.
+     */
+    inline T *pull(void)
+        {return (T *)ObjectStack::pull();}
+
+    /**
+     * Pull (pop) an object from the object stack.
+     * @return object of specified type or NULL if empty.
+     */
+    inline T *pop(void)
+        {return (T *)ObjectStack::pull();}
+};
+
+/**
+ * Template for typesafe basic object fifo container.  The object type, T,
+ * that is contained in the fifo must be derived from OrderedObject or
+ * LinkedObject.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <class T>
+class objfifo : public OrderedIndex
+{
+public:
+    /**
+     * Create a new object stack.
+     */
+    inline objfifo() : OrderedIndex() {}
+
+    /**
+     * Push an object onto the object fifo.
+     * @param object of specified type to push.
+     */
+    inline void push(T *object)
+        {OrderedIndex::add((OrderedObject *)object);}
+
+    /**
+     * Add an object onto the object fifo.
+     * @param object of specified type to push.
+     */
+    inline void add(T *object)
+        {OrderedIndex::add((OrderedObject *)object);}
+
+    /**
+     * Pull an object from the object stack.
+     * @return object of specified type or NULL if empty.
+     */
+    inline T *pull(void)
+        {return (T *)OrderedIndex::get();}
+
+    /**
+     * Pull (pop) an object from the object stack.
+     * @return object of specified type or NULL if empty.
+     */
+    inline T *pop(void)
+        {return (T *)OrderedIndex::get();}
+};
+
+/**
+ * Template for typesafe basic object queue container.  The object type, T,
+ * that is contained in the fifo must be derived from DLinkedObject.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <class T>
+class objqueue : public ObjectQueue
+{
+public:
+    /**
+     * Create a new object stack.
+     */
+    inline objqueue() : ObjectQueue() {}
+
+    /**
+     * Push an object to start of queue.
+     * @param object of specified type to push.
+     */
+    inline void push(T *object)
+        {ObjectQueue::push((DLinkedObject *)object);}
+
+    /**
+     * Add an object to the end of the object queue.
+     * @param object of specified type to add.
+     */
+    inline void add(T *object)
+        {ObjectQueue::add((DLinkedObject *)object);}
+
+    /**
+     * Pull an object from the start of the object queue.
+     * @return object of specified type or NULL if empty.
+     */
+    inline T *pull(void)
+        {return (T *)ObjectQueue::pull();}
+
+    /**
+     * Pop an object from the end of the object queue.
+     * @return object of specified type or NULL if empty.
+     */
+    inline T *pop(void)
+        {return (T *)ObjectQueue::pop();}
+};
+
+/**
+ * A smart pointer template for iterating linked lists.  This class allows
+ * one to access a list of single or double linked objects and iterate
+ * through each member of a list.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <class T>
+class linked_pointer
+{
+private:
+    T *ptr;
+
+public:
+    /**
+     * Create a linked pointer and assign to start of a list.
+     * @param pointer to first member of a linked list.
+     */
+    inline linked_pointer(T *pointer)
+        {ptr = pointer;};
+
+    /**
+     * Create a copy of an existing linked pointer.
+     * @param pointer to copy from.
+     */
+    inline linked_pointer(const linked_pointer &pointer)
+        {ptr = pointer.ptr;};
+
+    /**
+     * Create a linked pointer assigned from a raw linked object pointer.
+     * @param pointer to linked object.
+     */
+    inline linked_pointer(LinkedObject *pointer)
+        {ptr = static_cast<T*>(pointer);};
+
+    inline linked_pointer(const LinkedObject *pointer)
+        {ptr = static_cast<T*>(pointer);};
+
+    /**
+     * Create a linked pointer to examine an ordered index.
+     * @param index of linked objects to iterate through.
+     */
+    inline linked_pointer(OrderedIndex *index)
+        {ptr = static_cast<T*>(index->begin());};
+
+    /**
+     * Create a linked pointer not attached to a list.
+     */
+    inline linked_pointer()
+        {ptr = NULL;};
+
+    /**
+     * Assign our typed iterative pointer from a matching typed object.
+     * @param pointer to typed object.
+     */
+    inline void operator=(T *pointer)
+        {ptr = pointer;};
+
+    /**
+     * Assign our pointer from another pointer.
+     * @param pointer to assign from.
+     */
+    inline void operator=(linked_pointer &pointer)
+        {ptr = pointer.ptr;};
+
+    /**
+     * Assign our pointer from the start of an ordered index.
+     * @param index to assign pointer from.
+     */
+    inline void operator=(OrderedIndex *index)
+        {ptr = static_cast<T*>(index->begin());};
+
+    /**
+     * Assign our pointer from a generic linked object pointer.
+     * @param pointer of linked list.
+     */
+    inline void operator=(LinkedObject *pointer)
+        {ptr = static_cast<T*>(pointer);};
+
+    /**
+     * Return member from typed object our pointer references.
+     * @return evaluated member of object we point to.
+     */
+    inline T* operator->() const
+        {return ptr;};
+
+    /**
+     * Return object we currently point to.
+     * @return object linked pointer references.
+     */
+    inline T* operator*() const
+        {return ptr;};
+
+    /**
+     * Return object we point to by casting.
+     * @return object linked pointer references.
+     */
+    inline operator T*() const
+        {return ptr;};
+
+    /**
+     * Move (iterate) pointer to previous member in double linked list.
+     */
+    inline void prev(void)
+        {ptr = static_cast<T*>(ptr->getPrev());};
+
+    /**
+     * Move (iterate) pointer to next member in linked list.
+     */
+    inline void next(void)
+        {ptr = static_cast<T*>(ptr->getNext());};
+
+    /**
+     * Get the next member in linked list.  Do not change who we point to.
+     * @return next member in list or NULL if end of list.
+     */
+    inline T *getNext(void) const
+        {return static_cast<T*>(ptr->getNext());};
+
+    /**
+     * Get the previous member in double linked list.  Do not change who we
+     * point to.
+     * @return previous member in list or NULL if start of list.
+     */
+    inline T *getPrev(void) const
+        {return static_cast<T*>(ptr->getPrev());};
+
+    /**
+     * Move (iterate) pointer to next member in linked list.
+     */
+    inline void operator++()
+        {ptr = static_cast<T*>(ptr->getNext());};
+
+    /**
+     * Move (iterate) pointer to previous member in double linked list.
+     */
+    inline void operator--()
+        {ptr = static_cast<T*>(ptr->getPrev());};
+
+    /**
+     * Test for next member in linked list.
+     * @return true if there is more members after current one.
+     */
+    inline bool is_next(void) const
+        {return (ptr->getNext() != NULL);};
+
+    /**
+     * Test for previous member in double linked list.
+     * @return true if there is more members before current one.
+     */
+    inline bool is_prev(void) const
+        {return (ptr->getPrev() != NULL);};
+
+    /**
+     * Test if linked pointer is set/we are not at end of list.
+     * @return true if we are not at end of list.
+     */
+    inline operator bool() const
+        {return (ptr != NULL);};
+
+    /**
+     * Test if linked list is empty/we are at end of list.
+     * @return true if we are at end of list.
+     */
+    inline bool operator!() const
+        {return (ptr == NULL);};
+
+    /**
+     * Return pointer to our linked pointer to use as root node of a chain.
+     * @return our object pointer as a root index.
+     */
+    inline LinkedObject **root(void) const
+        {T **r = &ptr; return (LinkedObject**)r;};
+};
+
+/**
+ * Embed data objects into a multipap structured memory database.  This
+ * can be used to form multi-key hash nodes.  Embedded values can either be
+ * of direct types that are then stored as part of the template object, or
+ * of class types that are data pointers.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <typename T, unsigned P>
+class multimap : public MultiMap
+{
+protected:
+    T value;
+
+public:
+    /**
+     * Construct a multimap node.
+     */
+    inline multimap() : MultiMap(P) {};
+
+    /**
+     * Destroy a multimap object.
+     */
+    inline ~multimap() {};
+
+    /**
+     * Return the typed value of this node.
+     * @return reference to value of node.
+     */
+    inline T &get(void) const
+        {return value;};
+
+    /**
+     * Return next multimap typed object.
+     * @param path to follow.
+     * @return multimap typed.
+     */
+    inline multimap *next(unsigned path)
+        {return static_cast<multimap*>(MultiMap::next(path));};
+
+    /**
+     * Return typed value of this node by pointer reference.
+     * @return value of node.
+     */
+    inline T& operator*() const
+        {return value;};
+
+    /**
+     * Set the pointer of a pointer based value tree.
+     * @param pointer to set.
+     */
+    inline void setPointer(const T pointer)
+        {value = pointer;};
+
+    /**
+     * Set the value of a data based value tree.
+     * @param reference to value to copy into node.
+     */
+    inline void set(const T &reference)
+        {value = reference;};
+
+    /**
+     * Assign the value of our node.
+     * @param data value to assign.
+     */
+    inline void operator=(const T& data)
+        {value = data;};
+
+    /**
+     * Find multimap key entry.
+     * @param path to search through.
+     * @param index of associated keys.
+     * @param key to search for, binary or NULL terminated string.
+     * @param size of index used.
+     * @param keysize or 0 if NULL terminated string.
+     * @return multipath typed object.
+     */
+    inline static multimap *find(unsigned path, MultiMap **index, caddr_t key, unsigned size, unsigned keysize = 0)
+        {return static_cast<multimap*>(MultiMap::find(path, index, key, size, keysize));};
+};
+
+/**
+ * Embed data objects into a tree structured memory database.  This can
+ * be used to form XML document trees or other data structures that
+ * can be organized in trees.  The NamedTree class is used to manage
+ * the structure of the tree, and the type specified is embedded as a
+ * data value object which can be manipulated.  Name identifiers are
+ * assumed to be dynamically allocated if tree node elements are deletable.
+ *
+ * Embedded values can either be of direct types that are then stored as
+ * part of the template object, or of class types that are data pointers.
+ * The latter might be used for trees that contain data which might be
+ * parsed dynamically from a document and/or saved on a heap.  Pointer trees
+ * assume that NULL pointers are for nodes that are empty, and that NULL data
+ * value nodes with children are trunk nodes.  Generally data values are then
+ * allocated with a pointer stored in pure leaf nodes.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <typename T>
+class treemap : public NamedTree
+{
+protected:
+    T value;
+
+public:
+    /**
+     * Construct a typed root node for the tree.  The root node may be
+     * named as a stand-alone node or unnamed.
+     * @param name of the node we are creating.
+     */
+    inline treemap(char *name = NULL) : NamedTree(name) {};
+
+    /**
+     * Construct a copy of the treemap object.
+     * @param source of copy for new object.
+     */
+    inline treemap(const treemap& source) : NamedTree(source)
+        {value = source.value;};
+
+    /**
+     * Construct a child node on an existing tree.
+     * @param parent of this node to attach.
+     * @param name of this node.
+     */
+    inline treemap(treemap *parent, char *name) : NamedTree(parent, name) {};
+
+    /**
+     * Construct a child node on an existing tree and assign it's value.
+     * @param parent of this node to attach.
+     * @param name of this node.
+     * @param reference to value to assign to this node.
+     */
+    inline treemap(treemap *parent, char *name, T& reference) :
+        NamedTree(parent, name) {value = reference;};
+
+    /**
+     * Return the typed value of this node.
+     * @return reference to value of node.
+     */
+    inline const T& get(void) const
+        {return value;};
+
+    /**
+     * Return typed value of this node by pointer reference.
+     * @return value of node.
+     */
+    inline const T& operator*() const
+        {return value;};
+
+    /**
+     * Return value from tree element when value is a pointer.
+     * @param node in our typed tree.
+     * @return value of node.
+     */
+    static inline T getPointer(treemap *node)
+        {return (node == NULL) ? NULL : node->value;};
+
+    /**
+     * Test if this node is a leaf node for a tree pointer table.
+     * @return true if value pointer is not NULL and there are no children.
+     */
+    inline bool is_attribute(void) const
+        {return (!Child.begin() && value != NULL);};
+
+    /**
+     * Get the pointer of a pointer based value tree.
+     * @return value pointer of node.
+     */
+    inline const T getPointer(void) const
+        {return value;};
+
+    /**
+     * Get the data value of a data based value tree.
+     * @return data value of node.
+     */
+    inline const T& getData(void) const
+        {return value;};
+
+    /**
+     * Set the pointer of a pointer based value tree.
+     * @param pointer to set.
+     */
+    inline void setPointer(const T pointer)
+        {value = pointer;};
+
+    /**
+     * Set the value of a data based value tree.
+     * @param reference to value to copy into node.
+     */
+    inline void set(const T& reference)
+        {value = reference;};
+
+    /**
+     * Assign the value of our node.
+     * @param data value to assign.
+     */
+    inline void operator=(const T& data)
+        {value = data;};
+
+    /**
+     * Get child member node by index.
+     * @param index of child member.
+     * @return node or NULL if past end.
+     */
+    inline treemap *getIndexed(unsigned index) const
+        {return static_cast<treemap*>(Child.getIndexed(index));};
+
+    /**
+     * Get the typed parent node for our node.
+     * @return parent node or NULL if root of tree.
+     */
+    inline treemap *getParent(void) const
+        {return static_cast<treemap*>(Parent);};
+
+    /**
+     * Get direct typed child node of our node of specified name.  This
+     * does not perform a recursive search.
+     * @param name of child node.
+     * @return typed child node pointer or NULL if not found.
+     */
+    inline treemap *getChild(const char *name) const
+        {return static_cast<treemap*>(NamedTree::getChild(name));};
+
+    /**
+     * Find a direct typed leaf node on our node.  A leaf node is a node that
+     * has no children of it's own.  This does not perform a recursive search.
+     * @param name of leaf child node to find.
+     * @return typed leaf node object of leaf or NULL.
+     */
+    inline treemap *getLeaf(const char *name) const
+        {return static_cast<treemap*>(NamedTree::getLeaf(name));};
+
+    /**
+     * Get the value pointer of a leaf node of a pointer tree.  This allows
+     * one to find a leaf node and return it's pointer value in a single
+     * operation.
+     * @param name of leaf node.
+     * @return value of leaf pointer if found and contains value, or NULL.
+     */
+    inline T getValue(const char *name) const
+        {return getPointer(getLeaf(name));};
+
+    /**
+     * Find a subnode from our node by name.  This performs a recursive
+     * search.
+     * @param name to search for.
+     * @return typed node that is found or NULL if none is found.
+     */
+    inline treemap *find(const char *name) const
+        {return static_cast<treemap*>(NamedTree::find(name));};
+
+    /**
+     * Find a subnode by pathname.  This is the same as the NamedTree
+     * path member function.
+     * @param path name to search for node.
+     * @return typed node that is found at path or NULL.
+     */
+    inline treemap *path(const char *path) const
+        {return static_cast<treemap*>(NamedTree::path(path));};
+
+    /**
+     * Search for a leaf node of our node.  This performs a recursive
+     * search.
+     * @param name to search for.
+     * @return typed not that is found or NULL if none is found.
+     */
+    inline treemap *leaf(const char *name) const
+        {return static_cast<treemap*>(NamedTree::leaf(name));};
+
+    /**
+     * Get first child of our node.  This is useful for iterating children.
+     * @return first child or NULL.
+     */
+    inline treemap *getFirst(void) const
+        {return static_cast<treemap*>(NamedTree::getFirst());};
+};
+
+/**
+ * A template class for a hash map.  This provides a has map index object as
+ * a chain of keyindex selected linked pointers of a specified size.  This
+ * is used for the index and size values for NamedObject's which are listed
+ * on a hash map.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <class T, unsigned M = 177>
+class keymap
+{
+private:
+    NamedObject *idx[M];
+
+public:
+    /**
+     * Destroy the hash map by puring the index chains.
+     */
+    inline ~keymap()
+        {NamedObject::purge(idx, M);};
+
+    /**
+     * Retrieve root of index to use in NamedObject constructors.
+     * @return root node of index.
+     */
+    inline NamedObject **root(void) const
+        {return idx;};
+
+    /**
+     * Retrieve key size to use in NamedObject constructors.
+     * @return key size of hash map.
+     */
+    inline unsigned limit(void) const
+        {return M;};
+
+    /**
+     * Find a typed object derived from NamedObject in the hash map by name.
+     * @param name to search for.
+     * @return typed object if found through map or NULL.
+     */
+    inline T *get(const char *name) const
+        {return static_cast<T*>(NamedObject::map(idx, name, M));};
+
+    /**
+     * Find a typed object derived from NamedObject in the hash map by name.
+     * @param name to search for.
+     * @return typed object if found through map or NULL.
+     */
+    inline T& operator[](const char *name) const
+        {return static_cast<T*>(NamedObject::map(idx, name, M));};
+
+    /**
+     * Add a typed object derived from NamedObject to the hash map by name.
+     * @param name to add.
+     * @param object to add.
+     */
+    inline void add(const char *name, T& object)
+        {object.NamedObject::add(idx, name, M);};
+
+    /**
+     * Add a typed object derived from NamedObject to the hash map by name.
+     * @param name to add.
+     * @param object to add.
+     */
+    inline void add(const char *name, T *object)
+        {object->NamedObject::add(idx, name, M);};
+
+    /**
+     * Remove a typed object derived from NamedObject to the hash map by name.
+     * @param name to remove.
+     * @return object removed if found or NULL.
+     */
+    inline T *remove(const char *name)
+        {return static_cast<T*>(NamedObject::remove(idx, name, M));};
+
+    /**
+     * Find first typed object in hash map to iterate.
+     * @return first typed object or NULL if nothing in list.
+     */
+    inline T *begin(void) const
+        {return static_cast<T*>(NamedObject::skip(idx, NULL, M));};
+
+    /**
+     * Find next typed object in hash map for iteration.
+     * @param current typed object we are referencing.
+     * @return next iterative object or NULL if past end of map.
+     */
+    inline T *next(T *current) const
+        {return static_cast<T*>(NamedObject::skip(idx, current, M));};
+
+    /**
+     * Count the number of typed objects in our hash map.
+     * @return count of typed objects.
+     */
+    inline unsigned count(void) const
+        {return NamedObject::count(idx, M);};
+
+    /**
+     * Convert our hash map into a linear object pointer array.  The
+     * object pointer array is created from the heap and must be deleted
+     * when no longer used.
+     * @return array of typed named object pointers.
+     */
+    inline T **index(void) const
+        {return NamedObject::index(idx, M);};
+
+    /**
+     * Convert our hash map into an alphabetically sorted linear object
+     * pointer array.  The object pointer array is created from the heap
+     * and must be deleted when no longer used.
+     * @return sorted array of typed named object pointers.
+     */
+    inline T **sort(void) const
+        {return NamedObject::sort(NamedObject::index(idx, M));};
+
+    /**
+     * Convenience typedef for iterative pointer.
+     */
+    typedef linked_pointer<T> iterator;
+};
+
+/**
+ * A template for ordered index of typed name key mapped objects.
+ * This is used to hold an iterable linked list of typed named objects
+ * where we can find objects by their name as well as through iteration.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <class T>
+class keylist : public OrderedIndex
+{
+public:
+    /**
+     * Return a root node pointer to use in NamedObject constructors.
+     * @return pointer to index root.
+     */
+    inline NamedObject **root(void)
+        {return static_cast<NamedObject**>(&head);};
+
+    /**
+     * Return first item in ordered list.  This is commonly used to
+     * iterate the list.
+     * @return first item in list or NULL if empty.
+     */
+    inline T *begin(void)
+        {return static_cast<T*>(head);};
+
+    /**
+     * Return last item in ordered list.  This is commonly used to determine
+     * end of list iteration.
+     * @return last item in list or NULL if empty.
+     */
+    inline T *end(void)
+        {return static_cast<T*>(tail);};
+
+    /**
+     * Create a new typed named object with default constructor.
+     * This creates a new object which can be deleted.
+     * @param name of object to create.
+     * @return typed named object.
+     */
+    inline T *create(const char *name)
+        {return new T(this, name);};
+
+    /**
+     * Iterate next object in list.
+     * @param current object we are referencing.
+     * @return next logical object in linked list or NULL if end.
+     */
+    inline T *next(LinkedObject *current)
+        {return static_cast<T*>(current->getNext());};
+
+    /**
+     * Find a specific object by name.
+     * @param name to search for.
+     * @return type named object that matches or NULL if not found.
+     */
+    inline T *find(const char *name)
+        {return static_cast<T*>(NamedObject::find(begin(), name));};
+
+    inline T *offset(unsigned offset)
+        {return static_cast<T*>(OrderedIndex::find(offset));};
+
+    /**
+     * Retrieve a specific object by position in list.
+     * @param offset in list for object we want.
+     * @return type named object or NULL if past end of list.
+     */
+    inline T& operator[](unsigned offset)
+        {return static_cast<T&>(OrderedIndex::find(offset));};
+
+    inline T& operator[](const char *name)
+        {return static_cast<T&>(NamedObject::find(begin(), name));};
+
+    /**
+     * Convert our linked list into a linear object pointer array.  The
+     * object pointer array is created from the heap and must be deleted
+     * when no longer used.
+     * @return array of typed named object pointers.
+     */
+    inline T **index(void)
+        {return static_cast<T**>(OrderedIndex::index());};
+
+    /**
+     * Convert our linked list into an alphabetically sorted linear object
+     * pointer array.  The object pointer array is created from the heap
+     * and must be deleted when no longer used.
+     * @return array of typed named object pointers.
+     */
+    inline T **sort(void)
+        {return static_cast<T**>(NamedObject::sort(index()));};
+
+    /**
+     * Convenience typedef for iterative pointer.
+     */
+    typedef linked_pointer<T> iterator;
+};
+
+/**
+ * Convenience typedef for root pointers of single linked lists.
+ */
+typedef LinkedObject *LinkedIndex;
+
+/**
+ * Convenience type for a stack of linked objects.
+ */
+typedef ObjectStack objstack_t;
+
+/**
+ * Convenience type for a fifo of linked objects.
+ */
+typedef OrderedIndex objfifo_t;
+
+/**
+ * Convenience type for a queue of linked objects.
+ */
+typedef ObjectQueue objqueue_t;
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/mapped.h b/jni/libucommon/sources/inc/ucommon/mapped.h
new file mode 100644
index 0000000..be2c2a6
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/mapped.h
@@ -0,0 +1,512 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Support for memory mapped objects.
+ * Memory mapped objects can be used to publish information so that it may be
+ * accessible directly by external programs.  The mapped memory objects will
+ * usually be built as a vector vector or reusable type factory, in the latter
+ * case using the allocated shared memory block itself as a local heap.  A
+ * simple template can be used to view the mapped contents that have been
+ * published by another process.
+ * @file ucommon/mapped.h
+ */
+
+#ifndef _UCOMMON_MAPPED_H_
+#define _UCOMMON_MAPPED_H_
+
+#ifndef _UCOMMON_LINKED_H_
+#include <ucommon/linked.h>
+#endif
+
+#ifndef _UCOMMON_THREAD_H_
+#include <ucommon/thread.h>
+#endif
+
+#ifndef _UCOMMON_STRING_H_
+#include <ucommon/string.h>
+#endif
+
+#ifndef _MSWINDOWS_
+#include <signal.h>
+#endif
+
+NAMESPACE_UCOMMON
+
+/**
+ * Construct or access a named section of memory.  A logical name is used
+ * which might map to something that is invoked from a call like shm_open
+ * or a named w32 mapped swap segment.  This is meant to support mapping a
+ * vector onto shared memory and is often used as a supporting class for our
+ * shared memory access templates.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT MappedMemory
+{
+private:
+    size_t mapsize;
+    caddr_t map;
+    fd_t fd;
+
+protected:
+    size_t size, used;
+    char idname[65];
+    bool erase;
+
+    MappedMemory();
+
+    /**
+     * Supporting function to construct a new or access an existing
+     * shared memory segment.  Used by primary constructors.
+     * @param name of segment to create or access.
+     * @param size of segment if creating new.  Use 0 for read-only access.
+     */
+    void create(const char *name, size_t size = (size_t)0);
+
+    /**
+     * Handler to invoke in derived class when accessing outside the
+     * shared memory segment boundary.
+     */
+    virtual void *invalid(void) const;
+
+    /**
+     * Handler for failure to map (allocate) memory.
+     */
+    virtual void fault(void) const;
+
+public:
+    /**
+     * Construct a read/write access mapped shared segment of memory of a
+     * known size.  This constructs a new memory segment.
+     * @param name of segment.
+     * @param size of segment.
+     */
+    MappedMemory(const char *name, size_t size);
+
+    /**
+     * Provide read-only mapped access to an existing named shared memory
+     * segment.  The size of the map is found by the size of the already
+     * existing segment.
+     * @param name of existing segment.
+     */
+    MappedMemory(const char *name);
+
+    /**
+     * Unmap memory segment.
+     */
+    virtual ~MappedMemory();
+
+    /**
+     * Unmap memory segment.
+     */
+    void release(void);
+
+    /**
+     * Destroy a previously existing memory segment under the specified name.
+     * This is used both before creating a new one, and after a publishing
+     * process unmaps the segment it created.
+     * @param name of segment to remove.
+     */
+    static  void remove(const char *name);
+
+    /**
+     * Test if map active.
+     * @return true if active map.
+     */
+    inline operator bool() const
+        {return (size != 0);};
+
+    /**
+     * Test if map is inactive.
+     * @return true if map inactive.
+     */
+    inline bool operator!() const
+        {return (size == 0);};
+
+    /**
+     * Extend size of managed heap on shared memory segment.  This does not
+     * change the size of the mapped segment in any way, only that of any
+     * heap space that is being allocated and used from the mapped segment.
+     * @return start of space from map.
+     * @param size of space requested.  Will fault if past end of segment.
+     */
+    void *sbrk(size_t size);
+
+    /**
+     * Get memory from a specific offset within the mapped memory segment.
+     * @param offset from start of segment.  Will fault if past end.
+     * @return address of offset.
+     */
+    void *offset(size_t offset) const;
+
+    /**
+     * Copy memory from specific offset within the mapped memory segment.
+     * This function assures the copy is not in the middle of being modified.
+     * @param offset from start of segment.
+     * @param buffer to copy into.
+     * @param size of object to copy.
+     * @return true on success.
+     */
+    bool copy(size_t offset, void *buffer, size_t size) const;
+
+    /**
+     * Get size of mapped segment.
+     * @return size of mapped segment.
+     */
+    inline size_t len(void)
+        {return size;};
+
+    /**
+     * Get starting address of mapped segment.
+     * @return starting address of mapped segment.
+     */
+    inline caddr_t addr(void)
+        {return map;};
+
+    /**
+     * An API that allows "disabling" of publishing shared memory maps.
+     * This may be useful when an app doesn't want to use shared memory
+     * as a runtime or build option, but does not want to have to be "recoded"
+     * explicitly for non-shared memory either.  Basically it substitutes a
+     * dummy map running on the local heap.
+     */
+    static void disable(void);
+};
+
+/**
+ * Map a reusable allocator over a named shared memory segment.  This may be
+ * used to form a resource bound fixed size managed heap in shared memory.
+ * The request can either be fulfilled from the object reuse pool or from a
+ * new section of memory, and if all memory in the segment has been exhausted,
+ * it can wait until more objects are returned by another thread to the reuse
+ * pool.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT MappedReuse : protected ReusableAllocator, protected MappedMemory
+{
+private:
+    unsigned objsize;
+    unsigned reading;
+    mutex_t mutex;
+
+protected:
+    MappedReuse(size_t osize);
+
+    inline void create(const char *fname, unsigned count)
+        {MappedMemory::create(fname, count * objsize);};
+
+public:
+    /**
+     * Construct a named memory segment for use with managed fixed size
+     * reusable objects.  The segment is created as writable.  There is no
+     * read-only version of mapped reuse since the mapped segment can be read
+     * by another process directly as a mapped read-only vector.  The actual
+     * mapped type will be derived from ReusableObject to meet the needs of
+     * the reusable allocator.  The template version should be used to
+     * assure type correctness rather than using this class directly.
+     * @param name of shared memory segment.
+     * @param size of the object type being mapped.
+     * @param count of the maximum number of active mapped objects.
+     */
+    MappedReuse(const char *name, size_t size, unsigned count);
+
+    /**
+     * Check whether there are objects available to be allocated.
+     * @return true if objects are available.
+     */
+    bool avail(void);
+
+    /**
+     * Request a reusable object from the free list or mapped space.
+     * @return free object or NULL if pool is exhausted.
+     */
+    ReusableObject *request(void);
+
+    /**
+     * Request a reusable object from the free list or mapped space.
+     * This method blocks until an object becomes available.
+     * @return free object.
+     */
+    ReusableObject *get(void);
+
+    /**
+     * Request a reusable object from the free list or mapped space.
+     * This method blocks until an object becomes available or the
+     * timeout has expired.
+     * @param timeout to wait in milliseconds.
+     * @return free object or NULL if timeout.
+     */
+    ReusableObject *getTimed(timeout_t timeout);
+
+    /**
+     * Used to get an object from the reuse pool when the mutex lock is
+     * already held.
+     * @return object from pool or NULL if exhausted.
+     */
+    ReusableObject *getLocked(void);
+
+    /**
+     * Used to return an object to the reuse pool when the mutex lock is
+     * already held.
+     * @param object being returned.
+     */
+    void removeLocked(ReusableObject *object);
+};
+
+/**
+ * Template class to map typed vector into shared memory.  This is used to
+ * construct a typed read/write vector of objects that are held in a named
+ * shared memory segment.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <class T>
+class mapped_array : public MappedMemory
+{
+protected:
+    inline mapped_array() : MappedMemory() {};
+
+    inline void create(const char *fn, unsigned members)
+        {MappedMemory::create(fn, members * sizeof(T));};
+
+public:
+    /**
+     * Construct mapped vector array of typed objects.  This is constructed
+     * for read/write access.  mapped_view is used in all cases for read-only
+     * access to mapped data.  Member objects are linearly allocated from
+     * the shared memory segment, or may simply be directly accessed by offset.
+     * @param name of mapped segment to construct.
+     * @param number of objects in the mapped vector.
+     */
+    inline mapped_array(const char *name, unsigned number) :
+        MappedMemory(name, number * sizeof(T)) {};
+
+    /**
+     * Initialize typed data in mapped array.  Assumes default constructor
+     * for type.
+     */
+    inline void initialize(void)
+        {new((caddr_t)offset(0)) T[size / sizeof(T)];};
+
+    /**
+     * Add mapped space while holding lock for one object.
+     * @return address of object.
+     */
+    inline void *addLock(void)
+        {return sbrk(sizeof(T));};
+
+    /**
+     * Get typed pointer to member object of vector in mapped segment.
+     * @param member to access.
+     * @return typed pointer or NULL if past end of array.
+     */
+    inline T *operator()(unsigned member)
+        {return static_cast<T*>(offset(member * sizeof(T)));}
+
+    /**
+     * Allocate mapped space for one object.
+     * @return address of object.
+     */
+    inline T *operator()(void)
+        {return static_cast<T*>(sbrk(sizeof(T)));};
+
+    /**
+     * Reference typed object of vector in mapped segment.
+     * @param member to access.
+     * @return typed reference.
+     */
+    inline T& operator[](unsigned member)
+        {return *(operator()(member));};
+
+    /**
+     * Get member size of typed objects that can be held in mapped vector.
+     * @return members mapped in segment.
+     */
+    inline unsigned max(void)
+        {return (unsigned)(size / sizeof(T));};
+};
+
+/**
+ * Template class to map typed reusable objects into shared memory heap.
+ * This is used to construct a read/write heap of objects that are held in a
+ * named shared memory segment.  Member objects are allocated from a reusable
+ * heap but are stored in the shared memory segment as a vector.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <class T>
+class mapped_reuse : public MappedReuse
+{
+protected:
+    inline mapped_reuse() :
+        MappedReuse(sizeof(T)) {};
+
+public:
+    /**
+     * Construct mapped reuse array of typed objects.  This is constructed
+     * for read/write access.  mapped_view is used in all cases for read-only
+     * access to mapped data.
+     * @param name of mapped segment to construct.
+     * @param number of objects in the mapped vector.
+     */
+    inline mapped_reuse(const char *name, unsigned number) :
+        MappedReuse(name, sizeof(T), number) {};
+
+    /**
+     * Initialize typed data in mapped array.  Assumes default constructor
+     * for type.
+     */
+    inline void initialize(void)
+        {new((caddr_t)pos(0)) T[size / sizeof(T)];};
+
+    /**
+     * Check whether there are typed objects available to be allocated.
+     * @return true if objects are available.
+     */
+    inline operator bool() const
+        {return MappedReuse::avail();};
+
+    /**
+     * Check whether there are typed objects available to be allocated.
+     * @return true if no more typed objects are available.
+     */
+    inline bool operator!() const
+        {return !MappedReuse::avail();};
+
+    /**
+     * Request a typed reusable object from the free list or mapped space.
+     * This method blocks until an object becomes available.
+     * @return free object.
+     */
+    inline operator T*()
+        {return mapped_reuse::get();};
+
+    /**
+     * Request a typed reusable object from the free list or mapped space by
+     * pointer reference.  This method blocks until an object becomes available.
+     * @return free object.
+     */
+    inline T* operator*()
+        {return mapped_reuse::get();};
+
+    /**
+     * Get typed object from a specific member offset within the mapped segment.
+     * @param member offset from start of segment.  Will fault if past end.
+     * @return typed object pointer.
+     */
+    inline T *pos(size_t member)
+        {return static_cast<T*>(MappedReuse::offset(member * sizeof(T)));};
+
+    /**
+     * Request a typed reusable object from the free list or mapped space.
+     * This method blocks until an object becomes available.
+     * @return free typed object.
+     */
+    inline T *get(void)
+        {return static_cast<T*>(MappedReuse::get());};
+
+    /**
+     * Request a typed reusable object from the free list or mapped space.
+     * This method blocks until an object becomes available from another
+     * thread or the timeout expires.
+     * @param timeout in milliseconds.
+     * @return free typed object.
+     */
+    inline T *getTimed(timeout_t timeout)
+        {return static_cast<T*>(MappedReuse::getTimed(timeout));};
+
+    /**
+     * Request a typed reusable object from the free list or mapped space.
+     * This method does not block or wait.
+     * @return free typed object if available or NULL.
+     */
+    inline T *request(void)
+        {return static_cast<T*>(MappedReuse::request());};
+
+    /**
+     * Used to return a typed object to the reuse pool when the mutex lock is
+     * already held.
+     * @param object being returned.
+     */
+    inline void removeLocked(T *object)
+        {MappedReuse::removeLocked(object);};
+
+    /**
+     * Used to get a typed object from the reuse pool when the mutex lock is
+     * already held.
+     * @return typed object from pool or NULL if exhausted.
+     */
+    inline T *getLocked(void)
+        {return static_cast<T*>(MappedReuse::getLocked());};
+
+    /**
+     * Used to release a typed object back to the reuse typed object pool.
+     * @param object being released.
+     */
+    inline void release(T *object)
+        {ReusableAllocator::release(object);};
+};
+
+/**
+ * Class to access a named mapped segment published from another process.
+ * This offers a simple typed vector interface to access the shared memory
+ * segment in read-only mode.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <class T>
+class mapped_view : protected MappedMemory
+{
+public:
+    /**
+     * Map existing named memory segment.  The size of the map is derived
+     * from the existing map alone.
+     * @param name of memory segment to map.
+     */
+    inline mapped_view(const char *name) :
+        MappedMemory(name) {};
+
+    /**
+     * Access typed member object in the mapped segment.
+     * @param member to access.
+     * @return typed object pointer.
+     */
+    inline volatile const T *operator()(unsigned member)
+        {return static_cast<const T*>(offset(member * sizeof(T)));}
+
+    /**
+     * Reference typed member object in the mapped segment.
+     * @param member to access.
+     * @return typed object reference.
+     */
+    inline volatile const T &operator[](unsigned member)
+        {return *(operator()(member));};
+
+    inline volatile const T *get(unsigned member)
+        {return static_cast<const T*>(offset(member * sizeof(T)));};
+
+    inline void copy(unsigned member, T& buffer)
+        {MappedMemory::copy(member * sizeof(T), &buffer, sizeof(T));};
+
+    /**
+     * Get count of typed member objects held in this map.
+     * @return count of typed member objects.
+     */
+    inline unsigned count(void)
+        {return (unsigned)(size / sizeof(T));};
+};
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/memory.h b/jni/libucommon/sources/inc/ucommon/memory.h
new file mode 100644
index 0000000..772d705
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/memory.h
@@ -0,0 +1,1412 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Private heaps, pools, and associations.
+ * Private heaps often can reduce locking contention in threaded applications
+ * since they do not require using the global "malloc" function.  Private
+ * heaps also can be used as auto-release heaps, where all memory allocated
+ * and handled out for small objects can be automatically released all at once.
+ * Pager pools are used to optimize system allocation around page boundaries.
+ * Associations allow private memory to be tagged and found by string
+ * identifiers.
+ * @file ucommon/memory.h
+ */
+
+#ifndef _UCOMMON_MEMORY_H_
+#define _UCOMMON_MEMORY_H_
+
+#ifndef _UCOMMON_CONFIG_H_
+#include <ucommon/platform.h>
+#endif
+
+#ifndef _UCOMMON_PROTOCOLS_H_
+#include <ucommon/protocols.h>
+#endif
+
+#ifndef  _UCOMMON_LINKED_H_
+#include <ucommon/linked.h>
+#endif
+
+#ifndef _UCOMMON_STRING_H_
+#include <ucommon/string.h>
+#endif
+
+NAMESPACE_UCOMMON
+
+class PagerPool;
+
+/**
+ * A memory protocol pager for private heap manager.  This is used to allocate
+ * in an optimized manner, as it assumes no mutex locks are held or used as
+ * part of it's own internal processing.  It also is designed for optimized
+ * performance.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT memalloc : public MemoryProtocol
+{
+private:
+    friend class bufpager;
+
+    size_t pagesize, align;
+    unsigned count;
+
+    typedef struct mempage {
+        struct mempage *next;
+        union {
+            void *memalign;
+            unsigned used;
+        };
+    }   page_t;
+
+    page_t *page;
+
+protected:
+    unsigned limit;
+
+    /**
+     * Acquire a new page from the heap.  This is mostly used internally.
+     * @return page structure of the newly acquired memory page.
+     */
+    page_t *pager(void);
+
+    /**
+     * Report runtime memory exhaustion.
+     */
+    virtual void fault(void) const;
+
+public:
+    /**
+     * Construct a memory pager.
+     * @param page size to use or 0 for OS allocation size.
+     */
+    memalloc(size_t page = 0);
+
+    /**
+     * Destroy a memory pager.  Release all pages back to the heap at once.
+     */
+    virtual ~memalloc();
+
+    /**
+     * Get the number of pages that have been allocated from the real heap.
+     * @return pages allocated from heap.
+     */
+    inline unsigned pages(void) const
+        {return count;}
+
+    /**
+     * Get the maximum number of pages that are permitted.  One can use a
+     * derived class to set and enforce a maximum limit to the number of
+     * pages that will be allocated from the real heap.  This is often used
+     * to detect and bring down apps that are leaking.
+     * @return page allocation limit.
+     */
+    inline unsigned max(void) const
+        {return limit;}
+
+    /**
+     * Get the size of a memory page.
+     * @return size of each pager heap allocation.
+     */
+    inline unsigned size(void) const
+        {return pagesize;}
+
+    /**
+     * Determine fragmentation level of acquired heap pages.  This is
+     * represented as an average % utilization (0-100) and represents the
+     * used portion of each allocated heap page verse the page size.  Since
+     * requests that cannot fit on an already allocated page are moved into
+     * a new page, there is some unusable space left over at the end of the
+     * page.  When utilization approaches 100, this is good.  A low utilization
+     * may suggest a larger page size should be used.
+     * @return pager utilization.
+     */
+    unsigned utilization(void) const;
+
+    /**
+     * Purge all allocated memory and heap pages immediately.
+     */
+    void purge(void);
+
+    /**
+     * Allocate memory from the pager heap.  The size of the request must be
+     * less than the size of the memory page used.  This implements the
+     * memory protocol allocation method.
+     * @param size of memory request.
+     * @return allocated memory or NULL if not possible.
+     */
+    virtual void *_alloc(size_t size);
+};
+
+/**
+ * A managed private heap for small allocations.  This is used to allocate
+ * a large number of small objects from a paged heap as needed and to then
+ * release them together all at once.  This pattern has significantly less
+ * overhead than using malloc and offers less locking contention since the
+ * memory pager can also have it's own mutex.  Pager pool allocated memory
+ * is always aligned to the optimal data size for the cpu bus and pages are
+ * themselves created from memory aligned allocations.  A page size for a
+ * memory pager should be some multiple of the OS paging size.
+ *
+ * The mempager uses a strategy of allocating fixed size pages as needed
+ * from the real heap and allocating objects from these pages as needed.
+ * A new page is allocated from the real heap when there is insufficient
+ * space in the existing page to complete a request.  The largest single
+ * memory allocation one can make is restricted by the page size used, and
+ * it is best to allocate objects a significant fraction smaller than the
+ * page size, as fragmentation occurs at the end of pages when there is
+ * insufficient space in the current page to complete a request.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT mempager : public memalloc, public LockingProtocol
+{
+private:
+    pthread_mutex_t mutex;
+
+protected:
+    /**
+     * Lock the memory pager mutex.  It will be more efficient to lock
+     * the pager and then call the locked allocator than using alloc which
+     * separately locks and unlocks for each request when a large number of
+     * allocation requests are being batched together.
+     */
+    virtual void _lock(void);
+
+    /**
+     * Unlock the memory pager mutex.
+     */
+    virtual void _unlock(void);
+
+public:
+    /**
+     * Construct a memory pager.
+     * @param page size to use or 0 for OS allocation size.
+     */
+    mempager(size_t page = 0);
+
+    /**
+     * Destroy a memory pager.  Release all pages back to the heap at once.
+     */
+    virtual ~mempager();
+
+    /**
+     * Determine fragmentation level of acquired heap pages.  This is
+     * represented as an average % utilization (0-100) and represents the
+     * used portion of each allocated heap page verse the page size.  Since
+     * requests that cannot fit on an already allocated page are moved into
+     * a new page, there is some unusable space left over at the end of the
+     * page.  When utilization approaches 100, this is good.  A low utilization
+     * may suggest a larger page size should be used.
+     * @return pager utilization.
+     */
+    unsigned utilization(void);
+
+    /**
+     * Purge all allocated memory and heap pages immediately.
+     */
+    void purge(void);
+
+    /**
+     * Return memory back to pager heap.  This actually does nothing, but
+     * might be used in a derived class to create a memory heap that can
+     * also receive (free) memory allocated from our heap and reuse it,
+     * for example in a full private malloc implementation in a derived class.
+     * @param memory to free back to private heap.
+     */
+    virtual void dealloc(void *memory);
+
+    /**
+     * Allocate memory from the pager heap.  The size of the request must be
+     * less than the size of the memory page used.  This impliments the
+     * memory protocol with mutex locking for thread safety.
+     * is locked during this operation and then released.
+     * @param size of memory request.
+     * @return allocated memory or NULL if not possible.
+     */
+    virtual void *_alloc(size_t size);
+};
+
+class __EXPORT ObjectPager : protected memalloc
+{
+public:
+    class __EXPORT member : public LinkedObject
+    {
+    private:
+        void *mem;
+
+    protected:
+        friend class ObjectPager;
+
+        inline void set(member *node)
+            {Next = node;};
+
+        inline void *get(void) const
+            {return mem;};
+
+        member(LinkedObject **root);
+        member();
+
+    public:
+        inline void *operator*() const
+            {return mem;};
+    };
+
+private:
+    unsigned members;
+    LinkedObject *root;
+    size_t typesize;
+    member *last;
+    void **index;
+
+protected:
+    ObjectPager(size_t objsize, size_t pagesize = 256);
+
+    /**
+     * Get object from list.  This is useful when objectpager is
+     * passed as a pointer and hence inconvenient for the [] operator.
+     * @param item to access.
+     * @return pointer to text for item, or NULL if out of range.
+     */
+    void *get(unsigned item) const;
+
+    /**
+     * Add object to list.
+     * @param object to add.
+     */
+    void *add(void);
+
+    void *push(void);
+
+    /**
+     * Remove element from front of list.  Does not release memory.
+     * @return object removed.
+     */
+    void *pull(void);
+
+    /**
+     * Remove element from back of list.  Does not release memory.
+     * @return object removed.
+     */
+    void *pop(void);
+
+    /**
+     * Invalid object...
+     * @return typically NULL.
+     */
+    void *invalid(void) const;
+
+public:
+    /**
+     * Purge all members and release pager member.  The list can then
+     * be added to again.
+     */
+    void clear(void);
+
+    /**
+     * Get root of pager list.  This is useful for externally enumerating
+     * the list of strings.
+     * @return first member of list or NULL if empty.
+     */
+    inline ObjectPager::member *begin(void)
+        {return static_cast<ObjectPager::member *>(root);};
+
+    inline operator bool() const
+        {return members > 0;}
+
+    inline bool operator!() const
+        {return !members;}
+
+    /**
+     * Get the number of items in the pager string list.
+     * @return number of items stored.
+     */
+    inline unsigned count(void) const
+        {return members;};
+
+    /**
+     * Convenience typedef for iterative pointer.
+     */
+    typedef linked_pointer<ObjectPager::member> iterator;
+
+    inline size_t size(void)
+        {return memalloc::size();}
+
+    inline unsigned pages(void)
+        {return memalloc::pages();}
+
+protected:
+    /**
+     * Gather index list.
+     * @return index.
+     */
+    void **list(void);
+};
+
+/**
+ * String pager for storing lists of NULL terminated strings.  This is
+ * used for accumulating lists which can be destroyed all at once.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT StringPager : protected memalloc
+{
+private:
+    unsigned members;
+    LinkedObject *root;
+
+protected:
+    virtual const char *invalid(void) const;
+
+public:
+    /**
+     * Filter text in a derived class.  The base class filter removes
+     * newlines at end of text and filters out empty strings.
+     * @param text to filter.
+     * @param size of text buffer for transforms.
+     * @return false if end of data.
+     */
+    virtual bool filter(char *text, size_t size);
+
+    /**
+     * Member of string list.  This is exposed so that the list of strings
+     * can be externally enumerated with linked_pointer<StringPager::member>
+     * if so desired, through the begin() method.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+    class __EXPORT member : public LinkedObject
+    {
+    private:
+        const char *text;
+
+    protected:
+        friend class StringPager;
+
+        inline void set(member *node)
+            {Next = node;};
+
+        member(LinkedObject **root, const char *data);
+        member(const char *data);
+
+    public:
+        inline const char *operator*() const
+            {return text;};
+
+        inline const char *get(void) const
+            {return text;};
+    };
+
+    /**
+     * Create a pager with a maximum page size.
+     * @param size of pager allocation pages.
+     */
+    StringPager(size_t pagesize = 256);
+
+    StringPager(char **list, size_t pagesize = 256);
+
+    /**
+     * Get the number of items in the pager string list.
+     * @return number of items stored.
+     */
+    inline unsigned count(void) const
+        {return members;};
+
+    /**
+     * Get string item from list.  This is useful when StringPager is
+     * passed as a pointer and hence inconvenient for the [] operator.
+     * @param item to access.
+     * @return pointer to text for item, or NULL if out of range.
+     */
+    const char *get(unsigned item) const;
+
+    /**
+     * Replace string item in list.
+     * @param item to replace.
+     * @param string to replace with.
+     */
+    void set(unsigned item, const char *string);
+
+    /**
+     * Add text to list.
+     * @param text to add.
+     */
+    void add(const char *text);
+
+    /**
+     * Add text to front of list.
+     * @param text to add.
+     */
+    void push(const char *text);
+
+    /**
+     * Add text list to front of list.
+     * @param text to add.
+     */
+    void push(char **text);
+
+    /**
+     * Remove element from front of list.  Does not release memory.
+     * @return text removed.
+     */
+    const char *pull(void);
+
+    /**
+     * Remove element from back of list.  Does not release memory.
+     * @return text removed.
+     */
+    const char *pop(void);
+
+    /**
+     * Add list to list.  This is a list of string pointers terminated with
+     * NULL.
+     * @param list of text to add.
+     */
+    void add(char **list);
+
+    /**
+     * Set list to list.  This is a list of string pointers terminated with
+     * NULL.
+     * @param list of text to set.
+     */
+    void set(char **list);
+
+    /**
+     * Purge all members and release pager member.  The list can then
+     * be added to again.
+     */
+    void clear(void);
+
+    /**
+     * Return specified member from pager list.  This is a convenience
+     * operator.
+     * @param item to access.
+     * @return text of item or NULL if invalid.
+     */
+    inline const char *operator[](unsigned item) const
+        {return get(item);};
+
+    inline const char *at(unsigned item) const
+        {return get(item);};
+
+    /**
+     * Get root of pager list.  This is useful for externally enumerating
+     * the list of strings.
+     * @return first member of list or NULL if empty.
+     */
+    inline StringPager::member *begin(void) const
+        {return static_cast<StringPager::member *>(root);};
+
+    /**
+     * Convenience operator to add to pager and auto-sort.
+     * @param text to add to list.
+     */
+    inline void operator+=(const char *text)
+        {add(text);};
+
+    /**
+     * Convenience operator to add to pager.
+     * @param text to add to list.
+     */
+    inline StringPager& operator<<(const char *text)
+        {add(text); return *this;}
+
+    inline StringPager& operator>>(const char *text)
+        {push(text); return *this;}
+
+    /**
+     * Sort members.
+     */
+    void sort(void);
+
+    /**
+     * Gather index list.
+     * @return index.
+     */
+    char **list(void);
+
+    /**
+     * Tokenize a string and add each token to the StringPager.
+     * @param text to tokenize.
+     * @param list of characters to use as token separators.
+     * @param quote pairs of characters for quoted text or NULL if not used.
+     * @param end of line marker characters or NULL if not used.
+     * @return number of tokens parsed.
+     */
+    unsigned token(const char *text, const char *list, const char *quote = NULL, const char *end = NULL);
+
+    unsigned split(const char *text, const char *string, unsigned flags = 0);
+
+    unsigned split(stringex_t& expr, const char *string, unsigned flags = 0);
+
+    String join(const char *prefix = NULL, const char *middle = NULL, const char *suffix = NULL);
+
+    inline operator bool()
+        {return members > 0;}
+
+    inline bool operator!()
+        {return !members;}
+
+    inline StringPager& operator=(char **list)
+        {set(list); return *this;}
+
+    inline const char *operator*()
+        {return pull();}
+
+    inline operator char **()
+        {return list();};
+
+    /**
+     * Convenience typedef for iterative pointer.
+     */
+    typedef linked_pointer<StringPager::member> iterator;
+
+    inline size_t size(void)
+        {return memalloc::size();}
+
+    inline unsigned pages(void)
+        {return memalloc::pages();}
+
+private:
+    member *last;
+    char **index;
+};
+
+/**
+ * Directory pager is a paged string list for directory file names.
+ * This protocol is used to convert a directory into a list of filenames.
+ * As a protocol it offers a filtering method to select which files to
+ * include in the list.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT DirPager : protected StringPager
+{
+protected:
+    const char *dir;
+
+    /**
+     * Filter filenames in a derived class.  The default filter
+     * drops "." special files.
+     * @param filename to filter.
+     * @param size of filename buffer.
+     * @return true if include in final list.
+     */
+    virtual bool filter(char *filename, size_t size);
+
+    /**
+     * Load a directory path.
+     * @param path to load.
+     * @return true if valid.
+     */
+    bool load(const char *path);
+
+public:
+    DirPager();
+
+    DirPager(const char *path);
+
+    void operator=(const char *path);
+
+    inline const char *operator*() const
+        {return dir;};
+
+    inline operator bool() const
+        {return dir != NULL;};
+
+    inline bool operator!() const
+        {return dir == NULL;};
+
+    inline unsigned count(void) const
+        {return StringPager::count();};
+
+    /**
+     * Return specified filename from directory list.  This is a convenience
+     * operator.
+     * @param item to access.
+     * @return text of item or NULL if invalid.
+     */
+    inline const char *operator[](unsigned item) const
+        {return StringPager::get(item);};
+
+    inline const char *get(unsigned item) const
+        {return StringPager::get(item);};
+
+    inline const char *at(unsigned item) const
+        {return StringPager::get(item);};
+
+    inline size_t size(void)
+        {return memalloc::size();}
+
+    inline unsigned pages(void)
+        {return memalloc::pages();}
+};
+
+/**
+ * Buffered pager for storing paged strings for character protocol.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT bufpager : public memalloc, public CharacterProtocol
+{
+private:
+    typedef struct cpage {
+        struct cpage *next;
+        char *text;
+        unsigned size, used;
+    } cpage_t;
+
+    cpage_t *first, *last, *current, *freelist;
+    unsigned cpos;
+    unsigned long ccount;
+    bool eom;       /* null written or out of memory */
+
+    virtual int _getch(void);
+    virtual int _putch(int code);
+
+protected:
+    virtual void *_alloc(size_t size);
+
+public:
+    /**
+     * Reset pager text buffer protocol.
+     */
+    void reset(void);
+
+    /**
+     * Rewind to start of text buffer protocol.
+     */
+    void rewind(void);
+
+    /**
+     * Create an output string from buffer.
+     * @return output string allocated.
+     */
+    char *dup(void);
+
+    /**
+     * Set text of string buffer.
+     * @param text to set.
+     */
+    void set(const char *text);
+
+    /**
+     * Add text to string buffer.
+     * @param text to add.
+     */
+    void add(const char *text);
+
+    /**
+     * Get string from buffer.
+     * @param text to save into.
+     * @param size of buffer.
+     * @return count of characters copied.
+     */
+    size_t get(char *text, size_t size);
+
+    /**
+     * Put memory string into buffer including NULL byte.
+     * @param text to add.
+     * @param size of text to add.
+     */
+    void put(const char *text, size_t size);
+
+    /**
+     * Get total size.
+     * @return number of characters in buffer.
+     */
+    inline unsigned long used(void) const
+        {return ccount;}
+
+    /**
+     * Convenience operator to get text.
+     * @return text string of buffer.
+     */
+    inline char *operator *()
+        {return dup();}
+
+    /**
+     * Convenience operator to add to pager.
+     * @param text to add to list.
+     */
+    inline bufpager& operator<<(const char *text)
+        {add(text); return *this;};
+
+    bufpager(size_t page = 0);
+
+    /**
+     * Request character buffer to write into directly.
+     * @param iosize made available.
+     * @return pointer to buffer or NULL if out of memory.
+     */
+    char *request(size_t *iosize);
+
+    /**
+     * Get pointer to copy character data.  The memory pointer is
+     * positioned at the next chunk automatically.
+     * @param iosize of data you can copy.
+     * @return to data from buffer or NULL if past end.
+     */
+    char *copy(size_t *iosize);
+
+    /**
+     * Used to complete a request method.
+     * @param size of data actually written.
+     */
+    void update(size_t size);
+
+    /**
+     * Check if can still save into buffer.
+     * @return true if buffer is full.
+     */
+    inline bool operator!()
+        {return eom;}
+
+    /**
+     * Check if can still save into buffer.  Used for is() function.
+     * @return true if pager can still store more.
+     */
+    inline operator bool()
+        {return !eom;}
+};
+
+/**
+ * Create a linked list of auto-releasable objects.  LinkedObject derived
+ * objects can be created that are assigned to an autorelease object list.
+ * When the autorelease object falls out of scope, all the objects listed'
+ * with it are automatically deleted.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT autorelease
+{
+private:
+    LinkedObject *pool;
+
+public:
+    /**
+     * Create an initially empty autorelease pool.
+     */
+    autorelease();
+
+    /**
+     * Destroy an autorelease pool and delete member objects.
+     */
+    ~autorelease();
+
+    /**
+     * Destroy an autorelease pool and delete member objects.  This may be
+     * used to release an existing pool programmatically when desired rather
+     * than requiring the object to fall out of scope.
+     */
+    void release(void);
+
+    /**
+     * Add a linked object to the autorelease pool.
+     * @param object to add to pool.
+     */
+    void operator+=(LinkedObject *object);
+};
+
+/**
+ * This is a base class for objects that may be created in pager pools.
+ * This is also used to create objects which can be maintained as managed
+ * memory and returned to a pool.  The linked list is used when freeing
+ * and re-allocating the object.  These objects are reference counted
+ * so that they are returned to the pool they come from automatically
+ * when falling out of scope.  This can be used to create automatic
+ * garbage collection pools.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT PagerObject : public LinkedObject, public CountedObject
+{
+protected:
+    friend class PagerPool;
+
+    PagerPool *pager;
+
+    /**
+     * Create a pager object.  This is object is constructed by a PagerPool.
+     */
+    PagerObject();
+
+    /**
+     * Reset state of object.
+     */
+    void reset(void);
+
+    /**
+     * Release a pager object reference.
+     */
+    void release(void);
+
+    /**
+     * Return the pager object back to it's originating pool.
+     */
+    void dealloc(void);
+};
+
+/**
+ * Pager pool base class for managed memory pools.  This is a helper base
+ * class for the pager template and generally is not used by itself.  If
+ * different type pools are intended to use a common memory pager then
+ * you will need to mixin a memory protocol object that performs
+ * redirection such as the MemoryRedirect class.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT PagerPool : public MemoryProtocol
+{
+private:
+    LinkedObject *freelist;
+    pthread_mutex_t mutex;
+
+protected:
+    PagerPool();
+    virtual ~PagerPool();
+
+    PagerObject *get(size_t size);
+
+public:
+    /**
+     * Return a pager object back to our free list.
+     * @param object to return to pool.
+     */
+    void put(PagerObject *object);
+};
+
+class __EXPORT charmem : public CharacterProtocol
+{
+protected:
+    char *buffer;
+    size_t inp, out, size;
+    bool dynamic;
+
+    int _getch(void);
+    int _putch(int code);
+
+public:
+    charmem(char *mem, size_t size);
+    charmem(size_t size);
+    charmem();
+    virtual ~charmem();
+
+    void release(void);
+
+    void set(char *mem, size_t size);
+
+    void set(size_t size);
+
+    inline void reset(void)
+        {inp = out = 0;}
+
+    inline void rewind(void)
+        {inp = 0;}
+};
+
+class __EXPORT chartext : public CharacterProtocol
+{
+private:
+    char *pos;
+    size_t max;
+
+    int _putch(int code);
+    int _getch(void);
+
+public:
+    chartext();
+    chartext(char *buf);
+    chartext(char *buf, size_t size);
+    virtual ~chartext();
+};
+
+/**
+ * A class to hold memory pointers referenced by string names.  This is
+ * used to form a typeless data pointer that can be associated and
+ * referenced by string/logical name.  The memory used for forming
+ * the string names can itself be managed in reusable memory pools and
+ * the entire structure uses it's own private pager heap.  This allows
+ * new string named pointers to be added and deleted at runtime in a thread-
+ * safe manner.  This might typically be used as a session id manager or for
+ * symbol tables.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT keyassoc : protected mempager
+{
+private:
+    /**
+     * Internal paged memory residing data class for name associated pointers.
+     */
+    class __LOCAL keydata : public NamedObject
+    {
+    public:
+        void *data;
+        char text[8];
+
+        keydata(keyassoc *assoc, const char *id, unsigned max, unsigned bufsize);
+    };
+
+    friend class keydata;
+
+    unsigned keycount;
+    unsigned paths;
+    size_t keysize;
+    NamedObject **root;
+    LinkedObject **list;
+
+protected:
+    /**
+     * Allocate object stored in pager also.
+     * @param name of object entry.
+     * @param size of object to allocate.
+     * @return pointer to allocated object or NULL on failure.
+     */
+    void *allocate(const char *name, size_t size);
+
+public:
+    /**
+     * Create a key associated memory pointer table.
+     * @param indexing size for hash map.
+     * @param max size of a string name if names are in reusable managed memory.
+     * @param page size of memory pager.
+     */
+    keyassoc(unsigned indexing = 177, size_t max = 0, size_t page = 0);
+
+    /**
+     * Destroy association object.  Release all pages back to the heap.
+     */
+    ~keyassoc();
+
+    /**
+     * Get the number of associations we have in our object.
+     * @return number of associations stored.
+     */
+    inline unsigned count(void) const
+        {return keycount;};
+
+    /**
+     * Lookup the data pointer of a string by direct operation.
+     * @param name to lookup.
+     * @return pointer to data or NULL if not found.
+     */
+    inline void *operator()(const char *name)
+        {return locate(name);};
+
+    /**
+     * Purge all associations and return allocated pages to heap.
+     */
+    void purge(void);
+
+    /**
+     * Lookup the data pointer by the string name given.
+     * @param name to lookup.
+     * @return pointer to data or NULL if not found.
+     */
+    void *locate(const char *name);
+
+    /**
+     * Assign a name to a data pointer.  If the name exists, it is re-assigned
+     * with the new pointer value, otherwise it is created.
+     * @param name to assign.
+     * @param pointer value to assign with name.
+     * @return false if failed because name is too long for managed table.
+     */
+    bool assign(const char *name, void *pointer);
+
+    /**
+     * Create a new name in the association table and assign it's value.
+     * @param name to create.
+     * @param pointer value to assign with name.
+     * @return false if already exists or name is too long for managed table.
+     */
+    bool create(const char *name, void *pointer);
+
+    /**
+     * Remove a name and pointer association.  If managed key names are used
+     * then the memory allocated for the name will be re-used.
+     * @param name to remove.
+     * @return pointer value of the name or NULL if not found.
+     */
+    void *remove(const char *name);
+};
+
+template <class T, size_t P = 0>
+class listof : private ObjectPager
+{
+public:
+    inline listof() : ObjectPager(sizeof(T), P) {};
+
+    inline T& operator[](unsigned item) const
+        {return (T&)ObjectPager::get(item);}
+
+    inline T* operator()(unsigned item) const
+        {return (T*)ObjectPager::get(item);}
+
+    inline const T& at(unsigned item) const
+        {return (const T&)ObjectPager::get(item);}
+
+    inline T* pull(void)
+        {return (T*)ObjectPager::pull();}
+
+    inline T* pop(void)
+        {return (T*)ObjectPager::pop();}
+
+    inline operator T**()
+        {return (T**)ObjectPager::list();}
+
+    inline T** list(void)
+        {return (T**)ObjectPager::list();}
+
+    inline T* operator++(void)
+        {T* tmp = ObjectPager::add(); if(tmp) new((caddr_t)tmp) T; return tmp;}
+
+    inline T* add(const T& object)
+        {T* tmp = ObjectPager::add(); if(tmp) new((caddr_t)tmp) T(object); return tmp;}
+
+    inline T* push(const T& object)
+        {T* tmp = ObjectPager::push(); if(tmp) new((caddr_t)tmp) T(object); return tmp;}
+
+    inline listof& operator<<(const T& object)
+        {T* tmp = ObjectPager::add(); if(tmp) new((caddr_t)tmp) T(object); return *this;}
+
+    inline listof& operator>>(const T& object)
+        {T* tmp = ObjectPager::push(); if(tmp) new((caddr_t)tmp) T(object); return *this;}
+
+};
+
+template <class T, unsigned I = 177, size_t M = 0, size_t P = 0>
+class mapof : private keyassoc
+{
+public:
+    /**
+     * Construct an associated pointer hash map based on the class template.
+     */
+    inline mapof() : keyassoc(I, M, P) {};
+
+    /**
+     * Get the count of typed objects stored in our hash map.
+     * @return typed objects in map.
+     */
+    inline unsigned count(void) const
+        {return keyassoc::count();};
+
+    /**
+     * Purge the hash map of typed objects.
+     */
+    inline void purge(void)
+        {keyassoc::purge();};
+
+    /**
+     * Lookup a typed object by name.
+     * @param name of typed object to locate.
+     * @return typed object pointer or NULL if not found.
+     */
+    inline T *locate(const char *name)
+        {return static_cast<T*>(keyassoc::locate(name));}
+
+    inline T *operator[](const char *name)
+        {return static_cast<T*>(keyassoc::locate(name));}
+
+    /**
+     * Reference a typed object directly by name.
+     * @param name of typed object to locate.
+     * @return typed object pointer or NULL if not found.
+     */
+    inline T *operator()(const char *name)
+        {return locate(name);};
+
+    /**
+     * Create mapped entry from scratch.
+     * @param name to assign.
+     */
+    inline T *map(const char *name)
+        {T *tmp = keyassoc::allocate(name, sizeof(T)); if(tmp) new((caddr_t)tmp) T;}
+
+    /**
+     * Remove a name and typed pointer association.  If managed key names are
+     * used then the memory allocated for the name will be re-used.
+     * @param name to remove.
+     */
+    inline void unmap(const char *name)
+        {keyassoc::remove(name);};
+
+    /**
+     * Access to pager utilization stats.  This is needed because we
+     * inherit keyassoc privately.
+     * @return pager utilization, 0-100.
+     */
+    inline unsigned utilization(void)
+        {return mempager::utilization();};
+
+    /**
+     * Access to number of pages allocated from heap for our associated
+     * index pointer.  This is needed because we inherit keyassoc
+     * privately.
+     * @return count of heap pages used.
+     */
+    inline unsigned pages(void) const
+        {return mempager::pages();};
+};
+
+/**
+ * A typed template for using a key association with typed objects.
+ * This essentially forms a form of "smart pointer" that is a reference
+ * to specific typed objects by symbolic name.  This is commonly used as
+ * for associated indexing of typed objects.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <class T, unsigned I = 177, size_t M = 0, size_t P = 0>
+class assoc_pointer : private keyassoc
+{
+public:
+    /**
+     * Construct an associated pointer hash map based on the class template.
+     */
+    inline assoc_pointer() : keyassoc(I, M, P) {};
+
+    /**
+     * Get the count of typed objects stored in our hash map.
+     * @return typed objects in map.
+     */
+    inline unsigned count(void) const
+        {return keyassoc::count();}
+
+    /**
+     * Purge the hash map of typed objects.
+     */
+    inline void purge(void)
+        {keyassoc::purge();}
+
+    /**
+     * Lookup a typed object by name.
+     * @param name of typed object to locate.
+     * @return typed object pointer or NULL if not found.
+     */
+    inline T *locate(const char *name)
+        {return static_cast<T*>(keyassoc::locate(name));}
+
+    inline T *operator[](const char *name)
+        {return static_cast<T*>(keyassoc::locate(name));}
+
+
+    /**
+     * Reference a typed object directly by name.
+     * @param name of typed object to locate.
+     * @return typed object pointer or NULL if not found.
+     */
+    inline T *operator()(const char *name)
+        {return locate(name);}
+
+    /**
+     * Assign a name for a pointer to a typed object.  If the name exists,
+     * it is re-assigned with the new pointer value, otherwise it is created.
+     * @param name to assign.
+     * @param pointer of typed object to assign with name.
+     * @return false if failed because name is too long for managed table.
+     */
+    inline bool assign(char *name, T *pointer)
+        {return keyassoc::assign(name, pointer);}
+
+    /**
+     * Create a new name in the association table and assign typed object.
+     * @param name to create.
+     * @param pointer of typed object to assign with name.
+     * @return false if already exists or name is too long for managed table.
+     */
+    inline bool create(char *name, T *pointer)
+        {return keyassoc::create(name, pointer);}
+
+    /**
+     * Remove a name and typed pointer association.  If managed key names are
+     * used then the memory allocated for the name will be re-used.
+     * @param name to remove.
+     */
+    inline void remove(char *name)
+        {keyassoc::remove(name);}
+
+    /**
+     * Access to pager utilization stats.  This is needed because we
+     * inherit keyassoc privately.
+     * @return pager utilization, 0-100.
+     */
+    inline unsigned utilization(void) const
+        {return mempager::utilization();}
+
+    /**
+     * Access to number of pages allocated from heap for our associated
+     * index pointer.  This is needed because we inherit keyassoc
+     * privately.
+     * @return count of heap pages used.
+     */
+    inline unsigned pages(void) const
+        {return mempager::pages();}
+};
+
+/**
+ * Mempager managed type factory for pager pool objects.  This is used to
+ * construct a type factory that creates and manages typed objects derived
+ * from PagerObject which can be managed through a private heap.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <typename T>
+class pager : private MemoryRedirect, private PagerPool
+{
+public:
+    /**
+     * Construct a pager and optionally assign a private pager heap.
+     * @param heap pager to use.  If NULL, uses global heap.
+     */
+    inline pager(mempager *heap = NULL) : MemoryRedirect(heap), PagerPool() {};
+
+    /**
+     * Create a managed object by casting reference.
+     * @return pointer to typed managed pager pool object.
+     */
+    inline T *operator()(void)
+        {return new(get(sizeof(T))) T;};
+
+    /**
+     * Create a managed object by pointer reference.
+     * @return pointer to typed managed pager pool object.
+     */
+    inline T *operator*()
+        {return new(get(sizeof(T))) T;};
+};
+
+/**
+ * A template class for a hash pager.  This creates objects from a pager
+ * pool when they do not already exist in the hash map.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <class T, unsigned M = 177>
+class keypager : public mempager
+{
+private:
+    NamedObject *idx[M];
+
+public:
+    /**
+     * Create the object cache.
+     * @param size of allocation units.
+     */
+    inline keypager(size_t size) : mempager(size) {};
+
+    /**
+     * Destroy the hash pager by purging the index chains and memory pools.
+     */
+    inline ~keypager()
+        {NamedObject::purge(idx, M); mempager::purge();};
+
+    /**
+     * Find a typed object derived from NamedObject in the hash map by name.
+     * If the object is not found, it is created from the memory pool.
+     * @param name to search for.
+     * @return typed object if found through map or NULL.
+     */
+    inline T *get(const char *name) const {
+        T *node = (static_cast<T*>(NamedObject::map(idx, name, M)));
+        if(!node) {
+            node = init<T>(static_cast<T*>(mempager::_alloc(sizeof(T))));
+            node->NamedObject::add(idx, name, M);
+        }
+        return node;
+    }
+
+    /**
+     * Test if a name exists in the pool.
+     * @param name to test.
+     * @return true if found.
+     */
+    bool test(const char *name) const
+        {return NamedObject::map(idx, name, M) != NULL;};
+
+    /**
+     * Find a typed object derived from NamedObject in the hash map by name.
+     * If the object is not found, it is created from the pager pool.
+     * @param name to search for.
+     * @return typed object if found through map or NULL.
+     */
+    inline T *operator[](const char *name) const
+        {return get(name);};
+
+    /**
+     * Find first typed object in hash map to iterate.
+     * @return first typed object or NULL if nothing in list.
+     */
+    inline T *begin(void) const
+        {return static_cast<T*>(NamedObject::skip(idx, NULL, M));};
+
+    /**
+     * Find next typed object in hash map for iteration.
+     * @param current typed object we are referencing.
+     * @return next iterative object or NULL if past end of map.
+     */
+    inline T *next(T *current) const
+        {return static_cast<T*>(NamedObject::skip(idx, current, M));};
+
+    /**
+     * Count the number of typed objects in our hash map.
+     * @return count of typed objects.
+     */
+    inline unsigned count(void) const
+        {return NamedObject::count(idx, M);};
+
+    /**
+     * Convert our hash map into a linear object pointer array.  The
+     * object pointer array is created from the heap and must be deleted
+     * when no longer used.
+     * @return array of typed named object pointers.
+     */
+    inline T **index(void) const
+        {return NamedObject::index(idx, M);};
+
+    /**
+     * Convert our hash map into an alphabetically sorted linear object
+     * pointer array.  The object pointer array is created from the heap
+     * and must be deleted when no longer used.
+     * @return sorted array of typed named object pointers.
+     */
+    inline T **sort(void) const
+        {return NamedObject::sort(NamedObject::index(idx, M));};
+
+    /**
+     * Convenience typedef for iterative pointer.
+     */
+    typedef linked_pointer<T> iterator;
+};
+
+/**
+ * A convenience type for paged string lists.
+ */
+typedef StringPager stringlist_t;
+
+/**
+ * A convenience type for paged string list items.
+ */
+typedef StringPager::member stringlistitem_t;
+
+/**
+ * A convenience type for using DirPager directly.
+ */
+typedef DirPager dirlist_t;
+
+inline const char *shift(stringlist_t& list)
+    {return list.pull();}
+
+inline void unshift(stringlist_t& list, const char *text)
+    {list.push(text);}
+
+
+inline String str(StringPager& list, const char *prefix = NULL, const char *middle = NULL, const char *suffix = NULL)
+    {return list.join(prefix, middle, suffix);}
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/numbers.h b/jni/libucommon/sources/inc/ucommon/numbers.h
new file mode 100644
index 0000000..b210c8c
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/numbers.h
@@ -0,0 +1,240 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Support classes for manipulation of numbers as strings.  This is
+ * used for things which parse numbers out of strings, such as in the
+ * date and time classes.  Other useful math related functions, templates,
+ * and macros may also be found here.
+ * @file ucommon/numbers.h
+ */
+
+#ifndef _UCOMMON_NUMBERS_H_
+#define _UCOMMON_NUMBERS_H_
+
+#ifndef _UCOMMON_CONFIG_H_
+#include <ucommon/platform.h>
+#endif
+
+NAMESPACE_UCOMMON
+
+/**
+ * A number manipulation class.  This is used to extract, convert,
+ * and manage simple numbers that are represented in C ascii strings
+ * in a very quick and optimal way.  This class modifies the string
+ * representation each time the value is changed.  No math expressions
+ * or explicit comparison operators are supported for the Numbers class
+ * because these are best done by casting to long first.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short number manipulation.
+ */
+class __EXPORT Number
+{
+protected:
+    char *buffer;
+    unsigned size;
+
+public:
+    /**
+     * Create an instance of a number.
+     * @param buffer or NULL if created internally.
+     * @param size of field if not null terminated.
+     */
+    Number(char *buffer, unsigned size);
+
+    /**
+     * Set string based on a new value.
+     * @param value to set.
+     */
+    void set(long value);
+
+    /**
+     * Get string buffer representing the number.
+     * @return string buffer.
+     */
+    inline const char *c_str() const
+        {return buffer;};
+
+    /**
+     * Get value of string buffer as a long integer.
+     * @return long integer value of string buffer.
+     */
+    long get() const;
+
+    /**
+     * Get value of string buffer as expression of object.
+     * @return long integer value of string buffer.
+     */
+    inline long operator()()
+        {return get();};
+
+    /**
+     * Cast string as long integer and get value of buffer.
+     * @return long integer value of string buffer.
+     */
+    inline operator long()
+        {return get();};
+
+    /**
+     * Cast object as a string to retrieve buffer.
+     * @return string buffer of value.
+     */
+    inline operator char*()
+        {return buffer;};
+
+    /**
+     * Assign a value to the number.  This rewrites the string buffer.
+     * @param value to assign.
+     * @return new value of number object assigned.
+     */
+    long operator=(long value);
+
+    /**
+     * Assign another number to this number.
+     * @param number to assign to assign.
+     * @return new value of number object assigned.
+     */
+    long operator=(const Number& number);
+
+    /**
+     * Add a value to the number.  This rewrites the string buffer.
+     * @param value to add.
+     * @return new value of number object.
+     */
+    long operator+=(const long value);
+
+    /**
+     * Subtract a value from the number.  This rewrites the string buffer.
+     * @param value to subtract.
+     * @return new value of number object.
+     */
+    long operator-=(const long value);
+
+    /**
+     * Decrement the number object.  This rewrites the string buffer.
+     * @return new value of number object.
+     */
+    long operator--();
+
+    /**
+     * Increment the number object.  This rewrites the string buffer.
+     * @return new value of number object.
+     */
+    long operator++();
+
+    inline bool operator==(const long value) const
+        {return get() == value;}
+
+    inline bool operator!=(const long value) const
+        {return get() != value;}
+
+    inline bool operator<(const long value) const
+        {return get() < value;}
+
+    inline bool operator>(const long value) const
+        {return get() > value;}
+
+    inline bool operator<=(const long value) const
+        {return get() <= value;}
+
+    inline bool operator>=(const long value) const
+        {return get() >= value;}
+};
+
+/**
+ * A number manipulation class that maintains a zero lead filled string.
+ *
+ * @author David Sugar <dyfet@ostel.com>
+ * @short zero filled number manipulation.
+ */
+class __EXPORT ZNumber : public Number
+{
+public:
+    /**
+     * Create a number class for zero fill.
+     * @param pointer to field.
+     * @param size of field to fill.
+     */
+    ZNumber(char *pointer, unsigned size);
+
+    /**
+     * Set value of zero filled number.
+     * @param value to set.
+     */
+
+    void set(long value);
+
+    /**
+     * Assign number from value.
+     * @param value to assign.
+     * @return value assigned.
+     */
+    long operator=(long value);
+};
+
+/**
+ * A convenience type for number.
+ */
+typedef Number  number_t;
+
+/**
+ * A convenience type for znumber.
+ */
+typedef ZNumber znumber_t;
+
+/**
+ * Template for absolute value of a type.
+ * @param value to check
+ * @return absolute value
+ */
+template<typename T>
+inline const T abs(const T& value)
+{
+    if(value < (T)0)
+        return -value;
+    return value;
+}
+
+
+/**
+ * Template for min value of a type.
+ * @param v1 value to check
+ * @param v2 value to check
+ * @return v1 if < v2, else v2
+ */
+template<typename T>
+inline const T (min)(const T& v1, const T& v2)
+{
+    return ((v1 < v2) ? v1 : v2);
+}
+
+/**
+ * Template for max value of a type.
+ * @param v1 value to check
+ * @param v2 value to check
+ * @return v1 if > v2, else v2
+ */
+template<typename T>
+inline const T (max)(const T& v1, const T& v2)
+{
+    return ((v1 > v2) ? v1 : v2);
+}
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/object.h b/jni/libucommon/sources/inc/ucommon/object.h
new file mode 100644
index 0000000..6bbed71
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/object.h
@@ -0,0 +1,484 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * A common object base class with auto-pointer support.
+ * A common object class is used which may be referenced counted and
+ * associated with a smart auto-pointer class.  A lot of the things
+ * found here were inspired by working with Objective-C.  Many of the
+ * classes are designed to offer automatic heap management through
+ * smart pointers and temporary objects controlled through the scope of
+ * the stack frame of method calls.
+ * @file ucommon/object.h
+ */
+
+#ifndef _UCOMMON_OBJECT_H_
+#define _UCOMMON_OBJECT_H_
+
+#ifndef _UCOMMON_CPR_H_
+#include <ucommon/cpr.h>
+#endif
+
+#ifndef _UCOMMON_GENERICS_H_
+#include <ucommon/generics.h>
+#endif
+
+#ifndef _UCOMMON_PROTOCOLS_H_
+#include <ucommon/protocols.h>
+#endif
+
+#include <stdlib.h>
+
+NAMESPACE_UCOMMON
+
+/**
+ * A base class for reference counted objects.  Reference counted objects
+ * keep track of how many objects refer to them and fall out of scope when
+ * they are no longer being referred to.  This can be used to achieve
+ * automatic heap management when used in conjunction with smart pointers.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT CountedObject : public ObjectProtocol
+{
+private:
+    volatile unsigned count;
+
+protected:
+    /**
+     * Construct a counted object, mark initially as unreferenced.
+     */
+    CountedObject();
+
+    /**
+     * Construct a copy of a counted object.  Our instance is not a
+     * reference to the original object but a duplicate, so we do not
+     * retain the original and we do reset our count to mark as
+     * initially unreferenced.
+     */
+    CountedObject(const ObjectProtocol &ref);
+
+    /**
+     * Dealloc object no longer referenced.  The dealloc routine would commonly
+     * be used for a self delete to return the object back to a heap when
+     * it is no longer referenced.
+     */
+    virtual void dealloc(void);
+
+    /**
+     * Force reset of count.
+     */
+    inline void reset(void)
+        {count = 0;}
+
+public:
+    /**
+     * Test if the object has copied references.  This means that more than
+     * one object has a reference to our object.
+     * @return true if referenced by more than one object.
+     */
+    inline bool is_copied(void)
+        {return count > 1;};
+
+    /**
+     * Test if the object has been referenced (retained) by anyone yet.
+     * @return true if retained.
+     */
+    inline bool is_retained(void)
+        {return count > 0;};
+
+    /**
+     * Return the number of active references (retentions) to our object.
+     * @return number of references to our object.
+     */
+    inline unsigned copied(void)
+        {return count;};
+
+    /**
+     * Increase reference count when retained.
+     */
+    void retain(void);
+
+    /**
+     * Decrease reference count when released.  If no longer retained, then
+     * the object is dealloc'd.
+     */
+    void release(void);
+};
+
+/**
+ * A general purpose smart pointer helper class.  This is particularly
+ * useful in conjunction with reference counted objects which can be
+ * managed and automatically removed from the heap when they are no longer
+ * being referenced by a smart pointer.  The smart pointer itself would
+ * normally be constructed and initialized as an auto variable in a method
+ * call, and will dereference the object when the pointer falls out of scope.
+ * This is actually a helper class for the typed pointer template.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT auto_object
+{
+protected:
+    ObjectProtocol *object;
+
+    auto_object();
+
+public:
+    /**
+     * Construct an auto-pointer referencing an existing object.
+     * @param object we point to.
+     */
+    auto_object(ObjectProtocol *object);
+
+    /**
+     * Construct an auto-pointer as a copy of another pointer.  The
+     * retention of the object being pointed to will be increased.
+     * @param pointer we are a copy of.
+     */
+    auto_object(const auto_object &pointer);
+
+    /**
+     * Delete auto pointer.  When it falls out of scope, the retention
+     * of the object it references is reduced.  If it falls to zero in
+     * a reference counted object, then the object is auto-deleted.
+     */
+    ~auto_object();
+
+    /**
+     * Manually release the pointer.  This reduces the retention level
+     * of the object and resets the pointer to point to nobody.
+     */
+    void release(void);
+
+    /**
+     * Test if the pointer is not set.
+     * @return true if the pointer is not referencing anything.
+     */
+    bool operator!() const;
+
+    /**
+     * Test if the pointer is referencing an object.
+     * @return true if the pointer is currently referencing an object.
+     */
+    operator bool() const;
+
+    /**
+     * test if the object being referenced is the same as the object we specify.
+     * @param object we compare to.
+     * @return true if this is the object our pointer references.
+     */
+    bool operator==(ObjectProtocol *object) const;
+
+    /**
+     * test if the object being referenced is not the same as the object we specify.
+     * @param object we compare to.
+     * @return true if this is not the object our pointer references.
+     */
+    bool operator!=(ObjectProtocol *object) const;
+
+    /**
+     * Set our pointer to a specific object.  If the pointer currently
+     * references another object, that object is released.  The pointer
+     * references our new object and that new object is retained.
+     * @param object to assign to.
+     */
+    void operator=(ObjectProtocol *object);
+};
+
+/**
+ * A sparse array of managed objects.  This might be used as a simple
+ * array class for reference counted objects.  This class assumes that
+ * objects in the array exist when assigned, and that gaps in the array
+ * are positions that do not reference any object.  Objects are automatically
+ * created (create on access/modify when an array position is referenced
+ * for the first time.  This is an abstract class because it is a type
+ * factory for objects who's derived class form constructor is not known
+ * in advance and is a helper class for the sarray template.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT SparseObjects
+{
+private:
+    ObjectProtocol **vector;
+    unsigned max;
+
+protected:
+    /**
+     * Object factory for creating members of the spare array when they
+     * are initially requested.
+     * @return new object.
+     */
+    virtual ObjectProtocol *create(void) = 0;
+
+    /**
+     * Purge the array by deleting all created objects.
+     */
+    void purge(void);
+
+    virtual ObjectProtocol *invalid(void) const;
+
+    /**
+     * Get (reference) an object at a specified offset in the array.
+     * @param offset in array.
+     * @return new or existing object.
+     */
+    ObjectProtocol *get(unsigned offset);
+
+    /**
+     * Create a sparse array of known size.  No member objects are
+     * created until they are referenced.
+     * @param size of array.
+     */
+    SparseObjects(unsigned size);
+
+    /**
+     * Destroy sparse array and delete all generated objects.
+     */
+    virtual ~SparseObjects();
+
+public:
+    /**
+     * Get count of array elements.
+     * @return array elements.
+     */
+    unsigned count(void);
+};
+
+/**
+ * Generate a typed sparse managed object array.  Members in the array
+ * are created when they are first referenced.  The types for objects
+ * that are generated by sarray must have Object as a base class.  Managed
+ * sparse arrays differ from standard arrays in that the member elements
+ * are not allocated from the heap when the array is created, but rather
+ * as they are needed.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <class T>
+class sarray : public SparseObjects
+{
+public:
+    /**
+     * Generate a sparse typed array of specified size.
+     * @param size of array to create.
+     */
+    inline sarray(unsigned size) : SparseObjects(size) {};
+
+    /**
+     * Get typed member of array.  If the object does not exist, it is
+     * created.
+     * @param offset in array for object.
+     * @return pointer to typed object.
+     */
+    inline T *get(unsigned offset)
+        {return static_cast<T*>(SparseObjects::get(offset));}
+
+    /**
+     * Array operation to access member object.  If the object does not
+     * exist, it is created.
+     * @param offset in array for object.
+     * @return pointer to typed object.
+     */
+    inline T& operator[](unsigned offset)
+        {return get(offset);};
+
+    inline const T* at(unsigned offset)
+        {return static_cast<const T&>(SparseObjects::get(offset));}
+
+private:
+    __LOCAL ObjectProtocol *create(void)
+        {return new T;};
+};
+
+/**
+ * Template for embedding a data structure into a reference counted object.
+ * This is a convenient means to create reference counted heap managed data
+ * structure.  This template can be used for embedding data into other kinds
+ * of managed object classes in addition to reference counting.  For example,
+ * it can be used to embed a data structure into a linked list, as shown in
+ * the linked_value template.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <typename T, class O = CountedObject>
+class object_value : public O
+{
+protected:
+    /**
+     * Assign our value from a typed data object.  This is a helper method.
+     * @param object to assign our value from.
+     */
+    inline void set(const T& object)
+        {value = object;};
+
+public:
+    T value;    /**< Embedded data value */
+
+    /**
+     * Construct composite value object.
+     */
+    inline object_value() : O() {};
+
+    /**
+     * Construct composite value object and assign from existing data value.
+     * @param existing typed value to assign.
+     */
+    inline object_value(T& existing) : O()
+        {value = existing;};
+
+    /**
+     * Pointer reference to embedded data value.
+     * @return embedded value.
+     */
+    inline T& operator*()
+        {return value;};
+
+    /**
+     * Assign embedded data value.
+     * @param data value to assign.
+     */
+    inline void operator=(const T& data)
+        {value = data;};
+
+    /**
+     * Retrieve data value by casting reference.
+     * @return embedded value.
+     */
+    inline operator T&()
+        {return value;};
+
+    inline T& operator()()
+        {return value;};
+
+    /**
+     * Set data value by expression reference.
+     * @param data value to assign.
+     */
+    inline void operator()(T& data)
+        {value = data;};
+};
+
+/**
+ * Typed smart pointer class.  This is used to manage references to
+ * a specific typed object on the heap that is derived from the base Object
+ * class.  This is most commonly used to manage references to reference
+ * counted heap objects so their heap usage can be auto-managed while there
+ * is active references to such objects.  Pointers are usually created on
+ * the stack frame and used to reference an object during the life of a
+ * member function.  They can be created in other objects that live on the
+ * heap and can be used to maintain active references so long as the object
+ * they are contained in remains in scope as well.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <class T, class P = auto_object>
+class object_pointer : public P
+{
+public:
+    /**
+     * Create a pointer with no reference.
+     */
+    inline object_pointer() : P() {};
+
+    /**
+     * Create a pointer with a reference to a heap object.
+     * @param object we are referencing.
+     */
+    inline object_pointer(T* object) : P(object) {};
+
+    /**
+     * Reference object we are pointing to through pointer indirection.
+     * @return pointer to object we are pointing to.
+     */
+    inline T* operator*() const
+        {return static_cast<T*>(P::object);};
+
+    /**
+     * Reference object we are pointing to through function reference.
+     * @return object we are pointing to.
+     */
+    inline T& operator()() const
+        {return *(static_cast<T*>(P::object));};
+
+    /**
+     * Reference member of object we are pointing to.
+     * @return reference to member of pointed object.
+     */
+    inline T* operator->() const
+        {return static_cast<T*>(P::object);};
+
+    /**
+     * Get pointer to object.
+     * @return pointer or NULL if we are not referencing an object.
+     */
+    inline T* get(void) const
+        {return static_cast<T*>(P::object);};
+
+    /**
+     * Iterate our pointer if we reference an array on the heap.
+     * @return next object in array.
+     */
+    inline T* operator++()
+        {P::operator++(); return get();};
+
+    /**
+     * Iterate our pointer if we reference an array on the heap.
+     * @return previous object in array.
+     */
+    inline void operator--()
+        {P::operator--(); return get();};
+
+    /**
+     * Perform assignment operator to existing object.
+     * @param typed object to assign.
+     */
+    inline void operator=(T *typed)
+        {P::operator=((ObjectProtocol *)typed);};
+
+    /**
+     * See if pointer is set.
+     */
+    inline operator bool()
+        {return P::object != NULL;};
+
+    /**
+     * See if pointer is not set.
+     */
+    inline bool operator!()
+        {return P::object == NULL;};
+};
+
+/**
+ * Convenience function to access object retention.
+ * @param object we are retaining.
+ */
+inline void retain(ObjectProtocol *object)
+    {object->retain();}
+
+/**
+ * Convenience function to access object release.
+ * @param object we are releasing.
+ */
+inline void release(ObjectProtocol *object)
+    {object->release();}
+
+/**
+ * Convenience function to access object copy.
+ * @param object we are copying.
+ */
+inline ObjectProtocol *copy(ObjectProtocol *object)
+    {return object->copy();}
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/persist.h b/jni/libucommon/sources/inc/ucommon/persist.h
new file mode 100644
index 0000000..3874ad5
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/persist.h
@@ -0,0 +1,505 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * The GNU Common C++ persistance engine by Daniel Silverstone.
+ * @file ucommon/persist.h
+ */
+
+#if defined(OLD_STDCPP) || defined(NEW_STDCPP)
+#if !defined(_MSC_VER) || _MSC_VER >= 1400
+#ifndef _UCOMMON_PERSIST_H_
+#define _UCOMMON_PERSIST_H_
+
+#ifndef _UCOMMON_PLATFORM_H_
+#include <ucommon/platform.h>
+#endif
+
+#include <iostream>
+#include <string>
+#include <vector>
+#include <deque>
+#include <map>
+
+NAMESPACE_UCOMMON
+#define NS_PREFIX   ucc::
+
+// This typedef allows us to declare NewPersistObjectFunction now
+typedef class PersistObject* (*NewPersistObjectFunction) (void);
+
+class __EXPORT PersistException
+{
+public:
+    PersistException(const std::string& reason);
+    const std::string& getString() const;
+
+    virtual ~PersistException() throw();
+
+protected:
+    std::string _what;
+};
+
+/**
+ * Type manager for persistence engine.
+ * This class manages the types for generation of the persistent objects.
+ * Its data structures are managed automatically by the system. They are
+ * implicitly filled by the constructors who declare classes to the system.
+ *
+ * @author Daniel Silverstone
+ */
+class __EXPORT TypeManager
+{
+public:
+    /**
+     * This manages a registration to the typemanager - attempting to
+     * remove problems with the optimizers
+     */
+    class registration
+    {
+    public:
+        registration(const char* name, NewPersistObjectFunction func);
+        virtual ~registration();
+    private:
+        std::string myName;
+    };
+
+    /**
+     * This adds a new construction function to the type manager
+     */
+    static void add(const char* name, NewPersistObjectFunction construction);
+
+    /**
+     * And this one removes a type from the managers lists
+     */
+    static void remove(const char* name);
+
+    /**
+     * This function creates a new object of the required type and
+     * returns a pointer to it. NULL is returned if we couldn't find
+     * the type
+     */
+    static PersistObject* createInstanceOf(const char* name);
+
+    typedef std::map<std::string,NewPersistObjectFunction> StringFunctionMap;
+};
+
+/*
+ * The following defines are used to declare and define the relevant code
+ * to allow a class to use the Persistence::Engine code.
+ */
+
+#define DECLARE_PERSISTENCE(ClassType)                  \
+  public:                               \
+    friend NS_PREFIX PersistEngine& operator>>( NS_PREFIX PersistEngine& ar, ClassType *&ob);     \
+    friend NS_PREFIX PersistEngine& operator<<( NS_PREFIX PersistEngine& ar, ClassType const &ob);    \
+    friend NS_PREFIX PersistObject *createNew##ClassType();                \
+    virtual const char* getPersistenceID() const;           \
+    static NS_PREFIX TypeManager::Registration registrationFor##ClassType;
+
+#define IMPLEMENT_PERSISTENCE(ClassType, FullyQualifiedName)              \
+  NS_PREFIX PersistObject *createNew##ClassType() { return new ClassType; }              \
+  const char* ClassType::getPersistenceID() const {return FullyQualifiedName;} \
+  NS_PREFIX PersistEngine& operator>>(NS_PREFIX PersistEngine& ar, ClassType &ob)               \
+    { ar >> (NS_PREFIX PersistObject &) ob; return ar; }                     \
+  NS_PREFIX PersistEngine& operator>>(NS_PREFIX PersistEngine& ar, ClassType *&ob)                  \
+    { ar >> (NS_PREFIX PersistObject *&) ob; return ar; }                    \
+  NS_PREFIX PersistEngine& operator<<(NS_PREFIX PersistEngine& ar, ClassType const &ob)                 \
+    { ar << (NS_PREFIX PersistObject const *)&ob; return ar; }               \
+  NS_PREFIX TypeManager::Registration                             \
+    ClassType::registrationFor##ClassType(FullyQualifiedName,         \
+                          createNew##ClassType);
+
+class PersistEngine;
+
+/**
+ * PersistObject
+ *
+ * Base class for classes that will be persistent.  This object is the base
+ * for all Persistent data which is not natively serialized by the
+ * persistence::engine
+ *
+ * It registers itself with the persistence::TypeManager
+ * using a global constructor function. A matching deregister call
+ * is made in a global destructor, to allow DLL's to use the
+ * persistence::engine in a main executable.
+ *
+ * Persistable objects must never maintain bad pointers. If a pointer
+ * doesn't point to something valid, it must be NULL.  This is so
+ * the persistence engine knows whether to allocate memory for an object
+ * or whether the memory has been pre-allocated.
+ *
+ * @author Daniel Silverstone
+ */
+class __EXPORT PersistObject
+{
+public:
+    /**
+     * This constructor is used in serialization processes.
+     * It is called in CreateNewInstance in order to create
+     * an instance of the class to have Read() called on it.
+     */
+    PersistObject();
+
+    /**
+     * Default destructor
+     */
+     virtual ~PersistObject();
+
+    /**
+     * This returns the ID of the persistent object (Its type)
+     */
+     virtual const char* getPersistenceID() const;
+
+    /**
+     * This method is used to write to the Persistence::Engine
+     * It is not equivalent to the << operator as it writes only the data
+     * and not the object type etc.
+     */
+     virtual bool write(PersistEngine& archive) const;
+
+    /**
+     * This method is used to read from a Persistence::Engine
+     * It is not equivalent to the >> operator as it does no
+     * typesafety or anything.
+     */
+     virtual bool read(PersistEngine& archive);
+};
+
+/**
+ * Stream serialization of persistent classes.
+ * This class constructs on a standard C++ STL stream and then
+ * operates in the mode specified. The stream passed into the
+ * constructor must be a binary mode to function properly.
+ *
+ * @author Daniel Silverstone
+ */
+class __EXPORT PersistEngine
+{
+public:
+    /**
+     * These are the modes the Persistence::Engine can work in
+     */
+    enum EngineMode {
+        modeRead,
+        modeWrite
+    };
+
+    /**
+     * Constructs a Persistence::Engine with the specified stream in
+     * the given mode. The stream must be initialized properly prior
+     * to this call or problems will ensue.
+     */
+    PersistEngine(std::iostream& stream, EngineMode mode) throw(PersistException);
+
+    virtual ~PersistEngine();
+
+    // Write operations
+
+    /**
+     * writes a PersistObject from a reference.
+     */
+    inline void write(const PersistObject &object) throw(PersistException)
+        {write(&object); };
+
+    /**
+     * writes a PersistObject from a pointer.
+     */
+    void write(const PersistObject *object) throw(PersistException);
+
+    // writes supported primitive types
+  // shortcut, to make the following more readable
+#define CCXX_ENGINEWRITE_REF(valref) writeBinary((const uint8_t*)&valref,sizeof(valref))
+    inline void write(int8_t i) throw(PersistException) { CCXX_ENGINEWRITE_REF(i); }
+    inline void write(uint8_t i) throw(PersistException) { CCXX_ENGINEWRITE_REF(i); }
+    inline void write(int16_t i)  throw(PersistException) { CCXX_ENGINEWRITE_REF(i); }
+    inline void write(uint16_t i) throw(PersistException) { CCXX_ENGINEWRITE_REF(i); }
+    inline void write(int32_t i)  throw(PersistException) { CCXX_ENGINEWRITE_REF(i); }
+    inline void write(uint32_t i) throw(PersistException) { CCXX_ENGINEWRITE_REF(i); }
+    inline void write(float i)  throw(PersistException) { CCXX_ENGINEWRITE_REF(i); }
+    inline void write(double i) throw(PersistException) { CCXX_ENGINEWRITE_REF(i); }
+    inline void write(bool i) throw(PersistException) { CCXX_ENGINEWRITE_REF(i); }
+#undef CCXX_ENGINEWRITE_REF
+
+    void write(const std::string& str) throw(PersistException);
+
+    // Every write operation boils down to one or more of these
+    void writeBinary(const uint8_t* data, const uint32_t size) throw(PersistException);
+
+    // Read Operations
+
+    /**
+     * reads a PersistObject into a reference overwriting the object.
+     */
+    void read(PersistObject &object) throw(PersistException);
+
+    /**
+     * reads a PersistObject into a pointer allocating memory for the object if necessary.
+     */
+    void read(PersistObject *&object) throw(PersistException);
+
+    // reads supported primitive types
+  // shortcut, to make the following more readable
+#define CCXX_ENGINEREAD_REF(valref) readBinary((uint8_t*)&valref,sizeof(valref))
+    inline void read(int8_t& i) throw(PersistException) { CCXX_ENGINEREAD_REF(i); }
+    inline void read(uint8_t& i) throw(PersistException) { CCXX_ENGINEREAD_REF(i); }
+    inline void read(int16_t& i) throw(PersistException) { CCXX_ENGINEREAD_REF(i); }
+    inline void read(uint16_t& i) throw(PersistException) { CCXX_ENGINEREAD_REF(i); }
+    inline void read(int32_t& i) throw(PersistException) { CCXX_ENGINEREAD_REF(i); }
+    inline void read(uint32_t& i) throw(PersistException) { CCXX_ENGINEREAD_REF(i); }
+    inline void read(float& i)  throw(PersistException) { CCXX_ENGINEREAD_REF(i); }
+    inline void read(double& i) throw(PersistException) { CCXX_ENGINEREAD_REF(i); }
+    inline void read(bool &i) throw(PersistException) { CCXX_ENGINEREAD_REF(i); }
+#undef CCXX_ENGINEREAD_REF
+
+    void read(std::string& str) throw(PersistException);
+
+    // Every read operation boiled down to one or more of these
+    void readBinary(uint8_t* data, uint32_t size) throw(PersistException);
+
+private:
+    /**
+     * reads the actual object data into a pre-instantiated object pointer
+     * by calling the read function of the derived class.
+     */
+    void readObject(PersistObject* object) throw(PersistException);
+
+    /**
+     * reads in a class name, and caches it into the ClassMap.
+     */
+    const std::string readClass() throw(PersistException);
+
+
+    /**
+     * The underlying stream
+     */
+    std::iostream& myUnderlyingStream;
+
+    /**
+     * The mode of the engine. read or write
+     */
+    EngineMode myOperationalMode;
+
+    /**
+     * Typedefs for the Persistence::PersistObject support
+     */
+    typedef std::vector<PersistObject*>           ArchiveVector;
+    typedef std::map<PersistObject const*, int32_t> ArchiveMap;
+    typedef std::vector<std::string>                ClassVector;
+    typedef std::map<std::string, int32_t>            ClassMap;
+
+    ArchiveVector myArchiveVector;
+    ArchiveMap myArchiveMap;
+    ClassVector myClassVector;
+    ClassMap myClassMap;
+};
+
+#define CCXX_RE(ar,ob)   ar.read(ob); return ar
+#define CCXX_WE(ar,ob)   ar.write(ob); return ar
+
+// Standard >> and << stream operators for PersistObject
+/** @relates PersistEngine */
+inline PersistEngine& operator >>( PersistEngine& ar, PersistObject &ob) throw(PersistException) {CCXX_RE(ar,ob);}
+/** @relates PersistEngine */
+inline PersistEngine& operator >>( PersistEngine& ar, PersistObject *&ob) throw(PersistException) {CCXX_RE(ar,ob);}
+/** @relates PersistEngine */
+inline PersistEngine& operator <<( PersistEngine& ar, PersistObject const &ob) throw(PersistException) {CCXX_WE(ar,ob);}
+/** @relates PersistEngine */
+inline PersistEngine& operator <<( PersistEngine& ar, PersistObject const *ob) throw(PersistException) {CCXX_WE(ar,ob);}
+
+/** @relates PersistEngine */
+inline PersistEngine& operator >>( PersistEngine& ar, int8_t& ob) throw(PersistException) {CCXX_RE(ar,ob);}
+/** @relates PersistEngine */
+inline PersistEngine& operator <<( PersistEngine& ar, int8_t ob)  throw(PersistException) {CCXX_WE(ar,ob);}
+
+/** @relates PersistEngine */
+inline PersistEngine& operator >>( PersistEngine& ar, uint8_t& ob) throw(PersistException) {CCXX_RE(ar,ob);}
+/** @relates PersistEngine */
+inline PersistEngine& operator <<( PersistEngine& ar, uint8_t ob)  throw(PersistException) {CCXX_WE(ar,ob);}
+
+/** @relates PersistEngine */
+inline PersistEngine& operator >>( PersistEngine& ar, int16_t& ob) throw(PersistException) {CCXX_RE(ar,ob);}
+/** @relates PersistEngine */
+inline PersistEngine& operator <<( PersistEngine& ar, int16_t ob)  throw(PersistException) {CCXX_WE(ar,ob);}
+
+/** @relates PersistEngine */
+inline PersistEngine& operator >>( PersistEngine& ar, uint16_t& ob) throw(PersistException) {CCXX_RE(ar,ob);}
+/** @relates PersistEngine */
+inline PersistEngine& operator <<( PersistEngine& ar, uint16_t ob)  throw(PersistException) {CCXX_WE(ar,ob);}
+
+/** @relates PersistEngine */
+inline PersistEngine& operator >>( PersistEngine& ar, int32_t& ob) throw(PersistException) {CCXX_RE(ar,ob);}
+/** @relates PersistEngine */
+inline PersistEngine& operator <<( PersistEngine& ar, int32_t ob)  throw(PersistException) {CCXX_WE(ar,ob);}
+
+/** @relates PersistEngine */
+inline PersistEngine& operator >>( PersistEngine& ar, uint32_t& ob) throw(PersistException) {CCXX_RE(ar,ob);}
+/** @relates PersistEngine */
+inline PersistEngine& operator <<( PersistEngine& ar, uint32_t ob)  throw(PersistException) {CCXX_WE(ar,ob);}
+
+/** @relates PersistEngine */
+inline PersistEngine& operator >>( PersistEngine& ar, float& ob) throw(PersistException) {CCXX_RE(ar,ob);}
+/** @relates PersistEngine */
+inline PersistEngine& operator <<( PersistEngine& ar, float ob)  throw(PersistException) {CCXX_WE(ar,ob);}
+
+/** @relates PersistEngine */
+inline PersistEngine& operator >>( PersistEngine& ar, double& ob) throw(PersistException) {CCXX_RE(ar,ob);}
+/** @relates PersistEngine */
+inline PersistEngine& operator <<( PersistEngine& ar, double ob) throw(PersistException) {CCXX_WE(ar,ob);}
+
+/** @relates PersistEngine */
+inline PersistEngine& operator >>( PersistEngine& ar, std::string& ob) throw(PersistException) {CCXX_RE(ar,ob);}
+/** @relates PersistEngine */
+inline PersistEngine& operator <<( PersistEngine& ar, std::string ob) throw(PersistException) {CCXX_WE(ar,ob);}
+
+/** @relates PersistEngine */
+inline PersistEngine& operator >>( PersistEngine& ar, bool& ob) throw(PersistException) {CCXX_RE(ar,ob);}
+/** @relates PersistEngine */
+inline PersistEngine& operator <<( PersistEngine& ar, bool ob)  throw(PersistException) {CCXX_WE(ar,ob);}
+
+#undef CCXX_RE
+#undef CCXX_WE
+
+/**
+ * The following are template classes
+ */
+
+/**
+ * @relates PersistEngine
+ * serialize a vector of some serializable content to
+ * the engine
+ */
+template<class T>
+PersistEngine& operator <<( PersistEngine& ar, typename std::vector<T> const& ob) throw(PersistException)
+{
+    ar << (uint32_t)ob.size();
+    for(unsigned int i=0; i < ob.size(); ++i)
+        ar << ob[i];
+    return ar;
+}
+
+/**
+ * @relates PersistEngine
+ * deserialize a vector of deserializable content from
+ * an engine.
+ */
+template<class T>
+PersistEngine& operator >>( PersistEngine& ar, typename std::vector<T>& ob) throw(PersistException)
+{
+    ob.clear();
+    uint32_t siz;
+    ar >> siz;
+    ob.resize(siz);
+    for(uint32_t i=0; i < siz; ++i)
+        ar >> ob[i];
+    return ar;
+}
+
+/**
+ * @relates PersistEngine
+ * serialize a deque of some serializable content to
+ * the engine
+ */
+template<class T>
+PersistEngine& operator <<( PersistEngine& ar, typename std::deque<T> const& ob) throw(PersistException)
+{
+    ar << (uint32_t)ob.size();
+  for(typename std::deque<T>::const_iterator it=ob.begin(); it != ob.end(); ++it)
+        ar << *it;
+    return ar;
+}
+
+/**
+ * @relates PersistEngine
+ * deserialize a deque of deserializable content from
+ * an engine.
+ */
+template<class T>
+PersistEngine& operator >>( PersistEngine& ar, typename std::deque<T>& ob) throw(PersistException)
+{
+    ob.clear();
+    uint32_t siz;
+    ar >> siz;
+    //ob.resize(siz);
+    for(uint32_t i=0; i < siz; ++i) {
+    T node;
+    ar >> node;
+    ob.push_back(node);
+        //ar >> ob[i];
+  }
+    return ar;
+}
+
+/**
+ * @relates PersistEngine
+ * serialize a map with keys/values which both are serializeable
+ * to an engine.
+ */
+template<class Key, class Value>
+PersistEngine& operator <<( PersistEngine& ar, typename std::map<Key,Value> const & ob) throw(PersistException)
+{
+    ar << (uint32_t)ob.size();
+    for(typename std::map<Key,Value>::const_iterator it = ob.begin();it != ob.end();++it)
+        ar << it->first << it->second;
+    return ar;
+}
+
+/**
+ * @relates PersistEngine
+ * deserialize a map with keys/values which both are serializeable
+ * from an engine.
+ */
+template<class Key, class Value>
+PersistEngine& operator >>( PersistEngine& ar, typename std::map<Key,Value>& ob) throw(PersistException)
+{
+    ob.clear();
+    uint32_t siz;
+    ar >> siz;
+    for(uint32_t i=0; i < siz; ++i) {
+        Key a;
+        ar >> a;
+        ar >> ob[a];
+    }
+    return ar;
+}
+
+/**
+ * @relates PersistEngine
+ * serialize a pair of some serializable content to the engine.
+ */
+template<class x, class y>
+PersistEngine& operator <<( PersistEngine& ar, std::pair<x,y> &ob) throw(PersistException)
+{
+    ar << ob.first << ob.second;
+    return ar;
+}
+
+/**
+ * @relates PersistEngine
+ * deserialize a pair of some serializable content to the engine.
+ */
+template<class x, class y>
+PersistEngine& operator >>(PersistEngine& ar, std::pair<x, y> &ob) throw(PersistException)
+{
+    ar >> ob.first >> ob.second;
+    return ar;
+}
+
+END_NAMESPACE
+
+#endif
+#endif
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/platform.h b/jni/libucommon/sources/inc/ucommon/platform.h
new file mode 100644
index 0000000..2cec935
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/platform.h
@@ -0,0 +1,434 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Various miscellaneous platform specific headers and defines.
+ * This is used to support ucommon on different platforms.  The ucommon
+ * library assumes at least a real posix threading library is present or
+ * will build thread support native on Microsoft Windows legacy platform.
+ * This header also deals with issues related to common base types.
+ * @file ucommon/platform.h
+ */
+
+#ifndef _UCOMMON_PLATFORM_H_
+#define _UCOMMON_PLATFORM_H_
+#define UCOMMON_ABI 6
+
+/**
+ * Common namespace for all ucommon objects.
+ * We are using a common namespace to easily separate ucommon from other
+ * libraries.  This namespace usage is set to the package name and controlled
+ * by macros so future changes will be hidden from user applications so long
+ * as the namespace macros (UCOMMON_NAMESPACE, NAMESPACE_UCOMMON,
+ * END_NAMESPACE) are used in place of direct namespace declarations.
+ * @namespace ucommon
+ */
+
+#define UCOMMON_NAMESPACE   ucommon
+#define NAMESPACE_UCOMMON   namespace ucommon {
+#define NAMESPACE_EXTERN_C  extern "C" {
+#define END_NAMESPACE       }
+#define EXTERN_C            extern "C"
+
+#ifndef _REENTRANT
+#define _REENTRANT 1
+#endif
+
+#ifndef __PTH__
+#ifndef _THREADSAFE
+#define _THREADSAFE 1
+#endif
+
+#ifndef _POSIX_PTHREAD_SEMANTICS
+#define _POSIX_PTHREAD_SEMANTICS
+#endif
+#endif
+
+#if defined(__GNUC__) && (__GNUC < 3) && !defined(_GNU_SOURCE)
+#define _GNU_SOURCE
+#endif
+
+#if __GNUC__ > 3 || (__GNUC__ == 3 && (__GNU_MINOR__ > 3))
+#define __PRINTF(x,y)   __attribute__ ((format (printf, x, y)))
+#define __SCANF(x, y) __attribute__ ((format (scanf, x, y)))
+#define __MALLOC      __attribute__ ((malloc))
+#endif
+
+#ifndef __MALLOC
+#define __PRINTF(x, y)
+#define __SCANF(x, y)
+#define __MALLOC
+#endif
+
+#ifndef DEBUG
+#ifndef NDEBUG
+#define NDEBUG
+#endif
+#endif
+
+#ifdef  DEBUG
+#ifdef  NDEBUG
+#undef  NDEBUG
+#endif
+#endif
+
+// see if we are building for or using extended stdc++ runtime library support
+
+#if defined(NEW_STDCPP) || defined(OLD_STDCPP)
+#define _UCOMMON_EXTENDED_
+#endif
+
+// see if targeting legacy Microsoft windows platform
+
+#if defined(_MSC_VER) || defined(WIN32) || defined(_WIN32)
+#define _MSWINDOWS_
+
+#if defined(_M_X64) || defined(_M_ARM)
+#define _MSCONDITIONALS_
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT    0x0600
+#endif
+#endif
+
+//#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0501
+//#undef    _WIN32_WINNT
+//#define   _WIN32_WINNT 0x0501
+//#endif
+
+//#ifndef _WIN32_WINNT
+//#define   _WIN32_WINNT 0x0501
+//#endif
+
+#ifdef  _MSC_VER
+#pragma warning(disable: 4251)
+#pragma warning(disable: 4996)
+#pragma warning(disable: 4355)
+#pragma warning(disable: 4290)
+#pragma warning(disable: 4291)
+#endif
+
+#if defined(__BORLANDC__) && !defined(__MT__)
+#error Please enable multithreading
+#endif
+
+#if defined(_MSC_VER) && !defined(_MT)
+#error Please enable multithreading (Project -> Settings -> C/C++ -> Code Generation -> Use Runtime Library)
+#endif
+
+// Require for compiling with critical sections.
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
+
+// Make sure we're consistent with _WIN32_WINNT
+#ifndef WINVER
+#define WINVER _WIN32_WINNT
+#endif
+
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+
+#include <winsock2.h>
+#include <ws2tcpip.h>
+
+#if defined(_MSC_VER)
+typedef signed long ssize_t;
+typedef int pid_t;
+#endif
+
+#include <process.h>
+#ifndef __EXPORT
+#ifdef  UCOMMON_STATIC
+#define __EXPORT
+#else
+#define __EXPORT    __declspec(dllimport)
+#endif
+#endif
+#define __LOCAL
+
+// if runtime mode then non-runtime libraries are static on windows...
+#if defined(UCOMMON_RUNTIME) || defined(UCOMMON_STATIC)
+#define __SHARED
+#else
+#define __SHARED __EXPORT
+#endif
+
+#elif UCOMMON_VISIBILITY > 0
+#define __EXPORT    __attribute__ ((visibility("default")))
+#define __LOCAL     __attribute__ ((visibility("hidden")))
+#define __SHARED    __attribute__ ((visibility("default")))
+#else
+#define __EXPORT
+#define __LOCAL
+#define __SHARED
+#endif
+
+#ifdef  _MSWINDOWS_
+
+#define _UWIN
+
+#include <sys/stat.h>
+#include <io.h>
+
+typedef DWORD pthread_t;
+typedef CRITICAL_SECTION pthread_mutex_t;
+typedef char *caddr_t;
+typedef HANDLE fd_t;
+typedef SOCKET socket_t;
+
+#ifdef  _MSC_VER
+typedef struct timespec {
+    time_t tv_sec;
+    long  tv_nsec;
+} timespec_t;
+#endif
+
+extern "C" {
+
+    #define SERVICE_MAIN(id, argc, argv) void WINAPI service_##id(DWORD argc, LPSTR *argv)
+
+    typedef LPSERVICE_MAIN_FUNCTION cpr_service_t;
+
+    inline void sleep(int seconds)
+        {::Sleep((seconds * 1000l));}
+
+    inline void pthread_exit(void *p)
+        {_endthreadex((DWORD)0);}
+
+    inline pthread_t pthread_self(void)
+        {return (pthread_t)GetCurrentThreadId();}
+
+    inline int pthread_mutex_init(pthread_mutex_t *mutex, void *x)
+        {InitializeCriticalSection(mutex); return 0;}
+
+    inline void pthread_mutex_destroy(pthread_mutex_t *mutex)
+        {DeleteCriticalSection(mutex);}
+
+    inline void pthread_mutex_lock(pthread_mutex_t *mutex)
+        {EnterCriticalSection(mutex);}
+
+    inline void pthread_mutex_unlock(pthread_mutex_t *mutex)
+        {LeaveCriticalSection(mutex);}
+
+    inline char *strdup(const char *s)
+        {return _strdup(s);}
+
+    inline int stricmp(const char *s1, const char *s2)
+        {return _stricmp(s1, s2);}
+
+    inline int strnicmp(const char *s1, const char *s2, size_t l)
+        {return _strnicmp(s1, s2, l);}
+}
+
+#elif defined(__PTH__)
+
+#include <pth.h>
+#include <sys/wait.h>
+
+typedef int socket_t;
+typedef int fd_t;
+#define INVALID_SOCKET -1
+#define INVALID_HANDLE_VALUE -1
+#include <signal.h>
+
+#define pthread_mutex_t pth_mutex_t
+#define pthread_cond_t pth_cond_t
+#define pthread_t pth_t
+
+inline int pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
+    {return pth_sigmask(how, set, oset);};
+
+inline void pthread_exit(void *p)
+    {pth_exit(p);};
+
+inline void pthread_kill(pthread_t tid, int sig)
+    {pth_raise(tid, sig);};
+
+inline int pthread_mutex_init(pthread_mutex_t *mutex, void *x)
+    {return pth_mutex_init(mutex) != 0;};
+
+inline void pthread_mutex_destroy(pthread_mutex_t *mutex)
+    {};
+
+inline void pthread_mutex_lock(pthread_mutex_t *mutex)
+    {pth_mutex_acquire(mutex, 0, NULL);};
+
+inline void pthread_mutex_unlock(pthread_mutex_t *mutex)
+    {pth_mutex_release(mutex);};
+
+inline void pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
+    {pth_cond_await(cond, mutex, NULL);};
+
+inline void pthread_cond_signal(pthread_cond_t *cond)
+    {pth_cond_notify(cond, FALSE);};
+
+inline void pthread_cond_broadcast(pthread_cond_t *cond)
+    {pth_cond_notify(cond, TRUE);};
+
+#else
+
+#include <pthread.h>
+
+typedef int socket_t;
+typedef int fd_t;
+#define INVALID_SOCKET -1
+#define INVALID_HANDLE_VALUE -1
+#include <signal.h>
+
+#endif
+
+#ifdef _MSC_VER
+typedef signed __int8 int8_t;
+typedef unsigned __int8 uint8_t;
+typedef signed __int16 int16_t;
+typedef unsigned __int16 uint16_t;
+typedef signed __int32 int32_t;
+typedef unsigned __int32 uint32_t;
+typedef signed __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+typedef char *caddr_t;
+
+#include <stdio.h>
+#define snprintf _snprintf
+#define vsnprintf _vsnprintf
+
+#else
+
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <stdint.h>
+#include <unistd.h>
+#include <stdio.h>
+
+#endif
+
+#undef  getchar
+#undef  putchar
+
+#ifndef _GNU_SOURCE
+typedef void (*sighandler_t)(int);  /**< Convenient typedef for signal handlers. */
+#endif
+typedef unsigned long timeout_t;    /**< Typedef for millisecond timer values. */
+
+#include <stdlib.h>
+#include <ctype.h>
+#include <limits.h>
+#include <errno.h>
+
+#ifdef  _MSWINDOWS_
+#ifndef ENETDOWN
+#define ENETDOWN        ((int)(WSAENETDOWN))
+#endif
+#ifndef EINPROGRESS
+#define EINPROGRESS     ((int)(WSAEINPROGRESS))
+#endif
+#ifndef ENOPROTOOPT
+#define ENOPROTOOPT     ((int)(WSAENOPROTOOPT))
+#endif
+#ifndef EADDRINUSE
+#define EADDRINUSE      ((int)(WSAEADDRINUSE))
+#endif
+#ifndef EADDRNOTAVAIL
+#define EADDRNOTAVAIL   ((int)(WSAEADDRNOTAVAIL))
+#endif
+#ifndef ENETUNREACH
+#define ENETUNREACH     ((int)(WSAENETUNREACH))
+#endif
+#ifndef EHOSTUNREACH
+#define EHOSTUNREACH    ((int)(WSAEHOSTUNREACH))
+#endif
+#ifndef EHOSTDOWN
+#define EHOSTDOWN       ((int)(WSAEHOSTDOWN))
+#endif
+#ifndef ENETRESET
+#define ENETRESET       ((int)(WSAENETRESET))
+#endif
+#ifndef ECONNABORTED
+#define ECONNABORTED    ((int)(WSAECONNABORTED))
+#endif
+#ifndef ECONNRESET
+#define ECONNRESET      ((int)(WSAECONNRESET))
+#endif
+#ifndef EISCONN
+#define EISCONN         ((int)(WSAEISCONN))
+#endif
+#ifndef ENOTCONN
+#define ENOTCONN        ((int)(WSAENOTCONN))
+#endif
+#ifndef ESHUTDOWN
+#define ESHUTDOWN       ((int)(WSAESHUTDOWN))
+#endif
+#ifndef ETIMEDOUT
+#define ETIMEDOUT       ((int)(WSAETIMEDOUT))
+#endif
+#ifndef ECONNREFUSED
+#define ECONNREFUSED    ((int)(WSAECONNREFUSED))
+#endif
+#endif
+
+#ifndef DEBUG
+#ifndef NDEBUG
+#define NDEBUG
+#endif
+#endif
+
+#ifdef  DEBUG
+#ifdef  NDEBUG
+#undef  NDEBUG
+#endif
+#endif
+
+#ifndef PROGRAM_MAIN
+#define PROGRAM_MAIN(argc, argv)    extern "C" int main(int argc, char **argv)
+#define PROGRAM_EXIT(code)          return code
+#endif
+
+#ifndef SERVICE_MAIN
+#define SERVICE_MAIN(id, argc, argv)    void service_##id(int argc, char **argv)
+typedef void (*cpr_service_t)(int argc, char **argv);
+#endif
+
+#include <assert.h>
+#ifdef  DEBUG
+#define crit(x, text)   assert(x)
+#else
+#define crit(x, text) if(!(x)) cpr_runtime_error(text)
+#endif
+
+/**
+ * Template function to initialize memory by invoking default constructor.
+ * If NULL is passed, then NULL is returned without any constructor called.
+ * @param memory to initialize.
+ * @return memory initialized.
+ */
+template<class T>
+inline T *init(T *memory)
+    {return ((memory) ? new(((caddr_t)memory)) T : NULL);}
+
+typedef long Integer;
+typedef unsigned long Unsigned;
+typedef double Real;
+
+/**
+ * Matching function for strdup().
+ * @param string to release from allocated memory.
+ */
+inline void strfree(char *str)
+    {::free(str);}
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/protocols.h b/jni/libucommon/sources/inc/ucommon/protocols.h
new file mode 100644
index 0000000..cf85c42
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/protocols.h
@@ -0,0 +1,645 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Abstract interfaces and support.  This is a set of "protocols", a concept
+ * borrowed from other object oriented languages, to define interfaces for
+ * low level services.  By using a protocol base class which offers both
+ * virtuals and support methods only, one can easily stack and share these
+ * as common base classes without having to consider when the final derived
+ * object implements them.  Core protocol methods always are tagged with a
+ * _ prefix to make it easier to track their derivation.
+ * @file ucommon/protocols.h
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+
+#ifndef _UCOMMON_PROTOCOLS_H_
+#define _UCOMMON_PROTOCOLS_H_
+
+#ifndef _UCOMMON_CPR_H_
+#include <ucommon/cpr.h>
+#endif
+
+NAMESPACE_UCOMMON
+
+class String;
+class StringPager;
+
+class __EXPORT MemoryProtocol
+{
+protected:
+    friend class MemoryRedirect;
+
+    /**
+     * Protocol to allocate memory from the pager heap.  The size of the
+     * request must be less than the size of the memory page used.  The
+     * actual method is in a derived or stacked object.
+     * @param size of memory request.
+     * @return allocated memory or NULL if not possible.
+     */
+    virtual void *_alloc(size_t size) = 0;
+
+    /**
+     * Allocation failure handler.
+     */
+    virtual void fault(void) const;
+
+public:
+    virtual ~MemoryProtocol();
+
+    /**
+     * Convenience function.
+     * @param size of memory request.
+     * @return alocated memory or NULL if not possible.
+     */
+    inline void *alloc(size_t size)
+        {return _alloc(size);};
+
+    /**
+     * Allocate memory from the pager heap.  The size of the request must be
+     * less than the size of the memory page used.  The memory is initialized
+     * to zero.  This uses alloc.
+     * @param size of memory request.
+     * @return allocated memory or NULL if not possible.
+     */
+    void *zalloc(size_t size);
+
+    /**
+     * Duplicate NULL terminated string into allocated memory.  This uses
+     * alloc.
+     * @param string to copy into memory.
+     * @return allocated memory with copy of string or NULL if cannot allocate.
+     */
+    char *dup(const char *string);
+
+    /**
+     * Duplicate existing memory block into allocated memory.  This uses alloc.
+     * @param memory to data copy from.
+     * @param size of memory to allocate.
+     * @return allocated memory with copy or NULL if cannot allocate.
+     */
+    void *dup(void *memory, size_t size);
+};
+
+/**
+ * A redirection base class for the memory protocol.  This is used because
+ * sometimes we choose a common memory pool to manage different objects.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT MemoryRedirect : public MemoryProtocol
+{
+private:
+    MemoryProtocol *target;
+
+public:
+    MemoryRedirect(MemoryProtocol *protocol);
+
+    virtual void *_alloc(size_t size);
+};
+
+/**
+ * Common locking protocol.  This is used for objects that may internally
+ * have sync'd functions, directly or in a derived class, that lock the
+ * current object.  The default handlers do nothing but offer the virtuals
+ * as a stub.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT LockingProtocol
+{
+protected:
+    virtual void _lock(void);
+    virtual void _unlock(void);
+
+public:
+    virtual ~LockingProtocol();
+};
+
+/**
+ * Used for forming stream output.  We would create a derived class who's
+ * constructor creates an internal string object, and a single method to
+ * extract that string.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT PrintProtocol
+{
+public:
+    virtual ~PrintProtocol();
+
+    /**
+     * Extract formatted string for object.
+     */
+    virtual const char *_print(void) const = 0;
+};
+
+/**
+ * Used for processing input.  We create a derived class that processes a
+ * single character of input, and returns a status value.  EOF means it
+ * accepts no more input and any value other than 0 is a character to also
+ * unget.  Otherwise 0 is good to accept more input.  The constructor is
+ * used to reference a final destination object in the derived class.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT InputProtocol
+{
+public:
+    virtual ~InputProtocol();
+
+    /**
+     * Extract formatted string for object.
+     * @param character code we are pushing.
+     * @return 0 to keep processing, EOF if done, or char to unget.
+     */
+    virtual int _input(int code) = 0;
+};
+
+/**
+ * Common character processing protocol.  This is used to access a character
+ * from some type of streaming buffer or memory object.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT CharacterProtocol
+{
+protected:
+    const char *eol;
+    int back;
+
+    CharacterProtocol();
+
+    /**
+     * Get the next character.
+     * @return next character or EOF.
+     */
+    virtual int _getch(void) = 0;
+
+    /**
+     * Put the next character.
+     * @param code to put.
+     * @return code or EOF if cannot put.
+     */
+    virtual int _putch(int code) = 0;
+
+    /**
+     * Write to back buffer.  Mostly used for input format processing.
+     * @param code to write into backbuffer.
+     */
+    inline void putback(int code)
+        {back = code;}
+
+    /**
+     * Set end of line marker.  Normally this is set to cr & lf, which
+     * actually supports both lf alone and cr/lf termination of lines.
+     * However, putline() will always add the full cr/lf if this mode is
+     * used.  This option only effects getline() and putline().
+     * @param string for eol for getline and putline.
+     */
+    inline void seteol(const char *string)
+        {eol = string;};
+
+public:
+    virtual ~CharacterProtocol();
+
+    /**
+     * Get the next character.
+     * @return next character or EOF.
+     */
+    inline int getchar(void)
+        {return _getch();};
+
+    /**
+     * Put the next character.
+     * @param code to put.
+     * @return code or EOF if cannot put.
+     */
+    inline int putchar(int code)
+        {return _putch(code);};
+
+    size_t print(const PrintProtocol& format);
+
+    size_t input(InputProtocol& format);
+
+    /**
+     * Get text as a line of input from the buffer.  The eol character(s)
+     * are used to mark the end of a line.  Because the end of line character
+     * is stripped, the length of the string may be less than the actual
+     * count read.  If at the end of the file buffer and unable to read more
+     * data an error occured then 0 is returned.
+     * @param string to save input into.
+     * @param size limit of string to save.
+     * @return count of characters actually read or 0 if at end of data.
+     */
+    size_t getline(char *string, size_t size);
+
+    /**
+     * Get a string as a line of input from the buffer.  The eol character(s)
+     * are used to mark the end of a line.  Because the end of line character
+     * is stripped, the length of the string may be less than the actual
+     * count read.  If at the end of the file buffer and unable to read more
+     * data an error occured then 0 is returned.
+     * @param buffer to save input into.
+     * @return count of characters actually read or 0 if at end of data.
+     */
+    size_t getline(String& buffer);
+
+    /**
+     * Put a string as a line of output to the buffer.  The eol character is
+     * appended to the end.
+     * @param string to write.
+     * @return total characters successfully written, including eol chars.
+     */
+    size_t putline(const char *string);
+
+    size_t putchars(const char *string, size_t count = 0);
+
+    /**
+     * Load input to a string list.  The string list filter method is used to
+     * control loading.
+     * @param list to load into.
+     * @return number of items loaded.
+     */
+    size_t load(StringPager *list);
+
+    /**
+     * Save output from a string list.
+     * @param list to save from.
+     * @return number of items loaded.
+     */
+    size_t save(const StringPager *list);
+};
+
+/**
+ * Common buffer protocol class.  This is used to create objects which will
+ * stream character data as needed.  This class can support bidirectional
+ * streaming as may be needed for serial devices, sockets, and pipes.  The
+ * buffering mechanisms are hidden from derived classes, and two virtuals
+ * are used to communicate with the physical transport.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT BufferProtocol : public CharacterProtocol
+{
+public:
+    typedef enum {RDONLY, WRONLY, RDWR} mode_t;
+
+private:
+    char *buffer;
+    char *input, *output;
+    size_t bufsize, bufpos, insize, outsize;
+    bool end;
+
+protected:
+    const char *format;
+
+    /**
+     * Construct an empty (unallocated) buffer.
+     */
+    BufferProtocol();
+
+    /**
+     * Construct a buffer of pre-allocated size and access type.
+     * @param size of buffer to allocate.
+     * @param access mode of buffer.
+     */
+    BufferProtocol(size_t size, mode_t access = RDWR);
+
+    /**
+     * Destroy object by releasing buffer memory.
+     */
+    virtual ~BufferProtocol();
+
+    /**
+     * Allocation error handler.
+     */
+    virtual void fault(void) const;
+
+    /**
+     * Allocate I/O buffer(s) of specified size.  If a buffer is currently
+     * allocated, it is released.
+     * @param size of buffer to allocate.
+     * @param access mode of buffer.
+     */
+    void allocate(size_t size, mode_t access = RDWR);
+
+    /**
+     * Release (free) buffer memory.
+     */
+    void release(void);
+
+    /**
+     * Request workspace in output buffer.  This returns a pointer to
+     * memory from the output buffer and advances the output position.
+     * This is sometimes used for a form of zero copy write.
+     * @param size of request area.
+     * @return data pointer or NULL if not available.
+     */
+    char *request(size_t size);
+
+    /**
+     * Gather returns a pointer to contiguous input of specified size.
+     * This may require moving the input data in memory.
+     * @param size of gather space.
+     * @return data pointer to gathered data or NULL if not available.
+     */
+    char *gather(size_t size);
+
+    /**
+     * Method to push buffer into physical i/o (write).  The address is
+     * passed to this virtual since it is hidden as private.
+     * @param address of data to push.
+     * @param size of data to push.
+     * @return number of bytes written, 0 on error.
+     */
+    virtual size_t _push(const char *address, size_t size) = 0;
+
+    /**
+     * Method to pull buffer from physical i/o (read).  The address is
+     * passed to this virtual since it is hidden as private.
+     * @param address of buffer to pull data into.
+     * @param size of buffer area being pulled..
+     * @return number of read written, 0 on error or end of data.
+     */
+    virtual size_t _pull(char *address, size_t size) = 0;
+
+    /**
+     * Method to get low level i/o error.
+     * @return error from low level i/o methods.
+     */
+    virtual int _err(void) const = 0;
+
+    /**
+     * Method to clear low level i/o error.
+     */
+    virtual void _clear(void) = 0;
+
+    /**
+     * Return true if blocking.
+     */
+    virtual bool _blocking(void);
+
+    /**
+     * Check if data is pending.
+     */
+    virtual bool _pending(void);
+
+    /**
+     * Flush buffer to physical i/o.
+     */
+    virtual bool _flush(void);
+
+    virtual int _getch(void);
+
+    virtual int _putch(int ch);
+
+    /**
+     * Get current input position.  Sometimes used to help compute and report
+     * a "tell" offset.
+     * @return offset of input buffer.
+     */
+    inline size_t input_pending(void)
+        {return bufpos;};
+
+    /**
+     * Get current output position.  Sometimes used to help compute a
+     * "trunc" operation.
+     */
+    inline size_t output_waiting(void)
+        {return outsize;};
+
+public:
+    const char *endl(void)
+        {return eol;}
+
+    /**
+     * Put memory into the buffer.  If count is 0 then put as NULL
+     * terminated string.
+     * @param address of characters to put into buffer.
+     * @param count of characters to put into buffer.
+     * @return number of characters actually written.
+     */
+    size_t put(const void *address, size_t count);
+
+    /**
+     * Get memory from the buffer.
+     * @param address of characters save from buffer.
+     * @param count of characters to get from buffer.
+     * @return number of characters actually copied.
+     */
+    size_t get(void *address, size_t count);
+
+    /**
+     * Print formatted string to the buffer.  The maximum output size is
+     * the buffer size, and the operation flushes the buffer.
+     * @param format string.
+     * @return number of bytes written.
+     */
+    size_t printf(const char *format, ...) __PRINTF(2, 3);
+
+    /**
+     * Flush buffered memory to physical I/O.
+     * @return true on success, false if not active or fails.
+     */
+    inline bool flush(void)
+        {return _flush();}
+
+    /**
+     * Purge any pending input or output buffer data.
+     */
+    void purge(void);
+
+    /**
+     * Reset input buffer state.  Drops any pending input.
+     */
+    void reset(void);
+
+    /**
+     * Check if at end of input.
+     * @return true if end of data, false if input still buffered.
+     */
+    bool eof(void);
+
+    /**
+     * See if buffer open.
+     * @return true if buffer active.
+     */
+    inline operator bool()
+        {return buffer != NULL;}
+
+    /**
+     * See if buffer closed.
+     * @return true if buffer inactive.
+     */
+    inline bool operator!()
+        {return buffer == NULL;}
+
+    /**
+     * See if buffer open.
+     * @return true if buffer active.
+     */
+    inline bool is_open(void)
+        {return buffer != NULL;}
+
+    /**
+     * See if input active.
+     * @return true if input active.
+     */
+    inline bool is_input(void)
+        {return input != NULL;}
+
+    /**
+     * See if output active.
+     * @return true if output active.
+     */
+    inline bool is_output(void)
+        {return output != NULL;}
+
+    /**
+     * See if pending input.
+     * @return true if input pending.
+     */
+    inline bool is_pending(void)
+        {return _pending();}
+
+    /**
+     * Set eof flag.
+     */
+    inline void seteof(void)
+        {end = true;}
+
+    inline int err(void)
+        {return _err();}
+
+    template<typename T> inline size_t write(const T& data)
+        {return put(&data, sizeof(T));}
+
+    template<typename T> inline size_t read(T& data)
+        {return get(&data, sizeof(T));}
+
+    template<typename T> inline size_t write(const T* data, unsigned count)
+        {return put(data, sizeof(T) * count) / sizeof(T);}
+
+    template<typename T> inline size_t read(T* data, unsigned count)
+        {return get(data, sizeof(T) * count) / sizeof(T);}
+
+};
+
+/**
+ * A common base class for all managed objects.  This is used to manage
+ * objects that might be linked or reference counted.  The base class defines
+ * only core virtuals some common public methods that should be used by
+ * all inherited object types.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT ObjectProtocol
+{
+public:
+    /**
+     * Method to retain (or increase retention) of an object.
+     */
+    virtual void retain(void) = 0;
+
+    /**
+     * Method to release (or decrease retention) of an object.
+     */
+    virtual void release(void) = 0;
+
+    /**
+     * Required virtual destructor.
+     */
+    virtual ~ObjectProtocol();
+
+    /**
+     * Retain (increase retention of) object when copying.
+     */
+    ObjectProtocol *copy(void);
+
+    /**
+     * Increase retention operator.
+     */
+    inline void operator++(void)
+        {retain();};
+
+    /**
+     * Decrease retention operator.
+     */
+    inline void operator--(void)
+        {release();};
+};
+
+/**
+ * At least with gcc, linking of stream operators was broken.  This provides
+ * an auxillory class to solve the issue.
+ */
+class __EXPORT _character_operators
+{
+private:
+    inline _character_operators() {};
+
+public:
+    static CharacterProtocol& print(CharacterProtocol& p, const char *s);
+
+    static CharacterProtocol& print(CharacterProtocol& p, const char& ch);
+
+    static CharacterProtocol& input(CharacterProtocol& p, char& ch);
+
+    static CharacterProtocol& input(CharacterProtocol& p, String& str);
+
+    static CharacterProtocol& print(CharacterProtocol& p, const long& value);
+
+    static CharacterProtocol& input(CharacterProtocol& p, long& value);
+
+    static CharacterProtocol& print(CharacterProtocol& p, const double& value);
+
+    static CharacterProtocol& input(CharacterProtocol& p, double& value);
+};
+
+inline CharacterProtocol& operator<< (CharacterProtocol& p, const char *s)
+    {return _character_operators::print(p, s);}
+
+inline CharacterProtocol& operator<< (CharacterProtocol& p, const char& ch)
+    {return _character_operators::print(p, ch);}
+
+inline CharacterProtocol& operator>> (CharacterProtocol& p, char& ch)
+    {return _character_operators::input(p, ch);}
+
+inline CharacterProtocol& operator>> (CharacterProtocol& p, String& str)
+    {return _character_operators::input(p, str);}
+
+inline CharacterProtocol& operator<< (CharacterProtocol& p, const PrintProtocol& format)
+    {p.print(format); return p;}
+
+inline CharacterProtocol& operator>> (CharacterProtocol& p, InputProtocol& format)
+    {p.input(format); return p;}
+
+inline CharacterProtocol& operator<< (CharacterProtocol& p, const StringPager& list)
+    {p.save(&list); return p;}
+
+inline CharacterProtocol& operator>> (CharacterProtocol& p, StringPager& list)
+    {p.load(&list); return p;}
+
+inline CharacterProtocol& operator<< (CharacterProtocol& p, const long& value)
+    {return _character_operators::print(p, value);}
+
+inline CharacterProtocol& operator>> (CharacterProtocol& p, long& value)
+    {return _character_operators::input(p, value);}
+
+inline CharacterProtocol& operator<< (CharacterProtocol& p, const double& value)
+    {return _character_operators::print(p, value);}
+
+inline CharacterProtocol& operator>> (CharacterProtocol& p, double& value)
+    {return _character_operators::input(p, value);}
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/secure.h b/jni/libucommon/sources/inc/ucommon/secure.h
new file mode 100644
index 0000000..b31101d
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/secure.h
@@ -0,0 +1,965 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * This library holds basic cryptographic functions and secure socket support
+ * for use with GNU uCommon C++.  This library might be used in conjunction
+ * with openssl, gnutls, etc.  If no secure socket library is available, then
+ * a stub library may be used with very basic cryptographic support.
+ * @file ucommon/secure.h
+ */
+
+/**
+ * Example of SSL socket code.
+ * @example ssl.cpp
+ */
+
+/**
+ * Example of cryptographic digest code.
+ * @example digest.cpp
+ */
+
+/**
+ * Example of cipher code.
+ * @example cipher.cpp
+ */
+
+#ifndef _UCOMMON_SECURE_H_
+#define _UCOMMON_SECURE_H_
+
+#ifndef _UCOMMON_CONFIG_H_
+#include <ucommon/platform.h>
+#endif
+
+#ifndef _UCOMMON_UCOMMON_H_
+#include <ucommon/ucommon.h>
+#endif
+
+#define MAX_CIPHER_KEYSIZE  512
+#define MAX_DIGEST_HASHSIZE 512
+
+NAMESPACE_UCOMMON
+
+/**
+ * Common secure socket support.  This offers common routines needed for
+ * secure/ssl socket support code.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __SHARED secure
+{
+public:
+    /**
+     * Different error states of the security context.
+     */
+    typedef enum {OK=0, INVALID, MISSING_CERTIFICATE, MISSING_PRIVATEKEY, INVALID_CERTIFICATE, INVALID_AUTHORITY, INVALID_PEERNAME, INVALID_CIPHER} error_t;
+
+protected:
+    /**
+     * Last error flagged for this context.
+     */
+    error_t error;
+
+    inline secure() {error = OK;};
+
+public:
+    /**
+     * This is derived in different back-end libraries, and will be used to
+     * clear certificate credentials.
+     */
+    virtual ~secure();
+
+    /**
+     * Convenience type to represent a security context.
+     */
+    typedef secure *client_t;
+
+    typedef secure *server_t;
+
+    /**
+     * Convenience type to represent a secure socket session.
+     */
+    typedef void *session_t;
+
+    /**
+     * Convenience type to represent a secure socket buf i/o stream.
+     */
+    typedef void *bufio_t;
+
+    /**
+     * Initialize secure stack for first use, and report if SSL support is
+     * compiled in.
+     * @return true if ssl support is available, false if not.
+     */
+    static bool init(void);
+
+    /**
+     * Initialize secure stack with fips support.  If fips support is not
+     * successfully enabled, the secure stack is also not initialized.  Hence
+     * init() can be used for non-fips certified operation if fips fails.
+     * @return true if fips support enabled and stack initialized.
+     */
+    static bool fips(void);
+
+    /**
+     * Copy system certificates to a local path.
+     * @param path to copy to.
+     * @return 0 or error number on failure.
+     */
+    static int oscerts(const char *path);
+
+    /**
+     * Get path to system certificates.
+     * @return path to system certificates.
+     */
+    static const char *oscerts(void);
+
+    /**
+     * Verify a certificate chain through your certificate authority.
+     * This uses the ca loaded as an optional argument for client and
+     * server.  Optionally the hostname of the connection can also be
+     * verified by pulling the peer certificate.
+     * @param session that is connected.
+     * @param peername that we expect.
+     * @return secure error level or secure::OK if none.
+     */
+    static error_t verify(session_t session, const char *peername = NULL);
+
+    /**
+     * Create a sever context.  The certificate file used will be based on
+     * the init() method name.  This may often be /etc/ssl/certs/initname.pem.
+     * Similarly, a matching private key certificate will also be loaded.  An
+     * optional certificate authority document can be used when we are
+     * establishing a service which ssl clients have their own certificates.
+     * @param authority path to use or NULL if none.
+     * @return a security context that is cast from derived library.
+     */
+    static server_t server(const char *keyfile = NULL, const char *authority = NULL);
+
+    /**
+     * Create an anonymous client context with an optional authority to
+     * validate.
+     * @param authority path to use or NULL if none.
+     * @return a basic client security context.
+     */
+    static client_t client(const char *authority = NULL);
+
+    /**
+     * Create a peer user client context.  This assumes a user certificate
+     * in ~/.ssl/certs and the user private key in ~/.ssl/private.  The
+     * path to an authority is also sent.
+     * @param authority path to use.
+     */
+    static client_t user(const char *authority);
+
+    /**
+     * Assign a non-default cipher to the context.
+     * @param context to set cipher for.
+     * @param ciphers to set.
+     */
+    static void cipher(secure *context, const char *ciphers);
+
+    /**
+     * Determine if the current security context is valid.
+     * @return true if valid, -1 if not.
+     */
+    inline bool is_valid(void) const
+        {return error == OK;};
+
+    /**
+     * Get last error code associated with the security context.
+     * @return last error code or 0/OK if none.
+     */
+    inline error_t err(void)
+        {return error;};
+
+    /**
+     * Create 36 character traditional version 1 uuid.
+     * @param string to write uuid into, must be 37 bytes or more.
+     */
+    static void uuid(char *string);
+
+    static String uuid(void);
+
+    template <typename T>
+    inline static void erase(T *object)
+        {memset(object, 0, sizeof(object)); delete object;}
+
+    inline operator bool()
+        {return is_valid();}
+
+    inline bool operator!()
+        {return !is_valid();}
+
+};
+
+/**
+ * Secure socket buffer.  This is used to create ssl socket connections
+ * for both clients and servers.  The use depends in part on the type of
+ * context created and passed at construction time.  If no context is
+ * passed (NULL), then this reverts to TCPBuffer behavior.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __SHARED SSLBuffer : public TCPBuffer
+{
+protected:
+    secure::session_t ssl;
+    secure::bufio_t bio;
+    bool server;
+    bool verify;
+
+public:
+    SSLBuffer(secure::client_t context);
+    SSLBuffer(const TCPServer *server, secure::server_t context, size_t size = 536);
+    ~SSLBuffer();
+
+    /**
+     * Connect a ssl client session to a specific host uri.  If the socket
+     * was already connected, it is automatically closed first.
+     * @param host we are connecting to.
+     * @param service to connect to.
+     * @param size of buffer and tcp fragments.
+     */
+    void open(const char *host, const char *service, size_t size = 536);
+
+    void close(void);
+
+    void release(void);
+
+    size_t _push(const char *address, size_t size);
+
+    size_t _pull(char *address, size_t size);
+
+    bool _flush(void);
+
+    bool _pending(void);
+
+    inline bool is_secure(void)
+        {return bio != NULL;};
+};
+
+/**
+ * A generic data ciphering class.  This is used to construct cryptographic
+ * ciphers to encode and decode data as needed.  The cipher type is specified
+ * by the key object.  This class can be used to send output streaming to
+ * memory or in a fixed size buffer.  If the latter is used, a push() method
+ * is called through a virtual when the buffer is full.  Since block ciphers
+ * are used, buffers should be aligned to the block size.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __SHARED Cipher
+{
+public:
+    typedef enum {ENCRYPT = 1, DECRYPT = 0} mode_t;
+
+    /**
+     * Cipher key formed by hash algorithm.  This can generate both a
+     * key and iv table based on the algorithms used and required.  Normally
+     * it is used from a pass-phrase, though any block of data may be
+     * supplied.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+    class __SHARED Key
+    {
+    protected:
+        friend class Cipher;
+
+        union {
+            const void *algotype;
+            int algoid;
+        };
+
+        union {
+            const void *hashtype;
+            int hashid;
+        };
+
+        int modeid;
+
+        // assume 512 bit cipher keys possible...
+        unsigned char keybuf[MAX_CIPHER_KEYSIZE / 8], ivbuf[MAX_CIPHER_KEYSIZE / 8];
+
+        // generated keysize
+        size_t keysize, blksize;
+
+        Key(const char *cipher);
+        Key();
+
+        void set(const char *cipher);
+
+        void set(const char *cipher, const char *digest);
+
+        void assign(const char *key, size_t size, const unsigned char *salt, unsigned rounds);
+
+    public:
+        Key(const char *cipher, const char *digest, const char *text, size_t size = 0, const unsigned char *salt = NULL, unsigned rounds = 1);
+
+        Key(const char *cipher, const char *digest);
+
+        ~Key();
+
+        void assign(const char *key, size_t size = 0);
+
+        void clear(void);
+
+        inline size_t size(void)
+            {return keysize;};
+
+        inline size_t iosize(void)
+            {return blksize;};
+
+        inline operator bool()
+            {return keysize > 0;};
+
+        inline bool operator!()
+            {return keysize == 0;};
+
+        inline Key& operator=(const char *pass)
+            {assign(pass); return *this;};
+
+        static void options(const unsigned char *salt = NULL, unsigned rounds = 1);
+    };
+
+    typedef Key *key_t;
+
+private:
+    Key keys;
+    size_t bufsize, bufpos;
+    mode_t bufmode;
+    unsigned char *bufaddr;
+    void *context;
+
+protected:
+    virtual void push(unsigned char *address, size_t size);
+
+    void release(void);
+
+public:
+    Cipher();
+
+    Cipher(key_t key, mode_t mode, unsigned char *address = NULL, size_t size = 0);
+
+    virtual ~Cipher();
+
+    void set(unsigned char *address, size_t size = 0);
+
+    void set(key_t key, mode_t mode, unsigned char *address, size_t size = 0);
+
+    /**
+     * Push a final cipher block.  This is used to push the final buffer into
+     * the push method for any remaining data.
+     */
+    size_t flush(void);
+
+    /**
+     * Process cipher data.  This requires the size to be a multiple of the
+     * cipher block size.  If an unaligned sized block of data is used, it
+     * will be ignored and the size returned will be 0.
+     * @param data to process.
+     * @param size of data to process.
+     * @return size of processed output, should be same as size or 0 if error.
+     */
+    size_t put(const unsigned char *data, size_t size);
+
+    /**
+     * This essentially encrypts a single string and pads with NULL bytes
+     * as needed.
+     * @param string to encrypt.
+     * @return total encrypted size.
+     */
+    size_t puts(const char *string);
+
+    /**
+     * This is used to process any data unaligned to the blocksize at the end
+     * of a cipher session.  On an encryption, it will add padding or an
+     * entire padding block with the number of bytes to strip.  On decryption
+     * it will remove padding at the end.  The pkcs5 method of padding with
+     * removal count is used.  This also sets the address buffer to NULL
+     * to prevent further puts until reset.
+     * @param address of data to add before final pad.
+     * @param size of data to add before final pad.
+     * @return actual bytes encrypted or decrypted.
+     */
+    size_t pad(const unsigned char *address, size_t size);
+
+    /**
+     * Process encrypted data in-place.  This assumes no need to set the
+     * address buffer.
+     * @param address of data to process.
+     * @param size of data to process.
+     * @param flag if to pad data.
+     * @return bytes processed and written back to buffer.
+     */
+    size_t process(unsigned char *address, size_t size, bool flag = false);
+
+    inline size_t size(void)
+        {return bufsize;};
+
+    inline size_t pos(void)
+        {return bufpos;};
+
+    inline size_t align(void)
+        {return keys.iosize();};
+
+    /**
+     * Check if a specific cipher is supported.
+     * @param name of cipher to check.
+     * @return true if supported, false if not.
+     */
+    static bool has(const char *name);
+};
+
+/**
+ * A cryptographic digest class.  This class can support md5 digests, sha1,
+ * sha256, etc, depending on what the underlying library supports.  The
+ * hash class accumulates the hash in the object.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __SHARED Digest
+{
+private:
+    void *context;
+
+    union {
+        const void *hashtype;
+        int hashid;
+    };
+
+    unsigned bufsize;
+    unsigned char buffer[MAX_DIGEST_HASHSIZE / 8];
+    char textbuf[MAX_DIGEST_HASHSIZE / 8 + 1];
+
+protected:
+    void release(void);
+
+public:
+    Digest(const char *type);
+
+    Digest();
+
+    ~Digest();
+
+    inline bool puts(const char *str)
+        {return put(str, strlen(str));};
+
+    inline Digest &operator<<(const char *str)
+        {puts(str); return *this;}
+
+    inline Digest &operator<<(int16_t value)
+        {int16_t v = htons(value); put(&v, 2); return *this;}
+
+    inline Digest &operator<<(int32_t value)
+        {int32_t v = htonl(value); put(&v, 4); return *this;}
+
+    inline Digest &operator<<(const PrintProtocol& p)
+        {const char *cp = p._print(); if(cp) puts(cp); return *this;}
+
+    bool put(const void *memory, size_t size);
+
+    inline unsigned size() const
+        {return bufsize;};
+
+    const unsigned char *get(void);
+
+    const char *c_str(void);
+
+    inline String str(void)
+        {return String(c_str());};
+
+    inline operator String()
+        {return String(c_str());};
+
+    void set(const char *id);
+
+    inline void operator=(const char *id)
+        {set(id);};
+
+    inline bool operator *=(const char *text)
+        {return puts(text);};
+
+    inline bool operator +=(const char *text)
+        {return puts(text);};
+
+    inline const char *operator*()
+        {return c_str();};
+
+    inline bool operator!() const
+        {return !bufsize && context == NULL;};
+
+    inline operator bool() const
+        {return bufsize > 0 || context != NULL;};
+
+    /**
+     * Finalize and recycle current digest to start a new
+     * digest.
+     * @param binary digest used rather than text if true.
+     */
+    void recycle(bool binary = false);
+
+    /**
+     * Reset and restart digest object.
+     */
+    void reset(void);
+
+    /**
+     * Test to see if a specific digest type is supported.
+     * @param name of digest we want to check.
+     * @return true if supported, false if not.
+     */
+    static bool has(const char *name);
+
+    static void uuid(char *string, const char *name, const unsigned char *ns = NULL);
+
+    static String uuid(const char *name, const unsigned char *ns = NULL);
+};
+
+/**
+ * A cryptographic message authentication code class.  This class can support 
+ * md5 digests, sha1, sha256, etc, depending on what the underlying library 
+ * supports.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __SHARED HMAC
+{
+private:
+    void *context;
+
+    union {
+        const void *hmactype;
+        int hmacid;
+    };
+
+    unsigned bufsize;
+    unsigned char buffer[MAX_DIGEST_HASHSIZE / 8];
+    char textbuf[MAX_DIGEST_HASHSIZE / 8 + 1];
+
+protected:
+    void release(void);
+
+public:
+    HMAC(const char *digest, const char *key, size_t keylen = 0);
+
+    HMAC();
+
+    ~HMAC();
+
+    inline bool puts(const char *str)
+        {return put(str, strlen(str));};
+
+    inline HMAC &operator<<(const char *str)
+        {puts(str); return *this;}
+
+    inline HMAC &operator<<(int16_t value)
+        {int16_t v = htons(value); put(&v, 2); return *this;}
+
+    inline HMAC &operator<<(int32_t value)
+        {int32_t v = htonl(value); put(&v, 4); return *this;}
+
+    inline HMAC &operator<<(const PrintProtocol& p)
+        {const char *cp = p._print(); if(cp) puts(cp); return *this;}
+
+    bool put(const void *memory, size_t size);
+
+    inline unsigned size() const
+        {return bufsize;};
+
+    const unsigned char *get(void);
+
+    const char *c_str(void);
+
+    inline String str(void)
+        {return String(c_str());};
+
+    inline operator String()
+        {return String(c_str());};
+
+    void set(const char *digest, const char *key, size_t len);
+
+    inline bool operator *=(const char *text)
+        {return puts(text);};
+
+    inline bool operator +=(const char *text)
+        {return puts(text);};
+
+    inline const char *operator*()
+        {return c_str();};
+
+    inline bool operator!() const
+        {return !bufsize && context == NULL;};
+
+    inline operator bool() const
+        {return bufsize > 0 || context != NULL;};
+
+    /**
+     * Test to see if a specific digest type is supported.
+     * @param name of digest we want to check.
+     * @return true if supported, false if not.
+     */
+    static bool has(const char *name);
+};
+
+/**
+ * Cryptographically relevant random numbers.  This is used both to gather
+ * entropy pools and pseudo-random values.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __SHARED Random
+{
+public:
+    /**
+     * Push entropic seed.
+     * @param buffer of random data to push.
+     * @param size of buffer.
+     * @return true if successful.
+     */
+    static bool seed(const unsigned char *buffer, size_t size);
+
+    /**
+     * Re-seed pseudo-random generation and entropy pools.
+     */
+    static void seed(void);
+
+    /**
+     * Get high-entropy random data.  This is often used to
+     * initialize keys.  This operation may block if there is
+     * insufficient entropy immediately available.
+     * @param memory buffer to fill.
+     * @param size of buffer.
+     * @return number of bytes filled.
+     */
+    static size_t key(unsigned char *memory, size_t size);
+
+    /**
+     * Fill memory with pseudo-random values.  This is used
+     * as the basis for all get and real operations and does
+     * not depend on seed entropy.
+     * @param memory buffer to fill.
+     * @param size of buffer to fill.
+     * @return number of bytes set.
+     */
+    static size_t fill(unsigned char *memory, size_t size);
+
+    /**
+     * Get a pseudo-random integer, range 0 - 32767.
+     * @return random integer.
+     */
+    static int get(void);
+
+    /**
+     * Get a pseudo-random integer in a preset range.
+     * @param min value of random integer.
+     * @param max value of random integer.
+     * @return random value from min to max.
+     */
+    static int get(int min, int max);
+
+    /**
+     * Get a pseudo-random floating point value.
+     * @return psudo-random value 0 to 1.
+     */
+    static double real(void);
+
+    /**
+     * Get a pseudo-random floating point value in a preset range.
+     * @param min value of random floating point number.
+     * @param max value of random floating point number.
+     * @return random value from min to max.
+     */
+    static double real(double min, double max);
+
+    /**
+     * Determine if we have sufficient entropy to return random
+     * values.
+     * @return true if sufficient entropy.
+     */
+    static bool status(void);
+
+    /**
+     * Create 36 character random uuid string.
+     * @param string to write uuid into, must be 37 bytes or more.
+     */
+    static void uuid(char *string);
+
+    static String uuid(void);
+};
+
+/**
+ * Convenience type for secure socket.
+ */
+typedef SSLBuffer ssl_t;
+
+/**
+ * Convenience type for generic digests.
+ */
+typedef Digest digest_t;
+
+/**
+ * Convenience type for generic digests.
+ */
+typedef HMAC hmac_t;
+
+/**
+ * Convenience type for generic ciphers.
+ */
+typedef Cipher cipher_t;
+
+/**
+ * Convenience type for generic cipher key.
+ */
+typedef Cipher::Key skey_t;
+
+inline void zerofill(void *addr, size_t size)
+{
+    ::memset(addr, 0, size);
+}
+
+#if defined(OLD_STDCPP) || defined(NEW_STDCPP)
+
+/**
+ * Secure socket using std::iostream.  This class is similar to SSLBuffer
+ * but uses the libstdc++ library to stream i/o.  Being based on tcpstream,
+ * it also inherits the character protocol.  Like SSLBuffer, if no context
+ * is given or the handshake fails, then the stream defaults to insecure TCP
+ * connection behavior.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __SHARED sstream : public tcpstream
+{
+protected:
+    secure::session_t ssl;
+    secure::bufio_t bio;
+    bool server;
+    bool verify;
+
+private:
+    // kill copy constructor
+    sstream(const sstream&);
+
+public:
+    sstream(secure::client_t context);
+    sstream(const TCPServer *server, secure::server_t context, size_t size = 536);
+    ~sstream();
+
+    void open(const char *host, const char *service, size_t size = 536);
+
+    void close(void);
+
+    int sync();
+
+    void release(void);
+
+    ssize_t _write(const char *address, size_t size);
+
+    ssize_t _read(char *address, size_t size);
+
+    bool _wait(void);
+
+    inline void flush(void)
+        {sync();}
+
+    inline bool is_secure(void)
+        {return bio != NULL;}
+};
+
+/**
+ * A template to create a string array that automatically erases.
+ * This is a mini string/stringbuf class that supports a subset of
+ * functionality but does not require a complex supporting object.  Like
+ * stringbuf, this can be used to create local string variables.  When
+ * the object falls out of scope it's memory is reset.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template<size_t S>
+class keystring
+{
+private:
+    char buffer[S];
+
+    /**
+     * Disable copy constructor.
+     */
+    inline keystring(const keystring& copy) {};
+
+public:
+    /**
+     * Create a new character buffer with an empty string.
+     */
+    inline keystring()
+        {buffer[0] = 0;}
+
+    /**
+     * Create a character buffer with assigned text.  If the text is
+     * larger than the size of the object, it is truncated.
+     * @param text to assign.
+     */
+    inline keystring(const char *text)
+        {String::set(buffer, S, text);}
+
+    /**
+     * Clear memory when destroyed.
+     */
+    inline ~keystring()
+        {memset(buffer, 0, S);}
+
+    /**
+     * Clear current key memory.
+     */
+    inline void clear(void)
+        {memset(buffer, 0, S);}
+
+    /**
+     * Assign null terminated text to the object.
+     * @param text to assign.
+     */
+    inline void operator=(const char *text)
+        {String::set(buffer, S, text);}
+
+    /**
+     * Concatenate text into the object.  If the text is larger than the
+     * size of the object, then it is truncated.
+     * @param text to append.
+     */
+    inline void operator+=(const char *text)
+        {String::add(buffer, S, text);}
+
+    /**
+     * Test if data is contained in the object.
+     * @return true if there is text.
+     */
+    inline operator bool() const
+        {return buffer[0];}
+
+    /**
+     * Test if the object is empty.
+     * @return true if the object is empty.
+     */
+    inline bool operator!() const
+        {return buffer[0] == 0;}
+
+    /**
+     * Get text by casting reference.
+     * @return pointer to text in object.
+     */
+    inline operator char *()
+        {return buffer;}
+
+    /**
+     * Get text by object pointer reference.
+     * @return pointer to text in object.
+     */
+    inline char *operator*()
+        {return buffer;}
+
+    /**
+     * Array operator to get a character from the object.
+     * @param offset of character in string buffer.
+     * @return character at offset.
+     */
+    inline char& operator[](size_t offset) const
+        {return buffer[offset];}
+
+    /**
+     * Get a pointer to an offset in the object by expression operator.
+     * @param offset of character in string buffer.
+     * @return pointer to offset in object.
+     */
+    inline char *operator()(size_t offset)
+        {return buffer + offset;}
+
+    /**
+     * Get allocated size of the object.
+     * @return allocated size.
+     */
+    inline size_t size(void) const
+        {return S;}
+
+    /**
+     * Get current length of string.
+     * @return length of string.
+     */
+    inline size_t len(void) const
+        {return strlen(buffer);}
+};
+
+/**
+ * A template to create a random generated key of specified size.  The
+ * key memory is cleared when the object is destroyed.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template<size_t S>
+class keyrandom
+{
+private:
+    unsigned char buffer[S];
+
+    /**
+     * Disable copy constructor.
+     */
+    inline keyrandom(const keyrandom& copy) {};
+
+public:
+    /**
+     * Create a new character buffer with an empty string.
+     */
+    inline keyrandom()
+        {Random::key(buffer, S);}
+
+    /**
+     * Clear memory when destroyed.
+     */
+    inline ~keyrandom()
+        {memset(buffer, 0, S);}
+
+    /**
+     * Update with new random key.
+     */
+    inline void update(void)
+        {Random::key(buffer, S);}
+
+    /**
+     * Clear current key memory.
+     */
+    inline void clear(void)
+        {memset(buffer, 0, S);}
+
+    /**
+     * Get text by casting reference.
+     * @return pointer to text in object.
+     */
+    inline operator unsigned char *()
+        {return buffer;}
+
+    /**
+     * Get text by object pointer reference.
+     * @return pointer to text in object.
+     */
+    inline unsigned char *operator*()
+        {return buffer;}
+
+    /**
+     * Get allocated size of the object.
+     * @return allocated size.
+     */
+    inline size_t size(void) const
+        {return S;}
+};
+
+
+#endif
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/shell.h b/jni/libucommon/sources/inc/ucommon/shell.h
new file mode 100644
index 0000000..d36e877
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/shell.h
@@ -0,0 +1,869 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Generic shell parsing and application services.
+ * @file ucommon/shell.h
+ */
+
+/**
+ * Example of shell parsing.
+ * @example shell.cpp
+ */
+
+#ifndef _UCOMMON_STRING_H_
+#include <ucommon/string.h>
+#endif
+
+#ifndef _UCOMMON_MEMORY_H_
+#include <ucommon/memory.h>
+#endif
+
+#ifndef _UCOMMON_BUFFER_H_
+#include <ucommon/buffer.h>
+#endif
+
+#ifndef _UCOMMON_SHELL_H_
+#define _UCOMMON_SHELL_H_
+
+#ifdef  _MSWINDOWS_
+#define INVALID_PID_VALUE   INVALID_HANDLE_VALUE
+#else
+#define INVALID_PID_VALUE   -1
+#endif
+
+#ifdef  ERR
+#undef  ERR
+#endif
+
+NAMESPACE_UCOMMON
+
+/**
+ * A utility class for generic shell operations.  This includes utilities
+ * to parse and expand arguments, and to call system shell services.  This
+ * also includes a common shell class to parse and process command line
+ * arguments which are managed through a local heap.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT shell : public mempager
+{
+private:
+    char **_argv;
+    unsigned _argc;
+    char *_argv0;
+    char *_exedir;
+    LinkedObject *_syms;
+
+    class __LOCAL args : public OrderedObject
+    {
+    public:
+        char *item;
+    };
+
+    class __LOCAL syms : public LinkedObject
+    {
+    public:
+        const char *name;
+        const char *value;
+    };
+
+    /**
+     * Collapse argument list.  This is used internally to collapse args
+     * that are created in a pool heap when they need to be turned into
+     * an argv style array.
+     */
+    void collapse(LinkedObject *first);
+
+    /**
+     * Set argv0.  This gets the simple filename of argv[0].
+     */
+    void set0(char *argv0);
+
+public:
+    /**
+     * Error table index.
+     */
+    typedef enum {NOARGS = 0, NOARGUMENT, INVARGUMENT, BADOPTION, OPTION_USED, BAD_VALUE, NUMERIC_SET} errmsg_t;
+
+    /**
+     * Type of error logging we are using.
+     */
+    typedef enum {NONE = 0, CONSOLE_LOG, USER_LOG, SYSTEM_LOG, SECURITY_LOG} logmode_t;
+
+    /**
+     * Level of error logging.
+     */
+    typedef enum {FAIL = 0, ERR, WARN, NOTIFY, INFO, DEBUG0} loglevel_t;
+
+    /**
+     * Numeric mode of parser.
+     */
+    typedef enum {NO_NUMERIC, NUMERIC_PLUS, NUMERIC_DASH, NUMERIC_ALL} numeric_t;
+
+    /**
+     * Path types to retrieve.
+     */
+    typedef enum {
+        PROGRAM_CONFIG, SERVICE_CONFIG, USER_DEFAULTS, SERVICE_CONTROL,
+        USER_HOME = USER_DEFAULTS + 3, SERVICE_DATA, SYSTEM_TEMP, USER_CACHE,
+        SERVICE_CACHE, USER_DATA, USER_CONFIG, SYSTEM_CFG, SYSTEM_ETC,
+        SYSTEM_VAR, SYSTEM_PREFIX, SYSTEM_SHARE, PROGRAM_PLUGINS,
+        PROGRAM_TEMP} path_t;
+
+    /**
+     * Log process handler.
+     */
+    typedef bool (*logproc_t)(loglevel_t level, const char *text);
+
+    /**
+     * Main handler.
+     */
+    typedef cpr_service_t   mainproc_t;
+
+    /**
+     * Exit handler.
+     */
+    typedef void (*exitproc_t)(void);
+
+#ifdef  _MSWINDOWS_
+    typedef HANDLE pid_t;
+#else
+    /**
+     * Standard type of process id for shell class.
+     */
+    typedef int pid_t;
+#endif
+
+    /**
+     * This can be used to get internationalized error messages.  The internal
+     * text for shell parser errors are passed through here.
+     * @param id of error message to use.
+     * @return published text of error message.
+     */
+    static const char *errmsg(errmsg_t id);
+
+    /**
+     * This is used to set internationalized error messages for the shell
+     * parser.
+     * @param id of message to set.
+     * @param text for error message.
+     */
+    static void errmsg(errmsg_t id, const char *text);
+
+    /**
+     * A class to redefine error messages.  This can be used as a statically
+     * initialized object to remap error messages for easier
+     * internationalization.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+    class __EXPORT errormap
+    {
+    public:
+        inline errormap(errmsg_t id, const char *text)
+            {shell::errmsg(id, text);};
+    };
+
+    /**
+     * A base class used to create parsable shell options.  The virtual
+     * is invoked when the shell option is detected.  Both short and long
+     * forms of argument parsing are supported.  An instance of a derived
+     * class is created to perform the argument parsing.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+    class __EXPORT Option : public LinkedObject
+    {
+    public:
+        char short_option;
+        const char *long_option;
+        const char *uses_option;
+        const char *help_string;
+        bool trigger_option;
+
+        /**
+         * Construct a shell parser option.
+         * @param short_option for single character code.
+         * @param long_option for extended string.
+         * @param value_type if -x value or -long=yyy.
+         * @param help string, future use.
+         */
+        Option(char short_option = 0, const char *long_option = NULL, const char *value_type = NULL, const char *help = NULL);
+
+        virtual ~Option();
+
+        static LinkedObject *first(void);
+
+        /**
+         * Disable a option.  Might happen if argv0 name suggests an
+         * option is no longer actively needed.
+         */
+        void disable(void);
+
+        /**
+         * Used to send option into derived receiver.
+         * @param value option that was received.
+         * @return NULL or error string to use.
+         */
+        virtual const char *assign(const char *value) = 0;
+
+        static void reset(void);
+    };
+
+    /**
+     * Flag option for shell parsing.  This offers a quick-use class
+     * to parse a shell flag, along with a counter for how many times
+     * the flag was selected.  The counter might be used for -vvvv style
+     * verbose options, for example.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+    class __EXPORT flagopt : public Option
+    {
+    private:
+        unsigned counter;
+        bool single;
+
+        virtual const char *assign(const char *value);
+
+    public:
+        flagopt(char short_option, const char *long_option = NULL, const char *help = NULL, bool single_use = true);
+
+        inline operator bool()
+            {return counter > 0;};
+
+        inline bool operator!()
+            {return counter == 0;};
+
+        inline operator unsigned()
+            {return counter;};
+
+        inline unsigned operator*()
+            {return counter;};
+
+        inline void set(unsigned value = 1)
+            {counter = value;};
+    };
+
+    /**
+     * Grouping option.  This is used to create a grouping entry in
+     * the shell::help() listing.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+    class __EXPORT groupopt : public Option
+    {
+    private:
+        virtual const char *assign(const char *value);
+
+    public:
+        groupopt(const char *help);
+    };
+
+    /**
+     * Text option for shell parsing.  This offers a quick-use class
+     * to parse a shell flag, along with a numeric text that may be
+     * saved and a use counter, as multiple invocations is an error.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+    class __EXPORT stringopt : public Option
+    {
+    private:
+        bool used;
+
+    protected:
+        const char *text;
+
+        virtual const char *assign(const char *value);
+
+    public:
+        stringopt(char short_option, const char *long_option = NULL, const char *help = NULL, const char *type = "text", const char *def_text = NULL);
+
+        inline void set(const char *string)
+            {text = string;};
+
+        inline operator bool()
+            {return used;};
+
+        inline bool operator!()
+            {return !used;};
+
+        inline operator const char *()
+            {return text;};
+
+        inline const char *operator*()
+            {return text;};
+    };
+
+    /**
+     * Character option for shell parsing.  This offers a quick-use class
+     * to parse a shell flag, along with a character code that may be
+     * saved.  Multiple invocations is an error.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+    class __EXPORT charopt : public Option
+    {
+    private:
+        bool used;
+
+    protected:
+        char code;
+
+        virtual const char *assign(const char *value);
+
+    public:
+        charopt(char short_option, const char *long_option = NULL, const char *help = NULL, const char *type = "char", char default_code = ' ');
+
+        inline void set(char value)
+            {code = value;};
+
+        inline operator bool()
+            {return used;};
+
+        inline bool operator!()
+            {return !used;};
+
+        inline operator char()
+            {return code;};
+
+        inline char operator*()
+            {return code;};
+    };
+
+    /**
+     * Numeric option for shell parsing.  This offers a quick-use class
+     * to parse a shell flag, along with a numeric value that may be
+     * saved and a use counter, as multiple invocations is an error.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+    class __EXPORT numericopt : public Option
+    {
+    private:
+        bool used;
+
+    protected:
+        long number;
+
+        virtual const char *assign(const char *value);
+
+    public:
+        numericopt(char short_option, const char *long_option = NULL, const char *help = NULL, const char *type = "numeric", long def_value = 0);
+
+        inline void set(long value)
+            {number = value;};
+
+        inline operator bool()
+            {return used;};
+
+        inline bool operator!()
+            {return !used;};
+
+        inline operator long()
+            {return number;};
+
+        inline long operator*()
+            {return number;};
+    };
+
+    /**
+     * Counter option for shell parsing.  This offers a quick-use class
+     * to parse a shell flag, along with a numeric value that may be
+     * saved and a use counter, as multiple invocations is an error.  Unlike
+     * numeric options, the short mode flag is a trigger option, and each
+     * use of the short flag is considered a counter increment.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+    class __EXPORT counteropt : public Option
+    {
+    private:
+        bool used;
+
+    protected:
+        long number;
+
+        virtual const char *assign(const char *value);
+
+    public:
+        counteropt(char short_option, const char *long_option = NULL, const char *help = NULL, const char *type = "numeric", long def_value = 0);
+
+        inline void set(long value)
+            {number = value;};
+
+        inline operator bool()
+            {return used;};
+
+        inline bool operator!()
+            {return !used;};
+
+        inline operator long()
+            {return number;};
+
+        inline long operator*()
+            {return number;};
+    };
+
+    /**
+     * Construct a shell argument list by parsing a simple command string.
+     * This separates a string into a list of command line arguments which
+     * can be used with exec functions.
+     * @param string to parse.
+     * @param pagesize for local heap.
+     */
+    shell(const char *string, size_t pagesize = 0);
+
+    /**
+     * Construct a shell argument list from existing arguments.  This
+     * copies and on some platforms expands the argument list originally
+     * passed to main.
+     * @param argc from main.
+     * @param argv from main.
+     * @param pagesize for local heap.
+     */
+    shell(int argc, char **argv, size_t pagesize = 0);
+
+    /**
+     * Construct an empty shell parser argument list.
+     * @param pagesize for local heap.
+     */
+    shell(size_t pagesize = 0);
+
+    static void setNumeric(numeric_t);
+
+    static long getNumeric(void);
+
+    /**
+     * Display shell options.
+     */
+    static void help(void);
+
+    /**
+     * A shell system call.  This uses the native system shell to invoke the
+     * command.
+     * @param command string..
+     * @param env array to optionally use.
+     * @return error code of child process.
+     */
+    static int system(const char *command, const char **env = NULL);
+
+    /**
+     * A shell system call that can be issued using a formatted string.  This
+     * uses the native system shell to invoke the command.
+     * @param format of/command string.
+     * @return error code of child process.
+     */
+    static int systemf(const char *format, ...) __PRINTF(1,2);
+
+    /**
+     * Set relative prefix.  Used for OS/X relocatable applications.
+     * @param argv0 path of executable.
+     */
+    static void relocate(const char *argv0);
+
+    /**
+     * Get a system path.  This is used to get directories for application
+     * specific data stores and default paths for config keys.
+     * @param id of path to return.
+     * @return path string or emptry string if not supported.
+     */
+    static String path(path_t id);
+
+    /**
+     * Get the system login id.
+     * @return login id.
+     */
+    static String userid(void);
+
+    /**
+     * Get a merged path.  If the path requested is a full path, then
+     * the prefix is ignored.
+     * @param id of prefix.
+     * @param directory path to merge with prefix.
+     */
+    static String path(path_t id, const char *directory);
+
+    /**
+     * Join a prefix with a path.
+     * @param prefix to merge with.
+     * @param directory or file path to merge.
+     */
+    static String path(String& prefix, const char *directory);
+
+    /**
+     * Bind application to text domain for internationalization.  This
+     * is useful if the argv0 argument can vary because of a symlinked
+     * executable.  This is the name of the .po/.mo message files for
+     * your application.  If bind is not called before shell processing,
+     * then the argv0 is used as the bind name.  Bind can be called
+     * multiple times to change the default message catalog name of the
+     * application, and this usage may be needed for plugins, though it's
+     * generally recommended to use only once, and at the start of main().
+     * @param name of text domain for the application.
+     */
+    static void bind(const char *name);
+
+    /**
+     * Rebind is used to change the text domain.  This may be needed in
+     * applications which have separately built plugins that have thier
+     * own message catalogs.  Normally the plugin would call bind itself
+     * at initialization, and then use rebind to select either the
+     * application's domain, or the plugins.  On systems without
+     * internationalization, this has no effect.
+     * @param name of text domain of plugin or NULL to restore application.
+     */
+    static void rebind(const char *name = NULL);
+
+    /**
+     * Parse a string as a series of arguments for use in exec calls.
+     * @param string to parse.
+     * @return argument array.
+     */
+    char **parse(const char *string);
+
+    /**
+     * Parse the command line arguments using the option table.  File
+     * arguments will be expanded for wildcards on some platforms.
+     * The argv will be set to the first file argument after all options
+     * are parsed.
+     * @param argc from main.
+     * @param argv from main.
+     */
+    void parse(int argc, char **argv);
+
+    /**
+     * Get an environment variable.  This creates a local copy of the
+     * variable in pager memory.
+     * @param name of symbol.
+     * @param value of symbol if not found.
+     * @return value of symbol.
+     */
+    const char *env(const char *name, const char *value = NULL);
+
+    inline const char *getenv(const char *name, const char *value = NULL)
+        {return env(name, value);}
+
+    /**
+     * Get a local symbol.  This uses getenv if no local symbol is found.
+     * @param name of symbol.
+     * @param value of symbol if not found.
+     * @return value of symbol.
+     */
+    const char *get(const char *name, const char *value = NULL);
+
+    inline const char *getsym(const char *name, const char *value = NULL)
+        {return get(name, value);}
+
+    /**
+     * Set a local symbol.
+     * @param name of symbol to set.
+     * @param value of symbol to set.
+     */
+    void set(const char *name, const char *value);
+
+    inline void setsym(const char *name, const char *value)
+        {return set(name, value);}
+
+    /**
+     * Test if symbol exists.
+     * @param name of symbol.
+     * @return true if found.
+     */
+    bool is_sym(const char *name);
+
+    /**
+     * Parse and extract the argv0 filename alone.
+     * @param argv from main.
+     * @return argv0 simple path name.
+     */
+    char *getargv0(char **argv);
+
+    /**
+     * Get the argument list by parsing options, and return the remaining
+     * file arguments.  This is used by parse, and can be fed by main by
+     * posting ++argv.
+     * @param argv of first option.
+     * @return argv of non-option file list.
+     */
+    char **getargv(char **argv);
+
+    /**
+     * Execute front-end like gdb based on stripped first argument.
+     * @param argv0 of our executable.
+     * @param argv to pass to child.
+     * @param list of arguments to execute in front of argv.
+     */
+    void restart(char *argv0, char **argv, char **list);
+
+    /**
+     * Get program name (argv0).
+     */
+    inline const char *argv0() const
+        {return _argv0;}
+
+    /**
+     * Get the exec directory.
+     */
+    inline const char *execdir() const
+        {return _exedir;}
+
+    /**
+     * Print error message and continue.
+     * @param format string to use.
+     */
+    static void error(const char *format, ...) __PRINTF(1, 2);
+
+    /**
+     * Print error message and exit.  Ignored if exitcode == 0.
+     * @param exitcode to return to parent process.
+     * @param format string to use.
+     */
+    static void errexit(int exitcode, const char *format = NULL, ...) __PRINTF(2, 3);
+
+
+    /**
+     * Convert condition to exit code if true.
+     * @param test condition.
+     * @param exitcode to use if true.
+     */
+    static inline int condition(bool test, int exitcode)
+        { return (test) ? exitcode : 0;};
+
+    /**
+     * Print a debug message by debug level.
+     * @param level of debug message.
+     * @param format string to use.
+     */
+    static void debug(unsigned level, const char *format, ...) __PRINTF(2, 3);
+
+    /**
+     * Print generic error message at specific error level.
+     * @param level of error condition.
+     * @param format string to use.
+     */
+    static void log(loglevel_t level, const char *format, ...) __PRINTF(2, 3);
+
+    /**
+     * Print security error message at specific error level.
+     * @param level of error condition.
+     * @param format string to use.
+     */
+    static void security(loglevel_t level, const char *format, ...) __PRINTF(2, 3);
+
+    /**
+     * Set logging level and state.
+     * @param name of logging entity.
+     * @param level of error conditions to log.
+     * @param mode of logging.
+     * @param handler for log messages.
+     */
+    static void log(const char *name, loglevel_t level = ERR, logmode_t mode = USER_LOG, logproc_t handler = (logproc_t)NULL);
+
+    /**
+     * Print to standard output.
+     * @param format string to use.
+     */
+    static size_t printf(const char *format, ...) __PRINTF(1, 2);
+
+    static size_t readln(char *address, size_t size);
+
+    static size_t writes(const char *string);
+
+    static size_t read(String& string);
+
+    inline static size_t write(String& string)
+        {return writes(string.c_str());};
+
+    /**
+     * Get saved internal argc count for items.  This may be items that
+     * remain after shell expansion and options have been parsed.
+     * @return count of remaining arguments.
+     */
+    inline unsigned argc(void) const
+        {return _argc;};
+
+    /**
+     * Get saved internal argv count for items in this shell object.  This
+     * may be filename items only that remain after shell expansion and
+     * options that have been parsed.
+     * @return list of remaining arguments.
+     */
+    inline char **argv(void) const
+        {return _argv;};
+
+    /**
+     * Return parser argv element.
+     * @param offset into array.
+     * @return argument string.
+     */
+    inline const char *operator[](unsigned offset)
+        {return _argv[offset];};
+
+    static void exiting(exitproc_t);
+
+    /**
+     * Detach current process to daemon for service entry.
+     */
+    void detach(mainproc_t mainentry = (mainproc_t)NULL);
+
+    /**
+     * Make current process restartable.
+     */
+    void restart(void);
+
+    /**
+     * Spawn a child process.  This creates a new child process.  If
+     * the executable path is a pure filename, then the $PATH will be
+     * used to find it.  The argv array may be created from a string
+     * with the shell string parser.
+     * @param path to executable.
+     * @param argv list of command arguments for the child process.
+     * @param env of child process can be explicitly set.
+     * @param stdio handles for stdin, stdout, and stderr.
+     * @return process id of child or INVALID_PID_VALUE if fails.
+     */
+    static shell::pid_t spawn(const char *path, char **argv, char **env = NULL, fd_t *stdio = NULL);
+
+    /**
+     * Set priority level and enable priority scheduler.  This activates the
+     * realtime priority scheduler when a priority > 0 is requested for the
+     * process, assuming scheduler support exists and the process is
+     * sufficiently privileged.  Negative priorities are essentially the
+     * same as nice.
+     * @param pri level for process.
+     */
+    static void priority(int pri = 1);
+
+    /**
+     * Create a detached process.  This creates a new child process that
+     * is completely detached from the current process.
+     * @param path to executable.
+     * @param argv list of command arguments for the child process.
+     * @param env of child process can be explicitly set.
+     * @param stdio handles for stdin, stdout, and stderr.
+     * @return 0 if success, -1 on error.
+     */
+    static int  detach(const char *path, char **argv, char **env = NULL, fd_t *stdio = NULL);
+
+    /**
+     * Detach and release from parent process with exit code.
+     * @param exit_code to send to parent process.
+     */
+    static void release(int exit_code = 0);
+
+    /**
+     * Wait for a child process to terminate.  This operation blocks.
+     * @param pid of process to wait for.
+     * @return exit code of process, -1 if fails or pid is invalid.
+     */
+    static int wait(shell::pid_t pid);
+
+    /**
+     * Cancel a child process.
+     * @param pid of child process to cancel.
+     * @return exit code of process, -1 if fails or pid is invalid.
+     */
+    static int cancel(shell::pid_t pid);
+
+    /**
+     * Return argc count.
+     * @return argc count.
+     */
+    inline unsigned operator()(void)
+        {return _argc;};
+
+    /**
+     * Text translation and localization.  This function does nothing but
+     * return the original string if no internationalization support is
+     * available.  If internationalization support exists, then it may
+     * return a substituted translation based on the current locale.  This
+     * offers a single function that can be safely used either when
+     * internationalization support is present, or it is absent, eliminating
+     * the need for the application to be coded differently based on
+     * awareness of support.
+     * @param string to translate.
+     * @return translation if found or original text.
+     */
+    static const char *text(const char *string);
+
+    /**
+     * Plural text translation and localization.  This does nothing but
+     * return single or plural forms if no internationalization is
+     * enabled.  Else it uses ngettext().
+     * @param singular string to translate.
+     * @param plural string to translate.
+     * @param count of objects.
+     * @return string to use.
+     */
+    static const char *texts(const char *singular, const char *plural, unsigned long count);
+
+    /**
+     * Get argc count for an existing array.
+     * @param argv to count items in.
+     * @return argc count of array.
+     */
+    static unsigned count(char **argv);
+
+#ifdef  _MSWINDOWS_
+
+    static inline fd_t input(void)
+        {return GetStdHandle(STD_INPUT_HANDLE);};
+
+    static inline fd_t output(void)
+        {return GetStdHandle(STD_OUTPUT_HANDLE);};
+
+    static inline fd_t error(void)
+        {return GetStdHandle(STD_ERROR_HANDLE);};
+
+#else
+    static inline fd_t input(void)
+        {return 0;};
+
+    static inline fd_t output(void)
+        {return 1;};
+
+    static inline fd_t error(void)
+        {return 2;};
+#endif
+
+    static int inkey(const char *prompt = NULL);
+
+    static char *getpass(const char *prompt, char *buffer, size_t size);
+
+    static char *getline(const char *prompt, char *buffer, size_t size);
+
+};
+
+/**
+ * Convenience type to manage and pass shell objects.
+ */
+typedef shell shell_t;
+
+/**
+ * Abusive compilers...
+ */
+#undef  _TEXT
+#undef  _STR
+#define _STR(x) (const char *)(x)
+
+/**
+ * Invoke translation lookup if available.  This can also be used to
+ * mark text constants that need to be translated.  It should not be
+ * used with pointer variables, which should instead call shell::text
+ * directly.  The primary purpose is to allow extraction of text to
+ * be internationalized with xgettext "--keyword=_TEXT:1".
+ */
+inline  const char *_TEXT(const char *s)
+    {return shell::text(s);}
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/socket.h b/jni/libucommon/sources/inc/ucommon/socket.h
new file mode 100644
index 0000000..cc99b04
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/socket.h
@@ -0,0 +1,1838 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Common socket class and address manipulation.
+ * This offers a common socket base class that exposes socket functionality
+ * based on what the target platform supports.  Support for multicast, IPV6
+ * addressing, and manipulation of cidr policies are all supported here.
+ * @file ucommon/socket.h
+ */
+
+#ifndef _UCOMMON_SOCKET_H_
+#define _UCOMMON_SOCKET_H_
+
+#ifndef _UCOMMON_TIMERS_H_
+#include <ucommon/timers.h>
+#endif
+
+#ifndef _UCOMMON_LINKED_H_
+#include <ucommon/linked.h>
+#endif
+
+#ifndef _UCOMMON_STRING_H_
+#include <ucommon/string.h>
+#endif
+
+extern "C" {
+    struct addrinfo;
+}
+
+#ifdef  _MSWINDOWS_
+#define SHUT_RDWR   SD_BOTH
+#define SHUT_WR     SD_SEND
+#define SHUT_RD     SD_RECV
+#else
+#include <unistd.h>
+#include <sys/socket.h>
+#include <net/if.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#endif
+
+#include <errno.h>
+#include <stdio.h>
+
+#ifndef IPTOS_LOWDELAY
+#define IPTOS_LOWDELAY      0x10
+#define IPTOS_THROUGHPUT    0x08
+#define IPTOS_RELIABILITY   0x04
+#define IPTOS_MINCOST       0x02
+#endif
+
+#ifdef  AF_UNSPEC
+#define DEFAULT_FAMILY  AF_UNSPEC
+#else
+#define DEFAULT_FAMILY  AF_INET
+#endif
+
+struct sockaddr_internet;
+
+typedef struct sockaddr *sockaddr_t;
+
+typedef struct sockaddr sockaddr_struct;    // older gcc needs...?
+
+/**
+ * An object that holds ipv4 or ipv6 binary encoded host addresses.
+ */
+typedef struct hostaddr_internet
+{
+    union
+    {
+        struct in_addr ipv4;
+#ifdef  AF_INET6
+        struct in6_addr ipv6;
+#endif
+    };
+}   inethostaddr_t;
+
+#if defined(AF_INET6) || defined(__CYGWIN__)
+/**
+ * An object that can hold a ipv4 or ipv6 socket address.  This would be
+ * used for tcpip socket connections.  We do not use sockaddr_storage
+ * because it is not present in pre ipv6 stacks, and because the storage
+ * size also includes the size of the path of a unix domain socket on
+ * posix systems.
+ */
+typedef struct sockaddr_internet
+{
+    union {
+#ifdef  AF_INET6
+        struct sockaddr_in6 ipv6;
+#endif
+        struct sockaddr_in ipv4;
+        struct sockaddr address;
+    };
+} inetsockaddr_t;
+#else
+typedef struct sockaddr_internet
+{
+    union {
+        struct sockaddr_in ipv4;
+        struct sockaddr address;
+    };
+} inetsockaddr_t;
+
+struct sockaddr_storage
+{
+#ifdef  AF_UNIX
+    char sa_data[128];
+#else
+    char sa_data[sizeof(struct sockaddr_in)];
+#endif
+};
+#endif
+
+#ifndef SOCK_DCCP
+#define SOCK_DCCP       6
+#endif
+
+#ifndef IPPROTO_DCCP
+#define IPPROTO_DCCP    23
+#endif
+
+#ifndef SOL_DCCP
+#define SOL_DCCP        269
+#endif
+
+#define DCCP_SOCKOPT_AVAILABLE_CCIDS    12
+#define DCCP_SOCKOPT_CCID               13
+#define DCCP_SOCKOPT_TX_CCID            14
+#define DCCP_SOCKOPT_RX_CCID            15
+
+NAMESPACE_UCOMMON
+
+/**
+ * A class to hold internet segment routing rules.  This class can be used
+ * to provide a stand-alone representation of a cidr block of internet
+ * addresses or chained together into some form of access control list.  The
+ * cidr class can hold segments for both IPV4 and IPV6 addresses.  The class
+ * accepts cidr's defined as C strings, typically in the form of address/bits
+ * or address/submask.  These routines auto-detect ipv4 and ipv6 addresses.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT cidr : public LinkedObject
+{
+protected:
+    int Family;
+    inethostaddr_t Netmask, Network;
+    char Name[16];
+
+    unsigned mask(const char *cp) const;
+
+    inethostaddr_t broadcast(void) const;
+
+    unsigned mask(void) const;
+
+public:
+    /**
+     * A convenience type for using a pointer to a linked list as a policy chain.
+     */
+    typedef LinkedObject policy;
+
+    /**
+     * Create an uninitialized cidr.
+     */
+    cidr();
+
+    /**
+     * Create an unlinked cidr from a string.  The string is typically in
+     * the form base-host-address/range, where range might be a bit count
+     * or a network mask.
+     * @param string for cidr block.
+     */
+    cidr(const char *string);
+
+    /**
+     * Create an unnamed cidr entry on a specified policy chain.
+     * @param policy chain to link cidr to.
+     * @param string for cidr block.
+     */
+    cidr(policy **policy, const char *string);
+
+    /**
+     * Create a named cidr entry on a specified policy chain.
+     * @param policy chain to link cidr to.
+     * @param string for cidr block.
+     * @param name of this policy object.
+     */
+    cidr(policy **policy, const char *string, const char *name);
+
+    /**
+     * Construct a copy of an existing cidr.
+     * @param existing cidr we copy from.
+     */
+    cidr(const cidr& existing);
+
+    /**
+     * Find the smallest cidr entry in a list that matches the socket address.
+     * @param policy chain to search.
+     * @param address to search for.
+     * @return smallest cidr or NULL if none match.
+     */
+    static const cidr *find(const policy *policy, const struct sockaddr *address);
+
+    /**
+     * Get the largest container cidr entry in a list that matches the
+     * socket address.
+     * @param policy chain to search.
+     * @param address to search for.
+     * @return largest cidr or NULL if none match.
+     */
+    static const cidr *container(const policy *policy, const struct sockaddr *address);
+
+    /**
+     * Get the saved name of our cidr.  This is typically used with find
+     * when the same policy name might be associated with multiple non-
+     * overlapping cidr blocks.  A typical use might to have a cidr
+     * block like 127/8 named "localdomain", as well as the ipv6 "::1".
+     * @return name of cidr.
+     */
+    inline const char *getName(void) const
+        {return Name;};
+
+    /**
+     * Get the address family of our cidr block object.
+     * @return family of our cidr.
+     */
+    inline int getFamily(void) const
+        {return Family;};
+
+    /**
+     * Get the network host base address of our cidr block.
+     * @return binary network host address.
+     */
+    inline inethostaddr_t getNetwork(void) const
+        {return Network;};
+
+    /**
+     * Get the effective network mask for our cidr block.
+     * @return binary network mask for our cidr.
+     */
+    inline inethostaddr_t getNetmask(void) const
+        {return Netmask;};
+
+    /**
+     * Get the broadcast host address represented by our cidr.
+     * @return binary broadcast host address.
+     */
+    inline inethostaddr_t getBroadcast(void) const
+        {return broadcast();}
+
+    /**
+     * Get the number of bits in the cidr bitmask.
+     * @return bit mask of cidr.
+     */
+    inline unsigned getMask(void) const
+        {return mask();}
+
+    /**
+     * Set our cidr to a string address.  Replaces prior value.
+     * @param string to set for cidr.
+     */
+    void set(const char *string);
+
+    /**
+     * Test if a given socket address falls within this cidr.
+     * @param address of socket to test.
+     * @return true if address is within cidr.
+     */
+    bool is_member(const struct sockaddr *address) const;
+
+    /**
+     * Test if a given socket address falls within this cidr.
+     * @param address of socket to test.
+     * @return true if address is within cidr.
+     */
+    inline bool operator==(const struct sockaddr *address) const
+        {return is_member(address);};
+
+    /**
+     * Test if a given socket address falls outside this cidr.
+     * @param address of socket to test.
+     * @return true if address is outside cidr.
+     */
+    inline bool operator!=(const struct sockaddr *address) const
+        {return !is_member(address);};
+};
+
+/**
+ * A generic socket base class.  This class can be used directly or as a
+ * base class for building network protocol stacks.  This common base tries
+ * to handle UDP and TCP sockets, as well as support multicast, IPV4/IPV6
+ * addressing, and additional addressing domains (such as Unix domain sockets).
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT Socket
+{
+protected:
+    socket_t so;
+    int ioerr;
+    timeout_t iowait;
+
+public:
+    /**
+     * Get an address list directly.  This is used internally by some derived
+     * socket types when generic address lists would be invalid.
+     * @param host name in the form address or "address:port"
+     * @param service id or port to use if not specified in host string.
+     * @param type of service to get.
+     * @param protocol of service to get.
+     */
+    static struct addrinfo *query(const char *host, const char *service, int type = SOCK_STREAM, int protocol = 0);
+
+    /**
+     * Release an address list directly.  This is used internally by some
+     * derived socket types which do not use generic address lists.
+     * @param list of addresses.
+     */
+    static void release(struct addrinfo *list);
+
+    /**
+     * A generic socket address class.  This class uses the addrinfo list
+     * to store socket multiple addresses in a protocol and family
+     * independent manner.  Hence, this address class can be used for ipv4
+     * and ipv6 sockets, for assigning connections to multiple hosts, etc.
+     * The address class will call the resolver when passed host names.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+    class __EXPORT address
+    {
+    protected:
+        struct addrinfo *list;
+
+    public:
+        /**
+         * Construct a socket address.  This is used to get an address to
+         * bind a socket interface to.  The address can be specified as the
+         * ip address of the interface or as a "hostname".  If a hostname
+         * is used, then family should be specified for clarity.
+         * @param family of socket address.  Needed when host names are used.
+         * @param address or hostname.
+         * @param type of socket (stream, dgram, etc).
+         * @param protocol number of socket.
+         */
+        address(int family, const char *address, int type = SOCK_STREAM, int protocol = 0);
+
+        /**
+         * Construct a socket address for an existing socket.  This can be the
+         * name of a host or to perform a lookup in a domain for a service.
+         * Family can be used to restrict the set of results returned, however
+         * since things like connecto() already filter by family and create
+         * will use family from the addrinfo, in most cases AF_UNSPEC can be
+         * used.  This may be depreciated in favor of the constructor that
+         * matches a set() method.
+         * @param family of hosts to filter by or AF_UNSPEC.
+         * @param hostname or ip address.  The socket family is used for hostnames.
+         * @param service port or name we are referencing or NULL.
+         */
+        address(int family, const char *hostname, const char *service = NULL);
+
+        /**
+         * Construct a socket address list for a service.
+         * @param host address for service.
+         * @param service name or port number.
+         * @param type of service, stream, dgram, etc.
+         */
+        address(const char *host, const char *service, int type = SOCK_STREAM);
+
+        /**
+         * Construct a socket address from host and service.  This is primarily
+         * used to construct a list of potential service connections by pure
+         * port numbers or for host lookup only.
+         * @param hostname or address to use.
+         * @param service port or 0.
+         */
+        address(const char *hostname, unsigned service = 0);
+
+        /**
+         * Construct an empty address.
+         */
+        address();
+
+        /**
+         * Copy constructor.
+         * @param reference to object to copy from.
+         */
+        address(const address& reference);
+
+        /**
+         * Destroy address.  Deallocate addrinfo structure.
+         */
+        ~address();
+
+        /**
+         * Get the first socket address in our address list.
+         * @return first socket address or NULL if none.
+         */
+        struct sockaddr *get(void) const;
+
+        inline struct sockaddr *getAddr(void) const
+            {return get();}
+
+        inline struct sockaddr *operator()(void) const
+            {return get();}
+
+        /**
+         * Get the first socket address by casted reference.
+         * @return first socket address we resolved or NULL if none.
+         */
+        inline operator struct sockaddr *() const
+            {return get();};
+
+        /**
+         * Get the first socket address of specified family from our list.
+         * @param family to seek.
+         * @return first socket address of family or NULL if none.
+         */
+        struct sockaddr *get(int family) const;
+
+        inline struct sockaddr *operator()(int family) const
+            {return get(family);}
+
+        inline operator struct sockaddr_in *() const
+            {return (struct sockaddr_in *)get(AF_INET);}
+
+#ifdef  AF_INET6
+        inline operator struct sockaddr_in6 *() const
+            {return (struct sockaddr_in6 *)get(AF_INET6);}
+#endif
+
+        /**
+         * Get the family of the first member in a list of services.
+         * @return family of first socket address or 0 if none.
+         */
+        int family(void) const;
+
+        /**
+         * Find a specific socket address in our address list.
+         * @return matching address from list or NULL if not found.
+         */
+        struct sockaddr *find(const struct sockaddr *addr) const;
+
+        /**
+         * Get the full socket address list from the object.
+         * @return addrinfo list we resolved or NULL if none.
+         */
+        inline struct addrinfo *getList(void) const
+            {return list;};
+
+        /**
+         * Get the full socket address list by casted reference.
+         * @return addrinfo list we resolved or NULL if none.
+         */
+        inline operator struct addrinfo *() const
+            {return list;};
+
+        /**
+         * Return the full socket address list by pointer reference.
+         * @return addrinfo list we resolved or NULL if none.
+         */
+        inline struct addrinfo *operator*() const
+            {return list;};
+
+        /**
+         * Test if the address list is valid.
+         * @return true if we have an address list.
+         */
+        inline operator bool() const
+            {return list != NULL;};
+
+        /**
+         * Test if we have no address list.
+         * @return true if we have no address list.
+         */
+        inline bool operator!() const
+            {return list == NULL;};
+
+
+        /**
+         * Clear current object.
+         */
+        void clear(void);
+
+        /**
+         * Set the host addresses to form a new list.
+         * @param hostname or address to resolve.
+         * @param service name or port number, or NULL if not used.
+         * @param type of socket (stream or dgram) to filter list by.
+         */
+        void set(const char *hostname, const char *service = NULL, int type = SOCK_STREAM);
+
+        /**
+         * Append additional host addresses to our list.
+         * @param hostname or address to resolve.
+         * @param service name or port number, or NULL if not used.
+         * @param type of socket (stream or dgram).
+         */
+        void add(const char *hostname, const char *service = NULL, int type = SOCK_STREAM);
+
+        /**
+         * Set an entry for host binding.
+         * @param family of socket address.  Needed when hostnames are used.
+         * @param address or hostname.
+         * @param type of socket (stream, dgram, etc).
+         * @param protocol number of socket.
+         */
+        void set(int family, const char *address, int type = SOCK_STREAM, int protocol = 0);
+
+        /**
+         * Add an individual socket address to our address list.
+         * @param address to add.
+         */
+        void add(sockaddr *address);
+
+        /**
+         * Insert unique members from another socket address list to ours.
+         * @param address list to insert into list.
+         * @return count of addresses added.
+         */
+        unsigned insert(struct addrinfo *address);
+
+        /**
+         * Remove members from another socket address list from ours.
+         * @param address list to remove from list.
+         * @return count of addresses removed.
+         */
+        unsigned remove(struct addrinfo *address);
+
+        /**
+         * Remove an individual socket address from our address list.
+         * @param address to remove.
+         * @return true if found and removed, false if not found.
+         */
+        bool remove(struct sockaddr *address);
+
+        /**
+         * Insert an individual socket address to our address list only if
+         * unique.
+         * @param address to insert into list.
+         * @return true if inserted, false if duplicate.
+         */
+        bool insert(struct sockaddr *address);
+
+        /**
+         * Copy an existing addrinfo into our object.  This is also used
+         * to support the copy constructor.
+         * @param address list to copy from.
+         */
+        void copy(const struct addrinfo *address);
+
+        /**
+         * Set an individual socket address for our address list.
+         * @param address to add.
+         */
+        void set(struct sockaddr *address);
+
+        /**
+         * Set a socket address from host and service.
+         * @param hostname or address to use.
+         * @param service port or 0.
+         */
+        void set(const char *hostname, unsigned service = 0);
+
+        /**
+         * Duplicate a socket address.
+         * @param address to duplicate.
+         * @return duplicate address object.
+         */
+        static struct sockaddr *dup(struct sockaddr *address);
+
+        /**
+         * Convert address object into ipv4 address.
+         * @param address to convert.
+         * @return new ipv4 address or NULL if not ipv4.
+         */
+        static struct sockaddr_in *ipv4(struct sockaddr *address);
+
+#ifdef  AF_INET6
+        /**
+         * Convert address object into ipv6 address.
+         * @param address to convert.
+         * @return new ipv6 address or NULL if not ipv6.
+         */
+        static struct sockaddr_in6 *ipv6(struct sockaddr *address);
+#endif
+    };
+
+    friend class address;
+
+    /**
+     * Create a socket object for use.
+     */
+    Socket();
+
+    /**
+     * Create socket as duped handle of existing socket.
+     * @param existing socket to dup.
+     */
+    Socket(const Socket& existing);
+
+    /**
+     * Create socket from existing socket descriptor.
+     * @param socket descriptor to use.
+     */
+    Socket(socket_t socket);
+
+    /**
+     * Create and connect a socket to an address from an address list.  The
+     * type of socket created is based on the type we are connecting to.
+     * @param address list to connect with.
+     */
+    Socket(struct addrinfo *address);
+
+    /**
+     * Create an unbound socket of a specific type.
+     * @param family of our new socket.
+     * @param type (stream, udp, etc) of our new socket.
+     * @param protocol number of our new socket.'
+     */
+    Socket(int family, int type, int protocol = 0);
+
+    /**
+     * Create a bound socket.  If one wishes to listen for connections on
+     * a protocol, then ListenSocket should be used instead.
+     * @param address to bind or "*" for all.
+     * @param port number of service to bind.
+     * @param family to bind as.
+     * @param type of socket to bind (stream, udp, etc).
+     * @param protocol of socket to bind.
+     */
+    Socket(const char *address, const char *port, int family = AF_UNSPEC, int type = 0, int protocol = 0);
+
+    /**
+     * Shutdown, close, and destroy socket.
+     */
+    virtual ~Socket();
+
+    /**
+     * Cancel pending i/o by shutting down the socket.
+     */
+    void cancel(void);
+
+    /**
+     * Cancel pending i/o by shutting down the socket.
+     * @param socket to shutdown.
+     */
+    static void cancel(socket_t socket);
+
+    /**
+     * Shutdown and close the socket.
+     */
+    void release(void);
+
+    /**
+     * Get error code.
+     */
+    inline int err(void) const
+        {return ioerr;}
+
+    /**
+     * See the number of bytes in the receive queue.
+     * @param value to test for.
+     * @return true if at least that many bytes waiting in receive queue.
+     */
+    bool is_pending(unsigned value) const;
+
+    /**
+     * Test if socket is connected.
+     * @return true if connected.
+     */
+    bool connected(void) const;
+
+    /**
+     * Test for pending input data.  This function can wait up to a specified
+     * timeout for data to appear.
+     * @param timeout or 0 if none.
+     * @return true if input data waiting.
+     */
+    bool wait(timeout_t timeout = 0) const;
+
+    /**
+     * Set nodelay option for tcp socket.
+     * @return 0 if successful, -1 on error.
+     */
+    inline int nodelay(void) const
+        {return nodelay(so);};
+
+    /**
+     * Test for pending input data.  This function can wait up to a specified
+     * timeout for data to appear.
+     * @param socket to test.
+     * @param timeout or 0 if none.
+     * @return true if input data waiting.
+     */
+    static bool wait(socket_t socket, timeout_t timeout = 0);
+
+    /**
+     * Test for output data sent.  This function can wait up to a specified
+     * timeout for data to appear sent.
+     * @param timeout or 0 if none.
+     * @return false if cannot send more output/out of buffer space.
+     */
+    bool waitSending(timeout_t timeout = 0) const;
+
+    /**
+     * Get the number of bytes of data in the socket receive buffer.
+     * @return bytes pending.
+     */
+    inline unsigned pending(void) const
+        {return pending(so);};
+
+    /**
+     * Set socket for unicast mode broadcasts.
+     * @param enable broadcasting if true.
+     * @return 0 on success, -1 if error.
+     */
+    inline int broadcast(bool enable)
+        {return broadcast(so, enable);};
+
+    /**
+     * Set socket for keepalive packets.
+     * @param enable keep-alive if true.
+     * @return 0 on success, -1 if error.
+     */
+    inline int keepalive(bool enable)
+        {return keepalive(so, enable);};
+
+    /**
+     * Set socket blocking I/O mode.
+     * @param enable true for blocking I/O.
+     * @return 0 on success, -1 if error.
+     */
+    inline int blocking(bool enable)
+        {return blocking(so, enable);};
+
+    /**
+     * Set multicast mode and multicast broadcast range.
+     * @param ttl to set for multicast socket or 0 to disable multicast.
+     * @return 0 on success, -1 if error.
+     */
+    inline int multicast(unsigned ttl = 1)
+        {return multicast(so, ttl);};
+
+    /**
+     * Set loopback to read multicast packets we broadcast.
+     * @param enable true to loopback, false to ignore.
+     * @return 0 on success, -1 if error.
+     */
+    inline int loopback(bool enable)
+        {return loopback(so, enable);};
+
+    /**
+     * Get socket error code.
+     * @return socket error code.
+     */
+    inline int getError(void)
+        {return error(so);};
+
+    /**
+     * Set the time to live before packets expire.
+     * @param time to live to set.
+     * @return 0 on success, -1 on error.
+     */
+    inline int ttl(unsigned char time)
+        {return ttl(so, time);};
+
+    /**
+     * Set the size of the socket send buffer.
+     * @param size of send buffer to set.
+     * @return 0 on success, -1 on error.
+     */
+    inline int sendsize(unsigned size)
+        {return sendsize(so, size);};
+
+    /**
+     * Set the size to wait before sending.
+     * @param size of send wait buffer to set.
+     * @return 0 on success, -1 on error.
+     */
+    inline int sendwait(unsigned size)
+        {return sendwait(so, size);};
+
+
+    /**
+     * Set the size of the socket receive buffer.
+     * @param size of recv buffer to set.
+     * @return 0 on success, -1 on error.
+     */
+    inline int recvsize(unsigned size)
+        {return recvsize(so, size);};
+
+    /**
+     * Get the type of a socket.
+     * @param socket descriptor.
+     * @return socket type.
+     */
+    static int type(socket_t socket);
+
+    /**
+     * Set segment size and get MTU.
+     * @param socket to modify.
+     * @param size of segment or zero to not set.
+     * @return mtu size of socket.
+     */
+    static unsigned segsize(socket_t socket, unsigned size = 0);
+
+    /**
+     * Set congestion control id.
+     * @param socket to modify.
+     * @param ccid value to set.
+     * @return true if success, false if not dccp or not supported ccid used.
+     */
+    static bool ccid(socket_t socket, uint8_t id);
+
+    /**
+     * Get the type of a socket.
+     * @return socket type.
+     */
+    inline int type(void)
+        {return type(so);};
+
+    /**
+     * Set segment size and get mtu of a socket.
+     * @param size of segment or 0 to leave unchanged.
+     * @return mtu size.
+     */
+    inline unsigned segsize(unsigned size)
+        {return segsize(so, size);};
+
+    /**
+     * Set ccid of dccp socket.
+     * @param ccid to set.
+     * @return true if success, false if not dccp or not supported ccid used.
+     */
+    inline bool ccid(uint8_t id)
+        {return ccid(so, id);};
+
+    /**
+     * Set the type of service field of outgoing packets.  Some useful
+     * values include IPTOS_LOWDELAY to minimize delay for interactive
+     * traffic, IPTOS_THROUGHPUT to optimize throughput, OPTOS_RELIABILITY
+     * to optimize for reliability, and IPTOS_MINCOST for low speed use.
+     * @param type of service value.
+     * @return 0 on success or -1 on error.
+     */
+    inline int tos(int type)
+        {return tos(so, type);};
+
+    /**
+     * Set packet priority, 0 to 6 unless privileged.  Should be set before
+     * type-of-service.
+     * @param scheduling priority for packet scheduling.
+     * @return 0 on success, -1 on error.
+     */
+    inline int priority(int scheduling)
+        {return priority(so, scheduling);};
+
+    /**
+     * Shutdown the socket communication channel.
+     */
+    inline void shutdown(void)
+        {::shutdown(so, SHUT_RDWR);};
+
+    /**
+     * Connect our socket to a remote host from an address list.
+     * For TCP (and DCCP) sockets, the entire list may be tried.  For UDP,
+     * connect is only a state and the first valid entry in the list is used.
+     * @param list of addresses to connect to.
+     * @return 0 on success or error.
+     */
+    int connectto(struct addrinfo *list);
+
+    /**
+     * Disconnect a connected socket.  Depending on the implementation, this
+     * might be done by connecting to AF_UNSPEC, connecting to a 0 address,
+     * or connecting to self.
+     * @return 0 on success or error.
+     */
+    int disconnect(void);
+
+    /**
+     * Join socket to multicast group.
+     * @param list of groups to join.
+     * @return 0 on success, -1 on error.
+     */
+    int join(const struct addrinfo *list);
+
+    /**
+     * Drop socket from multicast group.
+     * @param list of groups to drop.
+     * @return 0 on success, -1 on error.
+     */
+    int drop(const struct addrinfo *list);
+
+    /**
+     * Socket i/o timer setting.
+     * @param timeout to wait, inf for blocking, 0 pure non-blocking.
+     * @return 0 on success or error code.
+     */
+    int wait(timeout_t timeout = Timer::inf);
+
+    /**
+     * Peek at data waiting in the socket receive buffer.
+     * @param data pointer to save data in.
+     * @param number of bytes to peek.
+     * @return number of bytes actually read, or 0 if no data waiting.
+     */
+    size_t peek(void *data, size_t number) const;
+
+    /**
+     * Read data from the socket receive buffer.  This will be used in abi 4.
+     * @param data pointer to save data in.
+     * @param number of bytes to read.
+     * @param address of peer data was received from.
+     * @return number of bytes actually read, 0 if none, -1 if error.
+     */
+    size_t readfrom(void *data, size_t number, struct sockaddr_storage *address = NULL);
+
+    /**
+     * Write data to the socket send buffer.  This will be used in abi 4.
+     * @param data pointer to write data from.
+     * @param number of bytes to write.
+     * @param address of peer to send data to if not connected.
+     * @return number of bytes actually sent, 0 if none, -1 if error.
+     */
+    size_t writeto(const void *data, size_t number, const struct sockaddr *address = NULL);
+
+    /**
+     * Read a newline of text data from the socket and save in NULL terminated
+     * string.  This uses an optimized I/O method that takes advantage of
+     * socket peeking.  This presumes a connected socket on a streamble
+     * protocol.  Because the trailing newline is dropped, the return size
+     * may be greater than the string length.  If there was no data read
+     * because of eof of data, an error has occured, or timeout without
+     * input, then 0 will be returned.
+     * @param data to save input line.
+     * @param size of input line buffer.
+     * @return number of bytes read, 0 if none, err() has error.
+     */
+    size_t readline(char *data, size_t size);
+
+    /**
+     * Print formatted string to socket.
+     * @param format string.
+     * @return number of bytes sent.
+     */
+    size_t printf(const char *format, ...) __PRINTF(2,3);
+
+    /**
+     * Read a string of input from the socket and strip trailing newline.
+     * This uses an optimized I/O method that takes advantage of
+     * socket peeking.  This presumes a connected socket on a streamble
+     * protocol.  Because the trailing newline is dropped, the return size
+     * may be greater than the string length.  If there was no data read
+     * because of eof of data, an error has occured, or timeout without
+     * input, then 0 will be returned.
+     * @param buffer to save input line.
+     * @return number of bytes read, 0 if none, err() has error.
+     */
+    size_t readline(String& buffer);
+
+    /**
+     * Read a newline of text data from the socket and save in NULL terminated
+     * string.  This uses an optimized I/O method that takes advantage of
+     * socket peeking.  As such, it has to be rewritten to be used in a ssl
+     * layer socket.
+     * @param socket to read from.
+     * @param data to save input line.
+     * @param size of input line buffer.
+     * @param timeout to wait for a complete input line.
+     * @return number of bytes read, 0 if none, -1 if error.
+     */
+    static ssize_t readline(socket_t socket, char *data, size_t size, timeout_t timeout = Timer::inf);
+
+    /**
+     * Print formatted string to socket.
+     * @param socket to write to.
+     * @param format string.
+     * @return number of bytes sent, -1 if error.
+     */
+    static ssize_t printf(socket_t socket, const char *format, ...) __PRINTF(2,3);
+
+    /**
+     * Write a null terminated string to the socket.  This exists because
+     * we messed up consistency with the original puts() method.  In the
+     * future there will be a single puts() that has a NULL default.
+     * @param string to write.
+     * @return number of bytes sent, 0 if none, -1 if error.
+     */
+    size_t writes(const char *string);
+
+    /**
+     * Test if socket is valid.
+     * @return true if valid socket.
+     */
+    operator bool();
+
+    /**
+     * Test if socket is invalid.
+     * @return true if socket is invalid.
+     */
+    bool operator!() const;
+
+    /**
+     * Assign socket from a socket descriptor.  Release existing socket if
+     * one present.
+     * @param socket descriptor to assign to object.
+     */
+    Socket& operator=(socket_t socket);
+
+    /**
+     * Get the socket descriptor by casting.
+     * @return socket descriptor of object.
+     */
+    inline operator socket_t() const
+        {return so;};
+
+    /**
+     * Get the socket descriptor by pointer reference.
+     * @return socket descriptor of object.
+     */
+    inline socket_t operator*() const
+        {return so;};
+
+    /**
+     * Get the number of bytes pending in the receive buffer of a socket
+     * descriptor.
+     * @param socket descriptor.
+     * @return number of pending bytes.
+     */
+    static unsigned pending(socket_t socket);
+
+    /**
+     * Set the send size of a socket descriptor.
+     * @param socket descriptor.
+     * @param size of send buffer to set.
+     * @return 0 on success, -1 on error.
+     */
+    static int sendsize(socket_t socket, unsigned size);
+
+    /**
+     * Set the size to wait before sending.
+     * @param socket descriptor.
+     * @param size of send wait buffer to set.
+     * @return 0 on success, -1 on error.
+     */
+    static int sendwait(socket_t socket, unsigned size);
+
+    /**
+     * Set the receive size of a socket descriptor.
+     * @param socket descriptor.
+     * @param size of receive buffer to set.
+     * @return 0 on success, -1 on error.
+     */
+    static int recvsize(socket_t socket, unsigned size);
+
+    /**
+     * Connect socket descriptor to a remote host from an address list.
+     * For TCP (and DCCP) sockets, the entire list may be tried.  For UDP,
+     * connect is only a state and the first valid entry in the list is used.
+     * @param socket descriptor.
+     * @param list of addresses to connect to.
+     * @return 0 on success, -1 on error.
+     */
+    static int connectto(socket_t socket, struct addrinfo *list);
+
+    /**
+     * Disconnect a connected socket descriptor.
+     * @param socket descriptor.
+     * @return 0 on success, -1 on error.
+     */
+    static int disconnect(socket_t socket);
+
+    /**
+     * Drop socket descriptor from multicast group.
+     * @param socket descriptor.
+     * @param list of groups to drop.
+     * @return 0 on success, -1 on error.
+     */
+    static int drop(socket_t socket, const struct addrinfo *list);
+
+    /**
+     * Join socket descriptor to multicast group.
+     * @param socket descriptor.
+     * @param list of groups to join.
+     * @return 0 on success, -1 on error.
+     */
+    static int join(socket_t socket, const struct addrinfo *list);
+
+    /**
+     * Get socket error code of socket descriptor.
+     * @param socket descriptor.
+     * @return socket error code.
+     */
+    static int error(socket_t socket);
+
+    /**
+     * Set multicast mode and multicast broadcast range for socket descriptor.
+     * @param socket descriptor.
+     * @param ttl to set for multicast socket or 0 to disable multicast.
+     * @return 0 if success, -1 if error.
+     */
+    static int multicast(socket_t socket, unsigned ttl = 1);
+
+    /**
+     * Set loopback to read multicast packets socket descriptor broadcasts.
+     * @param socket descriptor.
+     * @param enable true to loopback, false to ignore.
+     * @return 0 if success, -1 if error.
+     */
+    static int loopback(socket_t socket, bool enable);
+
+    /**
+     * Set socket blocking I/O mode of socket descriptor.
+     * @param socket descriptor.
+     * @param enable true for blocking I/O.
+     * @return 0 if success, -1 if error.
+     */
+    static int blocking(socket_t socket, bool enable);
+
+    /**
+     * Set socket for keepalive packets for socket descriptor.
+     * @param socket descriptor.
+     * @param enable keep-alive if true.
+     * @return 0 if success, -1 if error.
+     */
+    static int keepalive(socket_t socket, bool enable);
+
+    /**
+     * Set socket for unicast mode broadcasts on socket descriptor.
+     * @param socket descriptor.
+     * @param enable broadcasting if true.
+     * @return 0 if success, -1 if error.
+     */
+    static int broadcast(socket_t socket, bool enable);
+
+    /**
+     * Set tcp nodelay option on socket descriptor.
+     * @param socket descriptor.
+     * @return 0 if success, -1 if error.
+     */
+    static int nodelay(socket_t socket);
+
+    /**
+     * Set packet priority of socket descriptor.
+     * @param socket descriptor.
+     * @param scheduling priority for packet scheduling.
+     * @return 0 on success, -1 on error.
+     */
+    static int priority(socket_t socket, int scheduling);
+
+    /**
+     * Set type of service of socket descriptor.
+     * @param socket descriptor.
+     * @param type of service.
+     * @return 0 on success, -1 on error.
+     */
+    static int tos(socket_t socket, int type);
+
+    /**
+     * Set the time to live for the socket descriptor.
+     * @param socket descriptor.
+     * @param time to live to set.
+     * @return 0 on success, -1 on error.
+     */
+    static int ttl(socket_t socket, unsigned char time);
+
+    /**
+     * Get the address family of the socket descriptor.
+     * @return address family.
+     */
+    static int family(socket_t socket);
+
+    /**
+     * Get the address family of a socket address object.
+     * @param address to examine.
+     * @return address family.
+     */
+    inline static int family(const struct sockaddr_storage& address)
+        {return ((const struct sockaddr *)&address)->sa_family;};
+
+    /**
+     * Get the address family of an internet socket address object.
+     * @param address to examine.
+     * @return address family.
+     */
+    inline static int family(const struct sockaddr_internet& address)
+        {return address.address.sa_family;};
+
+    /**
+     * Get data waiting in receive queue.
+     * @param socket to get from.
+     * @param buffer to save.
+     * @param size of data buffer to request.
+     * @param flags for i/o operation (MSG_OOB, MSG_PEEK, etc).
+     * @param address of source.
+     * @return number of bytes received, -1 if error.
+     */
+    static ssize_t recvfrom(socket_t socket, void *buffer, size_t size, int flags = 0, struct sockaddr_storage *address = NULL);
+
+    /**
+     * Send data on socket.
+     * @param socket to send to.
+     * @param buffer to send.
+     * @param size of data buffer to send.
+     * @param flags for i/o operation (MSG_OOB, MSG_PEEK, etc).
+     * @param address of destination, NULL if connected.
+     * @return number of bytes sent, -1 if error.
+     */
+    static ssize_t sendto(socket_t socket, const void *buffer, size_t size, int flags = 0, const struct sockaddr *address = NULL);
+
+    /**
+     * Send reply on socket.  Used to reply to a recvfrom message.
+     * @param socket to send to.
+     * @param buffer to send.
+     * @param size of data buffer to send.
+     * @param flags for i/o operation (MSG_OOB, MSG_PEEK, etc).
+     * @param address to reply to.
+     * @return number of bytes sent, -1 if error.
+     */
+    inline static ssize_t replyto(socket_t socket, const void *buffer, size_t size, int flags, const struct sockaddr_storage *address)
+        {return sendto(socket, buffer, size, flags, (const struct sockaddr *)address);};
+
+    /**
+     * Send to internet socket.
+     * @param socket to send to.
+     * @param buffer to send.
+     * @param size of data buffer to send.
+     * @param flags for i/o operation (MSG_OOB, MSG_PEEK, etc).
+     * @param address to send to.
+     * @return number of bytes sent, -1 if error.
+     */
+    inline static ssize_t sendinet(socket_t socket, const void *buffer, size_t size, int flags, const struct sockaddr_internet *address)
+        {return sendto(socket, buffer, size, flags, (const struct sockaddr *)address);};
+
+    /**
+     * Get internet data waiting in receive queue.
+     * @param socket to get from.
+     * @param buffer to save.
+     * @param size of data buffer to request.
+     * @param flags for i/o operation (MSG_OOB, MSG_PEEK, etc).
+     * @param address of source.
+     * @return number of bytes received, -1 if error.
+     */
+    static ssize_t recvinet(socket_t socket, void *buffer, size_t size, int flags = 0, struct sockaddr_internet *address = NULL);
+
+    /**
+     * Bind the socket descriptor to a known interface and service port.
+     * @param socket descriptor to bind.
+     * @param address to bind to or "*" for all.
+     * @param service port to bind.
+     * @param protocol to use or 0 if default.
+     * @return 0 on success, -1 if error.
+     */
+    static int bindto(socket_t socket, const char *address, const char *service, int protocol = 0);
+
+    /**
+     * Bind the socket descriptor to a known interface listen on service port.
+     * @param socket descriptor to bind.
+     * @param address of interface to bind to.
+     * @param backlog for service.
+     * @return 0 on success, -1 if error.
+     */
+    static int listento(socket_t socket, const struct sockaddr *address, int backlog = 5);
+
+    /**
+     * Bind the socket descriptor to a known interface.
+     * @param socket descriptor to bind.
+     * @param address of interface to bind to.
+     * @return 0 on success, -1 if error.
+     */
+    static int bindto(socket_t socket, const struct sockaddr *address);
+
+    /**
+     * Accept a socket connection from a remote host.
+     * @param socket descriptor to accept from.
+     * @param address of socket accepting.
+     * @return new socket accepted.
+     */
+    static socket_t acceptfrom(socket_t socket, struct sockaddr_storage *address = NULL);
+
+    /**
+     * Create a socket object unbound.
+     * @param family of socket.
+     * @param type of socket.
+     * @param protocol of socket.
+     * @return socket descriptor created or INVALID_SOCKET.
+     */
+    static socket_t create(int family, int type, int protocol);
+
+    /**
+     * Create a connected socket.
+     * @param address list to connect to.
+     * @param type of socket to create.
+     * @param protocol of socket.
+     * @return socket descriptor created or INVALID_SOCKET.
+     */
+    static socket_t create(const struct addrinfo *address, int type, int protocol);
+
+    /**
+     * Create a bound socket for a service.
+     * @param iface to bind.
+     * @param service port to bind.
+     * @param family to select or AF_UNSPEC
+     * @param type of socket to create.
+     * @param protocol of socket to create.
+     * @return socket descriptor created or INVALID_SOCKET.
+     */
+    static socket_t create(const char *iface, const char *service, int family = AF_UNSPEC, int type = 0, int protocol = 0);
+
+    /**
+     * Create a connected socket for a service.
+     * @param address of service for connect.
+     * @return socket descriptor.
+     */
+    static socket_t create(const Socket::address &address);
+
+    /**
+     * Release (close) a socket.
+     * @param socket to close.
+     */
+    static void release(socket_t socket);
+
+    /**
+     * Lookup and return the host name associated with a socket address.
+     * @param address to lookup.
+     * @param buffer to save hostname into.
+     * @param size of buffer to save hostname into.
+     * @return buffer or NULL if lookup fails.
+     */
+    static char *hostname(const struct sockaddr *address, char *buffer, size_t size);
+
+    /**
+     * Create an address info lookup hint based on the family and type
+     * properties of a socket descriptor.
+     * @param socket descriptor.
+     * @param hint buffer.
+     * @return hint buffer.
+     */
+    static struct addrinfo *hinting(socket_t socket, struct addrinfo *hint);
+
+    /**
+     * Lookup a host name and service address based on the addressing family
+     * and socket type of a socket descriptor.  Store the result in a socket
+     * address structure.
+     * @param socket descriptor.
+     * @param address that is resolved.
+     * @param hostname to resolve.
+     * @param service port.
+     * @return socket address size.
+     */
+    static socklen_t query(socket_t socket, struct sockaddr_storage *address, const char *hostname, const char *service);
+
+    /**
+     * Get the size of a socket address.
+     * @param address of socket.
+     * @return size to use for this socket address object.
+     */
+    static socklen_t len(const struct sockaddr *address);
+
+    /**
+     * Compare socket addresses.  Test if the address and service matches
+     * or if there is no service, then just the host address values.
+     * @param address1 to compare.
+     * @param address2 to compare.
+     * @return true if same family and equal.
+     */
+    static bool equal(const struct sockaddr *address1, const struct sockaddr *address2);
+
+    /**
+     * Copy a socket address.
+     * @param target address pointer to copy into.
+     * @param origin address pointer to copy from.
+     * @return number of bytes copied, 0 if invalid.
+     */
+    static unsigned copy(struct sockaddr *target, const struct sockaddr *origin);
+
+    /**
+     * Store an address into an address object.
+     * @param storage for address.
+     * @param address to store.
+     * @return number of bytes stored.
+     */
+    inline static unsigned store(struct sockaddr_storage *storage, const struct sockaddr *address)
+        {return copy((struct sockaddr*)storage, address);};
+
+    /**
+     * Store an address into an internet address object.
+     * @param storage for address.
+     * @param address to store.
+     * @return number of bytes stored.
+     */
+    static unsigned store(struct sockaddr_internet *storage, const struct sockaddr *address);
+
+    /**
+     * Compare socket host addresses.  Test if the host address matches
+     * or if there is no service, then just the host address values.
+     * @param address1 to compare.
+     * @param address2 to compare.
+     * @return true if same family and equal.
+     */
+    static bool eq_host(const struct sockaddr *address1, const struct sockaddr *address2);
+
+    /**
+     * Compare socket addresses.  Test if the stored addresses received match.
+     * or if there is no service, then just the host address values.
+     * @param address1 to compare.
+     * @param address2 to compare.
+     * @return true if same family and equal.
+     */
+    inline static bool eq_from(const struct sockaddr_storage *address1, const struct sockaddr_storage *address2)
+        {return equal((const struct sockaddr *)address1, (const struct sockaddr *)address2);};
+
+    /**
+     * Compare socket addresses.  Test if the internet addresses received match.
+     * or if there is no service, then just the host address values.
+     * @param address1 to compare.
+     * @param address2 to compare.
+     * @return true if same family and equal.
+     */
+    inline static bool eq_inet(const struct sockaddr_internet *address1, const struct sockaddr_internet *address2)
+        {return equal((const struct sockaddr *)address1, (const struct sockaddr *)address2);};
+
+    /**
+     * See if both addresses are in the same subnet.  This is only relevant
+     * to IPV4 and class domain routing.
+     * @param address1 to test.
+     * @param address2 to test.
+     * @return true if in same subnet.
+     */
+    static bool eq_subnet(const struct sockaddr *address1, const struct sockaddr *address2);
+
+    /**
+     * Get the socket address of the interface needed to reach a destination
+     * address.
+     * @param address of interface found.
+     * @param destination address.
+     * @return 0 on success, -1 on error.
+     */
+    static int via(struct sockaddr *address, const struct sockaddr *destination);
+
+    /**
+     * Get the hostname of a socket address.
+     * @param address to lookup.
+     * @param buffer to save hostname in.
+     * @param size of hostname buffer.
+     * @return buffer if found or NULL if not.
+     */
+    static char *query(const struct sockaddr *address, char *buffer, socklen_t size);
+
+    /**
+     * Get the service port of a socket.
+     * @param address of socket to examine.
+     * @return service port number.
+     */
+    static short service(const struct sockaddr *address);
+
+    /**
+     * Get the service port of an inet socket.
+     * @param address of internet socket to examine.
+     * @return service port number.
+     */
+    inline static short service(const struct sockaddr_internet *address)
+        {return service((const struct sockaddr *)address);};
+
+    /**
+     * Convert a socket address and service into a hash map index.
+     * @param address to convert.
+     * @param size of map index.
+     * @return key index path.
+     */
+    static unsigned keyindex(const struct sockaddr *address, unsigned size);
+
+    /**
+     * Convert a socket host address into a hash map index.
+     * @param address to convert.
+     * @param size of map index.
+     * @return key index path.
+     */
+    static unsigned keyhost(const struct sockaddr *address, unsigned size);
+
+    /**
+     * Initialize socket subsystem.
+     */
+    static void init(void);
+
+    /**
+     * Initialize with program name.  Used by socks, for example.
+     * @param program name.
+     */
+    static void init(const char *program);
+
+    /**
+     * Set default socket family preference for query options when the
+     * socket type is otherwise not specified.
+     * @param family to select.
+     */
+    static void query(int family);
+
+    /**
+     * Set the default socket behavior for v6-v4 mapping.  This also
+     * effects v6 address lookup as to whether v4 remapped addresses
+     * can be used if no v6 address is found.
+     * @param enable true to set mapping.  This is default.
+     */
+    static void v4mapping(bool enable);
+
+    /**
+     * Return error code of last socket operation,
+     * @return errno style error code.
+     */
+    static int error(void);
+
+    /**
+     * Simple function to validate that a given IP address string is a "zero"
+     * address.  Such address strings are used for example in SIP to indicate
+     * "hold" by re-inviting peers to a null address.  Supports IPV4 and
+     * IPV6 addresses.
+     * @param string address to check.
+     * @return true if zero/null address.
+     */
+    static bool is_null(const char *string);
+
+    /**
+     * Simple function to validate that a given IP address string is a numeric
+     * address.  This can be used to verify an address is not a "host" name.
+     * Supports IPV4 and IPV6 address strings.
+     * @param string address to check.
+     * @return true if zero/null address.
+     */
+    static bool is_numeric(const char *string);
+
+    /**
+     * Get local address to which the socket is bound.  This is defined here
+     * because we may re-define the backend linkage for the socks proxy in
+     * the future.
+     * @param socket descriptor to examine.
+     * @param address storage for local address.
+     * @return 0 on success, -1 on failure.
+     */
+    static int local(socket_t socket, struct sockaddr_storage *address);
+
+    /**
+     * Get remote address to which the socket is connected.  This is defined
+     * here because we may re-define the backend linkage for the socks proxy in
+     * the future.
+     * @param socket descriptor to examine.
+     * @param address storage for remote address.
+     * @return 0 on success, -1 on failure.
+     */
+    static int remote(socket_t socket, struct sockaddr_storage *address);
+};
+
+/**
+ * A bound socket used to listen for inbound socket connections.  This class
+ * is commonly used for TCP and DCCP listener sockets.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT ListenSocket : protected Socket
+{
+public:
+    /**
+     * Create and bind a listener socket.
+     * @param address to bind on or "*" for all.
+     * @param service port to bind listener.
+     * @param backlog size for buffering pending connections.
+     * @param family of socket.
+     * @param type of socket.
+     * @param protocol for socket if not TCPIP.
+     */
+    ListenSocket(const char *address, const char *service, unsigned backlog = 5, int family = AF_UNSPEC, int type = 0, int protocol = 0);
+
+    /**
+     * Create a listen socket directly.
+     * @param address to bind on or "*" for all.
+     * @param service port to bind listener.
+     * @param backlog size for buffering pending connections.
+     * @param family of socket.
+     * @param type of socket.
+     * @param protocol for socket if not TCPIP.
+     * @return bound and listened to socket.
+     */
+    static socket_t create(const char *address, const char *service, unsigned backlog = 5, int family = AF_UNSPEC, int type = 0, int protocol = 0);
+
+    /**
+     * Accept a socket connection.
+     * @param address to save peer connecting.
+     * @return socket descriptor of connected socket.
+     */
+    socket_t accept(struct sockaddr_storage *address = NULL) const;
+
+    /**
+     * Wait for a pending connection.
+     * @param timeout to wait.
+     * @return true when acceptable connection is pending.
+     */
+    inline bool wait(timeout_t timeout = Timer::inf) const
+        {return Socket::wait(timeout);};
+
+    /**
+     * Get the socket descriptor of the listener.
+     * @return socket descriptor.
+     */
+    inline operator socket_t() const
+        {return so;}
+
+    /**
+     * Get the socket descriptor of the listener by pointer reference.
+     * @return socket descriptor.
+     */
+    inline socket_t operator*() const
+        {return so;}
+
+    /**
+     * Get the socket descriptor of the listener.
+     * @return socket descriptor.
+     */
+    inline socket_t getsocket(void) const
+        {return so;}
+
+    inline socket_t handle(void) const
+        {return so;}
+
+};
+
+/**
+ * A generic tcp server class.  This saves the service id tag so that it
+ * can be propagated.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT TCPServer : public ListenSocket
+{
+public:
+    /**
+     * Create and bind a tcp server.  This mostly is used to preserve the
+     * service tag for TCP Socket when derived from a server instance.
+     * @param service tag to use.
+     * @param address of interface to bind or "*" for all.
+     * @param backlog size for pending connections.
+     */
+    TCPServer(const char *address, const char *service, unsigned backlog = 5);
+};
+
+/**
+ * Helper function for linked_pointer<struct sockaddr>.
+ */
+__EXPORT struct addrinfo *_nextaddrinfo(struct addrinfo *addrinfo);
+
+/**
+ * Helper function for linked_pointer<struct sockaddr>.
+ */
+__EXPORT struct sockaddr *_getaddrinfo(struct addrinfo *addrinfo);
+
+/**
+ * Helper function for linked_pointer<struct sockaddr>.
+ */
+__EXPORT socket_t _getaddrsock(struct addrinfo *addrinfo);
+
+/**
+ * Linked pointer for address lists.  This can be used to iterate through
+ * the list of a Socket::address object using the linked_pointer method.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <>
+class linked_pointer<sockaddr_struct>
+{
+private:
+    struct addrinfo *ptr;
+
+public:
+    inline linked_pointer(struct addrinfo *list)
+        {ptr = list;}
+
+    inline linked_pointer()
+        {ptr = NULL;}
+
+    inline linked_pointer(Socket::address& list)
+        {ptr = list.getList();};
+
+    /**
+     * Get the full socket address list by casted reference.
+     * @return addrinfo list we resolved or NULL if none.
+     */
+    inline operator struct sockaddr *() const
+        {return _getaddrinfo(ptr);};
+
+    /**
+     * Return the full socket address list by pointer reference.
+     * @return addrinfo list we resolved or NULL if none.
+     */
+    inline struct sockaddr *operator*() const
+        {return _getaddrinfo(ptr);};
+
+    inline operator struct sockaddr_in *() const
+        {return (struct sockaddr_in *)_getaddrinfo(ptr);};
+
+    inline struct sockaddr_in *in(void) const
+        {return (struct sockaddr_in *)_getaddrinfo(ptr);};
+
+#ifdef  AF_INET6
+    inline operator struct sockaddr_in6 *() const
+        {return (struct sockaddr_in6 *)_getaddrinfo(ptr);};
+
+    inline struct sockaddr_in6 *in6(void) const
+        {return (struct sockaddr_in6 *)_getaddrinfo(ptr);};
+#endif
+
+    /**
+     * Get socket as expression operator.
+     */
+    inline socket_t operator()(void) const
+        {return _getaddrsock(ptr);};
+
+    /**
+     * Test if the address list is valid.
+     * @return true if we have an address list.
+     */
+    inline operator bool() const
+        {return ptr != NULL;};
+
+    /**
+     * Assign our pointer from an address list.
+     * @param pointer of linked list.
+     */
+    inline void operator=(struct addrinfo *list)
+        {ptr = list;};
+
+    /**
+     * Assign our pointer from an address list.
+     * @param pointer of linked list.
+     */
+    inline void operator=(Socket::address& list)
+        {ptr = list.getList();};
+
+    /**
+     * Assign our pointer from an address list.
+     * @param pointer of linked list.
+     */
+    inline void set(struct addrinfo *list)
+        {ptr = list;};
+
+    /**
+     * Assign our pointer from an address list.
+     * @param pointer of linked list.
+     */
+    inline void set(Socket::address& list)
+        {ptr = list.getList();};
+
+
+    /**
+     * Return member from typed object our pointer references.
+     * @return evaluated member of object we point to.
+     */
+    inline struct sockaddr* operator->() const
+        {return _getaddrinfo(ptr);};
+
+    /**
+     * Test if we have no address list.
+     * @return true if we have no address list.
+     */
+    inline bool operator!() const
+        {return ptr == NULL;};
+
+    inline void next(void)
+        {ptr = _nextaddrinfo(ptr);};
+};
+
+/**
+ * A convenience function to convert a socket address list into an addrinfo.
+ * @param address list object.
+ * @return addrinfo list or NULL if empty.
+ */
+inline struct addrinfo *addrinfo(Socket::address& address)
+    {return address.getList();}
+
+/**
+ * A convenience function to convert a socket address list into a socket
+ * address.
+ * @param address list object.
+ * @return first socket address in list or NULL if empty.
+ */
+inline struct sockaddr *addr(Socket::address& address)
+    {return address.get();}
+
+/**
+ * Compare two socket addresses to see if equal.  If the port is zero
+ * then this is the same as comparing host address alone.
+ * @param s1 socket address to compare.
+ * @param s2 socket address to compare.
+ * @return true if addresses same.
+ */
+inline bool eq(const struct sockaddr *s1, const struct sockaddr *s2)
+    {return Socket::equal(s1, s2);}
+
+/**
+ * Compare two stored socket addresses to see if equal.  If the port is zero
+ * then this is the same as comparing host address alone.
+ * @param s1 stored socket address to compare.
+ * @param s2 stored socket address to compare.
+ * @return true if addresses same.
+ */
+inline bool eq(const struct sockaddr_storage *s1, const struct sockaddr_storage *s2)
+    {return Socket::equal((const struct sockaddr *)s1, (const struct sockaddr *)s2);}
+
+/**
+ * Compare two host addresses to see if equal.  The port numbers are
+ * ignored.
+ * @param s1 socket address to compare.
+ * @param s2 socket address to compare.
+ * @return true if addresses same.
+ */
+inline bool eq_host(const struct sockaddr *s1, const struct sockaddr *s2)
+    {return Socket::eq_host(s1, s2);}
+
+inline bool eq_subnet(const struct sockaddr *s1, const struct sockaddr *s2)
+    {return Socket::eq_subnet(s1, s2);}
+
+String str(Socket& so, strsize_t size);
+
+typedef TCPServer   tcpserv_t;
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/stl.h b/jni/libucommon/sources/inc/ucommon/stl.h
new file mode 100644
index 0000000..0d02bfc
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/stl.h
@@ -0,0 +1,47 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Placeholder for future classes that require stl support.
+ * @file ucommon/stl.h
+ */
+
+#if defined(OLD_STDCPP) || defined(NEW_STDCPP)
+#if !defined(_MSC_VER) || _MSC_VER >= 1400
+#ifndef _UCOMMON_STL_H_
+#define _UCOMMON_STL_H_
+#define _UCOMMON_STL_EXTENDED_
+
+#ifndef _UCOMMON_PLATFORM_H_
+#include <ucommon/platform.h>
+#endif
+
+#include <list> // example...
+
+NAMESPACE_UCOMMON
+
+/*
+    In the future we may introduce optional classes which require and/or
+    build upon the standard template library.  This header indicates how and
+    where they may be added.
+*/
+
+END_NAMESPACE
+
+#endif
+#endif
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/stream.h b/jni/libucommon/sources/inc/ucommon/stream.h
new file mode 100644
index 0000000..9645356
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/stream.h
@@ -0,0 +1,482 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Any ucommon streaming classes that are built from std::streamio facilities
+ * and that support ANSI C++ stream operators.
+ * @file ucommon/stream.h
+ */
+
+#if defined(OLD_STDCPP) || defined(NEW_STDCPP)
+#ifndef _UCOMMON_STREAM_H_
+#define _UCOMMON_STREAM_H_
+
+#ifndef _UCOMMON_CONFIG_H
+#include <ucommon/platform.h>
+#endif
+
+#ifndef _UCOMMON_PROTOCOLS_H_
+#include <ucommon/protocols.h>
+#endif
+
+#ifndef _UCOMMON_THREAD_H_
+#include <ucommon/thread.h>
+#endif
+
+#ifndef _UCOMMON_SOCKET_H_
+#include <ucommon/socket.h>
+#endif
+
+#ifndef _UCOMMON_FSYS_H_
+#include <ucommon/fsys.h>
+#endif
+
+#ifndef _UCOMMON_SHELL_H_
+#include <ucommon/shell.h>
+#endif
+
+#include <iostream>
+
+NAMESPACE_UCOMMON
+
+/**
+ * Common stream buffer for std C++ i/o classes.    This both binds the
+ * character protocol to iostream and offers a common base class for all
+ * other c++ stdlib based streaming classes.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT StreamBuffer : protected std::streambuf, public std::iostream
+{
+protected:
+    size_t bufsize;
+    char *gbuf, *pbuf;
+
+    StreamBuffer();
+
+    /**
+     * This streambuf method is used for doing unbuffered reads
+     * through the establish tcp socket connection when in interactive mode.
+     * Also this method will handle proper use of buffers if not in
+     * interactive mode.
+     *
+     * @return char from tcp socket connection, EOF if not connected.
+     */
+    int uflow();
+
+    void release(void);
+
+    void allocate(size_t size);
+
+public:
+    /**
+     * Flush the stream input and output buffers, writes pending output.
+     * @return 0 on success, or error code.
+     */
+    int sync(void);
+
+    inline bool is_open(void)
+        {return bufsize > 0;}
+
+    inline operator bool()
+        {return bufsize > 0;}
+
+    inline bool operator!()
+        {return bufsize == 0;}
+};
+
+/**
+ * Streamable tcp connection between client and server.  The tcp stream
+ * class can represent a client connection to a server or an instance of
+ * a service generated by a tcp listener.  As a stream class, data can
+ * be manipulated using the << and >> operators.
+ *
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT tcpstream : public StreamBuffer
+{
+private:
+    __LOCAL void allocate(unsigned size);
+    __LOCAL void reset(void);
+
+protected:
+    socket_t so;
+    timeout_t timeout;
+
+    virtual ssize_t _read(char *buffer, size_t size);
+
+    virtual ssize_t _write(const char *buffer, size_t size);
+
+    virtual bool _wait(void);
+
+    /**
+     * Release the tcp stream and destroy the underlying socket.
+     */
+    void release(void);
+
+    /**
+     * This streambuf method is used to load the input buffer
+     * through the established tcp socket connection.
+     *
+     * @return char from get buffer, EOF if not connected.
+     */
+    int underflow(void);
+
+    /**
+     * This streambuf method is used to write the output
+     * buffer through the established tcp connection.
+     * @param ch char to push through.
+     * @return char pushed through.
+     */
+    int overflow(int ch);
+
+    inline socket_t getsocket(void) const
+        {return so;}
+
+public:
+    /**
+     * Copy constructor...
+     * @param copy for object.
+     */
+    tcpstream(const tcpstream& copy);
+
+    /**
+     * Create a stream from an existing tcp listener.
+     * @param server to accept connection from.
+     * @param segsize for tcp segments and buffering.
+     * @param timeout for socket i/o operations.
+     */
+    tcpstream(const TCPServer *server, unsigned segsize = 536, timeout_t timeout = 0);
+
+    /**
+     * Create an unconnected tcp stream object that is idle until opened.
+     * @param family of protocol to create.
+     * @param timeout for socket i/o operations.
+     */
+    tcpstream(int family = PF_INET, timeout_t timeout = 0);
+
+    /**
+     * A convenience constructor that creates a connected tcp stream directly
+     * from an address.  The socket is constructed to match the type of the
+     * the address family in the socket address that is passed.
+     * @param address of service to connect to.
+     * @param segsize for tcp segments and buffering.
+     * @param timeout for socket i/o operations.
+     */
+    tcpstream(Socket::address& address, unsigned segsize = 536, timeout_t timeout = 0);
+
+    /**
+     * Destroy a tcp stream.
+     */
+    virtual ~tcpstream();
+
+    /**
+     * See if stream connection is active.
+     * @return true if stream is active.
+     */
+    inline operator bool() const
+        {return so != INVALID_SOCKET && bufsize > 0;};
+
+    /**
+     * See if stream is disconnected.
+     * @return true if stream disconnected.
+     */
+    inline bool operator!() const
+        {return so == INVALID_SOCKET || bufsize == 0;};
+
+    /**
+     * Open a stream connection to a tcp service.
+     * @param address of service to access.
+     * @param segment buffering size to use.
+     */
+    void open(Socket::address& address, unsigned segment = 536);
+
+    /**
+     * Open a stream connectoion to a host and service.
+     * @param host to connect to.
+     * @param service to connect to by name or number as string.
+     * @param segment buffering size to use.
+     */
+    void open(const char *host, const char *service, unsigned segment = 536);
+
+    /**
+     * Close an active stream connection.  This does not release the
+     * socket but is a disconnect.
+     */
+    void close(void);
+};
+
+/**
+ * Streamable tcp connection between client and server.  The tcp stream
+ * class can represent a client connection to a server or an instance of
+ * a service generated by a tcp listener.  As a stream class, data can
+ * be manipulated using the << and >> operators.
+ *
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT pipestream : public StreamBuffer
+{
+public:
+    typedef enum {
+        RDONLY,
+        WRONLY,
+        RDWR
+    } access_t;
+
+private:
+    __LOCAL void allocate(size_t size, access_t mode);
+
+protected:
+    fsys_t rd, wr;
+    shell::pid_t pid;
+
+    /**
+     * Release the stream, detach/do not wait for the process.
+     */
+    void release(void);
+
+    /**
+     * This streambuf method is used to load the input buffer
+     * through the established pipe connection.
+     *
+     * @return char from get buffer, EOF if not connected.
+     */
+    int underflow(void);
+
+    /**
+     * This streambuf method is used to write the output
+     * buffer through the established pipe connection.
+     *
+     * @param ch char to push through.
+     * @return char pushed through.
+     */
+    int overflow(int ch);
+
+public:
+    /**
+     * Create an unopened pipe stream.
+     */
+    pipestream();
+
+    /**
+     * Create child process and start pipe.
+     * @param path to execute.
+     * @param access mode of pipe stream.
+     * @param args to pass to command.
+     * @param env to create in child.
+     * @param size of buffer.
+     */
+    pipestream(const char *command, access_t access, char **args, char **env = NULL, size_t size = 512);
+
+    /**
+     * Destroy a pipe stream.
+     */
+    virtual ~pipestream();
+
+    /**
+     * See if stream connection is active.
+     * @return true if stream is active.
+     */
+    inline operator bool() const
+        {return (bufsize > 0);};
+
+    /**
+     * See if stream is disconnected.
+     * @return true if stream disconnected.
+     */
+    inline bool operator!() const
+        {return bufsize == 0;};
+
+    /**
+     * Open a stream connection to a pipe service.
+     * @param path to execute.
+     * @param access mode of stream.
+     * @param args to pass to command.
+     * @param env to create in child process.
+     * @param buffering size to use.
+     */
+    void open(const char *path, access_t access, char **args, char **env = NULL, size_t buffering = 512);
+
+    /**
+     * Close an active stream connection.  This waits for the child to
+     * terminate.
+     */
+    int close(void);
+
+    /**
+     * Force terminate child and close.
+     */
+    void terminate(void);
+
+    inline void cancel(void)
+        {terminate();}
+};
+
+/**
+ * Streamable tcp connection between client and server.  The tcp stream
+ * class can represent a client connection to a server or an instance of
+ * a service generated by a tcp listener.  As a stream class, data can
+ * be manipulated using the << and >> operators.
+ *
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT filestream : public StreamBuffer
+{
+public:
+    typedef enum {
+        RDONLY,
+        WRONLY,
+        RDWR
+    } access_t;
+
+private:
+    __LOCAL void allocate(size_t size, fsys::access_t mode);
+
+protected:
+    fsys_t fd;
+    fsys::access_t ac;
+
+    /**
+     * This streambuf method is used to load the input buffer
+     * through the established pipe connection.
+     *
+     * @return char from get buffer, EOF if not connected.
+     */
+    int underflow(void);
+
+    /**
+     * This streambuf method is used to write the output
+     * buffer through the established pipe connection.
+     *
+     * @param ch char to push through.
+     * @return char pushed through.
+     */
+    int overflow(int ch);
+
+public:
+    /**
+     * Create an unopened pipe stream.
+     */
+    filestream();
+
+    /**
+     * Create duplicate stream.
+     */
+    filestream(const filestream& copy);
+
+    /**
+     * Create and open a file stream.
+     */
+    filestream(const char *path, unsigned mode, fsys::access_t access, size_t bufsize = 512);
+
+    /**
+     * Open file stream.
+     */
+    filestream(const char *path, fsys::access_t access, size_t bufsize = 512);
+
+    /**
+     * Destroy a file stream.
+     */
+    virtual ~filestream();
+
+    /**
+     * See if stream connection is active.
+     * @return true if stream is active.
+     */
+    inline operator bool() const
+        {return (bufsize > 0);};
+
+    /**
+     * See if stream is disconnected.
+     * @return true if stream disconnected.
+     */
+    inline bool operator!() const
+        {return bufsize == 0;};
+
+    /**
+     * Open a stream connection to a tcp service.
+     */
+    void open(const char *filename, fsys::access_t access, size_t buffering = 512);
+
+    /**
+     * Create a stream connection to a tcp service.
+     */
+    void open(const char *filename, unsigned mode, fsys::access_t access, size_t buffering = 512);
+
+    /**
+     * Close an active stream connection.
+     */
+    void close(void);
+
+    /**
+     * Seek position.
+     */
+    void seek(fsys::offset_t offset);
+
+    /**
+     * Get error flag from last i/o operation.
+     * @return last error.
+     */
+    inline int err(void) const
+        {return fd.err();};
+};
+
+/**
+ * At least with gcc, linking of stream operators was broken.  This provides
+ * an auxillory class to solve the issue.
+ */
+class __EXPORT _stream_operators
+{
+private:
+    inline _stream_operators() {};
+
+public:
+    static std::ostream& print(std::ostream& out, const PrintProtocol& format);
+
+    static std::istream& input(std::istream& inp, InputProtocol& format);
+
+    static std::ostream& print(std::ostream& out, const string_t& str);
+
+    static std::istream& input(std::istream& inp, string_t& str);
+
+    static std::ostream& print(std::ostream& out, const stringlist_t& list);
+
+    static std::istream& input(std::istream& in, stringlist_t& list);
+
+};
+
+inline std::ostream& operator<< (std::ostream& out, const PrintProtocol& format)
+        {return _stream_operators::print(out, format);}
+
+inline std::istream& operator>> (std::istream& inp, InputProtocol& format)
+        {return _stream_operators::input(inp, format);}
+
+inline std::ostream& operator<< (std::ostream& out, const string_t& str)
+        {return _stream_operators::print(out, str);}
+
+inline std::istream& operator>> (std::istream& inp, string_t& str)
+        {return _stream_operators::input(inp, str);}
+
+inline std::ostream& operator<< (std::ostream& out, const stringlist_t& list)
+        {return _stream_operators::print(out, list);}
+
+inline std::istream& operator>> (std::istream& in, stringlist_t& list)
+        {return _stream_operators::input(in, list);}
+
+END_NAMESPACE
+
+#endif
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/string.h b/jni/libucommon/sources/inc/ucommon/string.h
new file mode 100644
index 0000000..e7bbfee
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/string.h
@@ -0,0 +1,1791 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * A common string class and character string support functions.
+ * Ucommon offers a simple string class that operates through copy-on-write
+ * when needing to expand buffer size.  Derived classes and templates allows
+ * one to create strings which live entirely in the stack frame rather
+ * than using the heap.  This offers the benefit of the string class
+ * manipulative members without compromising performance or locking issues
+ * in threaded applications.  Other things found here include better and
+ * safer char array manipulation functions.
+ * @file ucommon/string.h
+ */
+
+/**
+ * An example of the string class.
+ * @example string.cpp
+ */
+
+#ifndef _UCOMMON_STRING_H_
+#define _UCOMMON_STRING_H_
+
+#ifndef _UCOMMON_CPR_H_
+#include <ucommon/cpr.h>
+#endif
+
+#ifndef _UCOMMON_GENERICS_H_
+#include <ucommon/generics.h>
+#endif
+
+#ifndef _UCOMMON_PROTOCOLS_H_
+#include <ucommon/protocols.h>
+#endif
+
+#ifndef _UCOMMON_OBJECT_H_
+#include <ucommon/object.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <stdarg.h>
+
+#ifdef  HAVE_DIRENT_H
+#include <dirent.h>
+#endif
+
+#define PGP_B64_WIDTH   64
+#define MIME_B64_WIDTH  76
+
+NAMESPACE_UCOMMON
+
+/**
+ * A convenience class for size of strings.
+ */
+typedef unsigned short strsize_t;
+
+/**
+ * A copy-on-write string class that operates by reference count.  This string
+ * class anchors a counted object that is managed as a copy-on-write
+ * instance of the string data.  This means that multiple instances of the
+ * string class can refer to the same string in memory if it has not been
+ * modifed, which reduces heap allocation.  The string class offers functions
+ * to manipulate both the string object, and generic safe string functions to
+ * manipulate ordinary null terminated character arrays directly in memory.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT String : public ObjectProtocol
+{
+protected:
+    /**
+     * This is an internal class which contains the actual string data
+     * along with some control fields.  The string can be either NULL
+     * terminated or filled like a Pascal-style string, but with a user
+     * selected fill character.  The cstring object is an overdraft
+     * object, as the actual string text which is of unknown size follows
+     * immediately after the class control data.  This class is primarily
+     * for internal use.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+
+public:
+    enum {
+        SENSITIVE = 0x00,
+        INSENSITIVE = 0x01
+    };
+
+    class __EXPORT regex
+    {
+    private:
+        void *object;
+        void *results;
+        size_t count;
+
+    public:
+        regex(const char *pattern, size_t slots = 1);
+        regex(size_t slots = 1);
+        ~regex();
+
+        size_t offset(unsigned member);
+        size_t size(unsigned member);
+
+        inline size_t members(void)
+            {return count;};
+
+        bool match(const char *text, unsigned flags = 0);
+
+        regex& operator=(const char *string);
+
+        bool operator*=(const char *string);
+
+        operator bool()
+            {return object != NULL;}
+
+        bool operator!()
+            {return object == NULL;}
+    };
+
+    class __EXPORT cstring : public CountedObject
+    {
+    public:
+#pragma pack(1)
+        strsize_t max;  /**< Allocated size of cstring text */
+        strsize_t len;  /**< Current length of cstring text */
+        char fill;      /**< Filler character or 0 for none */
+        char text[1];   /**< Null terminated text, in overdraft space */
+#pragma pack()
+
+        /**
+         * Create a cstring node allocated for specified string size.  The
+         * new operator would also need the size as an overdraft value.
+         * @param size of string.
+         */
+        cstring(strsize_t size);
+
+        /**
+         * Create a filled cstring node allocated for specified string size.
+         * The new operator would also need the size as an overdraft value.
+         * The newly allocated string is filled with the fill value.
+         * @param size of string.
+         * @param fill character value to fill string with.
+         */
+        cstring(strsize_t size, char fill);
+
+        /**
+         * Used to clear a string.  If null terminated, then the string ends
+         * at the offset, otherwise it is simply filled with fill data up to
+         * the specified size.
+         * @param offset to clear from.
+         * @param size of field to clear.
+         */
+        void clear(strsize_t offset, strsize_t size);
+
+        /**
+         * Set part or all of a string with new text.
+         * @param offset to set from.
+         * @param text to insert from null terminated string.
+         * @param size of field to modify.  This is filled for fill mode.
+         */
+        void set(strsize_t offset, const char *text, strsize_t size);
+
+        /**
+         * Set our string from null terminated text up to our allocated size.
+         * @param text to set from.
+         */
+        void set(const char *text);
+
+        /**
+         * Append null terminated text to our string buffer.
+         * @param text to append.
+         */
+        void add(const char *text);
+
+        /**
+         * Append a single character to our string buffer.
+         * @param character to append.
+         */
+        void add(char character);
+
+        /**
+         * Fill our string buffer to end if fill mode.
+         */
+        void fix(void);
+
+        /**
+         * Trim filler at end to reduce filled string to null terminated
+         * string for further processing.
+         */
+        void unfix(void);
+
+        /**
+         * Adjust size of our string buffer by deleting characters from
+         * start of buffer.
+         * @param number of characters to delete.
+         */
+        void inc(strsize_t number);
+
+        /**
+         * Adjust size of our string buffer by deleting characters from
+         * end of buffer.
+         * @param number of characters to delete.
+         */
+        void dec(strsize_t number);
+    };
+
+protected:
+    cstring *str;  /**< cstring instance our object references. */
+
+    /**
+     * Factory create a cstring object of specified size.
+     * @param size of allocated space for string buffer.
+     * @param fill character to use or 0 if null.
+     * @return new cstring object.
+     */
+    cstring *create(strsize_t size, char fill = 0) const;
+
+public:
+    /**
+     * Compare the values of two string.  This is a virtual so that it
+     * can be overridden for example if we want to create strings which
+     * ignore case, or which have special ordering rules.
+     * @param string to compare with.
+     * @return 0 if equal, <0 if less than, 0> if greater than.
+     */
+    virtual int compare(const char *string) const;
+
+    inline int collate(const char *string) const
+        {return compare(string);};
+
+protected:
+    /**
+    * Test if two string values are equal.
+    * @param string to compare with.
+    * @return true if equal.
+    */
+    bool equal(const char *string) const;
+
+    /**
+     * Increase retention of our reference counted cstring.  May be overridden
+     * for memstring which has fixed cstring object.
+     */
+    virtual void retain(void);
+
+    /**
+     * Decrease retention of our reference counted cstring.  May be overridden
+     * for memstring which has fixed cstring object.
+     */
+    virtual void release(void);
+
+    /**
+     * Return cstring to use in copy constructors.  Is virtual for memstring.
+     * @return cstring for copy constructor.
+     */
+    virtual cstring *c_copy(void) const;
+
+    /**
+     * Copy on write operation for cstring.  This always creates a new
+     * unique copy for write/modify operations and is a virtual for memstring
+     * to disable.
+     * @param size to add to allocated space when creating new cstring.
+     */
+    virtual void cow(strsize_t size = 0);
+
+    strsize_t getStringSize(void);
+
+public:
+    /**
+     * A constant for an invalid position value.
+     */
+#if _MSC_VER > 1400        // windows broken dll linkage issue...
+    const static strsize_t npos = ((strsize_t)-1);
+#else
+    static const strsize_t npos;
+#endif
+
+
+    /**
+     * Create a new empty string object.
+     */
+    String();
+
+    /**
+     * Create a string from a long integer.
+     * @param value to convert to string.
+     */
+    String(long value);
+
+    /**
+     * Create a string from a floating point.
+     * @param value to convert to string.
+     */
+    String(double value);
+
+    /**
+     * Create an empty string with a buffer pre-allocated to a specified size.
+     * @param size of buffer to allocate.
+     */
+    String(strsize_t size);
+
+    /**
+     * Create a filled string with a buffer pre-allocated to a specified size.
+     * @param size of buffer to allocate.
+     * @param fill character to use.
+     */
+    String(strsize_t size, char fill);
+
+    /**
+     * Create a string by printf-like formating into a pre-allocated space
+     * of a specified size.  A typical use might be in a concat function
+     * like String x = (String)something + (String){10, "%ud", var}.
+     * @param size of buffer to allocate.
+     * @param format control for string.
+     */
+    String(strsize_t size, const char *format, ...) __PRINTF(3, 4);
+
+
+    /**
+     * Create a string from null terminated text.
+     * @param text to use for string.
+     */
+    String(const char *text);
+
+    /**
+     * Create a string from null terminated text up to a maximum specified
+     * size.
+     * @param text to use for string.
+     * @param size limit of new string.
+     */
+    String(const char *text, strsize_t size);
+
+    /**
+     * Create a string for a substring.  The end of the substring is a
+     * pointer within the substring itself.
+     * @param text to use for string.
+     * @param end of text in substring.
+     */
+    String(const char *text, const char *end);
+
+    /**
+     * Construct a copy of a string object.  Our copy inherets the same
+     * reference counted instance of cstring as in the original.
+     * @param existing string to copy from.
+     */
+    String(const String& existing);
+
+    /**
+     * Destroy string.  De-reference cstring.  If last reference to cstring,
+     * then also remove cstring from heap.
+     */
+    virtual ~String();
+
+    /**
+     * Get a new string object as a substring of the current object.
+     * @param offset of substring.
+     * @param size of substring or 0 if to end.
+     * @return string object holding substring.
+     */
+    String get(strsize_t offset, strsize_t size = 0) const;
+
+    /**
+     * Scan input items from a string object.
+     * @param format string of input to scan.
+     * @return number of items scanned.
+     */
+    int scanf(const char *format, ...) __SCANF(2, 3);
+
+    /**
+     * Scan input items from a string object.
+     * @param format string of input to scan.
+     * @param args list to scan into.
+     * @return number of items scanned.
+     */
+    int vscanf(const char *format, va_list args) __SCANF(2, 0);
+
+    /**
+     * Print items into a string object.
+     * @param format string of print format.
+     * @return number of bytes written to string.
+     */
+    strsize_t printf(const char *format, ...) __PRINTF(2, 3);
+
+    /**
+     * Print items into a string object.
+     * @param format string of print format.
+     * @param args list to print.
+     * @return number of bytes written to string.
+     */
+    strsize_t vprintf(const char *format, va_list args) __PRINTF(2, 0);
+
+    /**
+     * Get memory text buffer of string object.
+     * @return writable string buffer.
+     */
+    char *c_mem(void) const;
+
+    /**
+     * Get character text buffer of string object.
+     * @return character text buffer.
+     */
+    const char *c_str(void) const;
+
+    /**
+     * Resize and re-allocate string memory.
+     * @param size to allocate for string.
+     * @return true if re-allocated.  False in derived memstring.
+     */
+    virtual bool resize(strsize_t size);
+
+    /**
+     * Set string object to text of a null terminated string.
+     * @param text string to set.
+     */
+    void set(const char *text);
+
+    /**
+     * Set a portion of the string object at a specified offset to a text
+     * string.
+     * @param offset in object string buffer.
+     * @param text to set at offset.
+     * @param size of text area to set or 0 until end of text.
+     */
+    void set(strsize_t offset, const char *text, strsize_t size = 0);
+
+    /**
+     * Set a text field within our string object.
+     * @param text to set.
+     * @param overflow character to use as filler if text is too short.
+     * @param offset in object string buffer to set text at.
+     * @param size of part of buffer to set with text and overflow.
+     */
+    void set(const char *text, char overflow, strsize_t offset, strsize_t size = 0);
+
+    /**
+     * Set a text field within our string object offset from the end of buffer.
+     * @param text to set.
+     * @param overflow character to use as filler if text is too short.
+     * @param offset from end of object string buffer to set text at.
+     * @param size of part of buffer to set with text and overflow.
+     */
+    void rset(const char *text, char overflow, strsize_t offset, strsize_t size = 0);
+
+    /**
+     * Append null terminated text to our string buffer.
+     * @param text to append.
+     */
+    void add(const char *text);
+
+    /**
+     * Append a single character to our string buffer.
+     * @param character to append.
+     */
+    void add(char character);
+
+    /**
+     * Trim lead characters from the string.
+     * @param list of characters to remove.
+     */
+    void trim(const char *list);
+
+    /**
+     * Trim lead characters from text.
+     * @param count of characters to remove.
+     */
+    inline void trim(strsize_t count = 1)
+        {operator+=(count);};
+
+    /**
+     * Chop trailing characters from the string.
+     * @param list of characters to remove.
+     */
+    void chop(const char *list);
+
+    /**
+     * Chop trailing characters from text.
+     * @param count of characters to remove.
+     */
+    inline void chop(strsize_t count = 1)
+        {operator-=(count);};
+
+    /**
+     * Strip lead and trailing characters from the string.
+     * @param list of characters to remove.
+     */
+    void strip(const char *list);
+
+    /**
+     * Unquote a quoted string.  Removes lead and trailing quote marks.
+     * @param quote pairs of characters for open and close quote.
+     * @return true if string was quoted.
+     */
+    bool unquote(const char *quote);
+
+    /**
+     * Cut (remove) text from string.
+     * @param offset to start of text field to remove.
+     * @param size of text field to remove or 0 to remove to end of string.
+     */
+    void cut(strsize_t offset, strsize_t size = 0);
+
+    /**
+     * Insert (paste) text into string.
+     * @param offset to start paste.
+     * @param text to paste.
+     * @param size of text to paste.
+     */
+    void paste(strsize_t offset, const char *text, strsize_t size = 0);
+
+    /**
+     * Clear a field of a filled string with filler.
+     * @param offset to start of field to clear.
+     * @param size of field to fill or 0 to fill to end of string.
+     */
+    void clear(strsize_t offset, strsize_t size = 0);
+
+    /**
+     * Clear string by setting to empty.
+     */
+    void clear(void);
+
+    /**
+     * Convert string to upper case.
+     */
+    void upper(void);
+
+    /**
+     * Convert string to lower case.
+     */
+    void lower(void);
+
+    /**
+     * Erase string memory.
+     */
+    void erase(void);
+
+    /**
+     * Count number of occurrences of characters in string.
+     * @param list of characters to find.
+     * @return count of instances of characters in string.
+     */
+    strsize_t ccount(const char *list) const;
+
+    /**
+     * Count all characters in the string (strlen).
+     * @return count of characters.
+     */
+    strsize_t count(void) const;
+
+    /**
+     * Get the size of currently allocated space for string.
+     * @return size allocated for text.
+     */
+    strsize_t size(void) const;
+
+    /**
+     * Find offset of a pointer into our string buffer.  This can be used
+     * to find the offset position of a pointer returned by find, for
+     * example.  This is used when one needs to convert a member function
+     * that returns a pointer to call a member function that operates by
+     * a offset value.  If the pointer is outside the range of the string
+     * then npos is returned.
+     * @param pointer into our object's string buffer.
+     */
+    strsize_t offset(const char *pointer) const;
+
+    /**
+     * Return character found at a specific position in the string.
+     * @param position in string, negative values computed from end.
+     * @return character code at specified position in string.
+     */
+    char at(int position) const;
+
+    /**
+     * Get pointer to first character in string for iteration.
+     * @return first character pointer or NULL if empty.
+     */
+    const char *begin(void) const;
+
+    /**
+     * Get pointer to last character in string for iteration.
+     * @return last character pointer or NULL if empty.
+     */
+    const char *end(void) const;
+
+    /**
+     * Skip lead characters in the string.
+     * @param list of characters to skip when found.
+     * @param offset to start of scan.
+     * @return pointer to first part of string past skipped characters.
+     */
+    const char *skip(const char *list, strsize_t offset = 0) const;
+
+    /**
+     * Skip trailing characters in the string.  This searches the
+     * string in reverse order.
+     * @param list of characters to skip when found.
+     * @param offset to start of scan.  Default is end of string.
+     * @return pointer to first part of string before skipped characters.
+     */
+    const char *rskip(const char *list, strsize_t offset = npos) const;
+
+    /**
+     * Search for a substring in the string.
+     * @param substring to search for.
+     * @param flags for case insensitive search.
+     */
+    const char *search(const char *string, unsigned instance = 0, unsigned flags = 0) const;
+
+    const char *search(regex& expr, unsigned instance = 0, unsigned flags = 0) const;
+
+    unsigned replace(const char *string, const char *text = NULL, unsigned flags = 0);
+
+    unsigned replace(regex& expr, const char *text = NULL, unsigned flags = 0);
+
+    /**
+     * Find a character in the string.
+     * @param list of characters to search for.
+     * @param offset to start of search.
+     * @return pointer to first occurrence of character.
+     */
+    const char *find(const char *list, strsize_t offset = 0) const;
+
+    /**
+     * Find last occurrence of character in the string.
+     * @param list of characters to search for.
+     * @param offset to start of search.  Default is end of string.
+     * @return pointer to last occurrence of character.
+     */
+    const char *rfind(const char *list, strsize_t offset = npos) const;
+
+    /**
+     * Split the string by a pointer position.  Everything after the pointer
+     * is removed.
+     * @param pointer to split position in string.
+     */
+    void split(const char *pointer);
+
+    /**
+     * Split the string at a specific offset.  Everything after the offset
+     * is removed.
+     * @param offset to split position in string.
+     */
+    void split(strsize_t offset);
+
+    /**
+     * Split the string by a pointer position.  Everything before the pointer
+     * is removed.
+     * @param pointer to split position in string.
+     */
+    void rsplit(const char *pointer);
+
+    /**
+     * Split the string at a specific offset.  Everything before the offset
+     * is removed.
+     * @param offset to split position in string.
+     */
+    void rsplit(strsize_t offset);
+
+    /**
+     * Find pointer in string where specified character appears.
+     * @param character to find.
+     * @return string pointer for character if found, NULL if not.
+     */
+    const char *chr(char character) const;
+
+    /**
+     * Find pointer in string where specified character last appears.
+     * @param character to find.
+     * @return string pointer for last occurrence of character if found,
+     * NULL if not.
+     */
+    const char *rchr(char character) const;
+
+    /**
+     * Get length of string.
+     * @return length of string.
+     */
+    strsize_t len(void) const;
+
+    /**
+     * Get filler character used for field array strings.
+     * @return filler character or 0 if none.
+     */
+    char fill(void);
+
+    /**
+     * Casting reference to raw text string.
+     * @return null terminated text of string.
+     */
+    inline operator const char *() const
+        {return c_str();};
+
+    /**
+     * Reference raw text buffer by pointer operator.
+     * @return null terminated text of string.
+     */
+    inline const char *operator*() const
+        {return c_str();};
+
+    /**
+     * Test if the string's allocated space is all used up.
+     * @return true if no more room for append.
+     */
+    bool full(void) const;
+
+    /**
+     * Get a new substring through object expression.
+     * @param offset of substring.
+     * @param size of substring or 0 if to end.
+     * @return string object holding substring.
+     */
+    String operator()(int offset, strsize_t size) const;
+
+    /**
+     * Convenience method for left of string.
+     * @param size of substring to gather.
+     * @return string object holding substring.
+     */
+    inline String left(strsize_t size) const
+        {return operator()(0, size);}
+
+    /**
+     * Convenience method for right of string.
+     * @param offset of substring from right.
+     * @return string object holding substring.
+     */
+    inline String right(strsize_t offset) const
+        {return operator()(-((int)offset), 0);}
+
+    /**
+     * Convenience method for substring extraction.
+     * @param offset into string.
+     * @param size of string to return.
+     * @return string object holding substring.
+     */
+    inline String copy(strsize_t offset, strsize_t size) const
+        {return operator()((int)offset, size);}
+
+    /**
+     * Reference a string in the object by relative offset.  Positive
+     * offsets are from the start of the string, negative from the
+     * end.
+     * @param offset to string position.
+     * @return pointer to string data or NULL if invalid offset.
+     */
+    const char *operator()(int offset) const;
+
+    /**
+     * Reference a single character in string object by array offset.
+     * @param offset to character.
+     * @return character value at offset.
+     */
+    const char operator[](int offset) const;
+
+    /**
+     * Test if string is empty.
+     * @return true if string is empty.
+     */
+    bool operator!() const;
+
+    /**
+     * Test if string has data.
+     * @return true if string has data.
+     */
+    operator bool() const;
+
+    /**
+     * Create new cow instance and assign value from another string object.
+     * @param object to assign from.
+     * @return our object for expression use.
+     */
+    String& operator^=(const String& object);
+
+    /**
+     * Concatenate text to an existing string object.  This will use the
+     * old behavior when +/= updated.
+     */
+    String& operator|=(const char *text);
+
+    String& operator&=(const char *text);
+
+    /**
+     * Concatenate text to an existing string object.
+     * @param text to add.
+     * @return our object for expression use.
+     */
+    String& operator+=(const char *text);
+
+    /**
+     * Create new cow instance and assign value from null terminated text.
+     * @param text to assign from.
+     * @return our object for expression use.
+     */
+    String& operator^=(const char *text);
+
+    /**
+     * Concatenate null terminated text to our object.
+     * @param text to concatenate.
+     */
+    String operator+(const char *text);
+
+    /**
+     * Concatenate null terminated text to our object.  This creates a new
+     * copy-on-write instance to hold the concatenated string.  This will
+     * eventually replace '+' when + creates a new string instance instead.
+     * @param text to concatenate.
+     */
+    String& operator|(const char *text);
+
+    /**
+     * Concatenate null terminated text to our object.  This directly
+     * appends the text to the string buffer and does not resize the
+     * object if the existing cstring allocation space is fully used.
+     * @param text to concatenate.
+     */
+    String& operator&(const char *text);
+
+    /**
+     * Assign our string with the cstring of another object.  If we had
+     * an active string reference, it is released.  The object now has
+     * a duplicate reference to the cstring of the other object.
+     * @param object to assign from.
+     */
+    String& operator=(const String& object);
+
+    bool operator*=(const char *substring);
+
+    bool operator*=(regex& expr);
+
+    /**
+     * Assign text to our existing buffer.  This performs a set method.
+     * @param text to assign from.
+     */
+    String& operator=(const char *text);
+
+    /**
+     * Delete first character from string.
+     */
+    String& operator++(void);
+
+    /**
+     * Delete a specified number of characters from start of string.
+     * @param number of characters to delete.
+     */
+    String& operator+=(strsize_t number);
+
+    /**
+     * Delete last character from string.
+     */
+    String& operator--(void);
+
+    /**
+     * Delete a specified number of characters from end of string.
+     * @param number of characters to delete.
+     */
+    String& operator-=(strsize_t number);
+
+    /**
+     * Delete a specified number of characters from start of string.
+     * @param number of characters to delete.
+     */
+    String& operator*=(strsize_t number);
+
+    /**
+     * Compare our object with null terminated text.
+     * @param text to compare with.
+     * @return true if we are equal.
+     */
+    bool operator==(const char *text) const;
+
+    /**
+     * Compare our object with null terminated text.  Compare method is used.
+     * @param text to compare with.
+     * @return true if we are not equal.
+     */
+    bool operator!=(const char *text) const;
+
+    /**
+     * Compare our object with null terminated text.  Compare method is used.
+     * @param text to compare with.
+     * @return true if we are less than text.
+     */
+    bool operator<(const char *text) const;
+
+    /**
+     * Compare our object with null terminated text.  Compare method is used.
+     * @param text to compare with.
+     * @return true if we are less than or equal to text.
+     */
+    bool operator<=(const char *text) const;
+
+    /**
+     * Compare our object with null terminated text.  Compare method is used.
+     * @param text to compare with.
+     * @return true if we are greater than text.
+     */
+    bool operator>(const char *text) const;
+
+    /**
+     * Compare our object with null terminated text.  Compare method is used.
+     * @param text to compare with.
+     * @return true if we are greater than or equal to text.
+     */
+    bool operator>=(const char *text) const;
+
+    inline String& operator<<(const char *text)
+        {add(text); return *this;}
+
+    inline String& operator<<(char code)
+        {add(code); return *this;}
+
+    /**
+     * Parse short integer value from a string.
+     * @param value to store.
+     * @return object in expression.
+     */
+    String &operator%(short& value);
+
+    /**
+     * Parse long integer value from a string.
+     * @param value to store.
+     * @return object in expression.
+     */
+    String &operator%(unsigned short& value);
+
+    /**
+     * Parse long integer value from a string.
+     * @param value to store.
+     * @return object in expression.
+     */
+    String &operator%(long& value);
+
+    /**
+     * Parse long integer value from a string.
+     * @param value to store.
+     * @return object in expression.
+     */
+    String &operator%(unsigned long& value);
+
+    /**
+     * Parse double value from a string.
+     * @param value to store.
+     * @return object in expression.
+     */
+    String &operator%(double& value);
+
+    /**
+     * Parse text from a string in a scan expression.
+     * @param text to scan and bypass.
+     * @return object in expression.
+     */
+    String &operator%(const char *text);
+
+    /**
+     * Swap the cstring references between two strings.
+     * @param object1 to swap.
+     * @param object2 to swap.
+     */
+    static void swap(String& object1, String& object2);
+
+    /**
+     * Fix and reset string object filler.
+     * @param object to fix.
+     */
+    static void fix(String& object);
+
+    /**
+     * Erase string memory.  Often used to clear out passwords.
+     * @param text string to erase.
+     */
+    static void erase(char *text);
+
+    /**
+     * Convert null terminated text to lower case.
+     * @param text to convert.
+     */
+    static void lower(char *text);
+
+    /**
+     * Convert null terminated text to upper case.
+     * @param text to convert.
+     */
+    static void upper(char *text);
+
+    /**
+     * A thread-safe token parsing routine for null terminated strings.  This
+     * is related to strtok, but with safety checks for NULL values and a
+     * number of enhancements including support for quoted text that may
+     * contain token separators within quotes.  The text string is modified
+     * as it is parsed.
+     * @param text string to examine for tokens.
+     * @param last token position or set to NULL for start of string.
+     * @param list of characters to use as token separators.
+     * @param quote pairs of characters for quoted text or NULL if not used.
+     * @param end of line marker characters or NULL if not used.
+     * @return token extracted from string or NULL if no more tokens found.
+     */
+    static char *token(char *text, char **last, const char *list, const char *quote = NULL, const char *end = NULL);
+
+    /**
+     * Skip after lead characters in a null terminated string.
+     * @param text pointer to start at.
+     * @param list of characters to skip when found.
+     * @return pointer to first part of string past skipped characters.
+     */
+    static char *skip(char *text, const char *list);
+
+    /**
+     * Skip before trailing characters in a null terminated string.
+     * @param text pointer to start at.
+     * @param list of characters to skip when found.
+     * @return pointer to last part of string past skipped characters.
+     */
+    static char *rskip(char *text, const char *list);
+
+    /**
+     * Unquote a quoted null terminated string.  Returns updated string
+     * position and replaces trailing quote with null byte if quoted.
+     * @param text to examine.
+     * @param quote pairs of character for open and close quote.
+     * @return new text pointer if quoted, NULL if unchanged.
+     */
+    static char *unquote(char *text, const char *quote);
+
+    /**
+     * Set a field in a null terminated string relative to the end of text.
+     * @param buffer to modify.
+     * @param size of field to set.
+     * @param text to replace end of string with.
+     * @return pointer to text buffer.
+     */
+    static char *rset(char *buffer, size_t size, const char *text);
+
+    /**
+     * Safely set a null terminated string buffer in memory.  If the text
+     * is too large to fit into the buffer, it is truncated to the size.
+     * @param buffer to set.
+     * @param size of buffer.  Includes null byte at end of string.
+     * @param text to set in buffer.
+     * @return pointer to text buffer.
+     */
+    static char *set(char *buffer, size_t size, const char *text);
+
+    /**
+     * Safely set a null terminated string buffer in memory.  If the text
+     * is too large to fit into the buffer, it is truncated to the size.
+     * @param buffer to set.
+     * @param size of buffer.  Includes null byte at end of string.
+     * @param text to set in buffer.
+     * @param max size of text to set.
+     * @return pointer to text buffer.
+     */
+    static char *set(char *buffer, size_t size, const char *text, size_t max);
+
+    /**
+     * Safely append a null terminated string into an existing string in
+     * memory.  If the resulting string is too large to fit into the buffer,
+     * it is truncated to the size.
+     * @param buffer to set.
+     * @param size of buffer.  Includes null byte at end of string.
+     * @param text to set in buffer.
+     * @return pointer to text buffer.
+     */
+    static char *add(char *buffer, size_t size, const char *text);
+
+    /**
+     * Safely append a null terminated string into an existing string in
+     * memory.  If the resulting string is too large to fit into the buffer,
+     * it is truncated to the size.
+     * @param buffer to set.
+     * @param size of buffer.  Includes null byte at end of string.
+     * @param text to set in buffer.
+     * @param max size of text to append.
+     * @return pointer to text buffer.
+     */
+    static char *add(char *buffer, size_t size, const char *text, size_t max);
+
+    /**
+     * Find position of case insensitive substring within a string.
+     * @param text to search in.
+     * @param key string to locate.
+     * @param optional separator chars if formatted as list of keys.
+     * @return substring position if found, or NULL.
+     */
+    static const char *ifind(const char *text, const char *key, const char *optional);
+
+    /**
+     * Find position of substring within a string.
+     * @param text to search in.
+     * @param key string to locate.
+     * @param optional separator chars if formatted as list of keys.
+     * @return substring position if found, or NULL.
+     */
+    static const char *find(const char *text, const char *key, const char *optional);
+
+    /**
+     * Safe version of strlen function.  Accepts NULL as 0 length strings.
+     * @param text string.
+     * @return length of string.
+     */
+    static size_t count(const char *text);
+
+    /**
+     * Safe string collation function.
+     * @param text1 to compare.
+     * @param text2 to compare.
+     * @return 0 if equal, >0 if text1 > text2, <0 if text1 < text2.
+     */
+    static int compare(const char *text1, const char *text2);
+
+    static inline int collate(const char *text1, const char *text2)
+        {return compare(text1, text2);};
+
+    /**
+     * Simple equal test for strings.
+     * @param text1 to test.
+     * @param text2 to test.
+     * @return true if equal and case is same.
+     */
+    static bool equal(const char *text1, const char *text2);
+
+    /**
+     * Depreciated string comparison function.
+     * @param text1 to compare.
+     * @param text2 to compare.
+     * @param size limit of strings to compare.
+     * @return 0 if equal, >0 if text1 > text2, <0 if text1 < text2.
+     */
+    static int compare(const char *text1, const char *text2, size_t size);
+
+    /**
+     * Simple equal test for strings.
+     * @param text1 to test.
+     * @param text2 to test.
+     * @param size limit of strings to compare.
+     * @return true if equal and case is same.
+     */
+    static bool equal(const char *text1, const char *text2, size_t size);
+
+    /**
+     * Depreciated case insensitive string comparison function.
+     * @param text1 to compare.
+     * @param text2 to compare.
+     * @return 0 if equal, >0 if text1 > text2, <0 if text1 < text2.
+     */
+    static int case_compare(const char *text1, const char *text2);
+
+    /**
+     * Simple case insensitive equal test for strings.
+     * @param text1 to test.
+     * @param text2 to test.
+     * @return true if equal.
+     */
+    static bool eq_case(const char *text1, const char *text2);
+
+    /**
+     * Depreciated case insensitive string comparison function.
+     * @param text1 to compare.
+     * @param text2 to compare.
+     * @param size limit of strings to compare.
+     * @return 0 if equal, >0 if text1 > text2, <0 if text1 < text2.
+     */
+    static int case_compare(const char *text1, const char *text2, size_t size);
+
+    /**
+     * Simple case insensitive equal test for strings.
+     * @param text1 to test.
+     * @param text2 to test.
+     * @param size limit of strings to compare.
+     * @return true if equal.
+     */
+    static bool eq_case(const char *text1, const char *text2, size_t size);
+
+    /**
+     * Return start of string after characters to trim from beginning.
+     * This function does not modify memory.
+     * @param text buffer to examine.
+     * @param list of characters to skip from start.
+     * @return position in text past lead trim.
+     */
+    static char *trim(char *text, const char *list);
+
+    /**
+     * Strip trailing characters from the text string.  This function will
+     * modify memory.
+     * @param text buffer to examine.
+     * @param list of characters to chop from trailing end of string.
+     * @return pointer to text buffer.
+     */
+    static char *chop(char *text, const char *list);
+
+    /**
+     * Skip lead and remove trailing characters from a text string.  This
+     * function will modify memory.
+     * @param text buffer to examine.
+     * @param list of characters to trim and chop.
+     * @return position in text past lead trim.
+     */
+    static char *strip(char *text, const char *list);
+
+    /**
+     * Fill a section of memory with a fixed text character.  Adds a null
+     * byte at the end.
+     * @param text buffer to fill.
+     * @param size of text buffer with null terminated byte.
+     * @param character to fill with.
+     * @return pointer to text buffer.
+     */
+    static char *fill(char *text, size_t size, char character);
+
+    /**
+     * Count instances of characters in a list in a text buffer.
+     * @param text buffer to examine.
+     * @param list of characters to count in buffer.
+     * @return number of instances of the characters in buffer.
+     */
+    static unsigned ccount(const char *text, const char *list);
+
+    /**
+     * Find the first occurrence of a character in a text buffer.
+     * @param text buffer to examine.
+     * @param list of characters to search for.
+     * @return pointer to first instance found or NULL.
+     */
+    static char *find(char *text, const char *list);
+
+    /**
+     * Offset until next occurrence of character in a text or length.
+     * @param text buffer to examine.
+     * @param list of characters to search for.
+     * @return offset to next occurrence or length of string.
+     */
+    static size_t seek(char *text, const char *list);
+
+    /**
+     * Find the last occurrence of a character in a text buffer.
+     * @param text buffer to examine.
+     * @param list of characters to search for.
+     * @return pointer to last instance found or NULL.
+     */
+    static char *rfind(char *text, const char *list);
+
+    /**
+     * Duplicate null terminated text into the heap.
+     * @param text to duplicate.
+     * @return duplicate copy of text allocated from heap.
+     */
+    static char *dup(const char *text);
+
+    /**
+     * Duplicate null terminated text of specific size to heap.
+     * @param text to duplicate.
+     * @param size of text, maximum space allocated.
+     * @return duplicate copy of text allocated on heap.
+     */
+    static char *left(const char *text, size_t size);
+
+    /**
+     * Compute position in string.
+     * @param text of string.
+     * @param offset from start, negative values from end.
+     * @return pointer to string position.
+     */
+    static const char *pos(const char *text, ssize_t offset);
+
+    inline static char *right(const char *text, size_t size)
+        {return dup(pos(text, -(signed)size));}
+
+    inline static char *copy(const char *text, size_t offset, size_t len)
+        {return left(pos(text, offset), len);}
+
+    static void cut(char *text, size_t offset, size_t len);
+
+    static void paste(char *text, size_t max, size_t offset, const char *data, size_t len = 0);
+
+    /**
+     * A thread-safe token parsing routine for strings objects.  This
+     * is related to strtok, but with safety checks for NULL values and a
+     * number of enhancements including support for quoted text that may
+     * contain token separators within quotes.  The object is modified
+     * as it is parsed.
+     * @param last token position or set to NULL for start of string.
+     * @param list of characters to use as token separators.
+     * @param quote pairs of characters for quoted text or NULL if not used.
+     * @param end of line marker characters or NULL if not used.
+     * @return token extracted from string or NULL if no more tokens found.
+     */
+    inline char *token(char **last, const char *list, const char *quote = NULL, const char *end = NULL)
+        {return token(c_mem(), last, list, quote, end);};
+
+    /**
+     * Convert string to a double value.
+     * @param object to convert.
+     * @param pointer to update with end of parsed value.
+     * @return double value of object.
+     */
+    inline double tod(char **pointer = NULL)
+        {return strtod(c_mem(), pointer);}
+
+    /**
+     * Convert string to a long value.
+     * @param object to convert.
+     * @param pointer to update with end of parsed value.
+     * @return long value of object.
+     */
+    inline long tol(char **pointer = NULL)
+        {return strtol(c_mem(), pointer, 0);}
+
+    /**
+     * Convert text to a double value.
+     * @param text to convert.
+     * @param pointer to update with end of parsed value.
+     * @return double value of object.
+     */
+    inline static double tod(const char *text, char **pointer = NULL)
+        {return strtod(text, pointer);}
+
+    /**
+     * Convert text to a long value.
+     * @param text to convert.
+     * @param pointer to update with end of parsed value.
+     * @return long value of object.
+     */
+    inline static long tol(const char *text, char **pointer = NULL)
+        {return strtol(text, pointer, 0);}
+
+    /**
+     * Standard radix 64 encoding.
+     * @param string of encoded text save into.
+     * @param binary data to encode.
+     * @param size of binary data to encode.
+     * @param width of string buffer for data if partial supported.
+     * @return number of bytes encoded.
+     */
+    static size_t b64encode(char *string, const uint8_t *binary, size_t size, size_t width = 0);
+
+    /**
+     * Standard radix 64 decoding.
+     * @param binary data to save.
+     * @param string of encoded text.
+     * @param size of destination buffer.
+     * @return number of bytes actually decoded.
+     */
+    static size_t b64decode(uint8_t *binary, const char *string, size_t size);
+
+    /**
+     * 24 bit crc as used in openpgp.
+     * @param binary data to sum.
+     * @param size of binary data to sum.
+     * @return 24 bit crc of data.
+     */
+    static uint32_t crc24(uint8_t *binary, size_t size);
+
+    /**
+     * ccitt 16 bit crc for binary data.
+     * @param binary data to sum.
+     * @param size of binary data to sum.
+     * @return 16 bit crc.
+     */
+    static uint16_t crc16(uint8_t *binary, size_t size);
+
+    /**
+     * Dump hex data to a string buffer.
+     * @param binary memory to dump.
+     * @param string to save into.
+     * @param format string to convert with.
+     * @return number of bytes processed.
+     */
+    static unsigned hexdump(const unsigned char *binary, char *string, const char *format);
+
+    /**
+     * Pack hex data from a string buffer.
+     * @param binary memory to pack.
+     * @param string to save into.
+     * @param format string to convert with.
+     * @return number of bytes processed.
+     */
+    static unsigned hexpack(unsigned char *binary, const char *string, const char *format);
+
+    static unsigned hexsize(const char *format);
+};
+
+/**
+ * A string class that uses a cstring buffer that is fixed in memory.
+ * This allows one to manipulate a fixed buffer of text in memory through
+ * the string class.  The size of the memory used must include space for
+ * the overhead() size needed for the cstring object control data.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT memstring : public String
+{
+public:
+#if _MSC_VER > 1400        // windows broken dll linkage issue...
+    const static size_t header = sizeof(string::cstring);
+#else
+    static const size_t header;
+#endif
+
+private:
+    bool resize(strsize_t size);
+    void cow(strsize_t adj = 0);
+    void release(void);
+
+protected:
+    cstring *c_copy(void) const;
+
+public:
+    /**
+     * Assign the text of a string to our object.
+     * @param object to copy text from.
+     */
+    inline void operator=(String& object)
+        {set(object.c_str());};
+
+    /**
+     * Assign null terminated text to our object.
+     * @param text to copy.
+     */
+    inline void operator=(const char *text)
+        {set(text);};
+
+    /**
+     * Create an instance of a memory string.
+     * @param memory to use for cstring object.
+     * @param size of string.  Total size must include space for overhead.
+     * @param fill character for fixed character fields.
+     */
+    memstring(void *memory, strsize_t size, char fill = 0);
+
+    /**
+     * Destroy memory string.
+     */
+    ~memstring();
+
+    /**
+     * Create a memory string with memory allocated from the heap.
+     * @param size of string to allocate.  Automatically adds control size.
+     * @param fill character for fixed field strings.
+     */
+    static memstring *create(strsize_t size, char fill = 0);
+
+    /**
+     * Create a memory string with memory allocated from a pager.
+     * @param pager to allocate memory from.
+     * @param size of string to allocate.  Automatically adds control size.
+     * @param fill character for fixed field strings.
+     */
+    static memstring *create(MemoryProtocol *pager, strsize_t size, char fill = 0);
+};
+
+/**
+ * A template to create a character array that can be manipulated as a string.
+ * This is a mini string/stringbuf class that supports a subset of
+ * functionality but does not require a complex supporting object.  Like
+ * stringbuf, this can be used to create local string variables.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template<size_t S>
+class charbuf
+{
+private:
+    char buffer[S];
+
+public:
+    /**
+     * Create a new character buffer with an empty string.
+     */
+    inline charbuf()
+        {buffer[0] = 0;}
+
+    /**
+     * Create a character buffer with assigned text.  If the text is
+     * larger than the size of the object, it is truncated.
+     * @param text to assign.
+     */
+    inline charbuf(const char *text)
+        {String::set(buffer, S, text);}
+
+    /**
+     * Copy constructor.
+     */
+    inline charbuf(const charbuf& copy)
+        {String::set(buffer, S, copy.buffer);}
+
+    /**
+     * Assign null terminated text to the object.
+     * @param text to assign.
+     */
+    inline void operator=(const char *text)
+        {String::set(buffer, S, text);}
+
+    /**
+     * Concatenate text into the object.  If the text is larger than the
+     * size of the object, then it is truncated.
+     * @param text to append.
+     */
+    inline void operator+=(const char *text)
+        {String::add(buffer, S, text);}
+
+    /**
+     * Test if data is contained in the object.
+     * @return true if there is text.
+     */
+    inline operator bool() const
+        {return buffer[0];}
+
+    /**
+     * Test if the object is empty.
+     * @return true if the object is empty.
+     */
+    inline bool operator!() const
+        {return buffer[0] == 0;}
+
+    /**
+     * Get text by casting reference.
+     * @return pointer to text in object.
+     */
+    inline operator char *()
+        {return buffer;};
+
+    /**
+     * Get text by object pointer reference.
+     * @return pointer to text in object.
+     */
+    inline char *operator*()
+        {return buffer;};
+
+    /**
+     * Array operator to get a character from the object.
+     * @param offset of character in string buffer.
+     * @return character at offset.
+     */
+    inline char& operator[](size_t offset) const
+        {return buffer[offset];}
+
+    /**
+     * Get a pointer to an offset in the object by expression operator.
+     * @param offset of character in string buffer.
+     * @return pointer to offset in object.
+     */
+    inline char *operator()(size_t offset)
+        {return buffer + offset;}
+
+    /**
+     * Get allocated size of the object.
+     * @return allocated size.
+     */
+    inline size_t size(void) const
+        {return S;}
+
+    /**
+     * Get current length of string.
+     * @return length of string.
+     */
+    inline size_t len(void) const
+        {return strlen(buffer);}
+};
+
+/**
+ * A convenience type for string.
+ */
+typedef String string_t;
+
+typedef String::regex stringex_t;
+
+/**
+ * A string class that has a predefined string buffer.  The string class
+ * and buffer are allocated together as one object.  This allows one to use
+ * string objects entirely resident on the local stack as well as on the
+ * heap.  Using a string class on the local stack may be more convenient
+ * than a char array since one can use all the features of the class
+ * including assignment and concatenation which a char buffer cannot as
+ * easily do.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template<strsize_t S>
+class stringbuf : public memstring
+{
+private:
+    char buffer[sizeof(cstring) + S];
+
+public:
+    /**
+     * Create an empty instance of a string buffer.
+     */
+    inline stringbuf() : memstring(buffer, S) {};
+
+    /**
+     * Create a string buffer from a null terminated string.
+     * @param text to place in object.
+     */
+    inline stringbuf(const char *text) : memstring(buffer, S) {set(text);};
+
+    /**
+     * Assign a string buffer from a null terminated string.
+     * @param text to assign to object.
+     */
+    inline void operator=(const char *text)
+        {set(text);};
+
+    /**
+     * Assign a string buffer from another string object.
+     * @param object to assign from.
+     */
+    inline void operator=(String& object)
+        {set(object.c_str());};
+};
+
+#if !defined(_MSWINDOWS_) && !defined(__QNX__)
+
+/**
+ * Convenience function for case insensitive null terminated string compare.
+ * @param string1 to compare.
+ * @param string2 to compare.
+ * @return 0 if equal, > 0 if s2 > s1, < 0 if s2 < s1.
+ */
+extern "C" inline int stricmp(const char *string1, const char *string2)
+    {return String::case_compare(string1, string2);}
+
+/**
+ * Convenience function for case insensitive null terminated string compare.
+ * @param string1 to compare.
+ * @param string2 to compare.
+ * @param max size of string to compare.
+ * @return 0 if equal, > 0 if s2 > s1, < 0 if s2 < s1.
+ */
+extern "C" inline int strnicmp(const char *string1, const char *string2, size_t max)
+    {return String::case_compare(string1, string2, max);}
+
+#endif
+
+/**
+ * Compare two null terminated strings if equal.
+ * @param s1 string to compare.
+ * @param s2 string to compare.
+ * @return true if equal.
+ */
+inline bool eq(char const *s1, char const *s2)
+    {return String::equal(s1, s2);}
+
+inline bool ne(char const *s1, char const *s2)
+    {return !String::equal(s1, s2);}
+
+/**
+ * Compare two null terminated strings if equal up to specified size.
+ * @param s1 string to compare.
+ * @param s2 string to compare.
+ * @param size of string to compare.
+ * @return true if equal.
+ */
+inline bool eq(char const *s1, char const *s2, size_t size)
+    {return String::equal(s1, s2, size);}
+
+inline bool ne(char const *s1, char const *s2, size_t size)
+    {return !String::equal(s1, s2, size);}
+
+/**
+ * Compare two string objects if equal.  The left string is an object,
+ * the right may be an object or converted to a const string.  The
+ * compare virtual method of the left object is used, so we can do
+ * things like collation order or derived class specific sorting.
+ * @param s1 string to compare.
+ * @param s2 string to compare.
+ * @return true if equal.
+ */
+inline bool eq(String &s1, const char *s2)
+    {return s1.compare(s2) == 0;}
+
+inline bool ne(String &s1, String &s2)
+    {return s1.compare(s2) != 0;}
+
+inline bool lt(String &s1, const char *s2)
+    {return s1.compare(s2) < 0;}
+
+inline bool gt(String &s1, const char *s2)
+    {return s1.compare(s2) > 0;}
+
+inline bool le(String &s1, const char *s2)
+    {return s1.compare(s2) <= 0;}
+
+inline bool ge(String &s1, const char *s2)
+    {return s1.compare(s2) >= 0;}
+
+/**
+ * Compare two null terminated strings if equal ignoring case.  This is
+ * related to stricmp or gcc strcasecmp.
+ * @param s1 string to compare.
+ * @param s2 string to compare.
+ * @return true if equal.
+ */
+inline bool eq_case(char const *s1, char const *s2)
+    {return String::eq_case(s1, s2);}
+
+inline bool ne_case(char const *s1, char const *s2)
+    {return !String::eq_case(s1, s2);}
+
+/**
+ * Compare two null terminated strings if equal for a specified size
+ * ignoring case.  This is related to stricmp or gcc strcasecmp.
+ * @param s1 string to compare.
+ * @param s2 string to compare.
+ * @param size of string to compare.
+ * @return true if equal.
+ */
+inline bool eq_case(char const *s1, char const *s2, size_t size)
+    {return String::eq_case(s1, s2, size);}
+
+inline String str(const char *string)
+    {return (String)string;}
+
+inline String str(String& string)
+    {return (String)string;}
+
+inline String str(short value)
+    {String temp(16, "%hd", value); return temp;}
+
+inline String str(unsigned short value)
+    {String temp(16, "%hu", value); return temp;}
+
+inline String str(long value)
+    {String temp(32, "%ld", value); return temp;}
+
+inline String str(unsigned long value)
+    {String temp(32, "%lu", value); return temp;}
+
+inline String str(double value)
+    {String temp(40, "%f", value); return temp;}
+
+String str(CharacterProtocol& cp, strsize_t size);
+
+template<>
+inline void swap<string_t>(string_t& s1, string_t& s2)
+    {String::swap(s1, s2);}
+
+class __EXPORT strdup_t
+{
+private:
+    char *data;
+
+public:
+    inline strdup_t()
+        {data = NULL;}
+
+    inline strdup_t(char *str)
+        {data = str;}
+
+    inline ~strdup_t()
+        {if(data) ::free(data);}
+
+    inline strdup_t& operator=(char *str)
+        {if(data) ::free(data); data = str; return *this;}
+
+    inline operator bool() const
+        {return data != NULL;}
+
+    inline bool operator!() const
+        {return data == NULL;}
+
+    inline operator char*() const
+        {return data;}
+
+    inline const char *c_str(void) const
+        {return data;};
+
+    inline const char *operator*() const
+        {return data;}
+
+    inline char& operator[](int size)
+        {return data[size];}
+
+    inline char *operator+(size_t size)
+        {return data + size;}
+};
+
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/thread.h b/jni/libucommon/sources/inc/ucommon/thread.h
new file mode 100644
index 0000000..b96b1c9
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/thread.h
@@ -0,0 +1,2055 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Thread classes and sychronization objects.
+ * The theory behind ucommon thread classes is that they would be used
+ * to create derived classes where thread-specific data can be stored as
+ * member data of the derived class.  The run method is called when the
+ * context is executed.  Since we use a pthread foundation, we support
+ * both detached threads and joinable threads.  Objects based on detached
+ * threads should be created with new, and will automatically delete when
+ * the thread context exits.  Joinable threads will be joined with deleted.
+ *
+ * The theory behind ucommon sychronization objects is that all upper level
+ * sychronization objects can be formed directly from a mutex and conditional.
+ * This includes semaphores, barriers, rwlock, our own specialized conditional
+ * lock, resource-bound locking, and recurive exclusive locks.  Using only
+ * conditionals means we are not dependent on platform specific pthread
+ * implimentations that may not impliment some of these, and hence improves
+ * portability and consistency.  Given that our rwlocks are recursive access
+ * locks, one can safely create read/write threading pairs where the read
+ * threads need not worry about deadlocks and the writers need not either if
+ * they only write-lock one instance at a time to change state.
+ * @file ucommon/thread.h
+ */
+
+/**
+ * An example of the thread queue class.  This may be relevant to producer-
+ * consumer scenarios and realtime applications where queued messages are
+ * stored on a re-usable object pool.
+ * @example queue.cpp
+ */
+
+/**
+ * A simple example of threading and join operation.
+ * @example thread.cpp
+ */
+
+#ifndef _UCOMMON_THREAD_H_
+#define _UCOMMON_THREAD_H_
+
+#ifndef _UCOMMON_CPR_H_
+#include <ucommon/cpr.h>
+#endif
+
+#ifndef _UCOMMON_ACCESS_H_
+#include <ucommon/access.h>
+#endif
+
+#ifndef _UCOMMON_TIMERS_H_
+#include <ucommon/timers.h>
+#endif
+
+#ifndef _UCOMMON_MEMORY_H_
+#include <ucommon/memory.h>
+#endif
+
+NAMESPACE_UCOMMON
+
+class SharedPointer;
+
+/**
+ * The conditional is a common base for other thread synchronizing classes.
+ * Many of the complex sychronization objects, including barriers, semaphores,
+ * and various forms of read/write locks are all built from the conditional.
+ * This assures that the minimum functionality to build higher order thread
+ * synchronizing objects is a pure conditional, and removes dependencies on
+ * what may be optional features or functions that may have different
+ * behaviors on different pthread implimentations and platforms.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT Conditional
+{
+private:
+    friend class ConditionalAccess;
+
+#if defined(_MSCONDITIONAL_)
+    CRITICAL_SECTION mutex;
+    CONDITION_VARIABLE cond;
+#elif defined(_MSWINDOWS_)
+    enum {SIGNAL = 0, BROADCAST = 1};
+    HANDLE events[2];
+    unsigned waiting;
+    CRITICAL_SECTION mlock;
+    CRITICAL_SECTION mutex;
+#else
+#ifndef __PTH__
+    class __LOCAL attribute
+    {
+    public:
+        pthread_condattr_t attr;
+        attribute();
+    };
+
+    __LOCAL static attribute attr;
+#endif
+
+    pthread_cond_t cond;
+    pthread_mutex_t mutex;
+#endif
+
+protected:
+    friend class TimedEvent;
+
+    /**
+     * Conditional wait for signal on millisecond timeout.
+     * @param timeout in milliseconds.
+     * @return true if signalled, false if timer expired.
+     */
+    bool wait(timeout_t timeout);
+
+    /**
+     * Conditional wait for signal on timespec timeout.
+     * @param timeout as a high resolution timespec.
+     * @return true if signalled, false if timer expired.
+     */
+    bool wait(struct timespec *timeout);
+
+#ifdef  _MSWINDOWS_
+    inline void lock(void)
+        {EnterCriticalSection(&mutex);};
+
+    inline void unlock(void)
+        {LeaveCriticalSection(&mutex);};
+
+    void wait(void);
+    void signal(void);
+    void broadcast(void);
+
+#else
+    /**
+     * Lock the conditional's supporting mutex.
+     */
+    inline void lock(void)
+        {pthread_mutex_lock(&mutex);};
+
+    /**
+     * Unlock the conditional's supporting mutex.
+     */
+    inline void unlock(void)
+        {pthread_mutex_unlock(&mutex);};
+
+    /**
+     * Wait (block) until signalled.
+     */
+    inline void wait(void)
+        {pthread_cond_wait(&cond, &mutex);};
+
+    /**
+     * Signal the conditional to release one waiting thread.
+     */
+    inline void signal(void)
+        {pthread_cond_signal(&cond);};
+
+    /**
+     * Signal the conditional to release all waiting threads.
+     */
+    inline void broadcast(void)
+        {pthread_cond_broadcast(&cond);};
+#endif
+
+    /**
+     * Initialize and construct conditional.
+     */
+    Conditional();
+
+    /**
+     * Destroy conditional, release any blocked threads.
+     */
+    ~Conditional();
+
+public:
+#if !defined(_MSWINDOWS_) && !defined(__PTH__)
+    /**
+     * Support function for getting conditional attributes for realtime
+     * scheduling.
+     * @return attributes to use for creating realtime conditionals.
+     */
+    static inline pthread_condattr_t *initializer(void)
+        {return &attr.attr;};
+#endif
+
+    /**
+     * Convert a millisecond timeout into use for high resolution
+     * conditional timers.
+     * @param hires timespec representation to set.
+     * @param timeout to convert.
+     */
+    static void set(struct timespec *hires, timeout_t timeout);
+};
+
+/**
+ * The conditional rw seperates scheduling for optizming behavior or rw locks.
+ * This varient of conditonal seperates scheduling read (broadcast wakeup) and
+ * write (signal wakeup) based threads.  This is used to form generic rwlock's
+ * as well as the specialized condlock.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT ConditionalAccess : private Conditional
+{
+protected:
+#if defined _MSCONDITIONAL_
+    CONDITION_VARIABLE bcast;
+#elif !defined(_MSWINDOWS_)
+    pthread_cond_t bcast;
+#endif
+
+    unsigned pending, waiting, sharing;
+
+    /**
+     * Conditional wait for signal on millisecond timeout.
+     * @param timeout in milliseconds.
+     * @return true if signalled, false if timer expired.
+     */
+    bool waitSignal(timeout_t timeout);
+
+    /**
+     * Conditional wait for broadcast on millisecond timeout.
+     * @param timeout in milliseconds.
+     * @return true if signalled, false if timer expired.
+     */
+    bool waitBroadcast(timeout_t timeout);
+
+
+    /**
+     * Conditional wait for signal on timespec timeout.
+     * @param timeout as a high resolution timespec.
+     * @return true if signalled, false if timer expired.
+     */
+    bool waitSignal(struct timespec *timeout);
+
+    /**
+     * Conditional wait for broadcast on timespec timeout.
+     * @param timeout as a high resolution timespec.
+     * @return true if signalled, false if timer expired.
+     */
+    bool waitBroadcast(struct timespec *timeout);
+
+    /**
+     * Convert a millisecond timeout into use for high resolution
+     * conditional timers.
+     * @param hires timespec representation to set.
+     * @param timeout to convert.
+     */
+    inline static void set(struct timespec *hires, timeout_t timeout)
+        {Conditional::set(hires, timeout);};
+
+
+#ifdef  _MSWINDOWS_
+    inline void lock(void)
+        {EnterCriticalSection(&mutex);};
+
+    inline void unlock(void)
+        {LeaveCriticalSection(&mutex);};
+
+    void waitSignal(void);
+    void waitBroadcast(void);
+
+    inline void signal(void)
+        {Conditional::signal();};
+
+    inline void broadcast(void)
+        {Conditional::broadcast();};
+
+#else
+    /**
+     * Lock the conditional's supporting mutex.
+     */
+    inline void lock(void)
+        {pthread_mutex_lock(&mutex);};
+
+    /**
+     * Unlock the conditional's supporting mutex.
+     */
+    inline void unlock(void)
+        {pthread_mutex_unlock(&mutex);};
+
+    /**
+     * Wait (block) until signalled.
+     */
+    inline void waitSignal(void)
+        {pthread_cond_wait(&cond, &mutex);};
+
+    /**
+     * Wait (block) until broadcast.
+     */
+    inline void waitBroadcast(void)
+        {pthread_cond_wait(&bcast, &mutex);};
+
+
+    /**
+     * Signal the conditional to release one signalled thread.
+     */
+    inline void signal(void)
+        {pthread_cond_signal(&cond);};
+
+    /**
+     * Signal the conditional to release all broadcast threads.
+     */
+    inline void broadcast(void)
+        {pthread_cond_broadcast(&bcast);};
+#endif
+public:
+    /**
+     * Initialize and construct conditional.
+     */
+    ConditionalAccess();
+
+    /**
+     * Destroy conditional, release any blocked threads.
+     */
+    ~ConditionalAccess();
+
+    /**
+     * Access mode shared thread scheduling.
+     */
+    void access(void);
+
+    /**
+     * Exclusive mode write thread scheduling.
+     */
+    void modify(void);
+
+    /**
+     * Release access mode read scheduling.
+     */
+    void release(void);
+
+    /**
+     * Complete exclusive mode write scheduling.
+     */
+    void commit(void);
+
+    /**
+     * Specify a maximum sharing (access) limit.  This can be used
+     * to detect locking errors, such as when aquiring locks that are
+     * not released.
+     * @param max sharing level.
+     */
+    void limit_sharing(unsigned max);
+};
+
+/**
+ * Event notification to manage scheduled realtime threads.  The timer
+ * is advanced to sleep threads which then wakeup either when the timer
+ * has expired or they are notified through the signal handler.  This can
+ * be used to schedule and signal one-time completion handlers or for time
+ * synchronized events signaled by an asychrononous I/O or event source.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT TimedEvent : public Timer
+{
+private:
+#ifdef _MSWINDOWS_
+    HANDLE event;
+#else
+    pthread_cond_t cond;
+    bool signalled;
+#endif
+    pthread_mutex_t mutex;
+
+protected:
+    /**
+     * Lock the object for wait or to manipulate derived data.  This is
+     * relevant to manipulations in a derived class.
+     */
+    void lock(void);
+
+    /**
+     * Release the object lock after waiting.  This is relevent to
+     * manipulations in a derived class.
+     */
+    void release(void);
+
+    /**
+     * Wait while locked.  This can be used in more complex derived
+     * objects where we are concerned with synchronized access between
+     * the signaling and event thread.  This can be used in place of
+     * wait, but lock and release methods must be used around it.
+     * @return true if time expired.
+     */
+    bool sync(void);
+
+public:
+    /**
+     * Create event handler and timer for timing of events.
+     */
+    TimedEvent(void);
+
+    /**
+     * Create event handler and timer set to trigger a timeout.
+     * @param timeout in milliseconds.
+     */
+    TimedEvent(timeout_t timeout);
+
+    /**
+     * Create event handler and timer set to trigger a timeout.
+     * @param timeout in seconds.
+     */
+    TimedEvent(time_t timeout);
+
+    /**
+     * Destroy timer and release pending events.
+     */
+    ~TimedEvent();
+
+    /**
+     * Signal pending event.  Object may be locked or unlocked.  The
+     * signalling thread may choose to lock and check a condition in
+     * a derived class before signalling.
+     */
+    void signal(void);
+
+    /**
+     * Wait to be signalled or until timer expires.  This is a wrapper for
+     * expire for simple completion events.
+     * @param timeout to wait from last reset.
+     * @return true if signaled, false if timeout.
+     */
+    bool wait(timeout_t timeout);
+
+    /**
+     * A simple wait until triggered.
+     */
+    void wait(void);
+
+    /**
+     * Reset triggered conditional.
+     */
+    void reset(void);
+};
+
+/**
+ * Portable recursive exclusive lock.  This class is built from the
+ * conditional and hence does not require support for non-standard and
+ * platform specific extensions to pthread mutex to support recrusive
+ * style mutex locking.  The exclusive protocol is implimented to support
+ * exclusive_lock referencing.
+ */
+class __EXPORT RecursiveMutex : private Conditional, public ExclusiveAccess
+{
+protected:
+    unsigned waiting;
+    unsigned lockers;
+    pthread_t locker;
+
+    virtual void _lock(void);
+    virtual void _unlock(void);
+
+public:
+    /**
+     * Create rexlock.
+     */
+    RecursiveMutex();
+
+    /**
+     * Acquire or increase locking.
+     */
+    void lock(void);
+
+    /**
+     * Timed lock request.
+     */
+    bool lock(timeout_t timeout);
+
+    /**
+     * Release or decrease locking.
+     */
+    void release(void);
+};
+
+/**
+ * A generic and portable implimentation of Read/Write locking.  This
+ * class impliments classical read/write locking, including "timed" locks.
+ * Support for scheduling threads to avoid writer starvation is also provided
+ * for.  By building read/write locks from a conditional, we make them
+ * available on pthread implimetations and other platforms which do not
+ * normally include optional pthread rwlock's.  We also do not restrict
+ * the number of threads that may use the lock.  Finally, both the exclusive
+ * and shared protocols are implimented to support exclusive_lock and
+ * shared_lock referencing.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT ThreadLock : private ConditionalAccess, public ExclusiveAccess, public SharedAccess
+{
+protected:
+    unsigned writers;
+    pthread_t writeid;
+
+    virtual void _lock(void);
+    virtual void _share(void);
+    virtual void _unlock(void);
+
+public:
+    /**
+     * Guard class to apply scope based access locking to objects.  The rwlock
+     * is located from the rwlock pool rather than contained in the target
+     * object, and the read lock is released when the guard object falls out of
+     * scope.  This is essentially an automation mechanism for mutex::reader.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+    class __EXPORT guard_reader
+    {
+    private:
+        const void *object;
+
+    public:
+        /**
+          * Create an unitialized instance of guard.  Usually used with a
+          * guard = operator.
+          */
+        guard_reader();
+
+        /**
+         * Construct a guard for a specific object.
+         * @param object to guard.
+         */
+        guard_reader(const void *object);
+
+        /**
+         * Release mutex when guard falls out of scope.
+         */
+        ~guard_reader();
+
+        /**
+         * Set guard to mutex lock a new object.  If a lock is currently
+         * held, it is released.
+         * @param object to guard.
+         */
+        void set(const void *object);
+
+        /**
+         * Prematurely release a guard.
+         */
+        void release(void);
+
+        /**
+         * Set guard to read lock a new object.  If a lock is currently
+         * held, it is released.
+         * @param pointer to object to guard.
+         */
+        inline void operator=(const void *pointer)
+            {set(pointer);};
+    };
+
+    /**
+     * Guard class to apply scope based exclusive locking to objects.  The rwlock
+     * is located from the rwlock pool rather than contained in the target
+     * object, and the write lock is released when the guard object falls out of
+     * scope.  This is essentially an automation mechanism for mutex::writer.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+    class __EXPORT guard_writer
+    {
+    private:
+        const void *object;
+
+    public:
+        /**
+          * Create an unitialized instance of guard.  Usually used with a
+          * guard = operator.
+          */
+        guard_writer();
+
+        /**
+         * Construct a guard for a specific object.
+         * @param object to guard.
+         */
+        guard_writer(const void *object);
+
+        /**
+         * Release mutex when guard falls out of scope.
+         */
+        ~guard_writer();
+
+        /**
+         * Set guard to mutex lock a new object.  If a lock is currently
+         * held, it is released.
+         * @param object to guard.
+         */
+        void set(const void *object);
+
+        /**
+         * Prematurely release a guard.
+         */
+        void release(void);
+
+        /**
+         * Set guard to read lock a new object.  If a lock is currently
+         * held, it is released.
+         * @param pointer to object to guard.
+         */
+        inline void operator=(const void *pointer)
+            {set(pointer);};
+    };
+
+    /**
+     * Create an instance of a rwlock.
+     */
+    ThreadLock();
+
+    /**
+     * Request modify (write) access through the lock.
+     * @param timeout in milliseconds to wait for lock.
+     * @return true if locked, false if timeout.
+     */
+    bool modify(timeout_t timeout = Timer::inf);
+
+    /**
+     * Request shared (read) access through the lock.
+     * @param timeout in milliseconds to wait for lock.
+     * @return true if locked, false if timeout.
+     */
+    bool access(timeout_t timeout = Timer::inf);
+
+    /**
+     * Specify hash table size for guard protection.  The default is 1.
+     * This should be called at initialization time from the main thread
+     * of the application before any other threads are created.
+     * @param size of hash table used for guarding.
+     */
+    static void indexing(unsigned size);
+
+    /**
+      * Write protect access to an arbitrary object.  This is like the
+      * protect function of mutex.
+      * @param object to protect.
+      * @param timeout in milliseconds to wait for lock.
+      * @return true if locked, false if timeout.
+      */
+    static bool writer(const void *object, timeout_t timeout = Timer::inf);
+
+    /**
+     * Shared access to an arbitrary object.  This is based on the protect
+     * function of mutex.
+     * @param object to share.
+     * @param timeout in milliseconds to wait for lock.
+     * @return true if shared, false if timeout.
+     */
+    static bool reader(const void *object, timeout_t timeout = Timer::inf);
+
+    /**
+     * Release an arbitrary object that has been protected by a rwlock.
+     * @param object to release.
+     */
+    static void release(const void *object);
+
+    /**
+     * Release the lock.
+     */
+    void release(void);
+};
+
+/**
+ * Class for resource bound memory pools between threads.  This is used to
+ * support a memory pool allocation scheme where a pool of reusable objects
+ * may be allocated, and the pool renewed by releasing objects or back.
+ * When the pool is used up, a pool consuming thread then must wait for
+ * a resource to be freed by another consumer (or timeout).  This class is
+ * not meant to be used directly, but rather to build the synchronizing
+ * control between consumers which might be forced to wait for a resource.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT ReusableAllocator : protected Conditional
+{
+protected:
+    ReusableObject *freelist;
+    unsigned waiting;
+
+    /**
+     * Initialize reusable allocator through a conditional.  Zero free list.
+     */
+    ReusableAllocator();
+
+    /**
+     * Get next reusable object in the pool.
+     * @param object from list.
+     * @return next object.
+     */
+    inline ReusableObject *next(ReusableObject *object)
+        {return object->getNext();};
+
+    /**
+     * Release resuable object
+     * @param object being released.
+     */
+    void release(ReusableObject *object);
+};
+
+/**
+ * An optimized and convertable shared lock.  This is a form of read/write
+ * lock that has been optimized, particularly for shared access.  Support
+ * for scheduling access around writer starvation is also included.  The
+ * other benefits over traditional read/write locks is that the code is
+ * a little lighter, and read (shared) locks can be converted to exclusive
+ * (write) locks to perform brief modify operations and then returned to read
+ * locks, rather than having to release and re-aquire locks to change mode.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT ConditionalLock : protected ConditionalAccess, public SharedAccess
+{
+protected:
+    class Context : public LinkedObject
+    {
+    public:
+        inline Context(LinkedObject **root) : LinkedObject(root) {};
+
+        pthread_t thread;
+        unsigned count;
+    };
+
+    LinkedObject *contexts;
+
+    virtual void _share(void);
+    virtual void _unlock(void);
+
+    Context *getContext(void);
+
+public:
+    /**
+     * Construct conditional lock for default concurrency.
+     */
+    ConditionalLock();
+
+    /**
+     * Destroy conditional lock.
+     */
+    ~ConditionalLock();
+
+    /**
+     * Acquire write (exclusive modify) lock.
+     */
+    void modify(void);
+
+    /**
+     * Commit changes / release a modify lock.
+     */
+    void commit(void);
+
+    /**
+     * Acquire access (shared read) lock.
+     */
+    void access(void);
+
+    /**
+     * Release a shared lock.
+     */
+    void release(void);
+
+    /**
+     * Convert read lock into exclusive (write/modify) access.  Schedule
+     * when other readers sharing.
+     */
+    virtual void exclusive(void);
+
+    /**
+     * Return an exclusive access lock back to share mode.
+     */
+    virtual void share(void);
+};
+
+/**
+ * A portable implimentation of "barrier" thread sychronization.  A barrier
+ * waits until a specified number of threads have all reached the barrier,
+ * and then releases all the threads together.  This implimentation works
+ * regardless of whether the thread library supports barriers since it is
+ * built from conditional.  It also differs in that the number of threads
+ * required can be changed dynamically at runtime, unlike pthread barriers
+ * which, when supported, have a fixed limit defined at creation time.  Since
+ * we use conditionals, another feature we can add is optional support for a
+ * wait with timeout.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT barrier : private Conditional
+{
+private:
+    unsigned count;
+    unsigned waits;
+
+public:
+    /**
+     * Construct a barrier with an initial size.
+     * @param count of threads required.
+     */
+    barrier(unsigned count);
+
+    /**
+     * Destroy barrier and release pending threads.
+     */
+    ~barrier();
+
+    /**
+     * Dynamically alter the number of threads required.  If the size is
+     * set below the currently waiting threads, then the barrier releases.
+     * @param count of threads required.
+     */
+    void set(unsigned count);
+
+    /**
+     * Dynamically increment the number of threads required.
+     */
+    void inc(void);
+
+    /**
+     * Reduce the number of threads required.
+     */
+    void dec(void);
+
+    /**
+     * Alternative prefix form of the same increment operation.
+     * @return the current amount of threads.
+     */
+    unsigned operator++(void);
+
+    unsigned operator--(void);
+
+    /**
+     * Wait at the barrier until the count of threads waiting is reached.
+     */
+    void wait(void);
+
+    /**
+     * Wait at the barrier until either the count of threads waiting is
+     * reached or a timeout has occurred.
+     * @param timeout to wait in milliseconds.
+     * @return true if barrier reached, false if timer expired.
+     */
+    bool wait(timeout_t timeout);
+};
+
+/**
+ * A portable counting semaphore class.  A semaphore will allow threads
+ * to pass through it until the count is reached, and blocks further threads.
+ * Unlike pthread semaphore, our semaphore class supports it's count limit
+ * to be altered during runtime and the use of timed waits.  This class also
+ * implements the shared_lock protocol.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT Semaphore : public SharedAccess, protected Conditional
+{
+protected:
+    unsigned count, waits, used;
+
+    virtual void _share(void);
+    virtual void _unlock(void);
+
+public:
+    /**
+     * Construct a semaphore with an initial count of threads to permit.
+     */
+    Semaphore(unsigned count = 0);
+
+    /**
+     * Wait until the semphore usage count is less than the thread limit.
+     * Increase used count for our thread when unblocked.
+     */
+    void wait(void);
+
+    /**
+     * Wait until the semphore usage count is less than the thread limit.
+     * Increase used count for our thread when unblocked, or return without
+     * changing if timed out.
+     * @param timeout to wait in millseconds.
+     * @return true if success, false if timeout.
+     */
+    bool wait(timeout_t timeout);
+
+    /**
+     * Alter semaphore limit at runtime
+     * @param count of threads to allow.
+     */
+    void set(unsigned count);
+
+    /**
+     * Release the semaphore after waiting for it.
+     */
+    void release(void);
+
+    /**
+     * Convenience operator to wait on a counting semaphore.
+     */
+    inline void operator++(void)
+        {wait();};
+
+    /**
+     * Convenience operator to release a counting semaphore.
+     */
+    inline void operator--(void)
+        {release();};
+};
+
+/**
+ * Generic non-recursive exclusive lock class.  This class also impliments
+ * the exclusive_lock protocol.  In addition, an interface is offered to
+ * support dynamically managed mutexes which are internally pooled.  These
+ * can be used to protect and serialize arbitrary access to memory and
+ * objects on demand.  This offers an advantage over embedding mutexes to
+ * serialize access to individual objects since the maximum number of
+ * mutexes will never be greater than the number of actually running threads
+ * rather than the number of objects being potentially protected.  The
+ * ability to hash the pointer address into an indexed table further optimizes
+ * access by reducing the chance for collisions on the primary index mutex.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT Mutex : public ExclusiveAccess
+{
+protected:
+    pthread_mutex_t mlock;
+
+    virtual void _lock(void);
+    virtual void _unlock(void);
+
+public:
+    /**
+     * Guard class to apply scope based mutex locking to objects.  The mutex
+     * is located from the mutex pool rather than contained in the target
+     * object, and the lock is released when the guard object falls out of
+     * scope.  This is essentially an automation mechanism for mutex::protect.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+    class __EXPORT guard
+    {
+    private:
+        const void *object;
+
+    public:
+        /**
+          * Create an unitialized instance of guard.  Usually used with a
+          * guard = operator.
+          */
+        guard();
+
+        /**
+         * Construct a guard for a specific object.
+         * @param object to guard.
+         */
+        guard(const void *object);
+
+        /**
+         * Release mutex when guard falls out of scope.
+         */
+        ~guard();
+
+        /**
+         * Set guard to mutex lock a new object.  If a lock is currently
+         * held, it is released.
+         * @param object to guard.
+         */
+        void set(const void *object);
+
+        /**
+         * Prematurely release a guard.
+         */
+        void release(void);
+
+        /**
+         * Set guard to mutex lock a new object.  If a lock is currently
+         * held, it is released.
+         * @param pointer to object to guard.
+         */
+        inline void operator=(void *pointer)
+            {set(pointer);};
+    };
+
+
+    /**
+     * Create a mutex lock.
+     */
+    Mutex();
+
+    /**
+     * Destroy mutex lock, release waiting threads.
+     */
+    ~Mutex();
+
+    /**
+     * Acquire mutex lock.  This is a blocking operation.
+     */
+    inline void acquire(void)
+        {pthread_mutex_lock(&mlock);};
+
+    /**
+     * Acquire mutex lock.  This is a blocking operation.
+     */
+    inline void lock(void)
+        {pthread_mutex_lock(&mlock);};
+
+    /**
+     * Release acquired lock.
+     */
+    inline void unlock(void)
+        {pthread_mutex_unlock(&mlock);};
+
+    /**
+     * Release acquired lock.
+     */
+    inline void release(void)
+        {pthread_mutex_unlock(&mlock);};
+
+    /**
+     * Convenience function to acquire os native mutex lock directly.
+     * @param lock to acquire.
+     */
+    inline static void acquire(pthread_mutex_t *lock)
+        {pthread_mutex_lock(lock);};
+
+    /**
+     * Convenience function to release os native mutex lock directly.
+     * @param lock to release.
+     */
+    inline static void release(pthread_mutex_t *lock)
+        {pthread_mutex_unlock(lock);};
+
+    /**
+     * Specify hash table size for guard protection.  The default is 1.
+     * This should be called at initialization time from the main thread
+     * of the application before any other threads are created.
+     * @param size of hash table used for guarding.
+     */
+    static void indexing(unsigned size);
+
+    /**
+     * Specify pointer/object/resource to guard protect.  This uses a
+     * dynamically managed mutex.
+     * @param pointer to protect.
+     */
+    static void protect(const void *pointer);
+
+    /**
+     * Specify a pointer/object/resource to release.
+     * @param pointer to release.
+     */
+    static void release(const void *pointer);
+};
+
+/**
+ * A mutex locked object smart pointer helper class.  This is particularly
+ * useful in referencing objects which will be protected by the mutex
+ * protect function.  When the pointer falls out of scope, the protecting
+ * mutex is also released.  This is meant to be used by the typed
+ * mutex_pointer template.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT auto_protect
+{
+private:
+    // cannot copy...
+    inline auto_protect(const auto_object &pointer) {};
+
+protected:
+    const void *object;
+
+    auto_protect();
+
+public:
+    /**
+     * Construct a protected pointer referencing an existing object.
+     * @param object we point to.
+     */
+    auto_protect(const void *object);
+
+    /**
+     * Delete protected pointer.  When it falls out of scope the associated
+     * mutex is released.
+     */
+    ~auto_protect();
+
+    /**
+     * Manually release the pointer.  This releases the mutex.
+     */
+    void release(void);
+
+    /**
+     * Test if the pointer is not set.
+     * @return true if the pointer is not referencing anything.
+     */
+    inline bool operator!() const
+        {return object == NULL;};
+
+    /**
+     * Test if the pointer is referencing an object.
+     * @return true if the pointer is currently referencing an object.
+     */
+    inline operator bool() const
+        {return object != NULL;};
+
+    /**
+     * Set our pointer to a specific object.  If the pointer currently
+     * references another object, the associated mutex is released.  The
+     * pointer references our new object and that new object is locked.
+     * @param object to assign to.
+     */
+    void operator=(const void *object);
+};
+
+/**
+ * An object pointer that uses mutex to assure thread-safe singleton use.
+ * This class is used to support a threadsafe replacable pointer to a object.
+ * This class is used to form and support the templated locked_pointer class
+ * and used with the locked_release class.  An example of where this might be
+ * used is in config file parsers, where a seperate thread may process and
+ * generate a new config object for new threads to refernce, while the old
+ * configuration continues to be used by a  reference counted instance that
+ * goes away when it falls out of scope.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT LockedPointer
+{
+private:
+    friend class locked_release;
+    pthread_mutex_t mutex;
+    ObjectProtocol *pointer;
+
+protected:
+    /**
+     * Create an instance of a locked pointer.
+     */
+    LockedPointer();
+
+    /**
+     * Replace existing object with a new one for next request.
+     * @param object to register with pointer.
+     */
+    void replace(ObjectProtocol *object);
+
+    /**
+     * Create a duplicate reference counted instance of the current object.
+     * @return duplicate reference counted object.
+     */
+    ObjectProtocol *dup(void);
+
+    /**
+     * Replace existing object through assignment.
+     * @param object to assign.
+     */
+    inline void operator=(ObjectProtocol *object)
+        {replace(object);};
+};
+
+/**
+ * Shared singleton object.  A shared singleton object is a special kind of
+ * object that may be shared by multiple threads but which only one active
+ * instance is allowed to exist.  The shared object is managed by the
+ * templated shared pointer class, and is meant to be inherited as a base
+ * class for the derived shared singleton type.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT SharedObject
+{
+protected:
+    friend class SharedPointer;
+
+    /**
+     * Commit is called when a shared singleton is accepted and replaces
+     * a prior instance managed by a shared pointer.  Commit occurs
+     * when replace is called on the shared pointer, and is assured to
+     * happen only when no threads are accessing either the current
+     * or the prior instance that was previously protected by the pointer.
+     * @param pointer that now holds the object.
+     */
+    virtual void commit(SharedPointer *pointer);
+
+public:
+    /**
+     * Allows inherited virtual.
+     */
+    virtual ~SharedObject();
+};
+
+/**
+ * The shared pointer is used to manage a singleton instance of shared object.
+ * This class is used to support the templated shared_pointer class and the
+ * shared_release class, and is not meant to be used directly or as a base
+ * for anything else.  One or more threads may aquire a shared lock to the
+ * singleton object through this pointer, and it can only be replaced with a
+ * new singleton instance when no threads reference it.  The conditional lock
+ * is used to manage shared access for use and exclusive access when modified.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT SharedPointer : protected ConditionalAccess
+{
+private:
+    friend class shared_release;
+    SharedObject *pointer;
+
+protected:
+    /**
+     * Created shared locking for pointer.  Must be assigned by replace.
+     */
+    SharedPointer();
+
+    /**
+     * Destroy lock and release any blocked threads.
+     */
+    ~SharedPointer();
+
+    /**
+     * Replace existing singleton instance with new one.  This happens
+     * during exclusive locking, and the commit method of the object
+     * will be called.
+     * @param object being set.
+     */
+    void replace(SharedObject *object);
+
+    /**
+     * Acquire a shared reference to the singleton object.  This is a
+     * form of shared access lock.  Derived classes and templates access
+     * "release" when the shared pointer is no longer needed.
+     * @return shared object.
+     */
+    SharedObject *share(void);
+};
+
+/**
+ * An abstract class for defining classes that operate as a thread.  A derived
+ * thread class has a run method that is invoked with the newly created
+ * thread context, and can use the derived object to store all member data
+ * that needs to be associated with that context.  This means the derived
+ * object can safely hold thread-specific data that is managed with the life
+ * of the object, rather than having to use the clumsy thread-specific data
+ * management and access functions found in thread support libraries.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT Thread
+{
+protected:
+// may be used in future if we need cancelable threads...
+#ifdef  _MSWINDOWS_
+    HANDLE cancellor;
+#else
+    void *cancellor;
+#endif
+
+    enum {} reserved;   // cancel mode?
+    pthread_t tid;
+    size_t stack;
+    int priority;
+
+    /**
+     * Create a thread object that will have a preset stack size.  If 0
+     * is used, then the stack size is os defined/default.
+     * @param stack size to use or 0 for default.
+     */
+    Thread(size_t stack = 0);
+
+    /**
+     * Map thread for get method.  This should be called from start of the
+     * run() method of a derived class.
+     */
+    void map(void);
+
+    /**
+     * Check if running.
+     */
+    virtual bool is_active(void);
+
+public:
+    /**
+     * Set thread priority without disrupting scheduling if possible.
+     * Based on scheduling policy.  It is recommended that the process
+     * is set for realtime scheduling, and this method is actually for
+     * internal use.
+     */
+    void setPriority(void);
+
+    /**
+     * Yield execution context of the current thread. This is a static
+     * and may be used anywhere.
+     */
+    static void yield(void);
+
+    /**
+     * Sleep current thread for a specified time period.
+     * @param timeout to sleep for in milliseconds.
+     */
+    static void sleep(timeout_t timeout);
+
+    /**
+     * Get mapped thread object.  This returns the mapped base class of the
+     * thread object of the current executing context.  You will need to
+     * cast to the correct derived class to access derived thread-specific
+     * storage.  If the current thread context is not mapped NULL is returned.
+     */
+    static Thread *get(void);
+
+    /**
+     * Abstract interface for thread context run method.
+     */
+    virtual void run(void) = 0;
+
+    /**
+     * Destroy thread object, thread-specific data, and execution context.
+     */
+    virtual ~Thread();
+
+    /**
+     * Exit the thread context.  This function should NO LONGER be called
+     * directly to exit a running thread.  Instead this method will only be
+     * used to modify the behavior of the thread context at thread exit,
+     * including detached threads which by default delete themselves.  This
+     * documented usage was changed to support Mozilla NSPR exit behavior
+     * in case we support NSPR as an alternate thread runtime in the future.
+     */
+    virtual void exit(void);
+
+    /**
+     * Used to initialize threading library.  May be needed for some platforms.
+     */
+    static void init(void);
+
+    /**
+     * Used to specify scheduling policy for threads above priority "0".
+     * Normally we apply static realtime policy SCHED_FIFO (default) or
+     * SCHED_RR.  However, we could apply SCHED_OTHER, etc.
+     */
+    static void policy(int polid);
+
+    /**
+     * Set concurrency level of process.  This is essentially a portable
+     * wrapper for pthread_setconcurrency.
+     */
+    static void concurrency(int level);
+
+    /**
+     * Determine if two thread identifiers refer to the same thread.
+     * @param thread1 to test.
+     * @param thread2 to test.
+     * @return true if both are the same context.
+     */
+    static bool equal(pthread_t thread1, pthread_t thread2);
+
+    /**
+     * Get current thread id.
+     * @return thread id.
+     */
+    static pthread_t self(void);
+
+    inline operator bool()
+        {return is_active();}
+
+    inline bool operator!()
+        {return !is_active();}
+
+    inline bool isRunning(void)
+        {return is_active();}
+};
+
+/**
+ * A child thread object that may be joined by parent.  A child thread is
+ * a type of thread in which the parent thread (or process main thread) can
+ * then wait for the child thread to complete and then delete the child object.
+ * The parent thread can wait for the child thread to complete either by
+ * calling join, or performing a "delete" of the derived child object.  In
+ * either case the parent thread will suspend execution until the child thread
+ * exits.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT JoinableThread : public Thread
+{
+protected:
+#ifdef  _MSWINDOWS_
+    HANDLE running;
+#else
+    volatile bool running;
+#endif
+    volatile bool joining;
+
+    /**
+     * Create a joinable thread with a known context stack size.
+     * @param size of stack for thread context or 0 for default.
+     */
+    JoinableThread(size_t size = 0);
+
+    /**
+     * Delete child thread.  Parent thread suspends until child thread
+     * run method completes or child thread calls it's exit method.
+     */
+    virtual ~JoinableThread();
+
+    /**
+     * Join thread with parent.  Calling from a child thread to exit is
+     * now depreciated behavior and in the future will not be supported.
+     * Threads should always return through their run() method.
+     */
+    void join(void);
+
+    bool is_active(void);
+
+    virtual void run(void) = 0;
+
+public:
+
+    /**
+     * Start execution of child context.  This must be called after the
+     * child object is created (perhaps with "new") and before it can be
+     * joined.  This method actually begins the new thread context, which
+     * then calls the object's run method.  Optionally raise the priority
+     * of the thread when it starts under realtime priority.
+     * @param priority of child thread.
+     */
+    void start(int priority = 0);
+
+    /**
+     * Start execution of child context as background thread.  This is
+     * assumed to be off main thread, with a priority lowered by one.
+     */
+    inline void background(void)
+        {start(-1);};
+};
+
+/**
+ * A detached thread object that is stand-alone.  This object has no
+ * relationship with any other running thread instance will be automatically
+ * deleted when the running thread instance exits, either by it's run method
+ * exiting, or explicity calling the exit member function.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT DetachedThread : public Thread
+{
+protected:
+    bool active;
+
+    /**
+     * Create a detached thread with a known context stack size.
+     * @param size of stack for thread context or 0 for default.
+     */
+    DetachedThread(size_t size = 0);
+
+    /**
+     * Destroys object when thread context exits.  Never externally
+     * deleted.  Derived object may also have destructor to clean up
+     * thread-specific member data.
+     */
+    ~DetachedThread();
+
+    /**
+     * Exit context of detached thread.  Thread object will be deleted.
+     * This function should NO LONGER be called directly to exit a running
+     * thread.  Instead, the thread should only "return" through the run()
+     * method to exit.  The documented usage was changed so that exit() can
+     * still be used to modify the "delete this" behavior of detached threads
+     * while merging thread exit behavior with Mozilla NSPR.
+     */
+    void exit(void);
+
+    bool is_active(void);
+
+    virtual void run(void) = 0;
+
+public:
+    /**
+     * Start execution of detached context.  This must be called after the
+     * object is created (perhaps with "new"). This method actually begins
+     * the new thread context, which then calls the object's run method.
+     * @param priority to start thread with.
+     */
+    void start(int priority = 0);
+};
+
+/**
+ * Auto-pointer support class for locked objects.  This is used as a base
+ * class for the templated locked_instance class that uses the managed
+ * LockedPointer to assign a reference to an object.  When the locked
+ * instance falls out of scope, the object is derefenced.  Ideally the
+ * pointer typed object should be based on the reference counted object class.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT locked_release
+{
+protected:
+    ObjectProtocol *object; /**< locked object protected by locked_release */
+
+    /**
+     * Create an unassigned locked object pointer base.
+     */
+    locked_release();
+
+    /**
+     * Construct a locked object instance base from an existing instance.  This
+     * will create a duplicate (retained) reference.
+     * @param object to copy from.
+     */
+    locked_release(const locked_release &object);
+
+public:
+    /**
+     * Construct a locked object instance base from a LockedPointer.  References
+     * a retained instance of the underlying object from the LockedPointer.
+     * @param pointer of locked pointer to assign from.
+     */
+    locked_release(LockedPointer &pointer);
+
+    /**
+     * Auto-release pointer to locked object instance.  This is used to release
+     * a reference when the pointer template falls out of scope.
+     */
+    ~locked_release();
+
+    /**
+     * Manually release the object reference.
+     */
+    void release(void);
+
+    /**
+     * Assign a locked object pointer.  If an existing object is already
+     * assigned, the existing pointer is released.
+     * @param pointer reference through locked object.
+     */
+    locked_release &operator=(LockedPointer &pointer);
+};
+
+/**
+ * Auto-pointer support class for shared singleton objects.  This is used as
+ * a base class for the templated shared_instance class that uses shared
+ * access locking through the SharedPointer class.  When the shared instance
+ * falls out of scope, the SharedPointer lock is released.  The pointer
+ * typed object must be based on the SharedObject class.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+
+class __EXPORT shared_release
+{
+protected:
+    SharedPointer *ptr; /**< Shared lock for protected singleton */
+
+    /**
+     * Create an unassigned shared singleton object pointer base.
+     */
+    shared_release();
+
+    /**
+     * Construct a shared object instance base from an existing instance.  This
+     * will assign an additional shared lock.
+     * @param object to copy from.
+     */
+    shared_release(const shared_release &object);
+
+public:
+    /**
+     * Access lock a shared singleton instance from a SharedPointer.
+     * @param pointer of shared pointer to assign from.
+     */
+    shared_release(SharedPointer &pointer);
+
+    /**
+     * Auto-unlock shared lock for singleton instance protected by shared
+     * pointer.  This is used to unlock when the instance template falls out
+     * of scope.
+     */
+    ~shared_release();
+
+    /**
+     * Manually release access to shared singleton object.
+     */
+    void release(void);
+
+    /**
+     * Get pointer to singleton object that we have shared lock for.
+     * @return shared object singleton.
+     */
+    SharedObject *get(void);
+
+    /**
+     * Assign shared lock access to shared singleton.  If an existing
+     * shared lock is held for another pointer, it is released.
+     * @param pointer access for shared object.
+     */
+    shared_release &operator=(SharedPointer &pointer);
+};
+
+/**
+ * Templated shared pointer for singleton shared objects of specific type.
+ * This is used as typed template for the SharedPointer object reference
+ * management class.  This is used to supply a typed singleton shared
+ * instance to the typed shared_instance template class.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template<class T>
+class shared_pointer : public SharedPointer
+{
+public:
+    /**
+     * Created shared locking for typed singleton pointer.
+     */
+    inline shared_pointer() : SharedPointer() {};
+
+    /**
+     * Acquire a shared (duplocate) reference to the typed singleton object.
+     * This is a form of shared access lock.  Derived classes and templates
+     * access conditionallock "release" when the shared pointer is no longer
+     * needed.
+     * @return typed shared object.
+     */
+    inline const T *dup(void)
+        {return static_cast<const T*>(SharedPointer::share());};
+
+    /**
+     * Replace existing typed singleton instance with new one.  This happens
+     * during exclusive locking, and the commit method of the typed object
+     * will be called.
+     * @param object being set.
+     */
+    inline void replace(T *object)
+        {SharedPointer::replace(object);};
+
+    /**
+     * Replace existing typed singleton object through assignment.
+     * @param object to assign.
+     */
+    inline void operator=(T *object)
+        {replace(object);};
+
+    /**
+     * Access shared lock typed singleton object by pointer reference.
+     * @return typed shared object.
+     */
+    inline T *operator*()
+        {return dup();};
+};
+
+/**
+ * Templated locked pointer for referencing locked objects of specific type.
+ * This is used as typed template for the LockedPointer object reference
+ * management class.  This is used to supply a typed locked instances
+ * to the typed locked_instance template class.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template<class T>
+class locked_pointer : public LockedPointer
+{
+public:
+    /**
+     * Create an instance of a typed locked pointer.
+     */
+    inline locked_pointer() : LockedPointer() {};
+
+    /**
+     * Create a duplicate reference counted instance of the current typed
+     * object.
+     * @return duplicate reference counted typed object.
+     */
+    inline T* dup(void)
+        {return static_cast<T *>(LockedPointer::dup());};
+
+    /**
+     * Replace existing typed object with a new one for next request.
+     * @param object to register with pointer.
+     */
+    inline void replace(T *object)
+        {LockedPointer::replace(object);};
+
+    /**
+     * Replace existing object through assignment.
+     * @param object to assign.
+     */
+    inline void operator=(T *object)
+        {replace(object);};
+
+    /**
+     * Create a duplicate reference counted instance of the current typed
+     * object by pointer reference.
+     * @return duplicate reference counted typed object.
+     */
+    inline T *operator*()
+        {return dup();};
+};
+
+/**
+ * A templated smart pointer instance for lock protected objects.
+ * This is used to reference an instance of a typed locked_pointer.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template<class T>
+class locked_instance : public locked_release
+{
+public:
+    /**
+     * Construct empty locked instance of typed object.
+     */
+    inline locked_instance() : locked_release() {};
+
+    /**
+     * Construct locked instance of typed object from matching locked_pointer.
+     * @param pointer to get instance from.
+     */
+    inline locked_instance(locked_pointer<T> &pointer) : locked_release(pointer) {};
+
+    /**
+     * Extract instance of locked typed object by pointer reference.
+     * @return instance of typed object.
+     */
+    inline T& operator*() const
+        {return *(static_cast<T&>(object));};
+
+    /**
+     * Access member of instance of locked typed object by member reference.
+     * @return instance of typed object.
+     */
+    inline T* operator->() const
+        {return static_cast<T*>(object);};
+
+    /**
+     * Get pointer to instance of locked typed object.
+     * @return instance of typed object.
+     */
+    inline T* get(void) const
+        {return static_cast<T*>(object);};
+};
+
+/**
+ * A templated smart pointer instance for shared singleton typed objects.
+ * This is used to access the shared lock instance of the singleton.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template<class T>
+class shared_instance : public shared_release
+{
+public:
+    /**
+     * Construct empty instance to reference shared typed singleton.
+     */
+    inline shared_instance() : shared_release() {};
+
+    /**
+     * Construct shared access instance of shared typed singleton from matching
+     * shared_pointer.
+     * @param pointer to get instance from.
+     */
+    inline shared_instance(shared_pointer<T> &pointer) : shared_release(pointer) {};
+
+    /**
+     * Access shared typed singleton object this instance locks and references.
+     */
+    inline const T& operator*() const
+        {return *(static_cast<const T&>(ptr->pointer));};
+
+    /**
+     * Access member of shared typed singleton object this instance locks and
+     * references.
+     */
+    inline const T* operator->() const
+        {return static_cast<const T*>(ptr->pointer);};
+
+    /**
+     * Access pointer to typed singleton object this instance locks and
+     * references.
+     */
+    inline const T* get(void) const
+        {return static_cast<const T*>(ptr->pointer);};
+};
+
+/**
+ * Typed smart locked pointer class.  This is used to manage references to
+ * objects which are protected by an auto-generated mutex.  The mutex is
+ * released when the pointer falls out of scope.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <class T>
+class mutex_pointer : public auto_protect
+{
+public:
+    /**
+     * Create a pointer with no reference.
+     */
+    inline mutex_pointer() : auto_protect() {};
+
+    /**
+     * Create a pointer with a reference to a heap object.
+     * @param object we are referencing.
+     */
+    inline mutex_pointer(T* object) : auto_protect(object) {};
+
+    /**
+     * Reference object we are pointing to through pointer indirection.
+     * @return object we are pointing to.
+     */
+    inline T& operator*() const
+        {return *(static_cast<T&>(auto_protect::object));};
+
+    /**
+     * Reference member of object we are pointing to.
+     * @return reference to member of pointed object.
+     */
+    inline T* operator->() const
+        {return static_cast<T*>(auto_protect::object);};
+
+    /**
+     * Get pointer to object.
+     * @return pointer or NULL if we are not referencing an object.
+     */
+    inline T* get(void) const
+        {return static_cast<T*>(auto_protect::object);};
+};
+
+/**
+ * Convenience function to start a joinable thread.
+ * @param thread to start.
+ * @param priority of thread.
+ */
+inline void start(JoinableThread *thread, int priority = 0)
+    {thread->start(priority);}
+
+/**
+ * Convenience function to start a detached thread.
+ * @param thread to start.
+ * @param priority of thread.
+ */
+inline void start(DetachedThread *thread, int priority = 0)
+    {thread->start(priority);}
+
+/**
+ * Convenience type for using conditional locks.
+ */
+typedef ConditionalLock condlock_t;
+
+/**
+ * Convenience type for scheduling access.
+ */
+typedef ConditionalAccess accesslock_t;
+
+/**
+ * Convenience type for using timed events.
+ */
+typedef TimedEvent timedevent_t;
+
+/**
+ * Convenience type for using exclusive mutex locks.
+ */
+typedef Mutex mutex_t;
+
+/**
+ * Convenience type for using read/write locks.
+ */
+typedef ThreadLock rwlock_t;
+
+/**
+ * Convenience type for using recursive exclusive locks.
+ */
+typedef RecursiveMutex rexlock_t;
+
+/**
+ * Convenience type for using counting semaphores.
+ */
+typedef Semaphore semaphore_t;
+
+/**
+ * Convenience type for using thread barriers.
+ */
+typedef barrier barrier_t;
+
+/**
+ * Convenience function to wait on a barrier.
+ * @param barrier to wait.
+ */
+inline void wait(barrier_t &barrier)
+    {barrier.wait();}
+
+/**
+ * Convenience function to wait on a semaphore.
+ * @param semaphore to wait on.
+ * @param timeout to wait for.
+ */
+inline void wait(semaphore_t &semaphore, timeout_t timeout = Timer::inf)
+    {semaphore.wait(timeout);}
+
+/**
+ * Convenience function to release a semaphore.
+ * @param semaphore to release.
+ */
+inline void release(semaphore_t &semaphore)
+    {semaphore.release();}
+
+/**
+ * Convenience function to acquire a mutex.
+ * @param mutex to acquire.
+ */
+inline void acquire(mutex_t &mutex)
+    {mutex.lock();}
+
+/**
+ * Convenience function to release a mutex.
+ * @param mutex to release.
+ */
+inline void release(mutex_t &mutex)
+    {mutex.release();}
+
+/**
+ * Convenience function to exclusively schedule conditional access.
+ * @param lock to make exclusive.
+ */
+inline void modify(accesslock_t &lock)
+    {lock.modify();}
+
+/**
+ * Convenience function to shared read schedule conditional access.
+ * @param lock to access shared.
+ */
+inline void access(accesslock_t &lock)
+    {lock.access();}
+
+/**
+ * Convenience function to release an access lock.
+ * @param lock to release.
+ */
+inline void release(accesslock_t &lock)
+    {lock.release();}
+
+/**
+ * Convenience function to commit an exclusive access lock.
+ * lock.
+ * @param lock to commit.
+ */
+inline void commit(accesslock_t &lock)
+    {lock.commit();}
+
+/**
+ * Convenience function to exclusively lock shared conditional lock.
+ * @param lock to make exclusive.
+ */
+inline void exclusive(condlock_t &lock)
+    {lock.exclusive();}
+
+/**
+ * Convenience function to restore shared access on a conditional lock.
+ * @param lock to make shared.
+ */
+inline void share(condlock_t &lock)
+    {lock.share();}
+
+/**
+ * Convenience function to exclusively aquire a conditional lock.
+ * @param lock to acquire for modify.
+ */
+inline void modify(condlock_t &lock)
+    {lock.modify();}
+
+/**
+ * Convenience function to commit and release an exclusively locked conditional
+ * lock.
+ * @param lock to commit.
+ */
+inline void commit(condlock_t &lock)
+    {lock.commit();}
+
+/**
+ * Convenience function for shared access to a conditional lock.
+ * @param lock to access.
+ */
+inline void access(condlock_t &lock)
+    {lock.access();}
+
+/**
+ * Convenience function to release shared access to a conditional lock.
+ * @param lock to release.
+ */
+inline void release(condlock_t &lock)
+    {lock.release();}
+
+/**
+ * Convenience function for exclusive write access to a read/write lock.
+ * @param lock to write lock.
+ * @param timeout to wait for exclusive locking.
+ */
+inline bool exclusive(rwlock_t &lock, timeout_t timeout = Timer::inf)
+    {return lock.modify(timeout);}
+
+/**
+ * Convenience function for shared read access to a read/write lock.
+ * @param lock to share read lock.
+ * @param timeout to wait for shared access.
+ */
+inline bool share(rwlock_t &lock, timeout_t timeout = Timer::inf)
+    {return lock.access(timeout);}
+
+/**
+ * Convenience function to release a shared lock.
+ * @param lock to release.
+ */
+inline void release(rwlock_t &lock)
+    {lock.release();}
+
+/**
+ * Convenience function to lock a shared recursive mutex lock.
+ * @param lock to acquire.
+ */
+inline void lock(rexlock_t &lock)
+    {lock.lock();}
+
+/**
+ * Convenience function to release a shared recursive mutex lock.
+ * @param lock to release.
+ */
+inline void release(rexlock_t &lock)
+    {lock.release();}
+
+inline bool _sync_protect_(const void *obj)
+{
+    Mutex::protect(obj);
+    return true;
+}
+
+inline bool _sync_release_(const void *obj)
+{
+    Mutex::release(obj);
+    return false;
+}
+
+inline bool _rw_reader_(const void *obj)
+{
+    ThreadLock::reader(obj);
+    return true;
+}
+
+inline bool _rw_writer_(const void *obj)
+{
+    ThreadLock::writer(obj);
+    return true;
+}
+
+inline bool _rw_release_(const void *obj)
+{
+    ThreadLock::release(obj);
+    return false;
+}
+
+#define ENTER_EXCLUSIVE \
+    do { static pthread_mutex_t __sync__ = PTHREAD_MUTEX_INITIALIZER; \
+        pthread_mutex_lock(&__sync__);
+
+#define LEAVE_EXCLUSIVE \
+    pthread_mutex_unlock(&__sync__);} while(0);
+
+#define SYNC(obj) for(bool _sync_flag_ = _sync_protect_(obj); _sync_flag_; _sync_flag_ = _sync_release_(obj))
+
+#define SHARED(obj) for(bool _sync_flag_ = _rw_reader_(obj); _sync_flag_; _sync_flag_ = _rw_release_(obj))
+
+#define EXCLUSIVE(obj) for(bool _sync_flag_ = _rw_writer_(obj); _sync_flag_; _sync_flag_ = _rw_release_(obj))
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/timers.h b/jni/libucommon/sources/inc/ucommon/timers.h
new file mode 100644
index 0000000..8208460
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/timers.h
@@ -0,0 +1,427 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Realtime timers and timer queues.
+ * This offers ucommon support for realtime high-resolution threadsafe
+ * timers and timer queues.  Threads may be scheduled by timers and timer
+ * queues may be used to inject timer events into callback objects or through
+ * virtuals.
+ * @file ucommon/timers.h
+ */
+
+#ifndef _UCOMMON_TIMERS_H_
+#define _UCOMMON_TIMERS_H_
+
+#ifndef _UCOMMON_LINKED_H_
+#include <ucommon/linked.h>
+#endif
+
+#ifndef _MSWINDOWS_
+#include <unistd.h>
+#include <sys/time.h>
+#endif
+
+#include <time.h>
+
+NAMESPACE_UCOMMON
+
+/**
+ * Timer class to use when scheduling realtime events.  The timer generally
+ * uses millisecond values but has a microsecond accuracy.  On platforms that
+ * support it, the timer uses posix realtime monotonic clock extensions,
+ * otherwise lower accuracy timer systems might be used.
+ */
+class __EXPORT Timer
+{
+private:
+    friend class Conditional;
+    friend class Semaphore;
+    friend class Event;
+
+#if _POSIX_TIMERS > 0 && defined(POSIX_TIMERS)
+    timespec timer;
+#else
+#undef  POSIX_TIMERS    // make sure not used if no support
+    timeval timer;
+#endif
+    bool updated;
+
+protected:
+    /**
+     * Check if timer has been updated since last check.
+     * @return true if updated.
+     */
+    bool update(void);
+
+    /**
+     * Check if timer active.
+     * @return true if active.
+     */
+    bool is_active(void);
+
+public:
+#if _MSC_VER > 1400        // windows broken dll linkage issue...
+    static const timeout_t inf = ((timeout_t)(-1));
+    static const time_t reset = ((time_t)(0));
+#else
+    static const timeout_t inf; /**< A value to use for infinite time */
+    static const time_t reset;  /**< A value to use when resetting */
+#endif
+
+#ifdef  _MSWINDOWS_
+    typedef unsigned __int64 tick_t;
+#else
+    typedef uint64_t tick_t;
+#endif
+
+    /**
+     * Construct an untriggered timer set to the time of creation.
+     */
+    Timer();
+
+    /**
+     * Construct a triggered timer that expires at specified offset.
+     * @param offset to expire in milliseconds.
+     */
+    Timer(timeout_t offset);
+
+    /**
+     * Construct a triggered timer that expires at specified offset.
+     * @param offset to expire in seconds.
+     */
+    Timer(time_t offset);
+
+    /**
+     * Construct a timer from a copy of another timer.
+     * @param copy of timer to construct from.
+     */
+    Timer(const Timer& copy);
+
+    /**
+     * Set the timer to expire.
+     * @param expire time in milliseconds.
+     */
+    void set(timeout_t expire);
+
+    /**
+     * Set the timer to expire.
+     * @param expire time in seconds.
+     */
+    void set(time_t expire);
+
+    /**
+     * Set (update) the timer with current time.
+     */
+    void set(void);
+
+    /**
+     * Clear pending timer, has no value.
+     */
+    void clear(void);
+
+    /**
+     * Get remaining time until the timer expires.
+     * @return 0 if expired or milliseconds still waiting.
+     */
+    timeout_t get(void) const;
+
+    /**
+     * Get remaining time until timer expires by reference.
+     * @return 0 if expired or milliseconds still waiting.
+     */
+    inline timeout_t operator*() const
+        {return get();};
+
+    /**
+     * Check if timer has expired.
+     * @return true if timer still pending.
+     */
+    bool operator!() const;
+
+    /**
+     * Check if timer expired for is() expression.
+     * @return true if timer expired.
+     */
+    operator bool() const;
+
+    /**
+     * Set timer expiration.
+     * @param expire timer in specified seconds.
+     */
+    Timer& operator=(time_t expire);
+
+    /**
+     * Set timer expiration.
+     * @param expire timer in milliseconds.
+     */
+    Timer& operator=(timeout_t expire);
+
+    /**
+     * Adjust timer expiration.
+     * @param expire time to add in seconds.
+     */
+    Timer& operator+=(time_t expire);
+
+    /**
+     * Adjust timer expiration.
+     * @param expire time to add in milliseconds.
+     */
+    Timer& operator+=(timeout_t expire);
+
+    /**
+     * Adjust timer expiration.
+     * @param expire time to subtract in seconds.
+     */
+    Timer& operator-=(time_t expire);
+
+    /**
+     * Adjust timer expiration.
+     * @param expire time to subtract in milliseconds.
+     */
+    Timer& operator-=(timeout_t expire);
+
+    /**
+     * Compute difference between two timers.
+     * @param timer to use for difference.
+     * @return difference in milliseconds.
+     */
+    timeout_t operator-(const Timer& timer);
+
+    /**
+     * Compare timers if same timeout.
+     * @param timer to compare with.
+     * @return true if same.
+     */
+    bool operator==(const Timer& timer) const;
+
+    /**
+     * Compare timers if not same timeout.
+     * @param timer to compare with.
+     * @return true if not same.
+     */
+    bool operator!=(const Timer& timer) const;
+
+    /**
+     * Compare timers if earlier timeout than another timer.
+     * @param timer to compare with.
+     * @return true if earlier.
+     */
+    bool operator<(const Timer& timer) const;
+
+    /**
+     * Compare timers if earlier than or equal to another timer.
+     * @param timer to compare with.
+     * @return true if earlier or same.
+     */
+    bool operator<=(const Timer& timer) const;
+
+    /**
+     * Compare timers if later timeout than another timer.
+     * @param timer to compare with.
+     * @return true if later.
+     */
+    bool operator>(const Timer& timer) const;
+
+    /**
+     * Compare timers if later than or equal to another timer.
+     * @param timer to compare with.
+     * @return true if later or same.
+     */
+    bool operator>=(const Timer& timer) const;
+
+    /**
+     * Sleep current thread until the specified timer expires.
+     * @param timer to reference for sleep.
+     */
+    static void sync(Timer &timer);
+
+    /**
+     * Get timer ticks since uuid epoch.
+     * @return timer ticks in 100ns resolution.
+     */
+    static tick_t ticks(void);
+};
+
+/**
+ * A timer queue for timer events.  The timer queue is used to hold a
+ * linked list of timers that must be processed together.  The timer
+ * queue processes the timer event list and calls an expired function
+ * on events that have expired.  The timer queue also determines the
+ * wait time until the next timer will expire.  When timer events are
+ * modified, they can retrigger the queue to re-examine the list to
+ * find when the next timer will now expire.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT TimerQueue : public OrderedIndex
+{
+public:
+    /**
+     * A timer event object that lives on a timer queue.  Timer events are
+     * triggered through the timer queue's expire method.  Timer events
+     * also modify the queue when they are changed, particularly to force
+     * re-evaluation of the expiration period.  This class is not used by
+     * itself but rather as a base class for a timer event object.
+     * @author David Sugar <dyfet@gnutelephony.org>
+     */
+    class __EXPORT event : protected Timer, public LinkedList
+    {
+    protected:
+        friend class TimerQueue;
+
+        /**
+         * Construct a timer event object and initially arm.
+         * @param expire timer in specified milliseconds.
+         */
+        event(timeout_t expire);
+
+        /**
+         * Construct an armed timer event object and attach to queue.
+         * @param queue to add event to.
+         * @param expire timer in specified milliseconds.
+         */
+        event(TimerQueue *queue, timeout_t expire);
+
+        /**
+         * Event method to call in derived class when timer expires.
+         */
+        virtual void expired(void) = 0;
+
+        /**
+         * Expected next timeout for the timer.  This may be overriden
+         * for strategy purposes when evaluted by timer queue's expire.
+         * @return milliseconds until timer next triggers.
+         */
+        virtual timeout_t timeout(void);
+
+    public:
+        /**
+         * Detaches from queue when destroyed.
+         */
+        virtual ~event();
+
+        /**
+         * Attach event to a timer queue.  Detaches from previous list if
+         * already attached elsewhere.
+         * @param queue to attach to.
+         */
+        void attach(TimerQueue *queue);
+
+        /**
+         * Detach event from a timer queue.
+         */
+        void detach(void);
+
+        /**
+         * Arm event to trigger at specified timeout.
+         * @param timeout to expire and trigger.
+         */
+        void arm(timeout_t timeout);
+
+        /**
+         * Disarm event.
+         */
+        void disarm(void);
+
+        /**
+         * Time remaining until expired.
+         * @return milliseconds until timer expires.
+         */
+        inline timeout_t get(void) const
+            {return Timer::get();};
+
+        /**
+         * Notify timer queue that the timer has been updated.
+         */
+        void update(void);
+
+        /**
+         * Get the timer queue we are attached to.
+         * @return timer queue or NULL if not attached.
+         */
+        inline TimerQueue *list(void)
+            {return static_cast<TimerQueue*>(Root);};
+    };
+
+protected:
+    friend class event;
+
+    /**
+     * Called in derived class when the queue is being modified.
+     * This is often used to lock the list.
+     */
+    virtual void modify(void) = 0;
+
+    /**
+     * Called in derived class after the queue has been modified.  This often
+     * releases a lock that modify set and to wakeup a timer thread to
+     * evaluate when the next timer will now expire.
+     */
+    virtual void update(void) = 0;
+
+public:
+    /**
+     * Create an empty timer queue.
+     */
+    TimerQueue();
+
+    /**
+     * Destroy queue, does not remove event objects.
+     */
+    virtual ~TimerQueue();
+
+    /**
+     * Add a timer event to the timer queue.
+     * @param timer event to add.
+     */
+    void operator+=(event &timer);
+
+    /**
+     * Remove a timer event from the timer queue.
+     * @param timer event to remove.
+     */
+    void operator-=(event &timer);
+
+    /**
+     * Process timer queue and find when next event triggers.  This function
+     * will call the expired methods on expired timers.  Normally this function
+     * will be called in the context of a timer thread which sleeps for the
+     * timeout returned unless it is awoken on an update event.
+     * @return timeout until next timer expires in milliseconds.
+     */
+    timeout_t expire();
+};
+
+/**
+ * A convenience type for timer queue timer events.
+ */
+typedef TimerQueue::event TQEvent;
+
+/**
+ * A convenience type for timers.
+ */
+typedef Timer timer_t;
+
+END_NAMESPACE
+
+extern "C" {
+#if defined(WIN32)
+    __EXPORT int gettimeofday(struct timeval *tv, void *tz);
+#endif
+}
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/ucommon.h b/jni/libucommon/sources/inc/ucommon/ucommon.h
new file mode 100644
index 0000000..d75a22b
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/ucommon.h
@@ -0,0 +1,119 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Top level include file for the GNU uCommon C++ core library.
+ * This is the only include file you need to have in your sources; it
+ * includes the remaining header files.
+ * @file ucommon/ucommon.h
+ */
+
+/**
+ * @short A portable C++ threading library for embedded applications.
+ * GNU uCommon C++ is meant as a very light-weight library to facilitate using
+ * C++ design patterns even for very deeply embedded applications, such as for
+ * systems using uclibc along with posix threading support.  For this reason,
+ * uCommon disables language features that consume memory or introduce runtime
+ * overhead, such as rtti and exception handling, and assumes one will mostly
+ * be linking applications with other pure C based libraries rather than using
+ * the overhead of the standard C++ library and other class frameworks.
+ *
+ * uCommon by default does build with support for the bloated ansi standard c++
+ * library unless this is changed at configure time with the --disable-stdcpp
+ * option.  This is to assure maximum portability and will be used to merge
+ * uCommon with GNU Common C++ to form GNU Common C++ 2.0.  Some specific
+ * features are tested for when stdc++ is enabled, and these will be used
+ * to add back in GNU Common C++ classes such as TCP Stream and serialization.
+ *
+ * uCommon introduces some Objective-C based design patterns, such as reference
+ * counted objects, memory pools, smart pointers, and offers dynamic typing
+ * through very light use of inline templates for pure type translation that are
+ * then tied to concrete base classes to avoid template instantiation issues.  C++
+ * auto-variable automation is also used to enable referenced objects to be
+ * deleted and threading locks to be released that are acquired automatically when
+ * methods return rather than requiring one to explicitly code for these things.
+ *
+ * uCommon depends on and when necessary will introduce some portable C
+ * replacement functions, especially for sockets, such as adding getaddrinfo for
+ * platforms which do not have it, or when threadsafe versions of existing C
+ * library functions are needed.  Basic socket support for connecting to named
+ * destinations and multicast addresses, and binding to interfaces with IPV4 and
+ * IPV6 addresses is directly supported.  Support for high resolution timing and
+ * Posix realtime clocks are also used when available.
+ *
+ * uCommon builds all higher level thread synchronization objects directly from
+ * conditionals.  Hence, on platforms which for example do not have rwlocks,
+ * barriers, or semaphores, these are still found in uCommon.  A common and
+ * consistent call methodology is used for all locks, whether mutex, rw, or
+ * semaphore, based on whether used for exclusive or "shared" locking.
+ *
+ * uCommon requires some knowledge of compiler switches and options to disable
+ * language features, the C++ runtime and stdlibs, and associated C++ headers. The
+ * current version supports compiling with GCC, which is commonly found on
+ * GNU/Linux, OS/X, BSD based systems, and many other platforms; and the Sun
+ * Workshop compiler, which is offered as an example how to adapt uCommon for
+ * additional compilers. uCommon may also be built with GCC cross compiling for
+ * mingw32 to build threaded applications for Microsoft Windows targets nativiely.
+ *
+ * The minimum platform support for uCommon is a modern and working posix
+ * pthread threading library.  I further use a subset of posix threads to assure
+ * wider portability by avoiding more specialized features like process shared
+ * synchronization objects, pthread rwlocks and pthread semaphores, as these are
+ * not implemented on all platforms that I have found.  Finally, I have
+ * eliminated the use of posix thread cancellation.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ * @license GNU Lesser General Public License Version 3 or later
+ * @mainpage GNU uCommon C++
+ */
+
+#ifndef _UCOMMON_UCOMMON_H_
+#define _UCOMMON_UCOMMON_H_
+#include <ucommon/platform.h>
+#include <ucommon/cpr.h>
+#include <ucommon/atomic.h>
+#include <ucommon/generics.h>
+#include <ucommon/protocols.h>
+#include <ucommon/object.h>
+#include <ucommon/string.h>
+#include <ucommon/counter.h>
+#include <ucommon/numbers.h>
+#include <ucommon/vector.h>
+#include <ucommon/linked.h>
+#include <ucommon/timers.h>
+#include <ucommon/access.h>
+#include <ucommon/memory.h>
+#include <ucommon/mapped.h>
+#include <ucommon/unicode.h>
+#include <ucommon/datetime.h>
+#include <ucommon/keydata.h>
+#include <ucommon/bitmap.h>
+#include <ucommon/socket.h>
+#include <ucommon/thread.h>
+#include <ucommon/containers.h>
+#include <ucommon/fsys.h>
+#include <ucommon/file.h>
+#include <ucommon/buffer.h>
+#include <ucommon/shell.h>
+#include <ucommon/xml.h>
+
+#ifdef  _UCOMMON_EXTENDED_
+#include <ucommon/stream.h>
+#include <ucommon/persist.h>
+#include <ucommon/stl.h>
+#endif
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/unicode.h b/jni/libucommon/sources/inc/ucommon/unicode.h
new file mode 100644
index 0000000..ba51fe2
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/unicode.h
@@ -0,0 +1,565 @@
+// Copyright (C) 2009-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Basic UCommon Unicode support.
+ * This includes computing unicode transcoding and supporting a
+ * UTF8-aware string class (UString).  We may add support for a wchar_t
+ * aware string class as well, as some external api libraries may require
+ * ucs-2 or 4 encoded strings.
+ * @file ucommon/unicode.h
+ */
+
+/**
+ * An example of some unicode-utf8 transcoding.
+ * @example unicode.cpp
+ */
+
+#ifndef _UCOMMON_UNICODE_H_
+#define _UCOMMON_UNICODE_H_
+
+#ifndef _UCOMMON_STRING_H_
+#include <ucommon/string.h>
+#endif
+
+NAMESPACE_UCOMMON
+
+/**
+ * 32 bit unicode character code.  We may extract this from a ucs2 or utf8
+ * string.
+ */
+typedef int32_t ucs4_t;
+
+/**
+ * 16 bit unicode character code.  Java and some api's like these.
+ */
+typedef int16_t ucs2_t;
+
+/**
+ * Resolves issues where wchar_t is not defined.
+ */
+typedef void *unicode_t;
+
+/**
+ * A core class of ut8 encoded string functions.  This is a foundation for
+ * all utf8 string processing.
+ * @author David Sugar
+ */
+class __EXPORT utf8
+{
+public:
+    /**
+     * Size of "unicode_t" character codes, may not be ucs4_t size.
+     */
+    static const unsigned ucsize;
+
+    /**
+     * A convenient NULL pointer value.
+     */
+    static const char *nil;
+
+    /**
+     * Compute character size of utf8 string codepoint.
+     * @param codepoint in string.
+     * @return size of codepoint as utf8 encoded data, 0 if invalid.
+     */
+    static unsigned size(const char *codepoint);
+
+    /**
+     * Count ut8 encoded ucs4 codepoints in string.
+     * @param string of utf8 data.
+     * @return codepount count, 0 if empty or invalid.
+     */
+    static size_t count(const char *string);
+
+    /**
+     * Get codepoint offset in a string.
+     * @param string of utf8 data.
+     * @param position of codepoint in string, negative offsets are from tail.
+     * @return offset of codepoint or NULL if invalid.
+     */
+    static char *offset(char *string, ssize_t position);
+
+    /**
+     * Convert a utf8 encoded codepoint to a ucs4 character value.
+     * @param encoded utf8 codepoint.
+     * @return ucs4 string or 0 if invalid.
+     */
+    static ucs4_t codepoint(const char *encoded);
+
+    /**
+     * How many chars requires to encode a given wchar string.
+     * @param string of ucs4 data.
+     * @return number of chars required to encode given string.
+     */
+    static size_t chars(const unicode_t string);
+
+    /**
+     * How many chars requires to encode a given unicode character.
+     * @param character to encode.
+     * @return number of chars required to encode given character.
+     */
+    static size_t chars(ucs4_t character);
+
+    /**
+     * Convert a unicode string into utf8.
+     * @param string of unicode data to pack
+     * @param buffer of character protocol to put data into.
+     * @return number of code points converted.
+     */
+    static size_t unpack(const unicode_t string, CharacterProtocol& buffer);
+
+    /**
+     * Convert a utf8 string into a unicode data buffer.
+     * @param unicode data buffer.
+     * @param buffer of character protocol to pack from.
+     * @param size of unicode data buffer in codepoints.
+     * @return number of code points converted.
+     */
+    static size_t pack(unicode_t unicode, CharacterProtocol& buffer, size_t size);
+
+    /**
+     * Dup a utf8 string into a ucs4_t string.
+     */
+    static ucs4_t *udup(const char *string);
+
+    /**
+     * Dup a utf8 string into a ucs2_t representation.
+     */
+    static ucs2_t *wdup(const char *string);
+
+    /**
+     * Find first occurance of character in string.
+     * @param string to search in.
+     * @param character code to search for.
+     * @param start offset in string in codepoints.
+     * @return pointer to first instance or NULL if not found.
+     */
+    static const char *find(const char *string, ucs4_t character, size_t start = 0);
+
+    /**
+     * Find last occurrence of character in string.
+     * @param string to search in.
+     * @param character code to search for.
+     * @param end offset to start from in codepoints.
+     * @return pointer to last instance or NULL if not found.
+     */
+    static const char *rfind(const char *string, ucs4_t character, size_t end = (size_t)-1l);
+
+    /**
+     * Count occurrences of a unicode character in string.
+     * @param string to search in.
+     * @param character code to search for.
+     * @return count of occurrences.
+     */
+    static unsigned ccount(const char *string, ucs4_t character);
+
+    /**
+     * Get a unicode character from a character protocol.
+     * @param buffer of character protocol to read from.
+     * @return unicode character or EOF error.
+     */
+    static ucs4_t get(CharacterProtocol& buffer);
+
+    /**
+     * Push a unicode character to a character protocol.
+     * @param character to push to file.
+     * @param buffer of character protocol to push character to.
+     * @return unicode character or EOF on error.
+     */
+    static ucs4_t put(ucs4_t character, CharacterProtocol& buffer);
+};
+
+/**
+ * A copy-on-write utf8 string class that operates by reference count.  This
+ * is derived from the classic uCommon String class by adding operations that
+ * are utf8 encoding aware.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT UString : public String, public utf8
+{
+protected:
+    /**
+     * Create a new empty utf8 aware string object.
+     */
+    UString();
+
+    /**
+     * Create an empty string with a buffer pre-allocated to a specified size.
+     * @param size of buffer to allocate.
+     */
+    UString(strsize_t size);
+
+    /**
+     * Create a utf8 aware string for a null terminated unicode string.
+     * @param text of ucs4 encoded data.
+     */
+    UString(const unicode_t text);
+
+    /**
+     * Create a string from null terminated text up to a maximum specified
+     * size.
+     * @param text to use for string.
+     * @param size limit of new string.
+     */
+    UString(const char *text, strsize_t size);
+
+    /**
+     * Create a string for a substring.  The end of the substring is a
+     * pointer within the substring itself.
+     * @param text to use for string.
+     * @param end of text in substring.
+     */
+    UString(const unicode_t *text, const unicode_t *end);
+
+    /**
+     * Construct a copy of a string object.  Our copy inherits the same
+     * reference counted instance of cstring as in the original.
+     * @param existing string to copy from.
+     */
+    UString(const UString& existing);
+
+    /**
+     * Destroy string.  De-reference cstring.  If last reference to cstring,
+     * then also remove cstring from heap.
+     */
+    virtual ~UString();
+
+    /**
+     * Get a new string object as a substring of the current object.
+     * @param codepoint offset of substring.
+     * @param size of substring in codepoints or 0 if to end.
+     * @return string object holding substring.
+     */
+    UString get(strsize_t codepoint, strsize_t size = 0) const;
+
+    /**
+     * Extract a unicode byte sequence from utf8 object.
+     * @param unicode data buffer.
+     * @param size of data buffer.
+     * @return codepoints copied.
+     */
+    size_t get(unicode_t unicode, size_t size) const;
+
+    /**
+     * Set a utf8 encoded string based on unicode data.
+     * @param unicode text to set.
+     */
+    void set(const unicode_t unicode);
+
+    /**
+     * Add (append) unicode to a utf8 encoded string.
+     * @param unicode text to add.
+     */
+    void add(const unicode_t unicode);
+
+    /**
+     * Return unicode character found at a specific codepoint in the string.
+     * @param position of codepoint in string, negative values computed from end.
+     * @return character code at specified position in string.
+     */
+    ucs4_t at(int position) const;
+
+    /**
+     * Extract a unicode byte sequence from utf8 object.
+     * @param unicode data buffer.
+     * @param size of data buffer.
+     * @return codepoints copied.
+     */
+    inline size_t operator()(unicode_t unicode, size_t size) const
+        {return get(unicode, size);};
+
+    /**
+     * Get a new substring through object expression.
+     * @param codepoint offset of substring.
+     * @param size of substring or 0 if to end.
+     * @return string object holding substring.
+     */
+    UString operator()(int codepoint, strsize_t size) const;
+
+    /**
+     * Convenience method for left of string.
+     * @param size of substring to gather in codepoints.
+     * @return string object holding substring.
+     */
+    inline UString left(strsize_t size) const
+        {return operator()(0, size);}
+
+    /**
+     * Convenience method for right of string.
+     * @param offset of substring from right in codepoints.
+     * @return string object holding substring.
+     */
+    inline UString right(strsize_t offset) const
+        {return operator()(-((int)offset), 0);}
+
+    /**
+     * Convenience method for substring extraction.
+     * @param offset into string.
+     * @param size of string to return.
+     * @return string object holding substring.
+     */
+    inline UString copy(strsize_t offset, strsize_t size) const
+        {return operator()((int)offset, size);}
+
+    /**
+     * Cut (remove) text from string using codepoint offsets.
+     * @param offset to start of text field to remove.
+     * @param size of text field to remove or 0 to remove to end of string.
+     */
+    void cut(strsize_t offset, strsize_t size = 0);
+
+    /**
+     * Insert (paste) text into string using codepoint offsets.
+     * @param offset to start paste.
+     * @param text to paste.
+     * @param size of text to paste.
+     */
+    void paste(strsize_t offset, const char *text, strsize_t size = 0);
+
+    /**
+     * Reference a string in the object by codepoint offset.  Positive
+     * offsets are from the start of the string, negative from the
+     * end.
+     * @param offset to string position.
+     * @return pointer to string data or NULL if invalid offset.
+     */
+    const char *operator()(int offset) const;
+
+    /**
+     * Reference a unicode character in string object by array offset.
+     * @param position of codepoint offset to character.
+     * @return character value at offset.
+     */
+    inline ucs4_t operator[](int position) const
+        {return UString::at(position);};
+
+    /**
+     * Count codepoints in current string.
+     * @return count of codepoints.
+     */
+    inline strsize_t count(void) const
+        {return utf8::count(str->text);}
+
+    /**
+     * Count occurrences of a unicode character in string.
+     * @param character code to search for.
+     * @return count of occurrences.
+     */
+    unsigned ccount(ucs4_t character) const;
+
+    /**
+     * Find first occurrence of character in string.
+     * @param character code to search for.
+     * @param start offset in string in codepoints.
+     * @return pointer to first instance or NULL if not found.
+     */
+    const char *find(ucs4_t character, strsize_t start = 0) const;
+
+    /**
+     * Find last occurrence of character in string.
+     * @param character code to search for.
+     * @param end offset to start from in codepoints.
+     * @return pointer to last instance or NULL if not found.
+     */
+    const char *rfind(ucs4_t character, strsize_t end = npos) const;
+};
+
+/**
+ * Pointer to utf8 encoded character data.  This is a kind of "char *" for
+ * utf8 text.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT utf8_pointer
+{
+protected:
+    uint8_t *text;
+
+public:
+    /**
+     * Create a utf8 pointer set to NULL.
+     */
+    utf8_pointer();
+
+    /**
+     * Create a utf8 pointer for an existing char pointer.
+     * @param string pointer to use.
+     */
+    utf8_pointer(const char *string);
+
+    /**
+     * Create a utf8 pointer as a copy of existing utf8 pointer.
+     * @param copy of object to use.
+     */
+    utf8_pointer(const utf8_pointer& copy);
+
+    /**
+     * Iterative increment of a utf8 pointer to prior codepoint.
+     * @return object incremented.
+     */
+    utf8_pointer& operator ++();
+
+    /**
+     * Iterative decrement of a utf8 pointer to next codepoint.
+     * @return object decremented.
+     */
+    utf8_pointer& operator --();
+
+    /**
+     * Adjust utf8 pointer by specified codepoints forward.
+     * @param offset to increment by.
+     * @return object incremented.
+     */
+    utf8_pointer& operator +=(long offset);
+
+    /**
+     * Adjust utf8 pointer by specified codepoints backward.
+     * @param offset to decrement by.
+     * @return object decremented.
+     */
+    utf8_pointer& operator -=(long offset);
+
+    /**
+     * Get new utf8 string after adding a codepoint offset.
+     * @param offset to add.
+     * @return new utf8 pointer pointing to specified offset.
+     */
+    utf8_pointer operator+(long offset) const;
+
+    /**
+     * Get new utf8 string after subtracting a codepoint offset.
+     * @param offset to subtract.
+     * @return new utf8 pointer pointing to specified offset.
+     */
+    utf8_pointer operator-(long offset) const;
+
+    /**
+     * Check if text is valid pointer.
+     * @return true if not NULL.
+     */
+    inline operator bool() const
+        {return text != NULL;};
+
+    /**
+     * Check if text is an invalid pointer.
+     * @return false if not NULL.
+     */
+    inline bool operator!() const
+        {return text == NULL;};
+
+    /**
+     * Extract a unicode character from a specified codepoint.
+     * @param codepoint offset to extract character from.
+     * @return unicode character or 0.
+     */
+    ucs4_t operator[](long codepoint) const;
+
+    /**
+     * Assign a utf8 string to point to.
+     * @param string to point to.
+     * @return current object after set to string.
+     */
+    utf8_pointer& operator=(const char *string);
+
+    /**
+     * Iterative increment of a utf8 pointer to next codepoint.
+     */
+    void inc(void);
+
+    /**
+     * Iterative decrement of a utf8 pointer to prior codepoint.
+     */
+    void dec(void);
+
+    /**
+     * check if pointer equals another string.
+     * @param string to check.
+     * @return true if same memory address.
+     */
+    inline bool operator==(const char *string) const
+        {return (const char *)text == string;};
+
+    /**
+     * check if pointer does not equal another string.
+     * @param string to check.
+     * @return false if same memory address.
+     */
+    inline bool operator!=(const char *string) const
+        {return (const char *)text != string;};
+
+    /**
+     * Get unicode character pointed to by pointer.
+     * @return unicode character we are pointing to.
+     */
+    inline  ucs4_t operator*() const
+        {return utf8::codepoint((const char *)text);};
+
+    /**
+     * Get c string we point to.
+     * @return string we point to.
+     */
+    inline char *c_str(void) const
+        {return (char *)text;};
+
+    /**
+     * Convert utf8 pointer to a generic string pointer.
+     * @return generic string pointer.
+     */
+    inline operator char*() const
+        {return (char *)text;};
+
+    /**
+     * Get length of null terminated utf8 string in codepoints.
+     * @return codepoint length of string.
+     */
+    inline size_t len(void) const
+        {return utf8::count((const char *)text);};
+};
+
+inline ucs4_t *strudup(const char *string)
+    {return utf8::udup(string);}
+
+inline ucs2_t *strwdup(const char *string)
+    {return utf8::wdup(string);}
+
+__EXPORT unicode_t unidup(const char *string);
+
+template<>
+inline void dupfree<ucs2_t*>(ucs2_t *string)
+    {::free(string);}
+
+template<>
+inline void dupfree<ucs4_t*>(ucs4_t *string)
+    {::free(string);}
+
+template<>
+inline void dupfree<unicode_t>(unicode_t string)
+    {::free(string);}
+
+/**
+ * Convenience type for utf8 encoded strings.
+ */
+typedef UString ustring_t;
+
+/**
+ * Convenience type for utf8_pointer strings.
+ */
+typedef utf8_pointer utf8_t;
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/vector.h b/jni/libucommon/sources/inc/ucommon/vector.h
new file mode 100644
index 0000000..207c7eb
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/vector.h
@@ -0,0 +1,752 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Basic array and reusable object factory heap support.
+ * This offers ucommon support for vector arrays, and for forming
+ * reusable object pools.  Reusable object pools can be tied to local
+ * heaps and offer a means to create type factories that do not require
+ * global locking through malloc.
+ * @file ucommon/vector.h
+ */
+
+#ifndef _UCOMMON_VECTOR_H_
+#define _UCOMMON_VECTOR_H_
+
+#ifndef _UCOMMON_THREAD_H_
+#include <ucommon/thread.h>
+#endif
+
+typedef unsigned short vectorsize_t;
+
+NAMESPACE_UCOMMON
+
+/**
+ * An array of reusable objects.  This class is used to support the
+ * array_use template.  A pool of objects are created which can be
+ * allocated as needed.  Deallocated objects are returned to the pool
+ * so they can be reallocated later.  This is a private fixed size heap.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT ArrayReuse : public ReusableAllocator
+{
+private:
+    size_t objsize;
+    unsigned count, limit, used;
+    caddr_t mem;
+
+protected:
+    ArrayReuse(size_t objsize, unsigned c);
+    ArrayReuse(size_t objsize, unsigned c, void *memory);
+
+public:
+    /**
+     * Destroy reusable private heap array.
+     */
+    ~ArrayReuse();
+
+protected:
+    bool avail(void);
+
+    ReusableObject *get(timeout_t timeout);
+    ReusableObject *get(void);
+    ReusableObject *request(void);
+};
+
+/**
+ * A mempager source of reusable objects.  This is used by the reuse_pager
+ * template to allocate new objects either from a memory pager used as
+ * a private heap, or from previously allocated objects that have been
+ * returned for reuse.
+  * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT PagerReuse : protected MemoryRedirect, protected ReusableAllocator
+{
+private:
+    unsigned limit, count;
+    size_t osize;
+
+protected:
+    PagerReuse(mempager *pager, size_t objsize, unsigned count);
+    ~PagerReuse();
+
+    bool avail(void);
+    ReusableObject *get(void);
+    ReusableObject *get(timeout_t timeout);
+    ReusableObject *request(void);
+};
+
+/**
+ * A managed vector for generic object pointers.  This vector is memory
+ * managed at runtime by basic cow (copy-on-write) operations of a reference
+ * counted object list.  This allows the size of the vector to be changed
+ * at runtime and for the vector to be copied by managing reference counted
+ * copies of the list of objects as needed.
+ *
+ * This class is somewhat analogous to the string class, but rather than
+ * holding a string "array of chars" that may be re-sized and reallocated,
+ * the Vector holds an array of Object pointers.  Since the object pointers
+ * we store in the vector are objects inherited from Object, a vector can
+ * itself act as a vector of smart pointers to  reference counted objects
+ * (derived from CountedObject).
+ * @author David Sugar <dyfet@gnutelephony.org>.
+ */
+class __EXPORT Vector
+{
+public:
+    class __EXPORT array : public CountedObject
+    {
+    public:
+#pragma pack(1)
+        vectorsize_t max, len;
+        ObjectProtocol *list[1];
+#pragma pack()
+
+        array(vectorsize_t size);
+        void dealloc(void);
+        void set(ObjectProtocol **items);
+        void add(ObjectProtocol **list);
+        void add(ObjectProtocol *obj);
+        void purge(void);
+        void inc(vectorsize_t adj);
+        void dec(vectorsize_t adj);
+    };
+
+protected:
+    array *data;
+
+    array *create(vectorsize_t size) const;
+
+    virtual void release(void);
+    virtual void cow(vectorsize_t adj = 0);
+    ObjectProtocol **list(void) const;
+
+    friend class Vector::array;
+
+protected:
+    /**
+     * Object handler for index outside vector range.
+     * @return default object, often NULL.
+     */
+    virtual ObjectProtocol *invalid(void) const;
+
+public:
+    /**
+     * npos is a constant for an "invalid" position value.
+     */
+    static const vectorsize_t npos;
+
+    /**
+     * Create an initially empty vector.
+     */
+    Vector();
+
+    /**
+     * Create a vector of size object pointers.
+     * @param size of vector to create.
+     */
+    Vector(vectorsize_t size);
+
+    /**
+     * Create a vector of size objects from existing object pointers.
+     * This allocates the vector and initializes the object pointers from
+     * an existing array of object pointers.  Either a specific vector
+     * size may be used, or the end of the vector will be found by a NULL
+     * object pointer.
+     * @param items to place into the vector.
+     * @param size of the vector to create, or use NULL item for end.
+     */
+    Vector(ObjectProtocol **items, vectorsize_t size = 0);
+
+    /**
+     * Destroy the current reference counted vector of object pointers.
+     */
+    virtual ~Vector();
+
+    /**
+     * Get the size of the vector (number of active members).
+     * @return number of active pointers in vector.
+     */
+    vectorsize_t len(void) const;
+
+    /**
+     * Get the effective allocation space used by the vector.  This is the
+     * number of pointers it can hold before it needs to be resized.
+     * @return storage size of vector.
+     */
+    vectorsize_t size(void) const;
+
+    /**
+     * Get an object pointer from a specified member of the vector.
+     * @param index of member pointer to return.  Negative values from end.
+     * @return object pointer of member.
+     */
+    ObjectProtocol *get(int index) const;
+
+    /**
+     * Copy the vector to an external pointer array.
+     * @param mem array of external pointers to hold vector.
+     * @param max size of the external array.
+     * @return number of elements copied into external array.
+     */
+    vectorsize_t get(void **mem, vectorsize_t max) const;
+
+    /**
+     * Get the first object pointer contained in the vector.  Typically used
+     * in iterations.
+     * @return first object pointer.
+     */
+    ObjectProtocol *begin(void) const;
+
+    /**
+     * Get the last object pointer contained in the vector.  Typically used
+     * in iterations.
+     * @return last object pointer.
+     */
+    ObjectProtocol *end(void) const;
+
+    /**
+     * Find the first instance of a specific pointer in the vector.
+     * @param pointer to locate in the vector.
+     * @param offset to start searching in vector.
+     * @return position of pointer in vector or npos if not found.
+     */
+    vectorsize_t find(ObjectProtocol *pointer, vectorsize_t offset = 0) const;
+
+    /**
+     * Split the vector at a specified offset.  All members after the split
+     * are de-referenced and dropped from the vector.
+     * @param position to split vector at.
+     */
+    void split(vectorsize_t position);
+
+    /**
+     * Split the vector after a specified offset.  All members before the split
+     * are de-referenced and dropped.  The member starting at the split point
+     * becomes the first member of the vector.
+     * @param position to split vector at.
+     */
+    void rsplit(vectorsize_t position);
+
+    /**
+     * Set a member of the vector to an object.  If an existing member was
+     * present and is being replaced, it is de-referenced.
+     * @param position in vector to place object pointer.
+     * @param pointer to place in vector.
+     */
+    void set(vectorsize_t position, ObjectProtocol *pointer);
+
+    /**
+     * Set the vector to a list of objects terminated by a NULL pointer.
+     * @param list of object pointers.
+     */
+    void set(ObjectProtocol **list);
+
+    /**
+     * Add (append) a NULL terminated list of objects to the vector.
+     * @param list of object pointers to add.
+     */
+    void add(ObjectProtocol **list);
+
+    /**
+     * Add (append) a single object pointer to the vector.
+     * @param pointer to add to vector.
+     */
+    void add(ObjectProtocol *pointer);
+
+    /**
+     * De-reference and remove all pointers from the vector.
+     */
+    void clear(void);
+
+    /**
+     * Re-size & re-allocate the total (allocated) size of the vector.
+     * @param size to allocate for vector.
+     */
+    virtual bool resize(vectorsize_t size);
+
+    /**
+     * Set (duplicate) an existing vector into our vector.
+     * @param vector to duplicate.
+     */
+    inline void set(Vector &vector)
+        {set(vector.list());};
+
+    /**
+     * Add (append) an existing vector to our vector.
+     * @param vector to append.
+     */
+    inline void add(Vector &vector)
+        {add(vector.list());};
+
+    /**
+     * Return a pointer from the vector by array reference.
+     * @param index of vector member pointer to return.
+     */
+    inline ObjectProtocol *operator[](int index)
+        {return get(index);};
+
+    /**
+     * Assign a member of the vector directly.
+     * @param position to assign.
+     * @param pointer to object to assign to vector.
+     */
+    inline void operator()(vectorsize_t position, ObjectProtocol *pointer)
+        {set(position, pointer);};
+
+    /**
+     * Retrieve a member of the vector directly.
+     * @param position to retrieve object from.
+     * @return object pointer retrieved from vector.
+     */
+    inline ObjectProtocol *operator()(vectorsize_t position)
+        {return get(position);};
+
+    /**
+     * Append a member to the vector directly.
+     * @param pointer to object to add to vector.
+     */
+    inline void operator()(ObjectProtocol *pointer)
+        {add(pointer);};
+
+    /**
+     * Assign (copy) into our existing vector from another vector.
+     * @param vector to assign from.
+     */
+    inline void operator=(Vector &vector)
+        {set(vector.list());};
+
+    /**
+     * Append into our existing vector from another vector.
+     * @param vector to append from.
+     */
+    inline void operator+=(Vector &vector)
+        {add(vector.list());};
+
+    /**
+     * Concatenate into our existing vector from assignment list.
+     * @param vector to append from.
+     */
+    inline Vector& operator+(Vector &vector)
+        {add(vector.list()); return *this;};
+
+    /**
+     * Release vector and concat vector from another vector.
+     * @param vector to assign from.
+     */
+    Vector &operator^(Vector &vector);
+
+    /**
+     * Release our existing vector and duplicate from another vector.  This
+     * differs from assign in that the allocated size of the vector is reset
+     * to the new list.
+     * @param vector to assign from.
+     */
+    void operator^=(Vector &vector);
+
+    /**
+     * Drop first member of vector.
+     */
+    void operator++();
+
+    /**
+     * Drop last member of the vector.
+     */
+    void operator--();
+
+    /**
+     * Drop first specified members from the vector.
+     * @param count of members to drop.
+     */
+    void operator+=(vectorsize_t count);
+
+    /**
+     * Drop last specified members from the vector.
+     * @param count of members to drop.
+     */
+    void operator-=(vectorsize_t count);
+
+    /**
+     * Compute the effective vector size of a list of object pointers.
+     * The size is found as the NULL pointer in the list.
+     * @return size of list.
+     */
+    static vectorsize_t size(void **list);
+};
+
+/**
+ * Vector with fixed size member list.  This is analogous to the memstring
+ * class and is used to tie a vector to a fixed list in memory.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT MemVector : public Vector
+{
+private:
+    bool resize(vectorsize_t size);
+    void cow(vectorsize_t adj = 0);
+    void release(void);
+
+    friend class Vector::array;
+
+public:
+    /**
+     * Create and manage a vector stored in fixed memory.
+     * @param pointer to where our vector list lives.
+     * @param size of vector list in memory.
+     */
+    MemVector(void *pointer, vectorsize_t size);
+
+    /**
+     * Destroy the vector.
+     */
+    ~MemVector();
+
+    /**
+     * Assign an existing vector into our fixed vector list.
+     * @param vector to copy from.
+     */
+    inline void operator=(Vector &vector)
+        {set(vector);};
+
+};
+
+/**
+ * A templated vector for a list of a specific Object subtype.  The
+ * templated type must be derived from Object.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template<class T>
+class vectorof : public Vector
+{
+public:
+    /**
+     * Create an empty vector for specified type.
+     */
+    inline vectorof() : Vector() {};
+
+    /**
+     * Create an empty vector of allocated size for specified type.
+     * @param size of vector to allocate.
+     */
+    inline vectorof(vectorsize_t size) : Vector(size) {};
+
+    inline T& operator[](int index)
+        {return static_cast<T&>(Vector::get(index));};
+
+    inline const T& at(int index)
+        {return static_cast<const T&>(Vector::get(index));};
+
+    /**
+     * Retrieve a typed member of the vector directly.
+     * @param position to retrieve object from.
+     * @return typed object pointer retrieved from vector.
+     */
+    inline T *operator()(vectorsize_t position)
+        {return static_cast<T *>(Vector::get(position));};
+
+    /**
+     * Get the first typed object pointer contained in the vector.
+     * @return first typed object pointer.
+     */
+    inline T *begin(void)
+        {return static_cast<T *>(Vector::begin());};
+
+    /**
+     * Get the last typed object pointer contained in the vector.
+     * @return last typed object pointer.
+     */
+    inline T *end(void)
+        {return static_cast<T *>(Vector::end());};
+
+    /**
+     * Concatenate typed vector in an expression.
+     * @param vector to concatenate.
+     * @return effective object to continue in expression.
+     */
+    inline Vector &operator+(Vector &vector)
+        {Vector::add(vector); return static_cast<Vector &>(*this);};
+};
+
+/**
+ * An array of reusable types.  A pool of typed objects is created which can
+ * be allocated as needed.  Deallocated typed objects are returned to the pool
+ * so they can be reallocated later.  This is a private fixed size heap.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template<class T>
+class array_reuse : protected ArrayReuse
+{
+public:
+    /**
+     * Create private heap of reusable objects of specified type.
+     * @param count of objects of specified type to allocate.
+     */
+    inline array_reuse(unsigned count) :
+        ArrayReuse(sizeof(T), count) {};
+
+    /**
+     * Create reusable objects of specific type in preallocated memory.
+     * @param count of objects of specified type in memory.
+     * @param memory to use.
+     */
+    inline array_reuse(unsigned count, void *memory) :
+        ArrayReuse(sizeof(T), count, memory) {};
+
+    /**
+     * Test if typed objects available in heap or re-use list.
+     * @return true if objects still are available.
+     */
+    inline operator bool() const
+        {return avail();};
+
+    /**
+     * Test if the entire heap has been allocated.
+     * @return true if no objects are available.
+     */
+    inline bool operator!() const
+        {return !avail();};
+
+    /**
+     * Request immediately next available typed object from the heap.
+     * @return typed object pointer or NULL if heap is empty.
+     */
+    inline T* request(void)
+        {return static_cast<T*>(ArrayReuse::request());};
+
+    /**
+     * Get a typed object from the heap.  This function blocks when the
+     * heap is empty until an object is returned to the heap.
+     * @return typed object pointer from heap.
+     */
+    inline T* get(void)
+        {return static_cast<T*>(ArrayReuse::get());};
+
+    /**
+     * Create a typed object from the heap.  This function blocks when the
+     * heap is empty until an object is returned to the heap.
+     * @return typed object pointer from heap.
+     */
+    inline T* create(void)
+        {return init<T>(static_cast<T*>(ArrayReuse::get()));};
+
+    /**
+     * Get a typed object from the heap.  This function blocks until the
+     * the heap has an object to return or the timer has expired.
+     * @param timeout to wait for heap in milliseconds.
+     * @return typed object pointer from heap or NULL if timeout.
+     */
+    inline T* get(timeout_t timeout)
+        {return static_cast<T*>(ArrayReuse::get(timeout));};
+
+    /**
+     * Create a typed object from the heap.  This function blocks until the
+     * the heap has an object to return or the timer has expired.
+     * @param timeout to wait for heap in milliseconds.
+     * @return typed object pointer from heap or NULL if timeout.
+     */
+    inline T* create(timeout_t timeout)
+        {return init<T>(static_cast<T*>(ArrayReuse::get(timeout)));};
+
+    /**
+     * Release (return) a typed object back to the heap for re-use.
+     * @param object to return.
+     */
+    inline void release(T *object)
+        {ArrayReuse::release(object);};
+
+    /**
+     * Get a typed object from the heap by type casting reference.  This
+     * function blocks while the heap is empty.
+     * @return typed object pointer from heap.
+     */
+    inline operator T*()
+        {return array_reuse::get();};
+
+    /**
+     * Get a typed object from the heap by pointer reference.  This
+     * function blocks while the heap is empty.
+     * @return typed object pointer from heap.
+     */
+    inline T *operator*()
+        {return array_reuse::get();};
+};
+
+/**
+ * A reusable private pool of reusable types.  A pool of typed objects is
+ * created which can be allocated from a memory pager.  Deallocated typed
+ * objects are also returned to this pool so they can be reallocated later.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template <class T>
+class paged_reuse : protected PagerReuse
+{
+public:
+    /**
+     * Create a managed reusable typed object pool.  This manages a heap of
+     * typed objects that can either be reused from released objects or
+     * allocate from an existing memory pager pool.
+     * @param pager pool to allocate from.
+     * @param count of objects of specified type to allocate.
+     */
+    inline paged_reuse(mempager *pager, unsigned count) :
+        PagerReuse(pager, sizeof(T), count) {};
+
+    /**
+     * Test if typed objects available from the pager or re-use list.
+     * @return true if objects still are available.
+     */
+    inline operator bool() const
+        {return PagerReuse::avail();};
+
+    /**
+     * Test if no objects are available for reuse or the pager.
+     * @return true if no objects are available.
+     */
+    inline bool operator!() const
+        {return !PagerReuse::avail();};
+
+    /**
+     * Get a typed object from the pager heap.  This function blocks when the
+     * heap is empty until an object is returned to the heap.
+     * @return typed object pointer from heap.
+     */
+    inline T *get(void)
+        {return static_cast<T*>(PagerReuse::get());};
+
+    /**
+     * Get a typed object from the pager heap.  This function blocks when the
+     * heap is empty until an object is returned to the heap.  The objects
+     * default constructor is used.
+     * @return typed object pointer from heap.
+     */
+    inline T *create(void)
+        {return init<T>(static_cast<T*>(PagerReuse::get()));};
+
+    /**
+     * Get a typed object from the heap.  This function blocks until the
+     * the heap has an object to return or the timer has expired.
+     * @param timeout to wait for heap in milliseconds.
+     * @return typed object pointer from heap or NULL if timeout.
+     */
+    inline T *get(timeout_t timeout)
+        {return static_cast<T*>(PagerReuse::get(timeout));};
+
+    /**
+     * Create a typed object from the heap.  This function blocks until the
+     * the heap has an object to return or the timer has expired.  The
+     * objects default constructor is used.
+     * @param timeout to wait for heap in milliseconds.
+     * @return typed object pointer from heap or NULL if timeout.
+     */
+    inline T *create(timeout_t timeout)
+        {return init<T>(static_cast<T*>(PagerReuse::get(timeout)));};
+
+    /**
+     * Request immediately next available typed object from the pager heap.
+     * @return typed object pointer or NULL if heap is empty.
+     */
+    inline T *request(void)
+        {return static_cast<T*>(PagerReuse::request());};
+
+    /**
+     * Release (return) a typed object back to the pager heap for re-use.
+     * @param object to return.
+     */
+    inline void release(T *object)
+        {PagerReuse::release(object);};
+
+    /**
+     * Get a typed object from the pager heap by type casting reference.  This
+     * function blocks while the heap is empty.
+     * @return typed object pointer from heap.
+     */
+    inline T *operator*()
+        {return paged_reuse::get();};
+
+    /**
+     * Get a typed object from the pager heap by pointer reference.  This
+     * function blocks while the heap is empty.
+     * @return typed object pointer from heap.
+     */
+    inline operator T*()
+        {return paged_reuse::get();};
+};
+
+/**
+ * Allocated vector list of a specified type.  This analogous to the stringbuf
+ * class and allows one to create a vector with it's member list as a single
+ * object that can live in the heap or that can be created at once and used as
+ * a auto variable.
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+template<typename T, vectorsize_t S>
+class vectorbuf : public MemVector
+{
+private:
+    char buffer[sizeof(array) + (S * sizeof(void *))];
+
+public:
+    /**
+     * Construct fixed sized vector object in heap or stack.
+     */
+    inline vectorbuf() : MemVector(buffer, S) {};
+
+    /**
+     * Get object pointer of specified type from fixed vector.
+     * @param index of typed member to return, < 0 to use from end of list.
+     * @return typed object pointer of member.
+     */
+    inline const T& at(int index)
+        {return static_cast<const T&>(Vector::get(index));};
+
+    inline T& operator[](int index)
+        {return static_cast<T&>(Vector::get(index));};
+
+    /**
+     * Retrieve a typed member of the fixed vector directly.
+     * @param position to retrieve object from.
+     * @return typed object pointer retrieved from vector.
+     */
+    inline T *operator()(vectorsize_t position)
+        {return static_cast<T *>(Vector::get(position));};
+
+    /**
+     * Get the first typed object pointer contained in the fixed vector.
+     * @return first typed object pointer.
+     */
+    inline T *begin(void)
+        {return static_cast<T *>(Vector::begin());};
+
+    /**
+     * Get the last typed object pointer contained in the fixed vector.
+     * @return last typed object pointer.
+     */
+    inline T *end(void)
+        {return static_cast<T *>(Vector::end());};
+
+    /**
+     * Concatenate fixed typed vector in an expression.
+     * @param vector to concatenate.
+     * @return effective object to continue in expression.
+     */
+    inline Vector &operator+(Vector &vector)
+        {Vector::add(vector); return static_cast<Vector &>(*this);};
+};
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/inc/ucommon/xml.h b/jni/libucommon/sources/inc/ucommon/xml.h
new file mode 100644
index 0000000..0890a8f
--- /dev/null
+++ b/jni/libucommon/sources/inc/ucommon/xml.h
@@ -0,0 +1,150 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * XML "SAX" (stream) parsing support from GNU Common C++.
+ * @file ucommon/xml.h
+ */
+
+#ifndef _UCOMMON_STRING_H_
+#include <ucommon/string.h>
+#endif
+
+#ifndef _UCOMMON_PROTOCOLS_H_
+#include <ucommon/protocols.h>
+#endif
+
+#ifndef _UCOMMON_XML_H_
+#define _UCOMMON_XML_H_
+
+NAMESPACE_UCOMMON
+
+/**
+ * XML streaming parser.  This class implements a basic XML stream parser
+ * that can be used to examine an XML resource thru virtual I/O methods.
+ * This class must be derived into one that can implement the physical I/O
+ * required to parse actual data.  A mixer class using XMLParser and
+ * tcpstream would be one example of this.  This can also be used to
+ * parse xml content in memory buffers easily.  This parser is only concerned
+ * with well-formedness, and does not perform validation.
+ *
+ * @author David Sugar <dyfet@gnutelephony.org>
+ */
+class __EXPORT XMLParser
+{
+private:
+    int ecount, dcount;
+    enum {TAG, CDATA, COMMENT, DTD, AMP, NONE, END} state;
+    char *buffer;
+    unsigned bufpos, bufsize;
+    __LOCAL bool parseTag(void);
+    __LOCAL void putBuffer(char c);
+    __LOCAL void clearBuffer(void);
+
+protected:
+    /**
+     * Create xml parser.
+     * @param size of XML data buffer.
+     */
+    XMLParser(unsigned size = 8192);
+
+    /**
+     * Destroy xml parser.
+     */
+    virtual ~XMLParser();
+
+    /**
+     * Virtual to receive embedded comments in XML document being parsed.
+     * @param text received.
+     * @param size of text received.
+     */
+    virtual void comment(caddr_t text, size_t size);
+
+    /**
+     * Virtual to receive character text extracted from the document.
+     * @param text received.
+     * @param size of text received.
+     */
+    virtual void characters(caddr_t text, size_t size);
+
+    /**
+     * Notify start of document event.
+     */
+    virtual void startDocument(void);
+
+    /**
+     * Notify end of document event.
+     */
+    virtual void endDocument(void);
+
+    /**
+     * Notify start of an element in the document.
+     * @param name of element found.
+     * @param attr list of attributes extracted.
+     */
+    virtual void startElement(caddr_t name, caddr_t *attr) = 0;
+
+    /**
+     * Notify end of an element in the document.
+     * @param name of element ending.
+     */
+    virtual void endElement(caddr_t name) = 0;
+
+    /**
+     * Parse a chunk of data and return parser completion flag.  This is
+     * used to externally drive data into the XML parser.  The return
+     * status can be used to determine when a document has been fully
+     * parsed.  This can be called multiple times to push stream data
+     * into the parser.
+     * @param address of data to parse.
+     * @param size of data to parse.
+     */
+    bool partial(const char *address, size_t size);
+
+    /**
+     * Parse a stream buffer and return parser document completion flag.
+     * This is used to scan a stream buffer for a complete XML document.
+     * The stream is scanned until the document is complete or EOF.
+     * Multiple XML document instances can be scanned from a continues
+     * XML streaming source.
+     * @param stream buffer to parse.
+     * @return true if parse complete, false if invalid or EOF.
+     */
+    bool parse(CharacterProtocol& stream);
+
+    /**
+     * Parse a file buffer and return parser document completion flag.
+     * This is used to scan a file buffer for a complete XML document.
+     * The file is scanned until the document is complete or EOF.
+     * Multiple XML document instances can be scanned from a continues
+     * XML streaming source.
+     * @param file buffer to parse.
+     * @return true if parse complete, false if invalid or EOF.
+     */
+    bool parse(FILE *file);
+
+    /**
+     * End of document check.
+     * @return true if end of document.
+     */
+    bool end(void)
+        {return state == END;};
+};
+
+END_NAMESPACE
+
+#endif
diff --git a/jni/libucommon/sources/libtool b/jni/libucommon/sources/libtool
new file mode 100755
index 0000000..552ae11
--- /dev/null
+++ b/jni/libucommon/sources/libtool
@@ -0,0 +1,10243 @@
+#! /bin/sh
+
+# libtool - Provide generalized library-building support services.
+# Generated automatically by config.status (ucommon) 6.0.7
+# Libtool was configured on host pcal:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010, 2011 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.
+#
+# 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.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags="CXX "
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Assembler program.
+AS="as"
+
+# DLL creation program.
+DLLTOOL="dlltool"
+
+# Object dumper program.
+OBJDUMP="objdump"
+
+# Which release of libtool.m4 was used?
+macro_version=2.4.2
+macro_revision=1.3337
+
+# Whether or not to build shared libraries.
+build_libtool_libs=yes
+
+# Whether or not to build static libraries.
+build_old_libs=yes
+
+# What type of objects to build.
+pic_mode=default
+
+# Whether or not to optimize for fast installation.
+fast_install=yes
+
+# Shell to use when invoking shell scripts.
+SHELL="/bin/sh"
+
+# An echo program that protects backslashes.
+ECHO="printf %s\\n"
+
+# The PATH separator for the build system.
+PATH_SEPARATOR=":"
+
+# The host system.
+host_alias=
+host=x86_64-unknown-linux-gnu
+host_os=linux-gnu
+
+# The build system.
+build_alias=
+build=x86_64-unknown-linux-gnu
+build_os=linux-gnu
+
+# A sed program that does not truncate output.
+SED="/usr/bin/sed"
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP="/usr/bin/grep"
+
+# An ERE matcher.
+EGREP="/usr/bin/grep -E"
+
+# A literal string matcher.
+FGREP="/usr/bin/grep -F"
+
+# A BSD- or MS-compatible name lister.
+NM="/usr/bin/nm -B"
+
+# Whether we need soft or hard links.
+LN_S="ln -s"
+
+# What is the maximum length of a command?
+max_cmd_len=1572864
+
+# Object file suffix (normally "o").
+objext=o
+
+# Executable file suffix (normally "").
+exeext=
+
+# whether the shell understands "unset".
+lt_unset=unset
+
+# turn spaces into newlines.
+SP2NL="tr \\040 \\012"
+
+# turn newlines into spaces.
+NL2SP="tr \\015\\012 \\040\\040"
+
+# convert $build file names to $host format.
+to_host_file_cmd=func_convert_file_noop
+
+# convert $build files to toolchain format.
+to_tool_file_cmd=func_convert_file_noop
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method="pass_all"
+
+# Command to use when deplibs_check_method = "file_magic".
+file_magic_cmd="\$MAGIC_CMD"
+
+# How to find potential files when deplibs_check_method = "file_magic".
+file_magic_glob=""
+
+# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
+want_nocaseglob="no"
+
+# Command to associate shared and link libraries.
+sharedlib_from_linklib_cmd="printf %s\\n"
+
+# The archiver.
+AR="ar"
+
+# Flags to create an archive.
+AR_FLAGS="cru"
+
+# How to feed a file listing to the archiver.
+archiver_list_spec="@"
+
+# A symbol stripping program.
+STRIP="strip"
+
+# Commands used to install an old-style archive.
+RANLIB="ranlib"
+old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$tool_oldlib"
+old_postuninstall_cmds=""
+
+# Whether to use a lock for old archive extraction.
+lock_old_archive_extraction=no
+
+# A C compiler.
+LTCC="gcc"
+
+# LTCC compiler flags.
+LTCFLAGS="-g -O2"
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe="sed -n -e 's/^.*[	 ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[	 ][	 ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p' | sed '/ __gnu_lto/d'"
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl="sed -n -e 's/^T .* \\(.*\\)\$/extern int \\1();/p' -e 's/^[ABCDGIRSTW]* .* \\(.*\\)\$/extern char \\1;/p'"
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\)[ ]*\$/  {\\\"\\1\\\", (void *) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/  {\"\\2\", (void *) \\&\\2},/p'"
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \\([^ ]*\\)[ ]*\$/  {\\\"\\1\\\", (void *) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\(lib[^ ]*\\)\$/  {\"\\2\", (void *) \\&\\2},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/  {\"lib\\2\", (void *) \\&\\2},/p'"
+
+# Specify filename containing input files for $NM.
+nm_file_list_spec="@"
+
+# The root where to search for dependent libraries,and in which our libraries should be installed.
+lt_sysroot=
+
+# The name of the directory that contains temporary libtool files.
+objdir=.libs
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=file
+
+# Must we lock files when doing compilation?
+need_locks="no"
+
+# Manifest tool.
+MANIFEST_TOOL=":"
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=""
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=""
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=""
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=""
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=""
+
+# Old archive suffix (normally "a").
+libext=a
+
+# Shared library suffix (normally ".so").
+shrext_cmds=".so"
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=""
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=no
+
+# Do we need a version for libraries?
+need_version=no
+
+# Library versioning type.
+version_type=linux
+
+# Shared library runtime path variable.
+runpath_var=LD_RUN_PATH
+
+# Shared library path variable.
+shlibpath_var=LD_LIBRARY_PATH
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=no
+
+# Format of library name prefix.
+libname_spec="lib\$name"
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
+
+# The coded name of the library, if different from the real name.
+soname_spec="\${libname}\${release}\${shared_ext}\$major"
+
+# Permission mode override for installation of shared libraries.
+install_override_mode=""
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=""
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=""
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=""
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=yes
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec="/usr/lib/gcc/x86_64-redhat-linux/4.8.2 /usr/lib64 /lib64 "
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib /usr/lib64/atlas /usr/lib64/dyninst /usr/lib64/iscsi /usr/lib64/llvm /usr/lib64/mysql /usr/lib64/qt-3.3/lib /usr/lib64/tracker-0.16 /usr/lib64/xulrunner "
+
+# Whether dlopen is supported.
+dlopen_support=unknown
+
+# Whether dlopen of programs is supported.
+dlopen_self=unknown
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=unknown
+
+# Commands to strip libraries.
+old_striplib="strip --strip-debug"
+striplib="strip --strip-unneeded"
+
+
+# The linker used to build libraries.
+LD="/usr/bin/ld -m elf_x86_64"
+
+# How to create reloadable object files.
+reload_flag=" -r"
+reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
+
+# Commands used to build an old-style archive.
+old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$tool_oldlib"
+
+# A language specific compiler.
+CC="gcc"
+
+# Is the compiler the GNU compiler?
+with_gcc=yes
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=" -fno-builtin"
+
+# Additional compiler flags for building library objects.
+pic_flag=" -fPIC -DPIC"
+
+# How to pass a linker flag through the compiler.
+wl="-Wl,"
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=""
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o="yes"
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=no
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=no
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec="\${wl}--export-dynamic"
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object="no"
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=""
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=""
+
+# Commands used to build a shared archive.
+archive_cmds="\$CC -shared \$pic_flag \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
+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 -shared \$pic_flag \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=""
+module_expsym_cmds=""
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld="yes"
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=""
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=""
+
+# Flag to hardcode $libdir into a binary during linking.
+# This must work even if $libdir does not exist
+hardcode_libdir_flag_spec="\${wl}-rpath \${wl}\$libdir"
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=""
+
+# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=no
+
+# 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
+# library is relocated.
+hardcode_direct_absolute=no
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=no
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=unsupported
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=no
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=no
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=unknown
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=no
+
+# The commands to list exported symbols.
+export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*"
+
+# Symbols that must always be exported.
+include_expsyms=""
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=""
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=""
+
+# Specify filename containing input files.
+file_list_spec=""
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=immediate
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=""
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=""
+postdep_objects=""
+predeps=""
+postdeps=""
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=""
+
+# ### END LIBTOOL CONFIG
+
+
+# libtool (GNU libtool) 2.4.2
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008, 2009, 2010, 2011 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
+#       --no-quiet, --no-silent
+#                            print informational messages (default)
+#       --no-warn            don't display warning messages
+#       --tag=TAG            use configuration variables from tag TAG
+#   -v, --verbose            print more informational messages than default
+#       --no-verbose         don't print the extra informational messages
+#       --version            print version information
+#   -h, --help, --help-all   print short, long, or detailed 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)
+#         $progname:	(GNU libtool) 2.4.2
+#         automake:	$automake_version
+#         autoconf:	$autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+# General help using GNU software: <http://www.gnu.org/gethelp/>.
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION=2.4.2
+TIMESTAMP=""
+package_revision=1.3337
+
+# 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
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# NLS nuisances: We save the old values to restore during execute mode.
+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
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
+
+$lt_unset CDPATH
+
+
+# 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"
+
+
+
+: ${CP="cp -f"}
+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${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 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
+} # Extended-shell func_dirname implementation
+
+
+# func_basename file
+func_basename ()
+{
+    func_basename_result="${1##*/}"
+} # Extended-shell func_basename implementation
+
+
+# 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##*/}"
+} # Extended-shell func_dirname_and_basename implementation
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+    # positional parameters, so assign one to ordinary parameter first.
+    func_stripname_result=${3}
+    func_stripname_result=${func_stripname_result#"${1}"}
+    func_stripname_result=${func_stripname_result%"${2}"}
+} # Extended-shell func_stripname implementation
+
+
+# These SED scripts presuppose an absolute path with a trailing slash.
+pathcar='s,^/\([^/]*\).*$,\1,'
+pathcdr='s,^/[^/]*,,'
+removedotparts=':dotsl
+		s@/\./@/@g
+		t dotsl
+		s,/\.$,/,'
+collapseslashes='s@/\{1,\}@/@g'
+finalslash='s,/*$,/,'
+
+# 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.
+#             value returned in "$func_normal_abspath_result"
+func_normal_abspath ()
+{
+  # 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 "$removedotparts" -e "$collapseslashes" -e "$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 "$pathcar"`
+    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$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_normal_abspath_result=$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_relative_path SRCDIR DSTDIR
+# generates a relative path from SRCDIR to DSTDIR, with a trailing
+# slash if non-empty, suitable for immediately appending a filename
+# without needing to append a separator.
+#             value returned in "$func_relative_path_result"
+func_relative_path ()
+{
+  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 "x$func_relative_path_tlibdir" = x ; 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 "x$func_stripname_result" != x ; then
+    func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+  fi
+
+  # Normalisation. If bindir is libdir, return empty string,
+  # else relative path ending with a slash; either way, target
+  # file name can be directly appended.
+  if test ! -z "$func_relative_path_result"; then
+    func_stripname './' '' "$func_relative_path_result/"
+    func_relative_path_result=$func_stripname_result
+  fi
+}
+
+# The name of this program:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+
+# 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=${PATH_SEPARATOR-:}
+     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'
+
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
+
+# Sed substitution that converts a w32 file name or path
+# which contains forward slashes, into one that contains
+# (escaped) backslashes.  A very naive implementation.
+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# 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: ${opt_mode+$opt_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_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*"
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+    $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+    $opt_warning && $ECHO "$progname: ${opt_mode+$opt_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 "$my_directory_path" | $SED -e "$dirname"`
+      done
+      my_dir_list=`$ECHO "$my_dir_list" | $SED '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 "$my_tmpdir"
+}
+
+
+# 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 "$1" | $SED "$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 "$1" | $SED \
+	    -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_tr_sh
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result.  All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+  case $1 in
+  [0-9]* | *[!a-zA-Z0-9_]*)
+    func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+    ;;
+  * )
+    func_tr_sh_result=$1
+    ;;
+  esac
+}
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+    $opt_debug
+
+    $SED -n '/(C)/!b go
+	:more
+	/\./!{
+	  N
+	  s/\n# / /
+	  b more
+	}
+	:go
+	/^# '$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 ()
+{
+    $opt_debug
+
+    $SED -n '/^# Usage:/,/^#  *.*--help/ {
+        s/^# //
+	s/^# *$//
+	s/\$progname/'$progname'/
+	p
+    }' < "$progpath"
+    echo
+    $ECHO "run \`$progname --help | more' for full usage"
+    exit $?
+}
+
+# func_help [NOEXIT]
+# Echo long help message to standard output and exit,
+# unless 'noexit' is passed as argument.
+func_help ()
+{
+    $opt_debug
+
+    $SED -n '/^# Usage:/,/# Report bugs to/ {
+	:print
+        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-automake} --version) 2>/dev/null |$SED 1q`"'/
+	s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/
+	p
+	d
+     }
+     /^# .* home page:/b print
+     /^# General help using/b print
+     ' < "$progpath"
+    ret=$?
+    if test -z "$1"; then
+      exit $ret
+    fi
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+    $opt_debug
+
+    func_error "missing argument for $1."
+    exit_cmd=exit
+}
+
+
+# func_split_short_opt shortopt
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+func_split_short_opt ()
+{
+    func_split_short_opt_arg=${1#??}
+    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}
+} # Extended-shell func_split_short_opt implementation
+
+
+# func_split_long_opt longopt
+# Set func_split_long_opt_name and func_split_long_opt_arg shell
+# variables after splitting LONGOPT at the `=' sign.
+func_split_long_opt ()
+{
+    func_split_long_opt_name=${1%%=*}
+    func_split_long_opt_arg=${1#*=}
+} # Extended-shell func_split_long_opt implementation
+
+exit_cmd=:
+
+
+
+
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+nonopt=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+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=
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+    eval "${1}+=\${2}"
+} # Extended-shell func_append implementation
+
+# func_append_quoted var value
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+func_append_quoted ()
+{
+    func_quote_for_eval "${2}"
+    eval "${1}+=\\ \$func_quote_for_eval_result"
+} # Extended-shell func_append_quoted implementation
+
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+    func_arith_result=$(( $* ))
+} # Extended-shell func_arith implementation
+
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+    func_len_result=${#1}
+} # Extended-shell func_len implementation
+
+
+# func_lo2o object
+func_lo2o ()
+{
+    case ${1} in
+      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+      *)    func_lo2o_result=${1} ;;
+    esac
+} # Extended-shell func_lo2o implementation
+
+
+# func_xform libobj-or-source
+func_xform ()
+{
+    func_xform_result=${1%.*}.lo
+} # Extended-shell func_xform implementation
+
+
+# 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
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+  if test "$package_revision" != "$macro_revision"; then
+    if test "$VERSION" != "$macro_version"; then
+      if test -z "$macro_version"; then
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      else
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      fi
+    else
+      cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+    fi
+
+    exit $EXIT_MISMATCH
+  fi
+}
+
+
+# Shorthand for --mode=foo, only valid as the first argument
+case $1 in
+clean|clea|cle|cl)
+  shift; set dummy --mode clean ${1+"$@"}; shift
+  ;;
+compile|compil|compi|comp|com|co|c)
+  shift; set dummy --mode compile ${1+"$@"}; shift
+  ;;
+execute|execut|execu|exec|exe|ex|e)
+  shift; set dummy --mode execute ${1+"$@"}; shift
+  ;;
+finish|finis|fini|fin|fi|f)
+  shift; set dummy --mode finish ${1+"$@"}; shift
+  ;;
+install|instal|insta|inst|ins|in|i)
+  shift; set dummy --mode install ${1+"$@"}; shift
+  ;;
+link|lin|li|l)
+  shift; set dummy --mode link ${1+"$@"}; shift
+  ;;
+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+  shift; set dummy --mode uninstall ${1+"$@"}; shift
+  ;;
+esac
+
+
+
+# Option defaults:
+opt_debug=:
+opt_dry_run=false
+opt_config=false
+opt_preserve_dup_deps=false
+opt_features=false
+opt_finish=false
+opt_help=false
+opt_help_all=false
+opt_silent=:
+opt_warning=:
+opt_verbose=:
+opt_silent=false
+opt_verbose=false
+
+
+# Parse options once, thoroughly.  This comes as soon as possible in the
+# script to make things like `--version' happen as quickly as we can.
+{
+  # this just eases exit handling
+  while test $# -gt 0; do
+    opt="$1"
+    shift
+    case $opt in
+      --debug|-x)	opt_debug='set -x'
+			func_echo "enabling shell trace mode"
+			$opt_debug
+			;;
+      --dry-run|--dryrun|-n)
+			opt_dry_run=:
+			;;
+      --config)
+			opt_config=:
+func_config
+			;;
+      --dlopen|-dlopen)
+			optarg="$1"
+			opt_dlopen="${opt_dlopen+$opt_dlopen
+}$optarg"
+			shift
+			;;
+      --preserve-dup-deps)
+			opt_preserve_dup_deps=:
+			;;
+      --features)
+			opt_features=:
+func_features
+			;;
+      --finish)
+			opt_finish=:
+set dummy --mode finish ${1+"$@"}; shift
+			;;
+      --help)
+			opt_help=:
+			;;
+      --help-all)
+			opt_help_all=:
+opt_help=': help-all'
+			;;
+      --mode)
+			test $# = 0 && func_missing_arg $opt && break
+			optarg="$1"
+			opt_mode="$optarg"
+case $optarg in
+  # Valid mode arguments:
+  clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+  # Catch anything else as an error
+  *) func_error "invalid argument for $opt"
+     exit_cmd=exit
+     break
+     ;;
+esac
+			shift
+			;;
+      --no-silent|--no-quiet)
+			opt_silent=false
+preserve_args+=" $opt"
+			;;
+      --no-warning|--no-warn)
+			opt_warning=false
+preserve_args+=" $opt"
+			;;
+      --no-verbose)
+			opt_verbose=false
+preserve_args+=" $opt"
+			;;
+      --silent|--quiet)
+			opt_silent=:
+preserve_args+=" $opt"
+        opt_verbose=false
+			;;
+      --verbose|-v)
+			opt_verbose=:
+preserve_args+=" $opt"
+opt_silent=false
+			;;
+      --tag)
+			test $# = 0 && func_missing_arg $opt && break
+			optarg="$1"
+			opt_tag="$optarg"
+preserve_args+=" $opt $optarg"
+func_enable_tag "$optarg"
+			shift
+			;;
+
+      -\?|-h)		func_usage				;;
+      --help)		func_help				;;
+      --version)	func_version				;;
+
+      # Separate optargs to long options:
+      --*=*)
+			func_split_long_opt "$opt"
+			set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
+			shift
+			;;
+
+      # Separate non-argument short options:
+      -\?*|-h*|-n*|-v*)
+			func_split_short_opt "$opt"
+			set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
+			shift
+			;;
+
+      --)		break					;;
+      -*)		func_fatal_help "unrecognized option \`$opt'" ;;
+      *)		set dummy "$opt" ${1+"$@"};	shift; break  ;;
+    esac
+  done
+
+  # Validate options:
+
+  # save first non-option argument
+  if test "$#" -gt 0; then
+    nonopt="$opt"
+    shift
+  fi
+
+  # preserve --debug
+  test "$opt_debug" = : || preserve_args+=" --debug"
+
+  case $host in
+    *cygwin* | *mingw* | *pw32* | *cegcc*)
+      # don't eliminate duplications in $postdeps and $predeps
+      opt_duplicate_compiler_generated_deps=:
+      ;;
+    *)
+      opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+      ;;
+  esac
+
+  $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
+
+    # Darwin sucks
+    eval std_shrext=\"$shrext_cmds\"
+
+    # Only execute mode is allowed to have -dlopen flags.
+    if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
+      func_error "unrecognized option \`-dlopen'"
+      $ECHO "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Change the help message to a mode-specific one.
+    generic_help="$help"
+    help="Try \`$progname --help --mode=$opt_mode' for more information."
+  }
+
+
+  # Bail if the options were screwed
+  $exit_cmd $EXIT_FAILURE
+}
+
+
+
+
+## ----------- ##
+##    Main.    ##
+## ----------- ##
+
+# 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_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 ()
+{
+    $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_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 ()
+{
+    $opt_debug
+    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 "$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}"
+    }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+  $opt_debug
+  func_convert_core_file_wine_to_w32_result="$1"
+  if test -n "$1"; then
+    # Unfortunately, winepath does not exit with a non-zero error code, so we
+    # are forced to check the contents of stdout. On the other hand, if the
+    # command is not found, the shell will set an exit code of 127 and print
+    # *an error message* to stdout. So we must check for both error code of
+    # zero AND non-empty stdout, which explains the odd construction:
+    func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+    if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
+      func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+        $SED -e "$lt_sed_naive_backslashify"`
+    else
+      func_convert_core_file_wine_to_w32_result=
+    fi
+  fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+  $opt_debug
+  # unfortunately, winepath doesn't convert paths, only file names
+  func_convert_core_path_wine_to_w32_result=""
+  if test -n "$1"; then
+    oldIFS=$IFS
+    IFS=:
+    for func_convert_core_path_wine_to_w32_f in $1; do
+      IFS=$oldIFS
+      func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+      if test -n "$func_convert_core_file_wine_to_w32_result" ; then
+        if test -z "$func_convert_core_path_wine_to_w32_result"; then
+          func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
+        else
+          func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+        fi
+      fi
+    done
+    IFS=$oldIFS
+  fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+  $opt_debug
+  if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+    func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+    if test "$?" -ne 0; then
+      # on failure, ensure result is empty
+      func_cygpath_result=
+    fi
+  else
+    func_cygpath_result=
+    func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
+  fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format.  Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+  $opt_debug
+  # awkward: cmd appends spaces to result
+  func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+    $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+  $opt_debug
+  if test -z "$2" && test -n "$1" ; then
+    func_error "Could not determine host file name corresponding to"
+    func_error "  \`$1'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback:
+    func_to_host_file_result="$1"
+  fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+  $opt_debug
+  if test -z "$4" && test -n "$3"; then
+    func_error "Could not determine the host path corresponding to"
+    func_error "  \`$3'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback.  This is a deliberately simplistic "conversion" and
+    # should not be "improved".  See libtool.info.
+    if test "x$1" != "x$2"; then
+      lt_replace_pathsep_chars="s|$1|$2|g"
+      func_to_host_path_result=`echo "$3" |
+        $SED -e "$lt_replace_pathsep_chars"`
+    else
+      func_to_host_path_result="$3"
+    fi
+  fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+  $opt_debug
+  case $4 in
+  $1 ) func_to_host_path_result="$3$func_to_host_path_result"
+    ;;
+  esac
+  case $4 in
+  $2 ) func_to_host_path_result+="$3"
+    ;;
+  esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via `$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+  $opt_debug
+  $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result.  If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+  $opt_debug
+  case ,$2, in
+    *,"$to_tool_file_cmd",*)
+      func_to_tool_file_result=$1
+      ;;
+    *)
+      $to_tool_file_cmd "$1"
+      func_to_tool_file_result=$func_to_host_file_result
+      ;;
+  esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+  func_to_host_file_result="$1"
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_to_host_file_result="$func_convert_core_msys_to_w32_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+    # LT_CYGPATH in this case.
+    func_to_host_file_result=`cygpath -m "$1"`
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format.  Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_file_wine_to_w32 "$1"
+    func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_msys_to_w32_result"
+    func_to_host_file_result="$func_cygpath_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format.  Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set.  Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+    func_convert_core_file_wine_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+    func_to_host_file_result="$func_cygpath_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via `$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format.  If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+#   file name conversion function    : func_convert_file_X_to_Y ()
+#   path conversion function         : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same.  If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+  $opt_debug
+  if test -z "$to_host_path_cmd"; then
+    func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+    to_host_path_cmd="func_convert_path_${func_stripname_result}"
+  fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+  $opt_debug
+  func_init_to_host_path_cmd
+  $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+  func_to_host_path_result="$1"
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # Remove leading and trailing path separator characters from ARG.  MSYS
+    # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+    # and winepath ignores them completely.
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result="$func_convert_core_msys_to_w32_result"
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format.  Requires a wine environment and
+# a working winepath.  Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+    func_to_host_path_result="$func_cygpath_result"
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format.  Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set.  Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # Remove leading and trailing path separator characters from
+    # ARG. msys behavior is inconsistent here, cygpath turns them
+    # into '.;' and ';.', and winepath ignores them completely.
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+    func_to_host_path_result="$func_cygpath_result"
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+    $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+=" $arg"
+	  continue
+	  ;;
+
+	-shared | -static | -prefer-pic | -prefer-non-pic)
+	  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.
+	  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 "$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 "$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 "$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+=" $output_obj"
+      $ECHO "$srcfile" > "$lockfile"
+    fi
+
+    $opt_dry_run || $RM $removelist
+    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 "$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+=" -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+=" -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      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 "$opt_mode" = compile && 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
+  -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 ()
+{
+    $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 $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
+	  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 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 "$opt_mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+    $opt_debug
+    libs=
+    libdirs=
+    admincmds=
+
+    for opt in "$nonopt" ${1+"$@"}
+    do
+      if test -d "$opt"; then
+	libdirs+=" $opt"
+
+      elif test -f "$opt"; then
+	if func_lalib_unsafe_p "$opt"; then
+	  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" || admincmds+="
+       $cmds"
+	fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    $opt_silent && 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 "$opt_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.
+       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"
+    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=no
+    stripme=
+    no_mode=:
+    for arg
+    do
+      arg2=
+      if test -n "$dest"; then
+	files+=" $dest"
+	dest=$arg
+	continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -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$prev" = x-m && 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"
+      install_prog+=" $func_quote_for_eval_result"
+      if test -n "$arg2"; then
+	func_quote_for_eval "$arg2"
+      fi
+      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"
+	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=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+=" $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 "*) ;;
+	  *) current_libdirs+=" $libdir" ;;
+	  esac
+	else
+	  # Note the libdir as a future libdir.
+	  case "$future_libdirs " in
+	  *" $libdir "*) ;;
+	  *) future_libdirs+=" $libdir" ;;
+	  esac
+	fi
+
+	func_dirname "$file" "/" ""
+	dir="$func_dirname_result"
+	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
+	    ;;
+	  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+=" $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 "$lib" | $SED '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 "$relink_command" | $SED '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 "$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 "$opt_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
+
+#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 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+	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 "$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
+
+	  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[];
+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+=" $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 "$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_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+  $opt_debug
+  win32_libid_type="unknown"
+  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
+      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
+		}
+	    }'`
+      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 ()
+{
+  $opt_debug
+  sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+  $opt_debug
+  match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+  $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+    $SED '/^Contents of section '"$match_literal"':/{
+      # Place marker at beginning of archive member dllname section
+      s/.*/====MARK====/
+      p
+      d
+    }
+    # These lines can sometimes be longer than 43 characters, but
+    # are always uninteresting
+    /:[	 ]*file format pe[i]\{,1\}-/d
+    /^In archive [^:]*:/d
+    # Ensure marker is printed
+    /^====MARK====/p
+    # Remove all lines with less than 43 characters
+    /^.\{43\}/!d
+    # From remaining lines, remove first 43 characters
+    s/^.\{43\}//' |
+    $SED -n '
+      # Join marker and all lines until next marker into a single line
+      /^====MARK====/ b para
+      H
+      $ b para
+      b
+      :para
+      x
+      s/\n//g
+      # Remove the marker
+      s/^====MARK====//
+      # Remove trailing dots and whitespace
+      s/[\. \t]*$//
+      # Print
+      /./p' |
+    # we now have a list, one entry per line, of the stringified
+    # contents of the appropriate section of all members of the
+    # archive which possess that section. Heuristic: eliminate
+    # all those which have a first or second character that is
+    # a '.' (that is, objdump's representation of an unprintable
+    # character.) This should work for all archives with less than
+    # 0x302f exports -- but will fail for DLLs whose name actually
+    # begins with a literal '.' or a single character followed by
+    # a '.'.
+    #
+    # Of those that remain, print the first one.
+    $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+  $opt_debug
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+  test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+  $opt_debug
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+  test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+#    $sharedlib_from_linklib_cmd
+# Result is available in the variable
+#    $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+  $opt_debug
+  if func_cygming_gnu_implib_p "$1" ; then
+    # binutils import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+  elif func_cygming_ms_implib_p "$1" ; then
+    # ms-generated import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+  else
+    # unknown
+    sharedlib_from_linklib_result=""
+  fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    $opt_debug
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+    if test "$lock_old_archive_extraction" = yes; 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 "$lock_old_archive_extraction" = yes; 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 ()
+{
+    $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 | 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 in which 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$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.
+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/ which is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options which 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$TIMESTAMP) $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 "$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"
+
+	# fixup the dll searchpath if we need to.
+	#
+	# Fix the DLL searchpath if we need to.  Do this before prepending
+	# to shlibpath, because on Windows, both are PATH and uninstalled
+	# libraries must come first.
+	if test -n "$dllsearchpath"; then
+	  $ECHO "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	  $ECHO "\
+    # 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$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.
+*/
+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>
+
+/* 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 platforms) ... */
+#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
+# ifndef _INTPTR_T_DEFINED
+#  define _INTPTR_T_DEFINED
+#  define intptr_t int
+# endif
+#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 ((void *) 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
+volatile 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_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 "$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-"
+
+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;
+  intptr_t rval = 127;
+
+  int i;
+
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  newargz = XMALLOC (char *, 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 (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"
+	  lt_dump_script (stdout);
+	  return 0;
+	}
+      if (strcmp (argv[i], debug_opt) == 0)
+	{
+          lt_debug = 1;
+          continue;
+	}
+      if (strcmp (argv[i], ltwrapper_option_prefix) == 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 (__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$TIMESTAMP) $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 = _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];
+  int 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 = 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 (strcmp (str, pat) == 0)
+	*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
+    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;
+}
+
+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 #' */
+      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)
+{
+  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 ()
+{
+    $opt_debug
+    case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+    *import*) : ;;
+    *) false ;;
+    esac
+}
+
+# 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
+    bindir=
+    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
+      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)
+	  compile_command+=" @OUTPUT@"
+	  finalize_command+=" @OUTPUT@"
+	  ;;
+	esac
+
+	case $prev in
+	bindir)
+	  bindir="$arg"
+	  prev=
+	  continue
+	  ;;
+	dlfiles|dlprefiles)
+	  if test "$preload" = no; then
+	    # Add the symbol object into the linking commands.
+	    compile_command+=" @SYMFILE@"
+	    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+=" $arg"
+	    else
+	      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+=" $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+=" $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+=" $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+=" $pic_object"
+		    prev=
+		  fi
+
+		  # A PIC object.
+		  libobjs+=" $pic_object"
+		  arg="$pic_object"
+		fi
+
+		# Non-PIC object.
+		if test "$non_pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  non_pic_object="$xdir$non_pic_object"
+
+		  # A standard non-PIC object
+		  non_pic_objects+=" $non_pic_object"
+		  if test -z "$pic_object" || test "$pic_object" = none ; then
+		    arg="$non_pic_object"
+		  fi
+		else
+		  # If the PIC object exists, use it instead.
+		  # $xdir was prepended to $pic_object above.
+		  non_pic_object="$pic_object"
+		  non_pic_objects+=" $non_pic_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
+		  libobjs+=" $pic_object"
+		  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+=" $arg" ;;
+	    esac
+	  else
+	    case "$xrpath " in
+	    *" $arg "*) ;;
+	    *) xrpath+=" $arg" ;;
+	    esac
+	  fi
+	  prev=
+	  continue
+	  ;;
+	shrext)
+	  shrext_cmds="$arg"
+	  prev=
+	  continue
+	  ;;
+	weak)
+	  weak_libs+=" $arg"
+	  prev=
+	  continue
+	  ;;
+	xcclinker)
+	  linker_flags+=" $qarg"
+	  compiler_flags+=" $qarg"
+	  prev=
+	  compile_command+=" $qarg"
+	  finalize_command+=" $qarg"
+	  continue
+	  ;;
+	xcompiler)
+	  compiler_flags+=" $qarg"
+	  prev=
+	  compile_command+=" $qarg"
+	  finalize_command+=" $qarg"
+	  continue
+	  ;;
+	xlinker)
+	  linker_flags+=" $qarg"
+	  compiler_flags+=" $wl$qarg"
+	  prev=
+	  compile_command+=" $wl$qarg"
+	  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.
+	  compile_command+=" $link_static_flag"
+	  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$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*)
+	  compile_command+=" $arg"
+	  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]:[\\/]* | =*) deplibs+=" $arg" ;;
+	    *) deplibs+=" -L$dir" ;;
+	  esac
+	  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;;
+	  *) dllsearchpath+=":$dir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  ::) dllsearchpath=$testbindir;;
+	  *) 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* | *-*-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$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+=" 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+=" $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|--sysroot)
+	compiler_flags+=" $arg"
+	compile_command+=" $arg"
+	finalize_command+=" $arg"
+	prev=xcompiler
+	continue
+	;;
+
+      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+      |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+	compiler_flags+=" $arg"
+	compile_command+=" $arg"
+	finalize_command+=" $arg"
+	case "$new_inherited_linker_flags " in
+	    *" $arg "*) ;;
+	    * ) 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_stripname '=' '' "$dir"
+	  dir=$lt_sysroot$func_stripname_result
+	  ;;
+	*)
+	  func_fatal_error "only absolute run-paths are allowed"
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) 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+=" $func_quote_for_eval_result"
+	  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+=" $wl$func_quote_for_eval_result"
+	  compiler_flags+=" $wl$func_quote_for_eval_result"
+	  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
+      # @file                GCC response files
+      # -tp=*                Portland pgcc target processor selection
+      # --sysroot=*          for sysroot support
+      # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+      -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*|-flto*|-fwhopr*|-fuse-linker-plugin)
+        func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+        compile_command+=" $arg"
+        finalize_command+=" $arg"
+        compiler_flags+=" $arg"
+        continue
+        ;;
+
+      # Some other compiler flag.
+      -* | +*)
+        func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+
+      *.$objext)
+	# A standard object.
+	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+=" $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+=" $pic_object"
+	      prev=
+	    fi
+
+	    # A PIC object.
+	    libobjs+=" $pic_object"
+	    arg="$pic_object"
+	  fi
+
+	  # Non-PIC object.
+	  if test "$non_pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    non_pic_object="$xdir$non_pic_object"
+
+	    # A standard non-PIC object
+	    non_pic_objects+=" $non_pic_object"
+	    if test -z "$pic_object" || test "$pic_object" = none ; then
+	      arg="$non_pic_object"
+	    fi
+	  else
+	    # If the PIC object exists, use it instead.
+	    # $xdir was prepended to $pic_object above.
+	    non_pic_object="$pic_object"
+	    non_pic_objects+=" $non_pic_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
+	    libobjs+=" $pic_object"
+	    non_pic_objects+=" $non_pic_object"
+	  else
+	    func_fatal_error "\`$arg' is not a valid libtool object"
+	  fi
+	fi
+	;;
+
+      *.$libext)
+	# An archive.
+	deplibs+=" $arg"
+	old_deplibs+=" $arg"
+	continue
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	func_resolve_sysroot "$arg"
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  dlfiles+=" $func_resolve_sysroot_result"
+	  prev=
+	elif test "$prev" = dlprefiles; then
+	  # The library was specified with -dlpreopen.
+	  dlprefiles+=" $func_resolve_sysroot_result"
+	  prev=
+	else
+	  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
+	compile_command+=" $arg"
+	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\"
+      compile_command+=" $arg"
+      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\"
+
+    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 "*) specialdeplibs+=" $deplib" ;;
+	esac
+      fi
+      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+=" $pre_post_deps" ;;
+	  esac
+	  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% $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=
+	  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 "*) ;;
+	    *) 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|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    compiler_flags+=" $deplib"
+	    if test "$linkmode" = lib ; then
+		case "$new_inherited_linker_flags " in
+		    *" $deplib "*) ;;
+		    * ) 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+=" $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"
+	    func_resolve_sysroot "$func_stripname_result"
+	    newlib_search_path+=" $func_resolve_sysroot_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"
+	    func_resolve_sysroot "$func_stripname_result"
+	    newlib_search_path+=" $func_resolve_sysroot_result"
+	    ;;
+	  *)
+	    func_warning "\`-L' is ignored for archives/objects"
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -L
+	-R*)
+	  if test "$pass" = link; 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 "*) ;;
+	    *) xrpath+=" $dir" ;;
+	    esac
+	  fi
+	  deplibs="$deplib $deplibs"
+	  continue
+	  ;;
+	*.la)
+	  func_resolve_sysroot "$deplib"
+	  lib=$func_resolve_sysroot_result
+	  ;;
+	*.$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 \"$deplib\"" 2>/dev/null | $SED 10q \
+		    | $EGREP "$match_pattern_regex" > /dev/null; then
+		    valid_a_lib=yes
+		  fi
+		;;
+		pass_all)
+		  valid_a_lib=yes
+		;;
+	      esac
+	      if test "$valid_a_lib" != yes; then
+		echo
+		$ECHO "*** Warning: Trying to link with static lib archive $deplib."
+		echo "*** I have the capability to make that library automatically link in when"
+		echo "*** you link to this library.  But I can only do this if you have a"
+		echo "*** shared version of the library, which you do not appear to have"
+		echo "*** because the file extensions .$libext of this argument makes me believe"
+		echo "*** that it is just a static archive that I should not 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+=" $deplib"
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      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 "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+	  for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+	    case " $new_inherited_linker_flags " in
+	      *" $tmp_inherited_linker_flag "*) ;;
+	      *) new_inherited_linker_flags+=" $tmp_inherited_linker_flag";;
+	    esac
+	  done
+	fi
+	dependency_libs=`$ECHO " $dependency_libs" | $SED '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+=" $dlopen"
+	  test -n "$dlpreopen" && 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+=" $ladir/$objdir/$old_library"
+	    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_preserve_dup_deps ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs+=" $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs+=" $deplib"
+	  done
+	  continue
+	fi # $pass = conv
+
+
+	# Get the name of the library we link against.
+	linklib=
+	if test -n "$old_library" &&
+	   { test "$prefer_static_libs" = yes ||
+	     test "$prefer_static_libs,$installed" = "built,no"; }; 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 "$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+=" $lib $dependency_libs"
+	  else
+	    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 "$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 "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+=" $abs_ladir"
+	  else
+	    dir="$ladir/$objdir"
+	    absdir="$abs_ladir/$objdir"
+	    # Remove this search path later
+	    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
+	  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"
+	        newdlprefiles+=" $dir/$linklib"
+	      else
+	        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+=" $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
+	        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+=" $dir/$old_library"
+	      # Otherwise, use the dlname, so that lt_dlopen finds it.
+	      elif test -n "$dlname"; then
+	        newdlprefiles+=" $dir/$dlname"
+	      else
+	        newdlprefiles+=" $dir/$linklib"
+	      fi
+	    ;;
+	  esac
+	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+=" $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"
+	         func_resolve_sysroot "$func_stripname_result"
+	         newlib_search_path+=" $func_resolve_sysroot_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_preserve_dup_deps ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs+=" $deplib" ;;
+	      esac
+	    fi
+	    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+="$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+=" $absdir" ;;
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) 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+=" $lib"
+	      need_relink=no
+	    ;;
+	  *)
+	    if test "$installed" = no; then
+	      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+=" $absdir" ;;
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) 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 "$opt_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$absdir"
+		# Try looking first in the location we're being installed to.
+		if test -n "$inst_prefix_dir"; then
+		  case $libdir in
+		    [\\/]*)
+		      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+="$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+="$libdir:" ;;
+		esac
+	      fi
+	    fi
+	  fi
+
+	  if test "$linkmode" = prog || test "$opt_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+="$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+=" -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+=" $temp_xrpath";;
+		   esac;;
+	      *) temp_deplibs+=" $libdir";;
+	      esac
+	    done
+	    dependency_libs="$temp_deplibs"
+	  fi
+
+	  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"
+	    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 "*)
+                specialdeplibs+=" $func_resolve_sysroot_result" ;;
+	      esac
+	    fi
+	    tmp_libs+=" $func_resolve_sysroot_result"
+	  done
+
+	  if test "$link_all_deplibs" != no; 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
+		      compiler_flags+=" ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+		      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 " $new_inherited_linker_flags" | $SED '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+=" $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+=" $deplib" ;;
+	      esac
+	      ;;
+	    *) 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+=" $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+="$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+=" $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
+	  # correct linux to gnu/linux during the next big refactor
+	  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|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
+	    ;;
+	  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) # 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 "$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+=":${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+=" $symfileobj"
+      test "X$libobjs" = "X " && libobjs=
+
+      if test "$opt_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+=" $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+=" $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"
+	  temp_xrpath+=" -R$func_replace_sysroot_result"
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) 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+=" $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+=" $lib" ;;
+	esac
+      done
+
+      if test "$build_libtool_libs" = yes; 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
+	    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+=" -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+=" $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+=" $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+=" $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+=" $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+=" $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+=" $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+=" $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 "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  if test "$want_nocaseglob" = yes; then
+		    shopt -s nocaseglob
+		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+		    $nocaseglob
+		  else
+		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+		  fi
+		  for potent_lib in $potential_libs; do
+		      # Follow soft links.
+		      if ls -lLd "$potent_lib" 2>/dev/null |
+			 $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
+			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+=" $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+=" $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval "\\$ECHO \"$libname_spec\""`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		    potlib="$potent_lib" # see symlink-check above in file_magic test
+		    if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
+		       $EGREP "$match_pattern_regex" > /dev/null; then
+		      newdeplibs+=" $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+=" $a_deplib"
+	      ;;
+	    esac
+	  done # Gone through all deplibs.
+	  ;;
+	none | unknown | *)
+	  newdeplibs=""
+	  tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; 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 " $tmp_deplibs" | $SED "s,$i,,"`
+	    done
+	  fi
+	  case $tmp_deplibs in
+	  *[!\	\ ]*)
+	    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
+	    ;;
+	  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 "$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 " $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 "*)
+	    new_libs+=" -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) new_libs+=" $deplib" ;;
+	  esac
+	  ;;
+	*) 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
+	# Remove ${wl} instances when linking with ld.
+	# FIXME: should test the right _cmds variable.
+	case $archive_cmds in
+	  *\$LD\ *) wl= ;;
+        esac
+	if test "$hardcode_into_libs" = yes; then
+	  # Hardcode the library paths
+	  hardcode_libdirs=
+	  dep_rpath=
+	  rpath="$finalize_rpath"
+	  test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
+	  for libdir in $rpath; do
+	    if test -n "$hardcode_libdir_flag_spec"; then
+	      if test -n "$hardcode_libdir_separator"; then
+		func_replace_sysroot "$libdir"
+		libdir=$func_replace_sysroot_result
+		if test -z "$hardcode_libdirs"; then
+		  hardcode_libdirs="$libdir"
+		else
+		  # 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_libdir_separator$libdir"
+		    ;;
+		  esac
+		fi
+	      else
+		eval flag=\"$hardcode_libdir_flag_spec\"
+		dep_rpath+=" $flag"
+	      fi
+	    elif test -n "$runpath_var"; then
+	      case "$perm_rpath " in
+	      *" $libdir "*) ;;
+	      *) 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
+	      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 "$opt_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+=" $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"
+	  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 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 "$try_normal_branch" = yes \
+		 && { test "$len" -lt "$max_cmd_len" \
+		      || test "$max_cmd_len" -le -1; }
+	      then
+		func_show_eval "$cmd" 'exit $?'
+		skipped_export=false
+	      elif test -n "$nm_file_list_spec"; then
+		func_basename "$output"
+		output_la=$func_basename_result
+		save_libobjs=$libobjs
+		save_output=$output
+		output=${output_objdir}/${output_la}.nm
+		func_to_tool_file "$output"
+		libobjs=$nm_file_list_spec$func_to_tool_file_result
+		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 "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 "$include_expsyms" | $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+=" $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+=" $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+=" $gentop"
+
+	    func_extract_archives $gentop $convenience
+	    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+=" $flag"
+	fi
+
+	# Make a backup of the uninstalled library when relinking
+	if test "$opt_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
+	  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 "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
+	      func_to_tool_file "$obj"
+	      $ECHO "$func_to_tool_file_result" >> $output
+	    done
+	    echo ')' >> $output
+	    delfiles+=" $output"
+	    func_to_tool_file "$output"
+	    output=$func_to_tool_file_result
+	  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+	    output=${output_objdir}/${output_la}.lnk
+	    func_verbose "creating linker input file list: $output"
+	    : > $output
+	    set x $save_libobjs
+	    shift
+	    firstobj=
+	    if test "$compiler_needs_object" = yes; then
+	      firstobj="$1 "
+	      shift
+	    fi
+	    for obj
+	    do
+	      func_to_tool_file "$obj"
+	      $ECHO "$func_to_tool_file_result" >> $output
+	    done
+	    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 "X$objlist" = X ||
+		   test "$len" -lt "$max_cmd_len"; then
+		  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.
+		    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
+	      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 "$opt_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 "$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
+	      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+=" $gentop"
+
+	  func_extract_archives $gentop $dlprefiles
+	  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 "$opt_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 "$opt_mode" = relink; then
+	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+	  if test -n "$convenience"; then
+	    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 "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+	else
+	  gentop="$output_objdir/${obj}x"
+	  generated+=" $gentop"
+
+	  func_extract_archives $gentop $convenience
+	  reload_conv_objs="$reload_objs $func_extract_archives_result"
+	fi
+      fi
+
+      # If we're not building shared, we need to use non_pic_objs
+      test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      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 " $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 "$tagname" = CXX ; then
+	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+	    10.[0123])
+	      compile_command+=" ${wl}-bind_at_load"
+	      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 "*)
+	    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+=" $deplib" ;;
+	  esac
+	  ;;
+	*) new_libs+=" $deplib" ;;
+	esac
+      done
+      compile_deplibs="$new_libs"
+
+
+      compile_command+=" $compile_deplibs"
+      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+=" $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_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath+=" $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) 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+=":$libdir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  ::) dllsearchpath=$testbindir;;
+	  *) 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_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath+=" $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$finalize_perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) 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 "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+	finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$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
+      *cegcc* | *mingw32ce*)
+        # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+        wrappers_required=no
+        ;;
+      *cygwin* | *mingw* )
+        if test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      *)
+        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 "$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
+      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+="$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+="$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 "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$opt_dry_run || $RM $output
+	# Link the executable and exit
+	func_show_eval "$link_command" 'exit $?'
+
+	if test -n "$postlink_cmds"; then
+	  func_to_tool_file "$output"
+	  postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+	  func_execute_cmds "$postlink_cmds" 'exit $?'
+	fi
+
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+	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 "$compile_var$compile_command$compile_rpath" | $SED '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 "$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
+
+      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+=" $symfileobj"
+	  fi
+	fi
+	addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	generated+=" $gentop"
+
+	func_extract_archives $gentop $addlibs
+	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+=" $gentop"
+
+	  func_extract_archives $gentop $dlprefiles
+	  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+=" $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+=" $gentop/$newobj"
+	      ;;
+	    *) 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
+	    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 "$relink_command" | $SED "$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"
+		func_resolve_sysroot "$deplib"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$deplib' is not a valid libtool archive"
+		newdependency_libs+=" ${lt_sysroot:+=}$libdir/$name"
+		;;
+	      -L*)
+		func_stripname -L '' "$deplib"
+		func_replace_sysroot "$func_stripname_result"
+		newdependency_libs+=" -L$func_replace_sysroot_result"
+		;;
+	      -R*)
+		func_stripname -R '' "$deplib"
+		func_replace_sysroot "$func_stripname_result"
+		newdependency_libs+=" -R$func_replace_sysroot_result"
+		;;
+	      *) 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+=" ${lt_sysroot:+=}$libdir/$name"
+		;;
+	      *) 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+=" ${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
+	      newdlfiles+=" $abs"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      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 "x$bindir" != x ;
+	      then
+		func_relative_path "$install_libdir" "$bindir"
+		tdlname=$func_relative_path_result$dlname
+	      else
+		# Otherwise fall back on heuristic.
+		tdlname=../bin/$dlname
+	      fi
+	      ;;
+	  esac
+	  $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# 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 "$opt_mode" = link || test "$opt_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+=" $arg"; rmforce=yes ;;
+      -*) RM+=" $arg" ;;
+      *) 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 "X$dir" = X.; then
+	odir="$objdir"
+      else
+	odir="$dir/$objdir"
+      fi
+      func_basename "$file"
+      name="$func_basename_result"
+      test "$opt_mode" = uninstall && odir="$dir"
+
+      # Remember odir for removal later, being careful to avoid duplicates
+      if test "$opt_mode" = clean; then
+	case " $rmdirs " in
+	  *" $odir "*) ;;
+	  *) 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 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+=" $odir/$n"
+	  done
+	  test -n "$old_library" && rmfiles+=" $odir/$old_library"
+
+	  case "$opt_mode" in
+	  clean)
+	    case " $library_names " in
+	    *" $dlname "*) ;;
+	    *) test -n "$dlname" && rmfiles+=" $odir/$dlname" ;;
+	    esac
+	    test -n "$libdir" && rmfiles+=" $odir/$name $odir/${name}i"
+	    ;;
+	  uninstall)
+	    if test -n "$library_names"; then
+	      # Do each command in the postuninstall commands.
+	      func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+	    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+=" $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+=" $dir/$non_pic_object"
+	  fi
+	fi
+	;;
+
+      *)
+	if test "$opt_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+=" $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+=" $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+=" $odir/$name $odir/${name}S.${objext}"
+	    if test "$fast_install" = yes && test -n "$relink_command"; then
+	      rmfiles+=" $odir/lt-$name"
+	    fi
+	    if test "X$noexename" != "X$name" ; then
+	      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
+}
+
+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
+    func_mode_uninstall ${1+"$@"}
+
+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
+# 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
+
+
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
+
+# The linker used to build libraries.
+LD="/usr/bin/ld -m elf_x86_64"
+
+# How to create reloadable object files.
+reload_flag=" -r"
+reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
+
+# Commands used to build an old-style archive.
+old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$tool_oldlib"
+
+# A language specific compiler.
+CC="g++"
+
+# Is the compiler the GNU compiler?
+with_gcc=yes
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=" -fno-builtin"
+
+# Additional compiler flags for building library objects.
+pic_flag=" -fPIC -DPIC"
+
+# How to pass a linker flag through the compiler.
+wl="-Wl,"
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=""
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o="yes"
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=no
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=no
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec="\${wl}--export-dynamic"
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object="no"
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=""
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=""
+
+# Commands used to build a shared archive.
+archive_cmds="\$CC \$pic_flag -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
+archive_expsym_cmds="\$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"
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=""
+module_expsym_cmds=""
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld="yes"
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=""
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=""
+
+# Flag to hardcode $libdir into a binary during linking.
+# This must work even if $libdir does not exist
+hardcode_libdir_flag_spec="\${wl}-rpath \${wl}\$libdir"
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=""
+
+# Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=no
+
+# 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
+# library is relocated.
+hardcode_direct_absolute=no
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=no
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=unsupported
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=no
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=no
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=unknown
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=no
+
+# The commands to list exported symbols.
+export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*"
+
+# Symbols that must always be exported.
+include_expsyms=""
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=""
+
+# Commands necessary for finishing linking programs.
+postlink_cmds=""
+
+# Specify filename containing input files.
+file_list_spec=""
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=immediate
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs="/usr/lib/gcc/x86_64-redhat-linux/4.8.2 /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64 /lib/../lib64 /usr/lib/../lib64 /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../.."
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects="/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.8.2/crtbeginS.o"
+postdep_objects="/usr/lib/gcc/x86_64-redhat-linux/4.8.2/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64/crtn.o"
+predeps=""
+postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path="-L/usr/lib/gcc/x86_64-redhat-linux/4.8.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../.."
+
+# ### END LIBTOOL TAG CONFIG: CXX
diff --git a/jni/libucommon/sources/nossl/.deps/cipher.Plo b/jni/libucommon/sources/nossl/.deps/cipher.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/nossl/.deps/cipher.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/nossl/.deps/common.Plo b/jni/libucommon/sources/nossl/.deps/common.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/nossl/.deps/common.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/nossl/.deps/digest.Plo b/jni/libucommon/sources/nossl/.deps/digest.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/nossl/.deps/digest.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/nossl/.deps/hmac.Plo b/jni/libucommon/sources/nossl/.deps/hmac.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/nossl/.deps/hmac.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/nossl/.deps/md5.Plo b/jni/libucommon/sources/nossl/.deps/md5.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/nossl/.deps/md5.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/nossl/.deps/random.Plo b/jni/libucommon/sources/nossl/.deps/random.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/nossl/.deps/random.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/nossl/.deps/secure.Plo b/jni/libucommon/sources/nossl/.deps/secure.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/nossl/.deps/secure.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/nossl/.deps/sha1.Plo b/jni/libucommon/sources/nossl/.deps/sha1.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/nossl/.deps/sha1.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/nossl/.deps/ssl.Plo b/jni/libucommon/sources/nossl/.deps/ssl.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/nossl/.deps/ssl.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/nossl/.deps/sstream.Plo b/jni/libucommon/sources/nossl/.deps/sstream.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/nossl/.deps/sstream.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/nossl/Makefile b/jni/libucommon/sources/nossl/Makefile
new file mode 100644
index 0000000..e1defad
--- /dev/null
+++ b/jni/libucommon/sources/nossl/Makefile
@@ -0,0 +1,696 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# nossl/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2013 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.
+
+
+
+# Copyright (C) 2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+
+
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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)/ucommon
+pkgincludedir = $(includedir)/ucommon
+pkglibdir = $(libdir)/ucommon
+pkglibexecdir = $(libexecdir)/ucommon
+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 = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+target_triplet = x86_64-unknown-linux-gnu
+subdir = nossl
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/autoconf/depcomp $(noinst_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+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)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libusecure_la_LIBADD =
+am_libusecure_la_OBJECTS = secure.lo ssl.lo digest.lo random.lo \
+	cipher.lo hmac.lo sstream.lo md5.lo sha1.lo common.lo
+libusecure_la_OBJECTS = $(am_libusecure_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libusecure_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(libusecure_la_LDFLAGS) $(LDFLAGS) \
+	-o $@
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = -I. -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+SOURCES = $(libusecure_la_SOURCES)
+DIST_SOURCES = $(libusecure_la_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+HEADERS = $(noinst_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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing aclocal-1.13
+AMTAR = $${TAR-tar}
+AM_DEFAULT_VERBOSITY = 1
+AR = ar
+AS = as
+AUTOCONF = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoconf
+AUTOHEADER = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoheader
+AUTOMAKE = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing automake-1.13
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CHECKFLAGS = 
+COMPAT = commoncpp
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS =  -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DLLTOOL = dlltool
+DOXYGEN = /usr/bin/doxygen
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /usr/bin/grep -E
+EXEEXT = 
+FGREP = /usr/bin/grep -F
+GNUTLS_CFLAGS = 
+GNUTLS_LIBS = -lgnutls
+GREP = /usr/bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+LT_GENERIC = $(SHELL) $(top_builddir)/libtool
+LT_VERSION = 6:3:0
+MAKEINFO = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing makeinfo
+MANIFEST_TOOL = :
+MKDIR_P = /usr/bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_CFLAGS = 
+OPENSSL_LIBS = -lssl -lcrypto -lz 
+OTOOL = 
+OTOOL64 = 
+PACKAGE = ucommon
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = ucommon
+PACKAGE_STRING = ucommon 6.0.7
+PACKAGE_TARNAME = ucommon
+PACKAGE_URL = 
+PACKAGE_VERSION = 6.0.7
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PKG_CONFIG_LIBDIR = 
+PKG_CONFIG_PATH = 
+RANLIB = ranlib
+SECURE = gnutls
+SECURE_LIBS = -lgnutls
+SECURE_LOCAL = ../gnutls/libusecure.la -lgnutls
+SED = /usr/bin/sed
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = strip
+UCOMMON_CFGPATH = /etc
+UCOMMON_CLINK =  -lc
+UCOMMON_FLAGS =  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+UCOMMON_INCLUDES = /usr/local/include/ucommon
+UCOMMON_LIBC = -lc
+UCOMMON_LIBS =   -lrt  -ldl -lpthread -lc
+UCOMMON_LINKED =   -lrt  -ldl -lpthread
+UCOMMON_LOCALE = /usr/local/share/locale
+UCOMMON_MODEL = CXX
+UCOMMON_PREFIX = /usr/local
+UCOMMON_VARPATH = /var
+UCOMMON_VISIBILITY = 1
+VERSION = 6.0.7
+abs_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources/nossl
+abs_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources/nossl
+abs_top_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+abs_top_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+includes = ${includedir}/ucommon
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+libs = /usr/local/lib
+localedir = ${datarootdir}/locale
+localstatedir = /var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = /etc
+target = x86_64-unknown-linux-gnu
+target_alias = 
+target_cpu = x86_64
+target_os = linux-gnu
+target_vendor = unknown
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = ..
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = -version-info $(LT_VERSION)
+AM_CXXFLAGS = -I$(top_srcdir)/inc  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+noinst_HEADERS = local.h md5.h sha1.h
+lib_LTLIBRARIES = libusecure.la
+libusecure_la_LDFLAGS = ../corelib/libucommon.la -lgnutls   -lrt  -ldl -lpthread -lc  -lc $(RELEASE)
+libusecure_la_SOURCES = secure.cpp ssl.cpp digest.cpp random.cpp cipher.cpp \
+    hmac.cpp sstream.cpp md5.cpp sha1.cpp common.cpp
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(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) --gnu nossl/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu nossl/Makefile
+.PRECIOUS: 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):
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	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)'; 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)'; \
+	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}; \
+	}
+
+libusecure.la: $(libusecure_la_OBJECTS) $(libusecure_la_DEPENDENCIES) $(EXTRA_libusecure_la_DEPENDENCIES) 
+	$(AM_V_CXXLD)$(libusecure_la_LINK) -rpath $(libdir) $(libusecure_la_OBJECTS) $(libusecure_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/cipher.Plo
+include ./$(DEPDIR)/common.Plo
+include ./$(DEPDIR)/digest.Plo
+include ./$(DEPDIR)/hmac.Plo
+include ./$(DEPDIR)/md5.Plo
+include ./$(DEPDIR)/random.Plo
+include ./$(DEPDIR)/secure.Plo
+include ./$(DEPDIR)/sha1.Plo
+include ./$(DEPDIR)/ssl.Plo
+include ./$(DEPDIR)/sstream.Plo
+
+.cpp.o:
+	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	$(AM_V_CXX)source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	$(AM_V_CXX)source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+#	$(AM_V_CXX)source='$<' object='$@' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+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`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(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
+
+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
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)"; 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:
+
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+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
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool 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-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 tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+
+
+# 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/jni/libucommon/sources/nossl/Makefile.am b/jni/libucommon/sources/nossl/Makefile.am
new file mode 100644
index 0000000..9099a84
--- /dev/null
+++ b/jni/libucommon/sources/nossl/Makefile.am
@@ -0,0 +1,21 @@
+# Copyright (C) 2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = -version-info $(LT_VERSION)
+AM_CXXFLAGS = -I$(top_srcdir)/inc @UCOMMON_FLAGS@
+
+noinst_HEADERS = local.h md5.h sha1.h
+lib_LTLIBRARIES = libusecure.la
+
+libusecure_la_LDFLAGS = ../corelib/libucommon.la @SECURE_LIBS@ @UCOMMON_LIBS@ @UCOMMON_CLINK@ $(RELEASE)
+libusecure_la_SOURCES = secure.cpp ssl.cpp digest.cpp random.cpp cipher.cpp \
+    hmac.cpp sstream.cpp md5.cpp sha1.cpp common.cpp
+
diff --git a/jni/libucommon/sources/nossl/Makefile.in b/jni/libucommon/sources/nossl/Makefile.in
new file mode 100644
index 0000000..89d51d6
--- /dev/null
+++ b/jni/libucommon/sources/nossl/Makefile.in
@@ -0,0 +1,696 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 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@
+
+# Copyright (C) 2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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@
+target_triplet = @target@
+subdir = nossl
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/autoconf/depcomp $(noinst_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+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)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libusecure_la_LIBADD =
+am_libusecure_la_OBJECTS = secure.lo ssl.lo digest.lo random.lo \
+	cipher.lo hmac.lo sstream.lo md5.lo sha1.lo common.lo
+libusecure_la_OBJECTS = $(am_libusecure_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libusecure_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(libusecure_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)/autoconf/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+SOURCES = $(libusecure_la_SOURCES)
+DIST_SOURCES = $(libusecure_la_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+HEADERS = $(noinst_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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECKFLAGS = @CHECKFLAGS@
+COMPAT = @COMPAT@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_GENERIC = @LT_GENERIC@
+LT_VERSION = @LT_VERSION@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+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@
+RANLIB = @RANLIB@
+SECURE = @SECURE@
+SECURE_LIBS = @SECURE_LIBS@
+SECURE_LOCAL = @SECURE_LOCAL@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UCOMMON_CFGPATH = @UCOMMON_CFGPATH@
+UCOMMON_CLINK = @UCOMMON_CLINK@
+UCOMMON_FLAGS = @UCOMMON_FLAGS@
+UCOMMON_INCLUDES = @UCOMMON_INCLUDES@
+UCOMMON_LIBC = @UCOMMON_LIBC@
+UCOMMON_LIBS = @UCOMMON_LIBS@
+UCOMMON_LINKED = @UCOMMON_LINKED@
+UCOMMON_LOCALE = @UCOMMON_LOCALE@
+UCOMMON_MODEL = @UCOMMON_MODEL@
+UCOMMON_PREFIX = @UCOMMON_PREFIX@
+UCOMMON_VARPATH = @UCOMMON_VARPATH@
+UCOMMON_VISIBILITY = @UCOMMON_VISIBILITY@
+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_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+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@
+includes = @includes@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libs = @libs@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = -version-info $(LT_VERSION)
+AM_CXXFLAGS = -I$(top_srcdir)/inc @UCOMMON_FLAGS@
+noinst_HEADERS = local.h md5.h sha1.h
+lib_LTLIBRARIES = libusecure.la
+libusecure_la_LDFLAGS = ../corelib/libucommon.la @SECURE_LIBS@ @UCOMMON_LIBS@ @UCOMMON_CLINK@ $(RELEASE)
+libusecure_la_SOURCES = secure.cpp ssl.cpp digest.cpp random.cpp cipher.cpp \
+    hmac.cpp sstream.cpp md5.cpp sha1.cpp common.cpp
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(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) --gnu nossl/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu nossl/Makefile
+.PRECIOUS: 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):
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	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)'; 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)'; \
+	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}; \
+	}
+
+libusecure.la: $(libusecure_la_OBJECTS) $(libusecure_la_DEPENDENCIES) $(EXTRA_libusecure_la_DEPENDENCIES) 
+	$(AM_V_CXXLD)$(libusecure_la_LINK) -rpath $(libdir) $(libusecure_la_OBJECTS) $(libusecure_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/digest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hmac.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secure.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sstream.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+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`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(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
+
+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
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)"; 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:
+
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+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
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool 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-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 tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+
+
+# 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/jni/libucommon/sources/nossl/cipher.cpp b/jni/libucommon/sources/nossl/cipher.cpp
new file mode 100644
index 0000000..b52562e
--- /dev/null
+++ b/jni/libucommon/sources/nossl/cipher.cpp
@@ -0,0 +1,91 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+static const unsigned char *_salt = NULL;
+static unsigned _rounds = 1;
+
+void Cipher::Key::assign(const char *text, size_t size, const unsigned char *salt, unsigned rounds)
+{
+    keysize = 0;
+}
+
+void Cipher::Key::set(const char *cipher)
+{
+    clear();
+}
+
+void Cipher::Key::set(const char *cipher, const char *digest)
+{
+    set(cipher);
+}
+
+void Cipher::Key::assign(const char *text, size_t size)
+{
+    assign(text, size, _salt, _rounds);
+}
+
+void Cipher::Key::options(const unsigned char *salt, unsigned rounds)
+{
+    _salt = salt;
+    _rounds = rounds;
+}
+
+bool Cipher::has(const char *id)
+{
+    return false;
+}
+
+void Cipher::push(unsigned char *address, size_t size)
+{
+}
+
+void Cipher::release(void)
+{
+}
+
+void Cipher::set(key_t key, mode_t mode, unsigned char *address, size_t size)
+{
+    release();
+
+    bufsize = size;
+    bufmode = mode;
+    bufaddr = address;
+
+    memcpy(&keys, key, sizeof(keys));
+}
+
+size_t Cipher::put(const unsigned char *data, size_t size)
+{
+    size_t count = 0;
+
+    while(bufsize && size + bufpos > bufsize) {
+        size_t diff = bufsize - bufpos;
+        count += put(data, diff);
+        data += diff;
+        size -= diff;
+    }
+
+    return 0;
+}
+
+size_t Cipher::pad(const unsigned char *data, size_t size)
+{
+    return 0;
+}
+
diff --git a/jni/libucommon/sources/nossl/common.cpp b/jni/libucommon/sources/nossl/common.cpp
new file mode 100644
index 0000000..ee6f5dd
--- /dev/null
+++ b/jni/libucommon/sources/nossl/common.cpp
@@ -0,0 +1,444 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+Digest::Digest()
+{
+    hashtype = NULL;
+    hashid = 0;
+    context = NULL;
+    bufsize = 0;
+    textbuf[0] = 0;
+}
+
+Digest::Digest(const char *type)
+{
+    hashtype = NULL;
+    hashid = 0;
+    context = NULL;
+    bufsize = 0;
+    textbuf[0] = 0;
+
+    set(type);
+}
+
+Digest::~Digest()
+{
+    release();
+}
+
+const char *Digest::c_str(void)
+{
+    if(!bufsize)
+        get();
+
+    return textbuf;
+}
+
+void Digest::uuid(char *str, const char *name, const unsigned char *ns)
+{
+    unsigned mask = 0x50;
+    const char *type = "sha1";
+    if(!has("sha1")) {
+        mask = 0x30;
+        type = "md5";
+    }
+
+    Digest md(type);
+    if(ns)
+        md.put(ns, 16);
+    md.puts(name);
+    unsigned char *buf = (unsigned char *)md.get();
+
+    buf[6] &= 0x0f;
+    buf[6] |= mask;
+    buf[8] &= 0x3f;
+    buf[8] |= 0x80;
+
+    String::hexdump(buf, str, "4-2-2-2-6");
+}
+
+String Digest::uuid(const char *name, const unsigned char *ns)
+{
+    char buf[38];
+    uuid(buf, name, ns);
+    return String(buf);
+}
+
+#if defined(_MSWINDOWS_)
+
+static void cexport(HCERTSTORE ca, FILE *fp)
+{
+    PCCERT_CONTEXT cert = NULL;
+    const uint8_t *cp;
+    char buf[80];
+
+    while ((cert = CertEnumCertificatesInStore(ca, cert)) != NULL) {
+        fprintf(fp, "-----BEGIN CERTIFICATE-----\n");
+        size_t total = cert->cbCertEncoded;
+        size_t count;
+        cp = (const uint8_t *)cert->pbCertEncoded;
+        while(total) {
+            count = String::b64encode(buf, cp, total, 64);
+            if(count)
+                fprintf(fp, "%s\n", buf);
+            total -= count;
+            cp += count;
+        }
+        fprintf(fp, "-----END CERTIFICATE-----\n");
+    }
+}
+
+const char *secure::oscerts(void)
+{
+    const char *path = "c:/temp/ca-bundle.crt";
+    if(!is_file(path)) {
+        if(oscerts(path))
+            return NULL;
+    }
+    return path;
+}
+
+int secure::oscerts(const char *pathname)
+{
+    bool caset;
+    string_t target;
+
+    if(pathname[1] == ':' || pathname[0] == '/' || pathname[0] == '\\')
+        target = pathname;
+    else
+        target = shell::path(shell::USER_CONFIG) + "/" + pathname;
+
+    FILE *fp = fopen(*target, "wt");
+
+    if(!fp)
+        return ENOSYS;
+
+    HCERTSTORE ca = CertOpenSystemStoreA((HCRYPTPROV)NULL, "ROOT");
+    if(ca) {
+        caset = true;
+        cexport(ca, fp);
+        CertCloseStore(ca, 0);
+    }
+
+    ca = CertOpenSystemStoreA((HCRYPTPROV)NULL, "CA");
+    if(ca) {
+        caset = true;
+        cexport(ca, fp);
+        CertCloseStore(ca, 0);
+    }
+
+    fclose(fp);
+
+    if(!caset) {
+        fsys::erase(*target);
+        return ENOSYS;
+    }
+    return 0;
+}
+
+#else
+const char *secure::oscerts(void)
+{
+    if(is_file("/etc/ssl/certs/ca-certificates.crt"))
+        return "/etc/ssl/certs/ca-certificates.crt";
+
+    if(is_file("/etc/pki/tls/ca-bundle.crt"))
+        return "/etc/pki/tls/ca-bundle.crt";
+
+    if(is_file("/etc/ssl/ca-bundle.pem"))
+        return "/etc/ssl/ca-bundle.pem";
+
+    return NULL;
+}
+
+int secure::oscerts(const char *pathname)
+{
+    string_t source = oscerts();
+    string_t target;
+
+    if(pathname[0] == '/')
+        target = pathname;
+    else
+        target = shell::path(shell::USER_CONFIG) + "/" + pathname;
+
+    if(!source)
+        return ENOSYS;
+
+    return fsys::copy(*source, *target);
+}
+#endif
+
+void secure::uuid(char *str)
+{
+    static unsigned char buf[16];
+    static Timer::tick_t prior = 0l;
+    static unsigned short seq;
+    Timer::tick_t current = Timer::ticks();
+
+    Mutex::protect(&buf);
+
+    // get our (random) node identifier...
+    if(!prior)
+        Random::fill(buf + 10, 6);
+
+    if(current == prior)
+        ++seq;
+    else
+        Random::fill((unsigned char *)&seq, sizeof(seq));
+
+    buf[8] = (unsigned char)((seq >> 8) & 0xff);
+    buf[9] = (unsigned char)(seq & 0xff);
+    buf[3] = (unsigned char)(current & 0xff);
+    buf[2] = (unsigned char)((current >> 8) & 0xff);
+    buf[1] = (unsigned char)((current >> 16) & 0xff);
+    buf[0] = (unsigned char)((current >> 24) & 0xff);
+    buf[5] = (unsigned char)((current >> 32) & 0xff);
+    buf[4] = (unsigned char)((current >> 40) & 0xff);
+    buf[7] = (unsigned char)((current >> 48) & 0xff);
+    buf[6] = (unsigned char)((current >> 56) & 0xff);
+
+    buf[6] &= 0x0f;
+    buf[6] |= 0x10;
+    buf[8] |= 0x80;
+    String::hexdump(buf, str, "4-2-2-2-6");
+    Mutex::release(&buf);
+}
+
+String secure::uuid(void)
+{
+    char buf[38];
+    uuid(buf);
+    return String(buf);
+}
+
+HMAC::HMAC()
+{
+    hmactype = NULL;
+    hmacid = 0;
+    context = NULL;
+    bufsize = 0;
+    textbuf[0] = 0;
+}
+
+HMAC::HMAC(const char *digest, const char *key, size_t len)
+{
+    context = NULL;
+    bufsize = 0;
+    hmactype = NULL;
+    hmacid = 0;
+    textbuf[0] = 0;
+
+    set(digest, key, len);
+}
+
+HMAC::~HMAC()
+{
+    release();
+}
+
+const char *HMAC::c_str(void)
+{
+    if(!bufsize)
+        get();
+
+    return textbuf;
+}
+
+Cipher::Key::Key(const char *cipher)
+{
+    hashtype = algotype = NULL;
+    hashid = algoid = 0;
+
+    secure::init();
+
+    set(cipher);
+}
+
+Cipher::Key::Key(const char *cipher, const char *digest)
+{
+    hashtype = algotype = NULL;
+    hashid = algoid = 0;
+
+    secure::init();
+    set(cipher, digest);
+}
+
+Cipher::Key::Key(const char *cipher, const char *digest, const char *text, size_t size, const unsigned char *salt, unsigned rounds)
+{
+    hashtype = algotype = NULL;
+    hashid = algoid = 0;
+
+    secure::init();
+
+    set(cipher, digest);
+    assign(text, size, salt, rounds);
+}
+
+Cipher::Key::Key()
+{
+    secure::init();
+    clear();
+}
+
+Cipher::Key::~Key()
+{
+    clear();
+}
+
+void Cipher::Key::clear(void)
+{
+    algotype = NULL;
+    hashtype = NULL;
+    algoid = hashid = 0;
+    keysize = blksize = 0;
+
+    zerofill(keybuf, sizeof(keybuf));
+    zerofill(ivbuf, sizeof(ivbuf));
+}
+
+Cipher::Cipher(key_t key, mode_t mode, unsigned char *address, size_t size)
+{
+    bufaddr = NULL;
+    bufsize = bufpos = 0;
+    context = NULL;
+    set(key, mode, address, size);
+}
+
+Cipher::Cipher()
+{
+    bufaddr = NULL;
+    bufsize = bufpos = 0;
+    context = NULL;
+}
+
+Cipher::~Cipher()
+{
+    flush();
+    release();
+}
+
+size_t Cipher::flush(void)
+{
+    size_t total = bufpos;
+
+    if(bufpos && bufsize) {
+        push(bufaddr, bufpos);
+        bufpos = 0;
+    }
+    bufaddr = NULL;
+    return total;
+}
+
+size_t Cipher::puts(const char *text)
+{
+    char padbuf[64];
+    if(!text || !bufaddr)
+        return 0;
+
+    size_t len = strlen(text) + 1;
+    unsigned pad = len % keys.iosize();
+
+    size_t count = put((const unsigned char *)text, len - pad);
+    if(pad) {
+        memcpy(padbuf, text + len - pad, pad);
+        memset(padbuf + pad, 0, keys.iosize() - pad);
+        count += put((const unsigned char *)padbuf, keys.iosize());
+        zerofill(padbuf, sizeof(padbuf));
+    }
+    return flush();
+}
+
+void Cipher::set(unsigned char *address, size_t size)
+{
+    flush();
+    bufsize = size;
+    bufaddr = address;
+    bufpos = 0;
+}
+
+size_t Cipher::process(unsigned char *buf, size_t len, bool flag)
+{
+    set(buf);
+    if(flag)
+        return pad(buf, len);
+    else
+        return put(buf, len);
+}
+
+int Random::get(void)
+{
+    uint16_t v;;
+    fill((unsigned char *)&v, sizeof(v));
+    v /= 2;
+    return (int)v;
+}
+
+int Random::get(int min, int max)
+{
+    unsigned rand;
+    int range = max - min + 1;
+    unsigned umax;
+
+    if(max < min)
+        return 0;
+
+    memset(&umax, 0xff, sizeof(umax));
+
+    do {
+        fill((unsigned char *)&rand, sizeof(rand));
+    } while(rand > umax - (umax % range));
+
+    return min + (rand % range);
+}
+
+double Random::real(void)
+{
+    unsigned umax;
+    unsigned rand;
+
+    memset(&umax, 0xff, sizeof(umax));
+    fill((unsigned char *)&rand, sizeof(rand));
+
+    return ((double)rand) / ((double)umax);
+}
+
+double Random::real(double min, double max)
+{
+    return real() * (max - min) + min;
+}
+
+void Random::uuid(char *str)
+{
+    unsigned char buf[16];
+
+    fill(buf, sizeof(buf));
+    buf[6] &= 0x0f;
+    buf[6] |= 0x40;
+    buf[8] &= 0x3f;
+    buf[8] |= 0x80;
+    String::hexdump(buf, str, "4-2-2-2-6");
+}
+
+String Random::uuid(void)
+{
+    char buf[38];
+    uuid(buf);
+    return String(buf);
+}
+
diff --git a/jni/libucommon/sources/nossl/digest.cpp b/jni/libucommon/sources/nossl/digest.cpp
new file mode 100644
index 0000000..2c34227
--- /dev/null
+++ b/jni/libucommon/sources/nossl/digest.cpp
@@ -0,0 +1,188 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+bool Digest::has(const char *id)
+{
+    if(eq_case(id, "md5"))
+        return true;
+
+    if(eq_case(id, "sha1") || eq_case(id, "sha"))
+        return true;
+
+    return false;
+}
+
+void Digest::set(const char *type)
+{
+    release();
+
+    if(eq_case(type, "md5")) {
+        hashtype = "m";
+        context = new MD5_CTX;
+        MD5Init((MD5_CTX*)context);
+    }
+    else if(eq_case(type, "sha") || eq_case(type, "sha1")) {
+        hashtype = "s";
+        context = new SHA1_CTX;
+        SHA1Init((SHA1_CTX*)context);
+    }
+}
+
+void Digest::release(void)
+{
+
+    if(context && hashtype) {
+        switch(*((char *)hashtype)) {
+        case 'm':
+            delete (MD5_CTX*)context;
+            break;
+        case 's':
+            delete (SHA1_CTX *)context;
+            break;
+        default:
+            break;
+        }
+        context = NULL;
+    }
+
+    bufsize = 0;
+    textbuf[0] = 0;
+    hashtype = NULL;
+}
+
+bool Digest::put(const void *address, size_t size)
+{
+    if(!context || !hashtype)
+        return false;
+
+    switch(*((char *)hashtype)) {
+    case 'm':
+        MD5Update((MD5_CTX*)context, (const unsigned char *)address, size);
+        return true;
+    case 's':
+        SHA1Update((SHA1_CTX*)context, (const unsigned char *)address, size);
+        return true;
+    default:
+        return false;
+    }
+}
+
+void Digest::reset(void)
+{
+    if(hashtype) {
+        switch(*((char *)hashtype)) {
+        case 'm':
+            if(!context)
+                context = new MD5_CTX;
+            MD5Init((MD5_CTX*)context);
+            break;
+        case 's':
+            if(!context)
+                context = new SHA1_CTX;
+            SHA1Init((SHA1_CTX*)context);
+            break;
+        default:
+            break;
+        }
+    }
+    bufsize = 0;
+}
+
+void Digest::recycle(bool bin)
+{
+    unsigned size = bufsize;
+
+    if(!context || !hashtype)
+        return;
+
+    switch(*((char *)hashtype)) {
+    case 'm':
+        if(!bufsize)
+            MD5Final(buffer, (MD5_CTX*)context);
+        size = 16;
+        MD5Init((MD5_CTX*)context);
+        if(bin)
+            MD5Update((MD5_CTX*)context, (const unsigned char *)buffer, size);
+        else {
+            unsigned count = 0;
+            while(count < bufsize) {
+                snprintf(textbuf + (count * 2), 3,
+"%2.2x", buffer[count]);
+                ++count;
+            }
+            MD5Update((MD5_CTX*)context, (const unsigned
+char *)textbuf, size * 2);
+        }
+        break;
+    case 's':
+        if(!bufsize)
+            SHA1Final(buffer, (SHA1_CTX*)context);
+        size = 20;
+        SHA1Init((SHA1_CTX*)context);
+        if(bin)
+            SHA1Update((SHA1_CTX*)context, (const unsigned char *)buffer, size);
+        else {
+            unsigned count = 0;
+            while(count < bufsize) {
+                snprintf(textbuf + (count * 2), 3,
+"%2.2x", buffer[count]);
+                ++count;
+            }
+            SHA1Update((SHA1_CTX*)context, (const unsigned
+char *)textbuf, size * 2);
+        }
+        break;
+    default:
+        break;
+    }
+    bufsize = 0;
+}
+
+const unsigned char *Digest::get(void)
+{
+    unsigned count = 0;
+
+    if(bufsize)
+        return buffer;
+
+    if(!context || !hashtype)
+        return NULL;
+
+    switch(*((char *)hashtype)) {
+    case 'm':
+        MD5Final(buffer, (MD5_CTX*)context);
+        release();
+        bufsize = 16;
+        break;
+    case 's':
+        SHA1Final(buffer, (SHA1_CTX*)context);
+        release();
+        bufsize = 20;
+        break;
+    default:
+        break;
+    }
+
+    while(count < bufsize) {
+        snprintf(textbuf + (count * 2), 3, "%2.2x", buffer[count]);
+        ++count;
+    }
+    return buffer;
+}
+
diff --git a/jni/libucommon/sources/nossl/hmac.cpp b/jni/libucommon/sources/nossl/hmac.cpp
new file mode 100644
index 0000000..4181eaf
--- /dev/null
+++ b/jni/libucommon/sources/nossl/hmac.cpp
@@ -0,0 +1,50 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+bool HMAC::has(const char *id)
+{
+    return false;
+}
+
+void HMAC::set(const char *digest, const char *key, size_t len)
+{
+    release();
+}
+
+void HMAC::release(void)
+{
+    bufsize = 0;
+    textbuf[0] = 0;
+
+    hmactype = " ";
+}
+
+bool HMAC::put(const void *address, size_t size)
+{
+    return false;
+}
+
+const unsigned char *HMAC::get(void)
+{
+    if(bufsize)
+        return buffer;
+
+    return NULL;
+}
+
diff --git a/jni/libucommon/sources/nossl/local.h b/jni/libucommon/sources/nossl/local.h
new file mode 100644
index 0000000..70dad66
--- /dev/null
+++ b/jni/libucommon/sources/nossl/local.h
@@ -0,0 +1,44 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/ucommon.h>
+#include <ucommon/export.h>
+#include <ucommon/secure.h>
+#include <errno.h>
+#include "md5.h"
+#include "sha1.h"
+
+#ifdef  _MSWINDOWS_
+#include <wincrypt.h>
+#endif
+
+#define NAMESPACE_LOCAL namespace __secure__ {
+#define LOCAL_NAMESPACE __secure__
+
+NAMESPACE_LOCAL
+using namespace UCOMMON_NAMESPACE;
+
+#ifdef  _MSWINDOWS_
+extern HCRYPTPROV _handle;
+#endif
+
+END_NAMESPACE
+
+using namespace UCOMMON_NAMESPACE;
+using namespace LOCAL_NAMESPACE;
+
diff --git a/jni/libucommon/sources/nossl/md5.cpp b/jni/libucommon/sources/nossl/md5.cpp
new file mode 100644
index 0000000..183d13f
--- /dev/null
+++ b/jni/libucommon/sources/nossl/md5.cpp
@@ -0,0 +1,247 @@
+/*  $OpenBSD: md5.c,v 1.8 2005/08/08 08:05:35 espie Exp $   */
+
+/*
+ * This code implements the MD5 message-digest algorithm.
+ * The algorithm is due to Ron Rivest.  This code was
+ * written by Colin Plumb in 1993, no copyright is claimed.
+ * This code is in the public domain; do with it what you wish.
+ *
+ * Equivalent code is available from RSA Data Security, Inc.
+ * This code has been tested against that, and is equivalent,
+ * except that you don't need to include two pages of legalese
+ * with every copy.
+ *
+ * To compute the message digest of a chunk of bytes, declare an
+ * MD5Context structure, pass it to MD5Init, call MD5Update as
+ * needed on buffers full of bytes, and then call MD5Final, which
+ * will fill a supplied 16-byte array with the digest.
+ */
+
+#include <ucommon/string.h>
+#include "md5.h"
+
+#define PUT_64BIT_LE(cp, value) do {                    \
+    (cp)[7] = (uint8_t)((value) >> 56);                    \
+    (cp)[6] = (uint8_t)((value) >> 48);                    \
+    (cp)[5] = (uint8_t)((value) >> 40);                    \
+    (cp)[4] = (uint8_t)((value) >> 32);                    \
+    (cp)[3] = (uint8_t)((value) >> 24);                    \
+    (cp)[2] = (uint8_t)((value) >> 16);                    \
+    (cp)[1] = (uint8_t)((value) >> 8);                     \
+    (cp)[0] = (uint8_t)((value)); } while (0)
+
+#define PUT_32BIT_LE(cp, value) do {                    \
+    (cp)[3] = (value) >> 24;                    \
+    (cp)[2] = (value) >> 16;                    \
+    (cp)[1] = (value) >> 8;                     \
+    (cp)[0] = (value); } while (0)
+
+static uint8_t PADDING[MD5_BLOCK_LENGTH] = {
+    0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+/*
+ * Start MD5 accumulation.  Set bit count to 0 and buffer to mysterious
+ * initialization constants.
+ */
+void
+MD5Init(MD5_CTX *ctx)
+{
+    ctx->count = 0;
+    ctx->state[0] = 0x67452301;
+    ctx->state[1] = 0xefcdab89;
+    ctx->state[2] = 0x98badcfe;
+    ctx->state[3] = 0x10325476;
+}
+
+/*
+ * Update context to reflect the concatenation of another buffer full
+ * of bytes.
+ */
+void
+MD5Update(MD5_CTX *ctx, const unsigned char *input, size_t len)
+{
+    size_t have, need;
+
+    /* Check how many bytes we already have and how many more we need. */
+    have = (size_t)((ctx->count >> 3) & (MD5_BLOCK_LENGTH - 1));
+    need = MD5_BLOCK_LENGTH - have;
+
+    /* Update bitcount */
+    ctx->count += (uint64_t)len << 3;
+
+    if (len >= need) {
+        if (have != 0) {
+            memcpy(ctx->buffer + have, input, need);
+            MD5Transform(ctx->state, ctx->buffer);
+            input += need;
+            len -= need;
+            have = 0;
+        }
+
+        /* Process data in MD5_BLOCK_LENGTH-byte chunks. */
+        while (len >= MD5_BLOCK_LENGTH) {
+            MD5Transform(ctx->state, input);
+            input += MD5_BLOCK_LENGTH;
+            len -= MD5_BLOCK_LENGTH;
+        }
+    }
+
+    /* Handle any remaining bytes of data. */
+    if (len != 0)
+        memcpy(ctx->buffer + have, input, len);
+}
+
+/*
+ * Pad pad to 64-byte boundary with the bit pattern
+ * 1 0* (64-bit count of bits processed, MSB-first)
+ */
+void
+MD5Pad(MD5_CTX *ctx)
+{
+    uint8_t count[8];
+    size_t padlen;
+
+    /* Convert count to 8 bytes in little endian order. */
+    PUT_64BIT_LE(count, ctx->count);
+
+    /* Pad out to 56 mod 64. */
+    padlen = MD5_BLOCK_LENGTH -
+        ((ctx->count >> 3) & (MD5_BLOCK_LENGTH - 1));
+    if (padlen < 1 + 8)
+        padlen += MD5_BLOCK_LENGTH;
+    MD5Update(ctx, PADDING, padlen - 8);        /* padlen - 8 <= 64 */
+    MD5Update(ctx, count, 8);
+}
+
+/*
+ * Final wrapup--call MD5Pad, fill in digest and zero out ctx.
+ */
+void
+MD5Final(unsigned char digest[MD5_DIGEST_LENGTH], MD5_CTX *ctx)
+{
+    int i;
+
+    MD5Pad(ctx);
+    if (digest != NULL) {
+        for (i = 0; i < 4; i++)
+            PUT_32BIT_LE(digest + i * 4, ctx->state[i]);
+        memset(ctx, 0, sizeof(*ctx));
+    }
+}
+
+
+/* The four core functions - F1 is optimized somewhat */
+
+/* #define F1(x, y, z) (x & y | ~x & z) */
+#define F1(x, y, z) (z ^ (x & (y ^ z)))
+#define F2(x, y, z) F1(z, x, y)
+#define F3(x, y, z) (x ^ y ^ z)
+#define F4(x, y, z) (y ^ (x | ~z))
+
+/* This is the central step in the MD5 algorithm. */
+#define MD5STEP(f, w, x, y, z, data, s) \
+    ( w += f(x, y, z) + data,  w = w<<s | w>>(32-s),  w += x )
+
+/*
+ * The core of the MD5 algorithm, this alters an existing MD5 hash to
+ * reflect the addition of 16 longwords of new data.  MD5Update blocks
+ * the data and converts bytes into longwords for this routine.
+ */
+void
+MD5Transform(uint32_t state[4], const uint8_t block[MD5_BLOCK_LENGTH])
+{
+    uint32_t a, b, c, d, in[MD5_BLOCK_LENGTH / 4];
+
+#if BYTE_ORDER == LITTLE_ENDIAN
+    memcpy(in, block, sizeof(in));
+#else
+    for (a = 0; a < MD5_BLOCK_LENGTH / 4; a++) {
+        in[a] = (u_int32_t)(
+            (u_int32_t)(block[a * 4 + 0]) |
+            (u_int32_t)(block[a * 4 + 1]) <<  8 |
+            (u_int32_t)(block[a * 4 + 2]) << 16 |
+            (u_int32_t)(block[a * 4 + 3]) << 24);
+    }
+#endif
+
+    a = state[0];
+    b = state[1];
+    c = state[2];
+    d = state[3];
+
+    MD5STEP(F1, a, b, c, d, in[ 0] + 0xd76aa478,  7);
+    MD5STEP(F1, d, a, b, c, in[ 1] + 0xe8c7b756, 12);
+    MD5STEP(F1, c, d, a, b, in[ 2] + 0x242070db, 17);
+    MD5STEP(F1, b, c, d, a, in[ 3] + 0xc1bdceee, 22);
+    MD5STEP(F1, a, b, c, d, in[ 4] + 0xf57c0faf,  7);
+    MD5STEP(F1, d, a, b, c, in[ 5] + 0x4787c62a, 12);
+    MD5STEP(F1, c, d, a, b, in[ 6] + 0xa8304613, 17);
+    MD5STEP(F1, b, c, d, a, in[ 7] + 0xfd469501, 22);
+    MD5STEP(F1, a, b, c, d, in[ 8] + 0x698098d8,  7);
+    MD5STEP(F1, d, a, b, c, in[ 9] + 0x8b44f7af, 12);
+    MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
+    MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22);
+    MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122,  7);
+    MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12);
+    MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17);
+    MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22);
+
+    MD5STEP(F2, a, b, c, d, in[ 1] + 0xf61e2562,  5);
+    MD5STEP(F2, d, a, b, c, in[ 6] + 0xc040b340,  9);
+    MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
+    MD5STEP(F2, b, c, d, a, in[ 0] + 0xe9b6c7aa, 20);
+    MD5STEP(F2, a, b, c, d, in[ 5] + 0xd62f105d,  5);
+    MD5STEP(F2, d, a, b, c, in[10] + 0x02441453,  9);
+    MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
+    MD5STEP(F2, b, c, d, a, in[ 4] + 0xe7d3fbc8, 20);
+    MD5STEP(F2, a, b, c, d, in[ 9] + 0x21e1cde6,  5);
+    MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6,  9);
+    MD5STEP(F2, c, d, a, b, in[ 3] + 0xf4d50d87, 14);
+    MD5STEP(F2, b, c, d, a, in[ 8] + 0x455a14ed, 20);
+    MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905,  5);
+    MD5STEP(F2, d, a, b, c, in[ 2] + 0xfcefa3f8,  9);
+    MD5STEP(F2, c, d, a, b, in[ 7] + 0x676f02d9, 14);
+    MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
+
+    MD5STEP(F3, a, b, c, d, in[ 5] + 0xfffa3942,  4);
+    MD5STEP(F3, d, a, b, c, in[ 8] + 0x8771f681, 11);
+    MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
+    MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23);
+    MD5STEP(F3, a, b, c, d, in[ 1] + 0xa4beea44,  4);
+    MD5STEP(F3, d, a, b, c, in[ 4] + 0x4bdecfa9, 11);
+    MD5STEP(F3, c, d, a, b, in[ 7] + 0xf6bb4b60, 16);
+    MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
+    MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6,  4);
+    MD5STEP(F3, d, a, b, c, in[ 0] + 0xeaa127fa, 11);
+    MD5STEP(F3, c, d, a, b, in[ 3] + 0xd4ef3085, 16);
+    MD5STEP(F3, b, c, d, a, in[ 6] + 0x04881d05, 23);
+    MD5STEP(F3, a, b, c, d, in[ 9] + 0xd9d4d039,  4);
+    MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
+    MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
+    MD5STEP(F3, b, c, d, a, in[2 ] + 0xc4ac5665, 23);
+
+    MD5STEP(F4, a, b, c, d, in[ 0] + 0xf4292244,  6);
+    MD5STEP(F4, d, a, b, c, in[7 ] + 0x432aff97, 10);
+    MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15);
+    MD5STEP(F4, b, c, d, a, in[5 ] + 0xfc93a039, 21);
+    MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3,  6);
+    MD5STEP(F4, d, a, b, c, in[3 ] + 0x8f0ccc92, 10);
+    MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15);
+    MD5STEP(F4, b, c, d, a, in[1 ] + 0x85845dd1, 21);
+    MD5STEP(F4, a, b, c, d, in[8 ] + 0x6fa87e4f,  6);
+    MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
+    MD5STEP(F4, c, d, a, b, in[6 ] + 0xa3014314, 15);
+    MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
+    MD5STEP(F4, a, b, c, d, in[4 ] + 0xf7537e82,  6);
+    MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10);
+    MD5STEP(F4, c, d, a, b, in[2 ] + 0x2ad7d2bb, 15);
+    MD5STEP(F4, b, c, d, a, in[9 ] + 0xeb86d391, 21);
+
+    state[0] += a;
+    state[1] += b;
+    state[2] += c;
+    state[3] += d;
+}
diff --git a/jni/libucommon/sources/nossl/md5.h b/jni/libucommon/sources/nossl/md5.h
new file mode 100644
index 0000000..ff39264
--- /dev/null
+++ b/jni/libucommon/sources/nossl/md5.h
@@ -0,0 +1,34 @@
+/*  $OpenBSD: md5.h,v 1.16 2004/06/22 01:57:30 jfb Exp $    */
+
+/*
+ * This code implements the MD5 message-digest algorithm.
+ * The algorithm is due to Ron Rivest.  This code was
+ * written by Colin Plumb in 1993, no copyright is claimed.
+ * This code is in the public domain; do with it what you wish.
+ *
+ * Equivalent code is available from RSA Data Security, Inc.
+ * This code has been tested against that, and is equivalent,
+ * except that you don't need to include two pages of legalese
+ * with every copy.
+ */
+
+#ifndef _MD5_H_
+#define _MD5_H_
+
+#define MD5_BLOCK_LENGTH        64
+#define MD5_DIGEST_LENGTH       16
+#define MD5_DIGEST_STRING_LENGTH    (MD5_DIGEST_LENGTH * 2 + 1)
+
+typedef struct MD5Context {
+    uint32_t state[4];         /* state */
+    uint64_t count;            /* number of bits, mod 2^64 */
+    uint8_t buffer[MD5_BLOCK_LENGTH];  /* input buffer */
+} MD5_CTX;
+
+void     MD5Init(MD5_CTX *);
+void     MD5Update(MD5_CTX *, const uint8_t *, size_t);
+void     MD5Pad(MD5_CTX *);
+void     MD5Final(uint8_t [MD5_DIGEST_LENGTH], MD5_CTX *);
+void     MD5Transform(uint32_t [4], const uint8_t [MD5_BLOCK_LENGTH]);
+
+#endif /* _MD5_H_ */
diff --git a/jni/libucommon/sources/nossl/random.cpp b/jni/libucommon/sources/nossl/random.cpp
new file mode 100644
index 0000000..6815ee7
--- /dev/null
+++ b/jni/libucommon/sources/nossl/random.cpp
@@ -0,0 +1,108 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+#ifndef _MSWINDOWS_
+#include <fcntl.h>
+#endif
+
+void Random::seed(void)
+{
+    time_t now;
+
+    time(&now);
+    srand((int)now);
+}
+
+bool Random::seed(const unsigned char *buf, size_t size)
+{
+#ifdef  _MSWINDOWS_
+    return false;
+#else
+    int fd = open("/dev/random", O_WRONLY);
+    bool result = false;
+
+    if(fd > -1) {
+        if(write(fd, buf, size) > 0)
+            result = true;
+        close(fd);
+    }
+    return result;
+#endif
+}
+
+size_t Random::key(unsigned char *buf, size_t size)
+{
+#ifdef  _MSWINDOWS_
+    if((_handle != (HCRYPTPROV)NULL) && CryptGenRandom(_handle, size, buf))
+        return size;
+    return 0;
+#else
+    int fd = open("/dev/random", O_RDONLY);
+    ssize_t result = 0;
+
+    if(fd > -1) {
+        result = read(fd, buf, size);
+        close(fd);
+    }
+
+    if(result < 0)
+        result = 0;
+
+    return (size_t)result;
+#endif
+}
+
+size_t Random::fill(unsigned char *buf, size_t size)
+{
+#ifdef  _MSWINDOWS_
+    return key(buf, size);
+#else
+    int fd = open("/dev/urandom", O_RDONLY);
+    ssize_t result = 0;
+
+    if(fd > -1) {
+        result = read(fd, buf, size);
+        close(fd);
+    }
+    // ugly...would not trust it
+    else {
+        result = 0;
+        while(result++ < (ssize_t)size)
+            *(buf++) = rand() & 0xff;
+    }
+
+    if(result < 0)
+        result = 0;
+
+    return (size_t)result;
+#endif
+}
+
+bool Random::status(void)
+{
+#ifdef  _MSWINDOWS_
+    return true;
+#else
+    if(fsys::is_file("/dev/random"))
+        return true;
+
+    return false;
+#endif
+}
+
diff --git a/jni/libucommon/sources/nossl/secure.cpp b/jni/libucommon/sources/nossl/secure.cpp
new file mode 100644
index 0000000..08f1652
--- /dev/null
+++ b/jni/libucommon/sources/nossl/secure.cpp
@@ -0,0 +1,70 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+#ifdef  _MSWINDOWS_
+NAMESPACE_LOCAL
+HCRYPTPROV _handle = (HCRYPTPROV)NULL;
+END_NAMESPACE
+#endif
+
+secure::~secure()
+{
+}
+
+bool secure::fips(void)
+{
+    return false;
+}
+
+bool secure::init(void)
+{
+    Thread::init();
+    Socket::init();
+
+#ifdef  _MSWINDOWS_
+    if(_handle != (HCRYPTPROV)NULL)
+        return false;
+
+    if(CryptAcquireContext(&_handle, NULL, NULL, PROV_RSA_FULL, 0))
+        return false;
+    if(GetLastError() == (DWORD)NTE_BAD_KEYSET) {
+        if(CryptAcquireContext(&_handle, NULL, NULL, PROV_RSA_FULL, CRYPT_NEWKEYSET))
+            return false;
+    }
+
+    _handle = (HCRYPTPROV)NULL;
+#endif
+
+    return false;
+}
+
+secure::server_t secure::server(const char *cert, const char *key)
+{
+    return NULL;
+}
+
+secure::client_t secure::client(const char *ca)
+{
+    return NULL;
+}
+
+void secure::cipher(secure *context, const char *ciphers)
+{
+}
+
diff --git a/jni/libucommon/sources/nossl/sha1.cpp b/jni/libucommon/sources/nossl/sha1.cpp
new file mode 100644
index 0000000..a914f3f
--- /dev/null
+++ b/jni/libucommon/sources/nossl/sha1.cpp
@@ -0,0 +1,234 @@
+/*  $OpenBSD: sha1.c,v 1.21 2008/07/29 19:32:50 miod Exp $  */
+
+/*
+ * SHA-1 in C
+ * By Steve Reid <steve@edmweb.com>
+ * 100% Public Domain
+ *
+ * Test Vectors (from FIPS PUB 180-1)
+ * "abc"
+ *   A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D
+ * "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
+ *   84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1
+ * A million repetitions of "a"
+ *   34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
+ */
+
+#include <ucommon/string.h>
+#include "sha1.h"
+
+#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
+
+/*
+ * blk0() and blk() perform the initial expand.
+ * I got the idea of expanding during the round function from SSLeay
+ */
+#if BYTE_ORDER == LITTLE_ENDIAN
+# define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \
+    |(rol(block->l[i],8)&0x00FF00FF))
+#else
+# define blk0(i) block->l[i]
+#endif
+#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \
+    ^block->l[(i+2)&15]^block->l[i&15],1))
+
+/*
+ * (R0+R1), R2, R3, R4 are the different operations (rounds) used in SHA1
+ */
+#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30);
+#define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30);
+#define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30);
+#define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30);
+#define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);
+
+typedef union {
+    uint8_t c[64];
+    uint32_t l[16];
+} CHAR64LONG16;
+
+#ifdef __sh__
+static void do_R01(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *);
+static void do_R2(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *);
+static void do_R3(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *);
+static void do_R4(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *);
+
+#define nR0(v,w,x,y,z,i) R0(*v,*w,*x,*y,*z,i)
+#define nR1(v,w,x,y,z,i) R1(*v,*w,*x,*y,*z,i)
+#define nR2(v,w,x,y,z,i) R2(*v,*w,*x,*y,*z,i)
+#define nR3(v,w,x,y,z,i) R3(*v,*w,*x,*y,*z,i)
+#define nR4(v,w,x,y,z,i) R4(*v,*w,*x,*y,*z,i)
+
+static void
+do_R01(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block)
+{
+    nR0(a,b,c,d,e, 0); nR0(e,a,b,c,d, 1); nR0(d,e,a,b,c, 2); nR0(c,d,e,a,b, 3);
+    nR0(b,c,d,e,a, 4); nR0(a,b,c,d,e, 5); nR0(e,a,b,c,d, 6); nR0(d,e,a,b,c, 7);
+    nR0(c,d,e,a,b, 8); nR0(b,c,d,e,a, 9); nR0(a,b,c,d,e,10); nR0(e,a,b,c,d,11);
+    nR0(d,e,a,b,c,12); nR0(c,d,e,a,b,13); nR0(b,c,d,e,a,14); nR0(a,b,c,d,e,15);
+    nR1(e,a,b,c,d,16); nR1(d,e,a,b,c,17); nR1(c,d,e,a,b,18); nR1(b,c,d,e,a,19);
+}
+
+static void
+do_R2(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block)
+{
+    nR2(a,b,c,d,e,20); nR2(e,a,b,c,d,21); nR2(d,e,a,b,c,22); nR2(c,d,e,a,b,23);
+    nR2(b,c,d,e,a,24); nR2(a,b,c,d,e,25); nR2(e,a,b,c,d,26); nR2(d,e,a,b,c,27);
+    nR2(c,d,e,a,b,28); nR2(b,c,d,e,a,29); nR2(a,b,c,d,e,30); nR2(e,a,b,c,d,31);
+    nR2(d,e,a,b,c,32); nR2(c,d,e,a,b,33); nR2(b,c,d,e,a,34); nR2(a,b,c,d,e,35);
+    nR2(e,a,b,c,d,36); nR2(d,e,a,b,c,37); nR2(c,d,e,a,b,38); nR2(b,c,d,e,a,39);
+}
+
+static void
+do_R3(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block)
+{
+    nR3(a,b,c,d,e,40); nR3(e,a,b,c,d,41); nR3(d,e,a,b,c,42); nR3(c,d,e,a,b,43);
+    nR3(b,c,d,e,a,44); nR3(a,b,c,d,e,45); nR3(e,a,b,c,d,46); nR3(d,e,a,b,c,47);
+    nR3(c,d,e,a,b,48); nR3(b,c,d,e,a,49); nR3(a,b,c,d,e,50); nR3(e,a,b,c,d,51);
+    nR3(d,e,a,b,c,52); nR3(c,d,e,a,b,53); nR3(b,c,d,e,a,54); nR3(a,b,c,d,e,55);
+    nR3(e,a,b,c,d,56); nR3(d,e,a,b,c,57); nR3(c,d,e,a,b,58); nR3(b,c,d,e,a,59);
+}
+
+static void
+do_R4(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d, u_int32_t *e, CHAR64LONG16 *block)
+{
+    nR4(a,b,c,d,e,60); nR4(e,a,b,c,d,61); nR4(d,e,a,b,c,62); nR4(c,d,e,a,b,63);
+    nR4(b,c,d,e,a,64); nR4(a,b,c,d,e,65); nR4(e,a,b,c,d,66); nR4(d,e,a,b,c,67);
+    nR4(c,d,e,a,b,68); nR4(b,c,d,e,a,69); nR4(a,b,c,d,e,70); nR4(e,a,b,c,d,71);
+    nR4(d,e,a,b,c,72); nR4(c,d,e,a,b,73); nR4(b,c,d,e,a,74); nR4(a,b,c,d,e,75);
+    nR4(e,a,b,c,d,76); nR4(d,e,a,b,c,77); nR4(c,d,e,a,b,78); nR4(b,c,d,e,a,79);
+}
+#endif
+
+/*
+ * Hash a single 512-bit block. This is the core of the algorithm.
+ */
+void
+SHA1Transform(uint32_t state[5], const uint8_t buffer[SHA1_BLOCK_LENGTH])
+{
+    uint32_t a, b, c, d, e;
+    uint8_t workspace[SHA1_BLOCK_LENGTH];
+    CHAR64LONG16 *block = (CHAR64LONG16 *)workspace;
+
+    (void)memcpy(block, buffer, SHA1_BLOCK_LENGTH);
+
+    /* Copy context->state[] to working vars */
+    a = state[0];
+    b = state[1];
+    c = state[2];
+    d = state[3];
+    e = state[4];
+
+#ifdef __sh__
+    do_R01(&a, &b, &c, &d, &e, block);
+    do_R2(&a, &b, &c, &d, &e, block);
+    do_R3(&a, &b, &c, &d, &e, block);
+    do_R4(&a, &b, &c, &d, &e, block);
+#else
+    /* 4 rounds of 20 operations each. Loop unrolled. */
+    R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3);
+    R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7);
+    R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11);
+    R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15);
+    R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19);
+    R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23);
+    R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27);
+    R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31);
+    R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35);
+    R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39);
+    R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43);
+    R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47);
+    R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51);
+    R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55);
+    R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59);
+    R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63);
+    R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67);
+    R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71);
+    R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75);
+    R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79);
+#endif
+
+    /* Add the working vars back into context.state[] */
+    state[0] += a;
+    state[1] += b;
+    state[2] += c;
+    state[3] += d;
+    state[4] += e;
+
+    /* Wipe variables */
+    a = b = c = d = e = 0;
+}
+
+
+/*
+ * SHA1Init - Initialize new context
+ */
+void
+SHA1Init(SHA1_CTX *context)
+{
+
+    /* SHA1 initialization constants */
+    context->count = 0;
+    context->state[0] = 0x67452301;
+    context->state[1] = 0xEFCDAB89;
+    context->state[2] = 0x98BADCFE;
+    context->state[3] = 0x10325476;
+    context->state[4] = 0xC3D2E1F0;
+}
+
+
+/*
+ * Run your data through this.
+ */
+void
+SHA1Update(SHA1_CTX *context, const uint8_t *data, size_t len)
+{
+    size_t i, j;
+
+    j = (size_t)((context->count >> 3) & 63);
+    context->count += (len << 3);
+    if ((j + len) > 63) {
+        (void)memcpy(&context->buffer[j], data, (i = 64-j));
+        SHA1Transform(context->state, context->buffer);
+        for ( ; i + 63 < len; i += 64)
+            SHA1Transform(context->state, (uint8_t *)&data[i]);
+        j = 0;
+    } else {
+        i = 0;
+    }
+    (void)memcpy(&context->buffer[j], &data[i], len - i);
+}
+
+
+/*
+ * Add padding and return the message digest.
+ */
+void
+SHA1Pad(SHA1_CTX *context)
+{
+    uint8_t finalcount[8];
+    unsigned i;
+
+    for (i = 0; i < 8; i++) {
+        finalcount[i] = (uint8_t)((context->count >>
+            ((7 - (i & 7)) * 8)) & 255);    /* Endian independent */
+    }
+    SHA1Update(context, (uint8_t *)"\200", 1);
+    while ((context->count & 504) != 448)
+        SHA1Update(context, (uint8_t *)"\0", 1);
+    SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */
+}
+
+void
+SHA1Final(uint8_t digest[SHA1_DIGEST_LENGTH], SHA1_CTX *context)
+{
+    unsigned i;
+
+    SHA1Pad(context);
+    if (digest) {
+        for (i = 0; i < SHA1_DIGEST_LENGTH; i++) {
+            digest[i] = (uint8_t)
+               ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
+        }
+        memset(context, 0, sizeof(*context));
+    }
+}
diff --git a/jni/libucommon/sources/nossl/sha1.h b/jni/libucommon/sources/nossl/sha1.h
new file mode 100644
index 0000000..5008bd0
--- /dev/null
+++ b/jni/libucommon/sources/nossl/sha1.h
@@ -0,0 +1,42 @@
+/*  $OpenBSD: sha1.h,v 1.23 2004/06/22 01:57:30 jfb Exp $   */
+
+/*
+ * SHA-1 in C
+ * By Steve Reid <steve@edmweb.com>
+ * 100% Public Domain
+ */
+
+#ifndef _SHA1_H
+#define _SHA1_H
+
+#define SHA1_BLOCK_LENGTH       64
+#define SHA1_DIGEST_LENGTH      20
+#define SHA1_DIGEST_STRING_LENGTH   (SHA1_DIGEST_LENGTH * 2 + 1)
+
+typedef struct {
+    uint32_t state[5];
+    uint64_t count;
+    uint8_t buffer[SHA1_BLOCK_LENGTH];
+} SHA1_CTX;
+
+void SHA1Init(SHA1_CTX *);
+void SHA1Pad(SHA1_CTX *);
+void SHA1Transform(uint32_t [5], const uint8_t [SHA1_BLOCK_LENGTH]);
+void SHA1Update(SHA1_CTX *, const uint8_t *, size_t);
+void SHA1Final(uint8_t [SHA1_DIGEST_LENGTH], SHA1_CTX *);
+
+#define HTONDIGEST(x) do {                                              \
+        x[0] = htonl(x[0]);                                             \
+        x[1] = htonl(x[1]);                                             \
+        x[2] = htonl(x[2]);                                             \
+        x[3] = htonl(x[3]);                                             \
+        x[4] = htonl(x[4]); } while (0)
+
+#define NTOHDIGEST(x) do {                                              \
+        x[0] = ntohl(x[0]);                                             \
+        x[1] = ntohl(x[1]);                                             \
+        x[2] = ntohl(x[2]);                                             \
+        x[3] = ntohl(x[3]);                                             \
+        x[4] = ntohl(x[4]); } while (0)
+
+#endif /* _SHA1_H */
diff --git a/jni/libucommon/sources/nossl/ssl.cpp b/jni/libucommon/sources/nossl/ssl.cpp
new file mode 100644
index 0000000..99ef3b1
--- /dev/null
+++ b/jni/libucommon/sources/nossl/ssl.cpp
@@ -0,0 +1,85 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+SSLBuffer::SSLBuffer(secure::client_t context) :
+TCPBuffer()
+{
+    ssl = NULL;
+    bio = NULL;
+    server = false;
+}
+
+SSLBuffer::SSLBuffer(const TCPServer *tcp, secure::server_t context, size_t size) :
+TCPBuffer(tcp, size)
+{
+    ssl = NULL;
+    bio = NULL;
+    server = true;
+}
+
+
+SSLBuffer::~SSLBuffer()
+{
+}
+
+void SSLBuffer::open(const char *host, const char *service, size_t bufsize)
+{
+    if(server) {
+        ioerr = EBADF;
+        return;
+    }
+
+    TCPBuffer::open(host, service, bufsize);
+}
+
+void SSLBuffer::close(void)
+{
+    if(server) {
+        ioerr = EBADF;
+        return;
+    }
+
+    TCPBuffer::close();
+}
+
+void SSLBuffer::release(void)
+{
+    TCPBuffer::close();
+}
+
+size_t SSLBuffer::_push(const char *address, size_t size)
+{
+    return TCPBuffer::_push(address, size);
+}
+
+size_t SSLBuffer::_pull(char *address, size_t size)
+{
+    return TCPBuffer::_pull(address, size);
+}
+
+bool SSLBuffer::_pending(void)
+{
+    return TCPBuffer::_pending();
+}
+
+bool SSLBuffer::_flush(void)
+{
+    return TCPBuffer::_flush();
+}
+
diff --git a/jni/libucommon/sources/nossl/sstream.cpp b/jni/libucommon/sources/nossl/sstream.cpp
new file mode 100644
index 0000000..1e9f88b
--- /dev/null
+++ b/jni/libucommon/sources/nossl/sstream.cpp
@@ -0,0 +1,83 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+#if defined(OLD_STDCPP) || defined(NEW_STDCPP)
+
+sstream::sstream(secure::client_t context) :
+tcpstream()
+{
+    ssl = NULL;
+    bio = NULL;
+    server = false;
+}
+
+sstream::sstream(const TCPServer *tcp, secure::server_t context, size_t size) :
+tcpstream(tcp, size)
+{
+    ssl = NULL;
+    bio = NULL;
+    server = true;
+}
+
+sstream::~sstream()
+{
+}
+
+void sstream::open(const char *host, const char *service, size_t bufsize)
+{
+    if(server)
+        return;
+
+    tcpstream::open(host, service, bufsize);
+}
+
+void sstream::close(void)
+{
+    if(server)
+        return;
+
+    tcpstream::close();
+}
+
+void sstream::release(void)
+{
+    tcpstream::close();
+}
+
+ssize_t sstream::_write(const char *address, size_t size)
+{
+    return tcpstream::_write(address, size);
+}
+
+ssize_t sstream::_read(char *address, size_t size)
+{
+    return tcpstream::_read(address, size);
+}
+
+bool sstream::_wait(void)
+{
+    return tcpstream::_wait();
+}
+
+int sstream::sync()
+{
+    return tcpstream::sync();
+}
+
+#endif
diff --git a/jni/libucommon/sources/openssl/.deps/cipher.Plo b/jni/libucommon/sources/openssl/.deps/cipher.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/openssl/.deps/cipher.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/openssl/.deps/common.Plo b/jni/libucommon/sources/openssl/.deps/common.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/openssl/.deps/common.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/openssl/.deps/digest.Plo b/jni/libucommon/sources/openssl/.deps/digest.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/openssl/.deps/digest.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/openssl/.deps/hmac.Plo b/jni/libucommon/sources/openssl/.deps/hmac.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/openssl/.deps/hmac.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/openssl/.deps/random.Plo b/jni/libucommon/sources/openssl/.deps/random.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/openssl/.deps/random.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/openssl/.deps/secure.Plo b/jni/libucommon/sources/openssl/.deps/secure.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/openssl/.deps/secure.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/openssl/.deps/ssl.Plo b/jni/libucommon/sources/openssl/.deps/ssl.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/openssl/.deps/ssl.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/openssl/.deps/sstream.Plo b/jni/libucommon/sources/openssl/.deps/sstream.Plo
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/openssl/.deps/sstream.Plo
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/openssl/Makefile b/jni/libucommon/sources/openssl/Makefile
new file mode 100644
index 0000000..32b5c0f
--- /dev/null
+++ b/jni/libucommon/sources/openssl/Makefile
@@ -0,0 +1,701 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# openssl/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2013 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.
+
+
+
+# Copyright (C) 2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+
+
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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)/ucommon
+pkgincludedir = $(includedir)/ucommon
+pkglibdir = $(libdir)/ucommon
+pkglibexecdir = $(libexecdir)/ucommon
+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 = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+target_triplet = x86_64-unknown-linux-gnu
+subdir = openssl
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/autoconf/depcomp $(noinst_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+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)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libusecure_la_LIBADD =
+am_libusecure_la_OBJECTS = secure.lo ssl.lo digest.lo random.lo \
+	cipher.lo hmac.lo sstream.lo common.lo
+libusecure_la_OBJECTS = $(am_libusecure_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libusecure_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(libusecure_la_LDFLAGS) $(LDFLAGS) \
+	-o $@
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = -I. -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+SOURCES = $(libusecure_la_SOURCES)
+DIST_SOURCES = $(libusecure_la_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+HEADERS = $(noinst_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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing aclocal-1.13
+AMTAR = $${TAR-tar}
+AM_DEFAULT_VERBOSITY = 1
+AR = ar
+AS = as
+AUTOCONF = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoconf
+AUTOHEADER = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoheader
+AUTOMAKE = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing automake-1.13
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CHECKFLAGS = 
+COMPAT = commoncpp
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS =  -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DLLTOOL = dlltool
+DOXYGEN = /usr/bin/doxygen
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /usr/bin/grep -E
+EXEEXT = 
+FGREP = /usr/bin/grep -F
+GNUTLS_CFLAGS = 
+GNUTLS_LIBS = -lgnutls
+GREP = /usr/bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+LT_GENERIC = $(SHELL) $(top_builddir)/libtool
+LT_VERSION = 6:3:0
+MAKEINFO = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing makeinfo
+MANIFEST_TOOL = :
+MKDIR_P = /usr/bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_CFLAGS = 
+OPENSSL_LIBS = -lssl -lcrypto -lz 
+OTOOL = 
+OTOOL64 = 
+PACKAGE = ucommon
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = ucommon
+PACKAGE_STRING = ucommon 6.0.7
+PACKAGE_TARNAME = ucommon
+PACKAGE_URL = 
+PACKAGE_VERSION = 6.0.7
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PKG_CONFIG_LIBDIR = 
+PKG_CONFIG_PATH = 
+RANLIB = ranlib
+SECURE = gnutls
+SECURE_LIBS = -lgnutls
+SECURE_LOCAL = ../gnutls/libusecure.la -lgnutls
+SED = /usr/bin/sed
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = strip
+UCOMMON_CFGPATH = /etc
+UCOMMON_CLINK =  -lc
+UCOMMON_FLAGS =  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+UCOMMON_INCLUDES = /usr/local/include/ucommon
+UCOMMON_LIBC = -lc
+UCOMMON_LIBS =   -lrt  -ldl -lpthread -lc
+UCOMMON_LINKED =   -lrt  -ldl -lpthread
+UCOMMON_LOCALE = /usr/local/share/locale
+UCOMMON_MODEL = CXX
+UCOMMON_PREFIX = /usr/local
+UCOMMON_VARPATH = /var
+UCOMMON_VISIBILITY = 1
+VERSION = 6.0.7
+abs_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources/openssl
+abs_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources/openssl
+abs_top_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+abs_top_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+includes = ${includedir}/ucommon
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+libs = /usr/local/lib
+localedir = ${datarootdir}/locale
+localstatedir = /var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = /etc
+target = x86_64-unknown-linux-gnu
+target_alias = 
+target_cpu = x86_64
+target_os = linux-gnu
+target_vendor = unknown
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = ..
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = -version-info $(LT_VERSION)
+AM_CXXFLAGS = -I$(top_srcdir)/inc  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+noinst_HEADERS = local.h
+lib_LTLIBRARIES = libusecure.la
+libusecure_la_LDFLAGS = ../corelib/libucommon.la   -lrt  -ldl -lpthread -lc -lssl -lcrypto -lz   -lc $(RELEASE)
+libusecure_la_SOURCES = secure.cpp ssl.cpp digest.cpp random.cpp cipher.cpp \
+    hmac.cpp sstream.cpp ../nossl/common.cpp
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(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) --gnu openssl/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu openssl/Makefile
+.PRECIOUS: 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):
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	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)'; 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)'; \
+	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}; \
+	}
+
+libusecure.la: $(libusecure_la_OBJECTS) $(libusecure_la_DEPENDENCIES) $(EXTRA_libusecure_la_DEPENDENCIES) 
+	$(AM_V_CXXLD)$(libusecure_la_LINK) -rpath $(libdir) $(libusecure_la_OBJECTS) $(libusecure_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/cipher.Plo
+include ./$(DEPDIR)/common.Plo
+include ./$(DEPDIR)/digest.Plo
+include ./$(DEPDIR)/hmac.Plo
+include ./$(DEPDIR)/random.Plo
+include ./$(DEPDIR)/secure.Plo
+include ./$(DEPDIR)/ssl.Plo
+include ./$(DEPDIR)/sstream.Plo
+
+.cpp.o:
+	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	$(AM_V_CXX)source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	$(AM_V_CXX)source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+#	$(AM_V_CXX)source='$<' object='$@' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(LTCXXCOMPILE) -c -o $@ $<
+
+common.lo: ../nossl/common.cpp
+	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT common.lo -MD -MP -MF $(DEPDIR)/common.Tpo -c -o common.lo `test -f '../nossl/common.cpp' || echo '$(srcdir)/'`../nossl/common.cpp
+	$(AM_V_at)$(am__mv) $(DEPDIR)/common.Tpo $(DEPDIR)/common.Plo
+#	$(AM_V_CXX)source='../nossl/common.cpp' object='common.lo' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o common.lo `test -f '../nossl/common.cpp' || echo '$(srcdir)/'`../nossl/common.cpp
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+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`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(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
+
+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
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)"; 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:
+
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+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
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool 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-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 tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+
+
+# 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/jni/libucommon/sources/openssl/Makefile.am b/jni/libucommon/sources/openssl/Makefile.am
new file mode 100644
index 0000000..5c8aea6
--- /dev/null
+++ b/jni/libucommon/sources/openssl/Makefile.am
@@ -0,0 +1,22 @@
+# Copyright (C) 2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = -version-info $(LT_VERSION)
+AM_CXXFLAGS = -I$(top_srcdir)/inc @UCOMMON_FLAGS@
+
+noinst_HEADERS = local.h
+
+lib_LTLIBRARIES = libusecure.la
+
+libusecure_la_LDFLAGS = ../corelib/libucommon.la @UCOMMON_LIBS@ @OPENSSL_LIBS@ @UCOMMON_CLINK@ $(RELEASE)
+libusecure_la_SOURCES = secure.cpp ssl.cpp digest.cpp random.cpp cipher.cpp \
+    hmac.cpp sstream.cpp ../nossl/common.cpp
+
diff --git a/jni/libucommon/sources/openssl/Makefile.in b/jni/libucommon/sources/openssl/Makefile.in
new file mode 100644
index 0000000..0f7cedf
--- /dev/null
+++ b/jni/libucommon/sources/openssl/Makefile.in
@@ -0,0 +1,701 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 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@
+
+# Copyright (C) 2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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@
+target_triplet = @target@
+subdir = openssl
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/autoconf/depcomp $(noinst_HEADERS)
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+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)$(libdir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libusecure_la_LIBADD =
+am_libusecure_la_OBJECTS = secure.lo ssl.lo digest.lo random.lo \
+	cipher.lo hmac.lo sstream.lo common.lo
+libusecure_la_OBJECTS = $(am_libusecure_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+libusecure_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(libusecure_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)/autoconf/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+SOURCES = $(libusecure_la_SOURCES)
+DIST_SOURCES = $(libusecure_la_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+HEADERS = $(noinst_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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECKFLAGS = @CHECKFLAGS@
+COMPAT = @COMPAT@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_GENERIC = @LT_GENERIC@
+LT_VERSION = @LT_VERSION@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+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@
+RANLIB = @RANLIB@
+SECURE = @SECURE@
+SECURE_LIBS = @SECURE_LIBS@
+SECURE_LOCAL = @SECURE_LOCAL@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UCOMMON_CFGPATH = @UCOMMON_CFGPATH@
+UCOMMON_CLINK = @UCOMMON_CLINK@
+UCOMMON_FLAGS = @UCOMMON_FLAGS@
+UCOMMON_INCLUDES = @UCOMMON_INCLUDES@
+UCOMMON_LIBC = @UCOMMON_LIBC@
+UCOMMON_LIBS = @UCOMMON_LIBS@
+UCOMMON_LINKED = @UCOMMON_LINKED@
+UCOMMON_LOCALE = @UCOMMON_LOCALE@
+UCOMMON_MODEL = @UCOMMON_MODEL@
+UCOMMON_PREFIX = @UCOMMON_PREFIX@
+UCOMMON_VARPATH = @UCOMMON_VARPATH@
+UCOMMON_VISIBILITY = @UCOMMON_VISIBILITY@
+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_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+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@
+includes = @includes@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libs = @libs@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MAINTAINERCLEANFILES = Makefile.in Makefile
+RELEASE = -version-info $(LT_VERSION)
+AM_CXXFLAGS = -I$(top_srcdir)/inc @UCOMMON_FLAGS@
+noinst_HEADERS = local.h
+lib_LTLIBRARIES = libusecure.la
+libusecure_la_LDFLAGS = ../corelib/libucommon.la @UCOMMON_LIBS@ @OPENSSL_LIBS@ @UCOMMON_CLINK@ $(RELEASE)
+libusecure_la_SOURCES = secure.cpp ssl.cpp digest.cpp random.cpp cipher.cpp \
+    hmac.cpp sstream.cpp ../nossl/common.cpp
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(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) --gnu openssl/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu openssl/Makefile
+.PRECIOUS: 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):
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	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)'; 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)'; \
+	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}; \
+	}
+
+libusecure.la: $(libusecure_la_OBJECTS) $(libusecure_la_DEPENDENCIES) $(EXTRA_libusecure_la_DEPENDENCIES) 
+	$(AM_V_CXXLD)$(libusecure_la_LINK) -rpath $(libdir) $(libusecure_la_OBJECTS) $(libusecure_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/digest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hmac.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/random.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secure.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sstream.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+common.lo: ../nossl/common.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT common.lo -MD -MP -MF $(DEPDIR)/common.Tpo -c -o common.lo `test -f '../nossl/common.cpp' || echo '$(srcdir)/'`../nossl/common.cpp
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/common.Tpo $(DEPDIR)/common.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='../nossl/common.cpp' object='common.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o common.lo `test -f '../nossl/common.cpp' || echo '$(srcdir)/'`../nossl/common.cpp
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+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`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(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
+
+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
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+	for dir in "$(DESTDIR)$(libdir)"; 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:
+
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+	mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+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
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+	clean-libLTLIBRARIES clean-libtool 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-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 tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
+
+
+# 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/jni/libucommon/sources/openssl/cipher.cpp b/jni/libucommon/sources/openssl/cipher.cpp
new file mode 100644
index 0000000..a43337c
--- /dev/null
+++ b/jni/libucommon/sources/openssl/cipher.cpp
@@ -0,0 +1,200 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+static const unsigned char *_salt = NULL;
+static unsigned _rounds = 1;
+
+void Cipher::Key::assign(const char *text, size_t size)
+{
+    assign(text, size, _salt, _rounds);
+}
+
+void Cipher::Key::options(const unsigned char *salt, unsigned rounds)
+{
+    _salt = salt;
+    _rounds = rounds;
+}
+
+void Cipher::Key::assign(const char *text, size_t size, const unsigned char *salt, unsigned rounds)
+{
+    if(!algotype || !hashtype)
+        return;
+
+    if(!size)
+        size = strlen((const char *)text);
+
+    if(!rounds)
+        rounds = _rounds;
+
+    if(!salt)
+        salt = _salt;
+
+    if(EVP_BytesToKey((const EVP_CIPHER*)algotype, (const EVP_MD*)hashtype, salt, (const unsigned char *)text, size, rounds, keybuf, ivbuf) < (int)keysize)
+        keysize = 0;
+}
+
+void Cipher::Key::set(const char *cipher, const char *digest)
+{
+    set(cipher);
+
+    // never use sha0...
+    if(eq_case(digest, "sha"))
+        digest = "sha1";
+
+    hashtype = EVP_get_digestbyname(digest);
+}
+
+void Cipher::Key::set(const char *cipher)
+{
+    char algoname[64];
+
+    clear();
+    String::set(algoname, sizeof(algoname), cipher);
+    char *fpart = strchr(algoname, '-');
+    char *lpart = strrchr(algoname, '-');
+
+    if(fpart && fpart == lpart)
+        strcpy(fpart, fpart + 1);
+
+    algotype = EVP_get_cipherbyname(algoname);
+
+    if(!algotype)
+        return;
+
+    keysize = EVP_CIPHER_key_length((const EVP_CIPHER*)algotype);
+    blksize = EVP_CIPHER_block_size((const EVP_CIPHER*)algotype);
+}
+
+
+bool Cipher::has(const char *id)
+{
+    // make sure cipher-bitsize forms without -mode do not fail...
+    char algoname[64];
+    String::set(algoname, sizeof(algoname), id);
+    char *fpart = strchr(algoname, '-');
+    char *lpart = strrchr(algoname, '-');
+
+    if(fpart && fpart == lpart)
+        strcpy(fpart, fpart + 1);
+
+    return (EVP_get_cipherbyname(algoname) != NULL);
+}
+
+void Cipher::push(unsigned char *address, size_t size)
+{
+}
+
+void Cipher::release(void)
+{
+    keys.clear();
+    if(context) {
+        EVP_CIPHER_CTX_cleanup((EVP_CIPHER_CTX*)context);
+        delete (EVP_CIPHER_CTX*)context;
+        context = NULL;
+    }
+}
+
+void Cipher::set(key_t key, mode_t mode, unsigned char *address, size_t size)
+{
+    release();
+
+    bufsize = size;
+    bufmode = mode;
+    bufaddr = address;
+
+    memcpy(&keys, key, sizeof(keys));
+    if(!keys.keysize)
+        return;
+
+    context = new EVP_CIPHER_CTX;
+    EVP_CIPHER_CTX_init((EVP_CIPHER_CTX *)context);
+    EVP_CipherInit_ex((EVP_CIPHER_CTX *)context, (EVP_CIPHER *)keys.algotype, NULL, keys.keybuf, keys.ivbuf, (int)mode);
+    EVP_CIPHER_CTX_set_padding((EVP_CIPHER_CTX *)context, 0);
+}
+
+size_t Cipher::put(const unsigned char *data, size_t size)
+{
+    int outlen;
+    size_t count = 0;
+
+    if(!bufaddr)
+        return 0;
+
+    if(size % keys.iosize())
+        return 0;
+
+    while(bufsize && size + bufpos > bufsize) {
+        size_t diff = bufsize - bufpos;
+        count += put(data, diff);
+        data += diff;
+        size -= diff;
+    }
+
+    if(!EVP_CipherUpdate((EVP_CIPHER_CTX *)context, bufaddr + bufpos, &outlen, data, size)) {
+        release();
+        return count;
+    }
+    bufpos += outlen;
+    count += outlen;
+    if(bufsize && bufpos >= bufsize) {
+        push(bufaddr, bufsize);
+        bufpos = 0;
+    }
+    return count;
+}
+
+size_t Cipher::pad(const unsigned char *data, size_t size)
+{
+    size_t padsize = 0;
+    unsigned char padbuf[64];
+    const unsigned char *ep;
+
+    if(!bufaddr)
+        return 0;
+
+    switch(bufmode) {
+    case DECRYPT:
+        if(size % keys.iosize())
+            return 0;
+        put(data, size);
+        ep = data + size - 1;
+        bufpos -= *ep;
+        size -= *ep;
+        break;
+    case ENCRYPT:
+        padsize = size % keys.iosize();
+        put(data, size - padsize);
+        if(padsize) {
+            memcpy(padbuf, data + size - padsize, padsize);
+            memset(padbuf + padsize, keys.iosize() - padsize, keys.iosize() - padsize);
+            size = (size - padsize) + keys.iosize();
+        }
+        else {
+            size += keys.iosize();
+            memset(padbuf, keys.iosize(), keys.iosize());
+        }
+
+        put((const unsigned char *)padbuf, keys.iosize());
+        zerofill(padbuf, sizeof(padbuf));
+    }
+
+    flush();
+    return size;
+}
+
diff --git a/jni/libucommon/sources/openssl/digest.cpp b/jni/libucommon/sources/openssl/digest.cpp
new file mode 100644
index 0000000..f50c189
--- /dev/null
+++ b/jni/libucommon/sources/openssl/digest.cpp
@@ -0,0 +1,133 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+bool Digest::has(const char *id)
+{
+    return (EVP_get_digestbyname(id) != NULL);
+}
+
+void Digest::set(const char *type)
+{
+    secure::init();
+
+    release();
+
+    // never use sha0
+    if(eq_case(type, "sha"))
+        type = "sha1";
+
+    hashtype = (void *)EVP_get_digestbyname(type);
+    if(hashtype) {
+        context = new EVP_MD_CTX;
+        EVP_MD_CTX_init((EVP_MD_CTX *)context);
+        EVP_DigestInit_ex((EVP_MD_CTX *)context, (const EVP_MD *)hashtype, NULL);
+    }
+}
+
+void Digest::release(void)
+{
+    if(context)
+        EVP_MD_CTX_cleanup((EVP_MD_CTX *)context);
+
+    if(context) {
+        delete (EVP_MD_CTX *)context;
+        context = NULL;
+    }
+
+    bufsize = 0;
+    textbuf[0] = 0;
+}
+
+bool Digest::put(const void *address, size_t size)
+{
+    if(!context)
+        return false;
+
+    EVP_DigestUpdate((EVP_MD_CTX *)context, address, size);
+    return true;
+}
+
+void Digest::reset(void)
+{
+    if(!context) {
+        if(hashtype) {
+            context = new EVP_MD_CTX;
+            EVP_MD_CTX_init((EVP_MD_CTX *)context);
+        }
+        else
+            return;
+    }
+
+    EVP_DigestInit_ex((EVP_MD_CTX *)context, (const EVP_MD *)hashtype, NULL);
+    bufsize = 0;
+}
+
+void Digest::recycle(bool bin)
+{
+    unsigned size = bufsize;
+
+    if(!context)
+        return;
+
+    if(!bufsize)
+        EVP_DigestFinal_ex((EVP_MD_CTX *)context, buffer, &size);
+
+    EVP_DigestInit_ex((EVP_MD_CTX *)context, (const EVP_MD *)hashtype, NULL);
+
+    if(bin)
+        EVP_DigestUpdate((EVP_MD_CTX *)context, buffer, size);
+    else {
+        unsigned count = 0;
+        while(count < size) {
+            snprintf(textbuf + (count * 2), 3, "%2.2x",
+buffer[count]);
+            ++count;
+        }
+        EVP_DigestUpdate((EVP_MD_CTX *)context, textbuf, size *
+2);
+    }
+    bufsize = 0;
+
+}
+
+const unsigned char *Digest::get(void)
+{
+    unsigned count = 0;
+    unsigned size = 0;
+
+    if(bufsize)
+        return buffer;
+
+    if(!context)
+        return NULL;
+
+    EVP_DigestFinal_ex((EVP_MD_CTX *)context, buffer, &size);
+
+    release();
+
+    bufsize = size;
+
+    while(count < bufsize) {
+        snprintf(textbuf + (count * 2), 3, "%2.2x",
+buffer[count]);
+        ++count;
+    }
+    return buffer;
+}
+
diff --git a/jni/libucommon/sources/openssl/hmac.cpp b/jni/libucommon/sources/openssl/hmac.cpp
new file mode 100644
index 0000000..8131ba3
--- /dev/null
+++ b/jni/libucommon/sources/openssl/hmac.cpp
@@ -0,0 +1,91 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+bool HMAC::has(const char *id)
+{
+    return (EVP_get_digestbyname(id) != NULL);
+}
+
+void HMAC::set(const char *digest, const char *key, size_t len)
+{
+    secure::init();
+
+    release();
+
+    if(!len)
+        len = strlen(key);
+
+    hmactype = EVP_get_digestbyname(digest);
+    if(hmactype && len) {
+        context = new HMAC_CTX;
+        HMAC_CTX_init((HMAC_CTX *)context);
+        HMAC_Init((HMAC_CTX *)context, key, len, (const EVP_MD *)hmactype);
+    }
+}
+
+void HMAC::release(void)
+{
+    if(context)
+        HMAC_cleanup((HMAC_CTX *)context);
+
+    if(context) {
+        delete (HMAC_CTX *)context;
+        context = NULL;
+    }
+
+    bufsize = 0;
+    textbuf[0] = 0;
+}
+
+bool HMAC::put(const void *address, size_t size)
+{
+    if(!context)
+        return false;
+
+    HMAC_Update((HMAC_CTX *)context, (const unsigned char *)address, size);
+    return true;
+}
+
+const unsigned char *HMAC::get(void)
+{
+    unsigned count = 0;
+    unsigned size = 0;
+
+    if(bufsize)
+        return buffer;
+
+    if(!context)
+        return NULL;
+
+	HMAC_Final((HMAC_CTX *)context, buffer, &size);
+	release();
+
+	if(!size)
+		return NULL;
+
+    bufsize = size;
+
+    while(count < bufsize) {
+        snprintf(textbuf + (count * 2), 3, "%2.2x",
+buffer[count]);
+        ++count;
+    }
+    return buffer;
+}
+
diff --git a/jni/libucommon/sources/openssl/local.h b/jni/libucommon/sources/openssl/local.h
new file mode 100644
index 0000000..b061444
--- /dev/null
+++ b/jni/libucommon/sources/openssl/local.h
@@ -0,0 +1,48 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon-config.h>
+#include <ucommon/ucommon.h>
+#include <ucommon/export.h>
+#include <ucommon/secure.h>
+#include <openssl/ssl.h>
+#include <openssl/evp.h>
+#include <openssl/rand.h>
+
+#ifdef  _MSWINDOWS_
+#include <wincrypt.h>
+#endif
+
+#define NAMESPACE_LOCAL namespace __secure__ {
+#define LOCAL_NAMESPACE __secure__
+
+NAMESPACE_LOCAL
+using namespace UCOMMON_NAMESPACE;
+
+class __LOCAL context : public secure
+{
+public:
+    ~context();
+
+    SSL_CTX *ctx;
+};
+
+END_NAMESPACE
+
+using namespace UCOMMON_NAMESPACE;
+using namespace LOCAL_NAMESPACE;
+
diff --git a/jni/libucommon/sources/openssl/random.cpp b/jni/libucommon/sources/openssl/random.cpp
new file mode 100644
index 0000000..85ccf90
--- /dev/null
+++ b/jni/libucommon/sources/openssl/random.cpp
@@ -0,0 +1,59 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+void Random::seed(void)
+{
+    secure::init();
+    RAND_poll();
+}
+
+bool Random::seed(const unsigned char *buf, size_t size)
+{
+    secure::init();
+
+    RAND_seed(buf, size);
+    return true;
+}
+
+size_t Random::key(unsigned char *buf, size_t size)
+{
+    secure::init();
+
+    if(RAND_bytes(buf, size))
+        return size;
+    return 0;
+}
+
+size_t Random::fill(unsigned char *buf, size_t size)
+{
+    secure::init();
+
+    if(RAND_pseudo_bytes(buf, size))
+        return size;
+    return 0;
+}
+
+bool Random::status(void)
+{
+    if(RAND_status())
+        return true;
+
+    return false;
+}
+
diff --git a/jni/libucommon/sources/openssl/secure.cpp b/jni/libucommon/sources/openssl/secure.cpp
new file mode 100644
index 0000000..4fbc661
--- /dev/null
+++ b/jni/libucommon/sources/openssl/secure.cpp
@@ -0,0 +1,206 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+#ifdef  HAVE_OPENSSL_FIPS_H
+#include <openssl/fips.h>
+#endif
+
+static mutex_t *private_locks = NULL;
+
+extern "C" {
+    static void ssl_lock(int mode, int n, const char *file, int line)
+    {
+        if((mode & 0x03) == CRYPTO_LOCK)
+            private_locks[n].acquire();
+        else if((mode & 0x03) == CRYPTO_UNLOCK)
+            private_locks[n].release();
+    }
+
+    static unsigned long ssl_self(void)
+    {
+#ifdef  _MSWINDOWS_
+        return GetCurrentThreadId();
+#else
+        return (long)Thread::self();
+#endif
+    }
+}
+
+bool secure::fips(void)
+{
+#ifdef  HAVE_OPENSSL_FIPS_H
+
+    // must always be first init function called...
+    if(private_locks)
+        return false;
+
+    if(!FIPS_mode_set(1))
+        return false;
+
+    return init();
+#else
+    return false;
+#endif
+}
+
+bool secure::init(void)
+{
+    if(private_locks)
+        return true;
+
+    Thread::init();
+    Socket::init();
+
+    SSL_library_init();
+    SSL_load_error_strings();
+    ERR_load_BIO_strings();
+    OpenSSL_add_all_algorithms();
+    OpenSSL_add_all_digests();
+
+    if(CRYPTO_get_id_callback() != NULL)
+        return false;
+
+    private_locks = new Mutex[CRYPTO_num_locks()];
+    CRYPTO_set_id_callback(ssl_self);
+    CRYPTO_set_locking_callback(ssl_lock);
+    return true;
+}
+
+void secure::cipher(secure *scontext, const char *ciphers)
+{
+    context *ctx = (context *)scontext;
+    if(!ctx)
+        return;
+
+    SSL_CTX_set_cipher_list(ctx->ctx, ciphers);
+}
+
+secure::client_t secure::client(const char *ca)
+{
+    context *ctx = new(context);
+    secure::init();
+
+    if(!ctx)
+        return NULL;
+
+    ctx->error = secure::OK;
+
+    ctx->ctx = SSL_CTX_new(SSLv23_client_method());
+
+    if(!ctx->ctx) {
+        ctx->error = secure::INVALID;
+        return ctx;
+    }
+
+    if(!ca)
+        return ctx;
+
+    if(eq(ca, "*"))
+        ca = oscerts();
+
+    if(!SSL_CTX_load_verify_locations(ctx->ctx, ca, 0)) {
+        ctx->error = secure::INVALID_AUTHORITY;
+        return ctx;
+    }
+
+    return ctx;
+}
+
+secure::server_t secure::server(const char *certfile, const char *ca)
+{
+    context *ctx = new(context);
+
+    if(!ctx)
+        return NULL;
+
+    secure::init();
+    ctx->error = secure::OK;
+    ctx->ctx = SSL_CTX_new(SSLv23_server_method());
+
+    if(!ctx->ctx) {
+        ctx->error = secure::INVALID;
+        return ctx;
+    }
+
+    if(!SSL_CTX_use_certificate_chain_file(ctx->ctx, certfile)) {
+        ctx->error = secure::MISSING_CERTIFICATE;
+        return ctx;
+    }
+
+    if(!SSL_CTX_use_PrivateKey_file(ctx->ctx, certfile, SSL_FILETYPE_PEM)) {
+        ctx->error = secure::MISSING_PRIVATEKEY;
+        return ctx;
+    }
+
+    if(!SSL_CTX_check_private_key(ctx->ctx)) {
+        ctx->error = secure::INVALID_CERTIFICATE;
+        return ctx;
+    }
+
+    if(!ca)
+        return ctx;
+
+    if(eq(ca, "*"))
+        ca = oscerts();
+
+    if(!SSL_CTX_load_verify_locations(ctx->ctx, ca, 0)) {
+        ctx->error = secure::INVALID_AUTHORITY;
+        return ctx;
+    }
+
+    return ctx;
+}
+
+secure::error_t secure::verify(session_t session, const char *peername)
+{
+    SSL *ssl = (SSL *)session;
+
+    char peer_cn[256];
+
+    if(SSL_get_verify_result(ssl) != X509_V_OK)
+        return secure::INVALID_CERTIFICATE;
+
+    if(!peername)
+        return secure::OK;
+
+    X509 *peer = SSL_get_peer_certificate(ssl);
+
+    if(!peer)
+        return secure::INVALID_PEERNAME;
+
+    X509_NAME_get_text_by_NID(
+        X509_get_subject_name(peer),
+        NID_commonName, peer_cn, sizeof(peer_cn));
+    if(!eq_case(peer_cn, peername))
+        return secure::INVALID_PEERNAME;
+
+    return secure::OK;
+}
+
+secure::~secure()
+{
+}
+
+context::~context()
+{
+    if(ctx)
+        SSL_CTX_free(ctx);
+}
+
+
diff --git a/jni/libucommon/sources/openssl/ssl.cpp b/jni/libucommon/sources/openssl/ssl.cpp
new file mode 100644
index 0000000..65ffae0
--- /dev/null
+++ b/jni/libucommon/sources/openssl/ssl.cpp
@@ -0,0 +1,164 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+SSLBuffer::SSLBuffer(secure::client_t scontext) :
+TCPBuffer()
+{
+    context *ctx = (context *)scontext;
+    ssl = NULL;
+    bio = NULL;
+    server = false;
+
+    if(ctx && ctx->ctx && ctx->err() == secure::OK)
+        ssl = SSL_new(ctx->ctx);
+}
+
+SSLBuffer::SSLBuffer(const TCPServer *tcp, secure::server_t scontext, size_t size) :
+TCPBuffer(tcp, size)
+{
+    context *ctx = (context *)scontext;
+    ssl = NULL;
+    bio = NULL;
+    server = true;
+
+    if(ctx && ctx->ctx && ctx->err() == secure::OK)
+        ssl = SSL_new(ctx->ctx);
+
+    if(!is_open() || !ssl)
+        return;
+
+    SSL_set_fd((SSL *)ssl, getsocket());
+
+    if(SSL_accept((SSL *)ssl) > 0)
+        bio = SSL_get_wbio((SSL *)ssl);
+}
+
+SSLBuffer::~SSLBuffer()
+{
+    release();
+}
+
+void SSLBuffer::open(const char *host, const char *service, size_t size)
+{
+    if(server) {
+        ioerr = EBADF;
+        return;
+    }
+
+    close();
+    TCPBuffer::open(host, service, size);
+
+    if(!is_open() || !ssl)
+        return;
+
+    SSL_set_fd((SSL *)ssl, getsocket());
+
+    if(SSL_connect((SSL *)ssl) > 0)
+        bio = SSL_get_wbio((SSL *)ssl);
+}
+
+void SSLBuffer::close(void)
+{
+    if(server) {
+        ioerr = EBADF;
+        return;
+    }
+
+    if(bio) {
+        SSL_shutdown((SSL *)ssl);
+        bio = NULL;
+    }
+
+    TCPBuffer::close();
+}
+
+void SSLBuffer::release(void)
+{
+    server = false;
+    close();
+    if(ssl) {
+        SSL_free((SSL *)ssl);
+        ssl = NULL;
+    }
+}
+
+size_t SSLBuffer::_push(const char *address, size_t size)
+{
+    if(!bio)
+        return TCPBuffer::_push(address, size);
+
+    int result = SSL_write((SSL *)ssl, address, size);
+    if(result < 0) {
+        result = 0;
+        ioerr = EIO;
+    }
+    return (ssize_t)result;
+}
+
+bool SSLBuffer::_pending(void)
+{
+    if(so == INVALID_SOCKET)
+        return false;
+
+    if(input_pending())
+        return true;
+
+    if(ssl && SSL_pending((SSL *)ssl))
+        return true;
+
+    if(iowait && iowait != Timer::inf)
+        return Socket::wait(so, iowait);
+
+    return Socket::wait(so, 0);
+}
+
+size_t SSLBuffer::_pull(char *address, size_t size)
+{
+    if(!bio)
+        return TCPBuffer::_pull(address, size);
+
+    if(SSL_pending((SSL *)ssl) == 0 && iowait && iowait != Timer::inf && !Socket::wait(so, iowait))
+        return 0;
+
+    int result = SSL_read((SSL *)ssl, address, size);
+    if(result < 0) {
+        result = 0;
+        ioerr = EIO;
+    }
+    return (size_t) result;
+}
+
+bool SSLBuffer::_flush(void)
+{
+    int result;
+
+    if(TCPBuffer::_flush()) {
+        if(bio) {
+            result = BIO_flush((BIO *)bio);
+            if(result < 1) {
+                ioerr = EIO;
+                return false;
+            }
+        }
+        return true;
+    }
+
+    return false;
+}
+
diff --git a/jni/libucommon/sources/openssl/sstream.cpp b/jni/libucommon/sources/openssl/sstream.cpp
new file mode 100644
index 0000000..b196f08
--- /dev/null
+++ b/jni/libucommon/sources/openssl/sstream.cpp
@@ -0,0 +1,136 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "local.h"
+
+#if defined(OLD_STDCPP) || defined(NEW_STDCPP)
+
+sstream::sstream(secure::client_t scontext) :
+tcpstream()
+{
+    context *ctx = (context *)scontext;
+    ssl = NULL;
+    bio = NULL;
+    server = false;
+
+    if(ctx && ctx->ctx && ctx->err() == secure::OK)
+        ssl = SSL_new(ctx->ctx);
+}
+
+sstream::sstream(const TCPServer *tcp, secure::server_t scontext, size_t size) :
+tcpstream(tcp, size)
+{
+    context *ctx = (context *)scontext;
+    ssl = NULL;
+    bio = NULL;
+    server = true;
+
+    if(ctx && ctx->ctx && ctx->err() == secure::OK)
+        ssl = SSL_new(ctx->ctx);
+
+    if(!is_open() || !ssl)
+        return;
+
+    SSL_set_fd((SSL *)ssl, getsocket());
+
+    if(SSL_accept((SSL *)ssl) > 0)
+        bio = SSL_get_wbio((SSL *)ssl);
+}
+
+sstream::~sstream()
+{
+    release();
+}
+
+void sstream::open(const char *host, const char *service, size_t size)
+{
+    if(server)
+        return;
+
+    close();
+    tcpstream::open(host, service, size);
+
+    if(!is_open() || !ssl)
+        return;
+
+    SSL_set_fd((SSL *)ssl, getsocket());
+
+    if(SSL_connect((SSL *)ssl) > 0)
+        bio = SSL_get_wbio((SSL *)ssl);
+}
+
+void sstream::close(void)
+{
+    if(server)
+        return;
+
+    if(bio) {
+        SSL_shutdown((SSL *)ssl);
+        bio = NULL;
+    }
+
+    tcpstream::close();
+}
+
+void sstream::release(void)
+{
+    server = false;
+    close();
+
+    if(ssl) {
+        SSL_free((SSL *)ssl);
+        ssl = NULL;
+    }
+}
+
+ssize_t sstream::_write(const char *address, size_t size)
+{
+    if(!bio)
+        return tcpstream::_write(address, size);
+
+    return SSL_write((SSL *)ssl, address, size);
+}
+
+ssize_t sstream::_read(char *address, size_t size)
+{
+    if(!bio)
+        return tcpstream::_read(address, size);
+
+    return SSL_read((SSL *)ssl, address, size);
+}
+
+bool sstream::_wait(void)
+{
+    if(so == INVALID_SOCKET)
+        return false;
+
+    if(ssl && SSL_pending((SSL *)ssl))
+        return true;
+
+    return tcpstream::_wait();
+}
+
+int sstream::sync()
+{
+    int rtn = tcpstream::sync();
+    if(bio)
+        rtn = BIO_flush((BIO *)bio);
+
+    return rtn;
+}
+
+#endif
diff --git a/jni/libucommon/sources/stamp-h1 b/jni/libucommon/sources/stamp-h1
new file mode 100644
index 0000000..a2a6a7f
--- /dev/null
+++ b/jni/libucommon/sources/stamp-h1
@@ -0,0 +1 @@
+timestamp for ucommon-config.h
diff --git a/jni/libucommon/sources/test/.deps/cipher.Po b/jni/libucommon/sources/test/.deps/cipher.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/test/.deps/cipher.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/test/.deps/datetime.Po b/jni/libucommon/sources/test/.deps/datetime.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/test/.deps/datetime.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/test/.deps/digest.Po b/jni/libucommon/sources/test/.deps/digest.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/test/.deps/digest.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/test/.deps/keydata.Po b/jni/libucommon/sources/test/.deps/keydata.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/test/.deps/keydata.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/test/.deps/linked.Po b/jni/libucommon/sources/test/.deps/linked.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/test/.deps/linked.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/test/.deps/memory.Po b/jni/libucommon/sources/test/.deps/memory.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/test/.deps/memory.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/test/.deps/queue.Po b/jni/libucommon/sources/test/.deps/queue.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/test/.deps/queue.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/test/.deps/shell.Po b/jni/libucommon/sources/test/.deps/shell.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/test/.deps/shell.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/test/.deps/socket.Po b/jni/libucommon/sources/test/.deps/socket.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/test/.deps/socket.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/test/.deps/ssl.Po b/jni/libucommon/sources/test/.deps/ssl.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/test/.deps/ssl.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/test/.deps/stream.Po b/jni/libucommon/sources/test/.deps/stream.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/test/.deps/stream.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/test/.deps/string.Po b/jni/libucommon/sources/test/.deps/string.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/test/.deps/string.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/test/.deps/thread.Po b/jni/libucommon/sources/test/.deps/thread.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/test/.deps/thread.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/test/.deps/unicode.Po b/jni/libucommon/sources/test/.deps/unicode.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/test/.deps/unicode.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/test/CMakeLists.txt b/jni/libucommon/sources/test/CMakeLists.txt
new file mode 100644
index 0000000..5f98e43
--- /dev/null
+++ b/jni/libucommon/sources/test/CMakeLists.txt
@@ -0,0 +1,63 @@
+project(test)
+cmake_minimum_required(VERSION 2.6)
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}
+                    ${CMAKE_CURRENT_SOURCE_DIR}/../inc)
+
+link_directories(${CMAKE_CURRENT_BINARY_DIR}
+         ${CMAKE_CURRENT_BINARY_DIR}/../src)
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/keydata.conf ${CMAKE_CURRENT_BINARY_DIR}/keydata.conf COPYONLY)
+
+add_executable(test-ucommonLinked linked.cpp)
+target_link_libraries(test-ucommonLinked ucommon)
+add_test(NAME ucommonLinked COMMAND test-ucommonLinked)
+
+add_executable(test-ucommonSocket socket.cpp)
+target_link_libraries(test-ucommonSocket ucommon)
+add_test(NAME ucommonSocket COMMAND test-ucommonSocket)
+
+add_executable(test-ucommonStrings string.cpp)
+target_link_libraries(test-ucommonStrings ucommon)
+add_test(NAME ucommonStrings COMMAND test-ucommonStrings)
+
+add_executable(test-ucommonThreads thread.cpp)
+target_link_libraries(test-ucommonThreads ucommon)
+add_test(NAME ucommonThreads COMMAND test-ucommonThreads)
+
+add_executable(test-ucommonKeydata keydata.cpp)
+target_link_libraries(test-ucommonKeydata ucommon)
+add_test(NAME ucommonKeydata COMMAND test-ucommonKeydata)
+
+add_executable(test-ucommonMemory memory.cpp)
+target_link_libraries(test-ucommonMemory ucommon)
+add_test(NAME ucommonMemory COMMAND test-ucommonMemory)
+
+add_executable(test-ucommonStream stream.cpp)
+target_link_libraries(test-ucommonStream ucommon)
+add_test(NAME ucommonStream COMMAND test-ucommonStream)
+
+add_executable(test-ucommonUnicode unicode.cpp)
+target_link_libraries(test-ucommonUnicode ucommon)
+add_test(NAME ucommonUnicode COMMAND test-ucommonUnicode)
+
+add_executable(test-ucommonQueue queue.cpp)
+target_link_libraries(test-ucommonQueue ucommon)
+add_test(NAME ucommonQueue COMMAND test-ucommonQueue)
+
+add_executable(test-ucommonDatetime datetime.cpp)
+target_link_libraries(test-ucommonDatetime ucommon)
+add_test(NAME ucommonDatetime COMMAND test-ucommonDatetime)
+
+add_executable(test-ucommonShell shell.cpp)
+target_link_libraries(test-ucommonShell ucommon)
+add_test(NAME ucommonShell COMMAND test-ucommonShell)
+
+add_executable(test-ucommonCipher cipher.cpp)
+target_link_libraries(test-ucommonCipher usecure ucommon)
+add_test(NAME ucommonCipher COMMAND test-ucommonCipher)
+
+add_executable(test-ucommonDigest digest.cpp)
+target_link_libraries(test-ucommonDigest usecure ucommon)
+add_test(NAME ucommonDigest COMMAND test-ucommonDigest)
+
diff --git a/jni/libucommon/sources/test/Makefile b/jni/libucommon/sources/test/Makefile
new file mode 100644
index 0000000..e755a20
--- /dev/null
+++ b/jni/libucommon/sources/test/Makefile
@@ -0,0 +1,1266 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# test/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2013 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.
+
+
+
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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)/ucommon
+pkgincludedir = $(includedir)/ucommon
+pkglibdir = $(libdir)/ucommon
+pkglibexecdir = $(libexecdir)/ucommon
+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 = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+target_triplet = x86_64-unknown-linux-gnu
+TESTS = ucommonLinked$(EXEEXT) ucommonSocket$(EXEEXT) \
+	ucommonStrings$(EXEEXT) ucommonThreads$(EXEEXT) \
+	ucommonMemory$(EXEEXT) ucommonKeydata$(EXEEXT) \
+	ucommonStream$(EXEEXT) ucommonUnicode$(EXEEXT) \
+	ucommonQueue$(EXEEXT) ucommonDatetime$(EXEEXT) \
+	ucommonShell$(EXEEXT) ucommonDigest$(EXEEXT) \
+	ucommonCipher$(EXEEXT)
+noinst_PROGRAMS = demoSSL$(EXEEXT)
+check_PROGRAMS = $(am__EXEEXT_1)
+subdir = test
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/autoconf/depcomp \
+	$(top_srcdir)/autoconf/test-driver
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__EXEEXT_1 = ucommonLinked$(EXEEXT) ucommonSocket$(EXEEXT) \
+	ucommonStrings$(EXEEXT) ucommonThreads$(EXEEXT) \
+	ucommonMemory$(EXEEXT) ucommonKeydata$(EXEEXT) \
+	ucommonStream$(EXEEXT) ucommonUnicode$(EXEEXT) \
+	ucommonQueue$(EXEEXT) ucommonDatetime$(EXEEXT) \
+	ucommonShell$(EXEEXT) ucommonDigest$(EXEEXT) \
+	ucommonCipher$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+am_demoSSL_OBJECTS = ssl.$(OBJEXT)
+demoSSL_OBJECTS = $(am_demoSSL_OBJECTS)
+demoSSL_LDADD = $(LDADD)
+demoSSL_DEPENDENCIES = ../corelib/libucommon.la
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+demoSSL_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(demoSSL_LDFLAGS) $(LDFLAGS) -o $@
+am_ucommonCipher_OBJECTS = cipher.$(OBJEXT)
+ucommonCipher_OBJECTS = $(am_ucommonCipher_OBJECTS)
+ucommonCipher_LDADD = $(LDADD)
+ucommonCipher_DEPENDENCIES = ../corelib/libucommon.la
+ucommonCipher_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(ucommonCipher_LDFLAGS) $(LDFLAGS) \
+	-o $@
+am_ucommonDatetime_OBJECTS = datetime.$(OBJEXT)
+ucommonDatetime_OBJECTS = $(am_ucommonDatetime_OBJECTS)
+ucommonDatetime_LDADD = $(LDADD)
+ucommonDatetime_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonDigest_OBJECTS = digest.$(OBJEXT)
+ucommonDigest_OBJECTS = $(am_ucommonDigest_OBJECTS)
+ucommonDigest_LDADD = $(LDADD)
+ucommonDigest_DEPENDENCIES = ../corelib/libucommon.la
+ucommonDigest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(ucommonDigest_LDFLAGS) $(LDFLAGS) \
+	-o $@
+am_ucommonKeydata_OBJECTS = keydata.$(OBJEXT)
+ucommonKeydata_OBJECTS = $(am_ucommonKeydata_OBJECTS)
+ucommonKeydata_LDADD = $(LDADD)
+ucommonKeydata_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonLinked_OBJECTS = linked.$(OBJEXT)
+ucommonLinked_OBJECTS = $(am_ucommonLinked_OBJECTS)
+ucommonLinked_LDADD = $(LDADD)
+ucommonLinked_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonMemory_OBJECTS = memory.$(OBJEXT)
+ucommonMemory_OBJECTS = $(am_ucommonMemory_OBJECTS)
+ucommonMemory_LDADD = $(LDADD)
+ucommonMemory_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonQueue_OBJECTS = queue.$(OBJEXT)
+ucommonQueue_OBJECTS = $(am_ucommonQueue_OBJECTS)
+ucommonQueue_LDADD = $(LDADD)
+ucommonQueue_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonShell_OBJECTS = shell.$(OBJEXT)
+ucommonShell_OBJECTS = $(am_ucommonShell_OBJECTS)
+ucommonShell_LDADD = $(LDADD)
+ucommonShell_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonSocket_OBJECTS = socket.$(OBJEXT)
+ucommonSocket_OBJECTS = $(am_ucommonSocket_OBJECTS)
+ucommonSocket_LDADD = $(LDADD)
+ucommonSocket_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonStream_OBJECTS = stream.$(OBJEXT)
+ucommonStream_OBJECTS = $(am_ucommonStream_OBJECTS)
+ucommonStream_LDADD = $(LDADD)
+ucommonStream_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonStrings_OBJECTS = string.$(OBJEXT)
+ucommonStrings_OBJECTS = $(am_ucommonStrings_OBJECTS)
+ucommonStrings_LDADD = $(LDADD)
+ucommonStrings_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonThreads_OBJECTS = thread.$(OBJEXT)
+ucommonThreads_OBJECTS = $(am_ucommonThreads_OBJECTS)
+ucommonThreads_LDADD = $(LDADD)
+ucommonThreads_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonUnicode_OBJECTS = unicode.$(OBJEXT)
+ucommonUnicode_OBJECTS = $(am_ucommonUnicode_OBJECTS)
+ucommonUnicode_LDADD = $(LDADD)
+ucommonUnicode_DEPENDENCIES = ../corelib/libucommon.la
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = -I. -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+SOURCES = $(demoSSL_SOURCES) $(ucommonCipher_SOURCES) \
+	$(ucommonDatetime_SOURCES) $(ucommonDigest_SOURCES) \
+	$(ucommonKeydata_SOURCES) $(ucommonLinked_SOURCES) \
+	$(ucommonMemory_SOURCES) $(ucommonQueue_SOURCES) \
+	$(ucommonShell_SOURCES) $(ucommonSocket_SOURCES) \
+	$(ucommonStream_SOURCES) $(ucommonStrings_SOURCES) \
+	$(ucommonThreads_SOURCES) $(ucommonUnicode_SOURCES)
+DIST_SOURCES = $(demoSSL_SOURCES) $(ucommonCipher_SOURCES) \
+	$(ucommonDatetime_SOURCES) $(ucommonDigest_SOURCES) \
+	$(ucommonKeydata_SOURCES) $(ucommonLinked_SOURCES) \
+	$(ucommonMemory_SOURCES) $(ucommonQueue_SOURCES) \
+	$(ucommonShell_SOURCES) $(ucommonSocket_SOURCES) \
+	$(ucommonStream_SOURCES) $(ucommonStrings_SOURCES) \
+	$(ucommonThreads_SOURCES) $(ucommonUnicode_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=''; \
+    grn=''; \
+    lgn=''; \
+    blu=''; \
+    mgn=''; \
+    brg=''; \
+    std=''; \
+  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 =  .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/autoconf/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:.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/autoconf/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+	$(TEST_LOG_FLAGS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing aclocal-1.13
+AMTAR = $${TAR-tar}
+AM_DEFAULT_VERBOSITY = 1
+AR = ar
+AS = as
+AUTOCONF = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoconf
+AUTOHEADER = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoheader
+AUTOMAKE = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing automake-1.13
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CHECKFLAGS = 
+COMPAT = commoncpp
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS =  -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DLLTOOL = dlltool
+DOXYGEN = /usr/bin/doxygen
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /usr/bin/grep -E
+EXEEXT = 
+FGREP = /usr/bin/grep -F
+GNUTLS_CFLAGS = 
+GNUTLS_LIBS = -lgnutls
+GREP = /usr/bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+LT_GENERIC = $(SHELL) $(top_builddir)/libtool
+LT_VERSION = 6:3:0
+MAKEINFO = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing makeinfo
+MANIFEST_TOOL = :
+MKDIR_P = /usr/bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_CFLAGS = 
+OPENSSL_LIBS = -lssl -lcrypto -lz 
+OTOOL = 
+OTOOL64 = 
+PACKAGE = ucommon
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = ucommon
+PACKAGE_STRING = ucommon 6.0.7
+PACKAGE_TARNAME = ucommon
+PACKAGE_URL = 
+PACKAGE_VERSION = 6.0.7
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PKG_CONFIG_LIBDIR = 
+PKG_CONFIG_PATH = 
+RANLIB = ranlib
+SECURE = gnutls
+SECURE_LIBS = -lgnutls
+SECURE_LOCAL = ../gnutls/libusecure.la -lgnutls
+SED = /usr/bin/sed
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = strip
+UCOMMON_CFGPATH = /etc
+UCOMMON_CLINK =  -lc
+UCOMMON_FLAGS =  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+UCOMMON_INCLUDES = /usr/local/include/ucommon
+UCOMMON_LIBC = -lc
+UCOMMON_LIBS =   -lrt  -ldl -lpthread -lc
+UCOMMON_LINKED =   -lrt  -ldl -lpthread
+UCOMMON_LOCALE = /usr/local/share/locale
+UCOMMON_MODEL = CXX
+UCOMMON_PREFIX = /usr/local
+UCOMMON_VARPATH = /var
+UCOMMON_VISIBILITY = 1
+VERSION = 6.0.7
+abs_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources/test
+abs_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources/test
+abs_top_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+abs_top_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+includes = ${includedir}/ucommon
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+libs = /usr/local/lib
+localedir = ${datarootdir}/locale
+localstatedir = /var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = /etc
+target = x86_64-unknown-linux-gnu
+target_alias = 
+target_cpu = x86_64
+target_os = linux-gnu
+target_vendor = unknown
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = ..
+MAINTAINERCLEANFILES = Makefile.in Makefile
+AM_CXXFLAGS = -I$(top_srcdir)/inc $(UCOMMON_FLAGS) $(CHECKFLAGS)
+LDADD = ../corelib/libucommon.la   -lrt  -ldl -lpthread -lc  -lc
+EXTRA_DIST = *.cpp keydata.conf CMakeLists.txt
+demoSSL_SOURCES = ssl.cpp
+demoSSL_LDFLAGS = ../gnutls/libusecure.la -lgnutls
+ucommonThreads_SOURCES = thread.cpp
+ucommonStrings_SOURCES = string.cpp
+ucommonLinked_SOURCES = linked.cpp
+ucommonSocket_SOURCES = socket.cpp
+ucommonMemory_SOURCES = memory.cpp
+ucommonStream_SOURCES = stream.cpp
+ucommonKeydata_SOURCES = keydata.cpp
+ucommonUnicode_SOURCES = unicode.cpp
+ucommonDatetime_SOURCES = datetime.cpp
+ucommonQueue_SOURCES = queue.cpp
+ucommonShell_SOURCES = shell.cpp
+ucommonDigest_SOURCES = digest.cpp
+ucommonDigest_LDFLAGS = ../gnutls/libusecure.la -lgnutls
+ucommonCipher_SOURCES = cipher.cpp
+ucommonCipher_LDFLAGS = ../gnutls/libusecure.la -lgnutls
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .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 \
+	    *$$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) --gnu test/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu test/Makefile
+.PRECIOUS: 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):
+
+clean-checkPROGRAMS:
+	@list='$(check_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
+
+clean-noinstPROGRAMS:
+	@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
+
+demoSSL$(EXEEXT): $(demoSSL_OBJECTS) $(demoSSL_DEPENDENCIES) $(EXTRA_demoSSL_DEPENDENCIES) 
+	@rm -f demoSSL$(EXEEXT)
+	$(AM_V_CXXLD)$(demoSSL_LINK) $(demoSSL_OBJECTS) $(demoSSL_LDADD) $(LIBS)
+
+ucommonCipher$(EXEEXT): $(ucommonCipher_OBJECTS) $(ucommonCipher_DEPENDENCIES) $(EXTRA_ucommonCipher_DEPENDENCIES) 
+	@rm -f ucommonCipher$(EXEEXT)
+	$(AM_V_CXXLD)$(ucommonCipher_LINK) $(ucommonCipher_OBJECTS) $(ucommonCipher_LDADD) $(LIBS)
+
+ucommonDatetime$(EXEEXT): $(ucommonDatetime_OBJECTS) $(ucommonDatetime_DEPENDENCIES) $(EXTRA_ucommonDatetime_DEPENDENCIES) 
+	@rm -f ucommonDatetime$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonDatetime_OBJECTS) $(ucommonDatetime_LDADD) $(LIBS)
+
+ucommonDigest$(EXEEXT): $(ucommonDigest_OBJECTS) $(ucommonDigest_DEPENDENCIES) $(EXTRA_ucommonDigest_DEPENDENCIES) 
+	@rm -f ucommonDigest$(EXEEXT)
+	$(AM_V_CXXLD)$(ucommonDigest_LINK) $(ucommonDigest_OBJECTS) $(ucommonDigest_LDADD) $(LIBS)
+
+ucommonKeydata$(EXEEXT): $(ucommonKeydata_OBJECTS) $(ucommonKeydata_DEPENDENCIES) $(EXTRA_ucommonKeydata_DEPENDENCIES) 
+	@rm -f ucommonKeydata$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonKeydata_OBJECTS) $(ucommonKeydata_LDADD) $(LIBS)
+
+ucommonLinked$(EXEEXT): $(ucommonLinked_OBJECTS) $(ucommonLinked_DEPENDENCIES) $(EXTRA_ucommonLinked_DEPENDENCIES) 
+	@rm -f ucommonLinked$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonLinked_OBJECTS) $(ucommonLinked_LDADD) $(LIBS)
+
+ucommonMemory$(EXEEXT): $(ucommonMemory_OBJECTS) $(ucommonMemory_DEPENDENCIES) $(EXTRA_ucommonMemory_DEPENDENCIES) 
+	@rm -f ucommonMemory$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonMemory_OBJECTS) $(ucommonMemory_LDADD) $(LIBS)
+
+ucommonQueue$(EXEEXT): $(ucommonQueue_OBJECTS) $(ucommonQueue_DEPENDENCIES) $(EXTRA_ucommonQueue_DEPENDENCIES) 
+	@rm -f ucommonQueue$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonQueue_OBJECTS) $(ucommonQueue_LDADD) $(LIBS)
+
+ucommonShell$(EXEEXT): $(ucommonShell_OBJECTS) $(ucommonShell_DEPENDENCIES) $(EXTRA_ucommonShell_DEPENDENCIES) 
+	@rm -f ucommonShell$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonShell_OBJECTS) $(ucommonShell_LDADD) $(LIBS)
+
+ucommonSocket$(EXEEXT): $(ucommonSocket_OBJECTS) $(ucommonSocket_DEPENDENCIES) $(EXTRA_ucommonSocket_DEPENDENCIES) 
+	@rm -f ucommonSocket$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonSocket_OBJECTS) $(ucommonSocket_LDADD) $(LIBS)
+
+ucommonStream$(EXEEXT): $(ucommonStream_OBJECTS) $(ucommonStream_DEPENDENCIES) $(EXTRA_ucommonStream_DEPENDENCIES) 
+	@rm -f ucommonStream$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonStream_OBJECTS) $(ucommonStream_LDADD) $(LIBS)
+
+ucommonStrings$(EXEEXT): $(ucommonStrings_OBJECTS) $(ucommonStrings_DEPENDENCIES) $(EXTRA_ucommonStrings_DEPENDENCIES) 
+	@rm -f ucommonStrings$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonStrings_OBJECTS) $(ucommonStrings_LDADD) $(LIBS)
+
+ucommonThreads$(EXEEXT): $(ucommonThreads_OBJECTS) $(ucommonThreads_DEPENDENCIES) $(EXTRA_ucommonThreads_DEPENDENCIES) 
+	@rm -f ucommonThreads$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonThreads_OBJECTS) $(ucommonThreads_LDADD) $(LIBS)
+
+ucommonUnicode$(EXEEXT): $(ucommonUnicode_OBJECTS) $(ucommonUnicode_DEPENDENCIES) $(EXTRA_ucommonUnicode_DEPENDENCIES) 
+	@rm -f ucommonUnicode$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonUnicode_OBJECTS) $(ucommonUnicode_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/cipher.Po
+include ./$(DEPDIR)/datetime.Po
+include ./$(DEPDIR)/digest.Po
+include ./$(DEPDIR)/keydata.Po
+include ./$(DEPDIR)/linked.Po
+include ./$(DEPDIR)/memory.Po
+include ./$(DEPDIR)/queue.Po
+include ./$(DEPDIR)/shell.Po
+include ./$(DEPDIR)/socket.Po
+include ./$(DEPDIR)/ssl.Po
+include ./$(DEPDIR)/stream.Po
+include ./$(DEPDIR)/string.Po
+include ./$(DEPDIR)/thread.Po
+include ./$(DEPDIR)/unicode.Po
+
+.cpp.o:
+	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	$(AM_V_CXX)source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	$(AM_V_CXX)source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+#	$(AM_V_CXX)source='$<' object='$@' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+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`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(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
+
+# 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; \
+	else \
+	  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 $(check_PROGRAMS)
+	@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 $$?
+ucommonLinked.log: ucommonLinked$(EXEEXT)
+	@p='ucommonLinked$(EXEEXT)'; \
+	b='ucommonLinked'; \
+	$(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)
+ucommonSocket.log: ucommonSocket$(EXEEXT)
+	@p='ucommonSocket$(EXEEXT)'; \
+	b='ucommonSocket'; \
+	$(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)
+ucommonStrings.log: ucommonStrings$(EXEEXT)
+	@p='ucommonStrings$(EXEEXT)'; \
+	b='ucommonStrings'; \
+	$(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)
+ucommonThreads.log: ucommonThreads$(EXEEXT)
+	@p='ucommonThreads$(EXEEXT)'; \
+	b='ucommonThreads'; \
+	$(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)
+ucommonMemory.log: ucommonMemory$(EXEEXT)
+	@p='ucommonMemory$(EXEEXT)'; \
+	b='ucommonMemory'; \
+	$(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)
+ucommonKeydata.log: ucommonKeydata$(EXEEXT)
+	@p='ucommonKeydata$(EXEEXT)'; \
+	b='ucommonKeydata'; \
+	$(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)
+ucommonStream.log: ucommonStream$(EXEEXT)
+	@p='ucommonStream$(EXEEXT)'; \
+	b='ucommonStream'; \
+	$(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)
+ucommonUnicode.log: ucommonUnicode$(EXEEXT)
+	@p='ucommonUnicode$(EXEEXT)'; \
+	b='ucommonUnicode'; \
+	$(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)
+ucommonQueue.log: ucommonQueue$(EXEEXT)
+	@p='ucommonQueue$(EXEEXT)'; \
+	b='ucommonQueue'; \
+	$(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)
+ucommonDatetime.log: ucommonDatetime$(EXEEXT)
+	@p='ucommonDatetime$(EXEEXT)'; \
+	b='ucommonDatetime'; \
+	$(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)
+ucommonShell.log: ucommonShell$(EXEEXT)
+	@p='ucommonShell$(EXEEXT)'; \
+	b='ucommonShell'; \
+	$(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)
+ucommonDigest.log: ucommonDigest$(EXEEXT)
+	@p='ucommonDigest$(EXEEXT)'; \
+	b='ucommonDigest'; \
+	$(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)
+ucommonCipher.log: ucommonCipher$(EXEEXT)
+	@p='ucommonCipher$(EXEEXT)'; \
+	b='ucommonCipher'; \
+	$(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)
+#.test$(EXEEXT).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)
+
+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
+check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+	clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+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
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \
+	clean-checkPROGRAMS 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 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 recheck tags tags-am uninstall \
+	uninstall-am
+
+
+testing:	$(TESTS)
+
+# test using full stdc++ linkage...
+stdcpp:	stdcpp.cpp
+	$(CXX)  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1 -o stdcpp -I../inc -L../src/.libs -lucommon stdcpp.cpp   -lrt  -ldl -lpthread -lc
+
+# 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/jni/libucommon/sources/test/Makefile.am b/jni/libucommon/sources/test/Makefile.am
new file mode 100644
index 0000000..9667941
--- /dev/null
+++ b/jni/libucommon/sources/test/Makefile.am
@@ -0,0 +1,46 @@
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+MAINTAINERCLEANFILES = Makefile.in Makefile
+AM_CXXFLAGS = -I$(top_srcdir)/inc $(UCOMMON_FLAGS) $(CHECKFLAGS)
+LDADD = ../corelib/libucommon.la @UCOMMON_LIBS@ @UCOMMON_CLINK@
+EXTRA_DIST = *.cpp keydata.conf CMakeLists.txt
+
+TESTS = ucommonLinked ucommonSocket ucommonStrings ucommonThreads \
+	ucommonMemory ucommonKeydata ucommonStream ucommonUnicode \
+	ucommonQueue ucommonDatetime ucommonShell ucommonDigest ucommonCipher
+
+noinst_PROGRAMS = demoSSL
+demoSSL_SOURCES = ssl.cpp
+demoSSL_LDFLAGS = @SECURE_LOCAL@
+
+check_PROGRAMS = $(TESTS)
+
+testing:	$(TESTS)
+
+ucommonThreads_SOURCES = thread.cpp
+ucommonStrings_SOURCES = string.cpp
+ucommonLinked_SOURCES = linked.cpp
+ucommonSocket_SOURCES = socket.cpp
+ucommonMemory_SOURCES = memory.cpp
+ucommonStream_SOURCES = stream.cpp
+ucommonKeydata_SOURCES = keydata.cpp
+ucommonUnicode_SOURCES = unicode.cpp
+ucommonDatetime_SOURCES = datetime.cpp
+ucommonQueue_SOURCES = queue.cpp
+ucommonShell_SOURCES = shell.cpp
+ucommonDigest_SOURCES = digest.cpp
+ucommonDigest_LDFLAGS = @SECURE_LOCAL@
+ucommonCipher_SOURCES = cipher.cpp
+ucommonCipher_LDFLAGS = @SECURE_LOCAL@
+
+# test using full stdc++ linkage...
+stdcpp:	stdcpp.cpp
+	$(CXX) @UCOMMON_FLAGS@ -o stdcpp -I../inc -L../src/.libs -lucommon stdcpp.cpp @UCOMMON_LIBS@
diff --git a/jni/libucommon/sources/test/Makefile.in b/jni/libucommon/sources/test/Makefile.in
new file mode 100644
index 0000000..dacf26d
--- /dev/null
+++ b/jni/libucommon/sources/test/Makefile.in
@@ -0,0 +1,1266 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 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@
+
+# Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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@
+target_triplet = @target@
+TESTS = ucommonLinked$(EXEEXT) ucommonSocket$(EXEEXT) \
+	ucommonStrings$(EXEEXT) ucommonThreads$(EXEEXT) \
+	ucommonMemory$(EXEEXT) ucommonKeydata$(EXEEXT) \
+	ucommonStream$(EXEEXT) ucommonUnicode$(EXEEXT) \
+	ucommonQueue$(EXEEXT) ucommonDatetime$(EXEEXT) \
+	ucommonShell$(EXEEXT) ucommonDigest$(EXEEXT) \
+	ucommonCipher$(EXEEXT)
+noinst_PROGRAMS = demoSSL$(EXEEXT)
+check_PROGRAMS = $(am__EXEEXT_1)
+subdir = test
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/autoconf/depcomp \
+	$(top_srcdir)/autoconf/test-driver
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__EXEEXT_1 = ucommonLinked$(EXEEXT) ucommonSocket$(EXEEXT) \
+	ucommonStrings$(EXEEXT) ucommonThreads$(EXEEXT) \
+	ucommonMemory$(EXEEXT) ucommonKeydata$(EXEEXT) \
+	ucommonStream$(EXEEXT) ucommonUnicode$(EXEEXT) \
+	ucommonQueue$(EXEEXT) ucommonDatetime$(EXEEXT) \
+	ucommonShell$(EXEEXT) ucommonDigest$(EXEEXT) \
+	ucommonCipher$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+am_demoSSL_OBJECTS = ssl.$(OBJEXT)
+demoSSL_OBJECTS = $(am_demoSSL_OBJECTS)
+demoSSL_LDADD = $(LDADD)
+demoSSL_DEPENDENCIES = ../corelib/libucommon.la
+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 = 
+demoSSL_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(demoSSL_LDFLAGS) $(LDFLAGS) -o $@
+am_ucommonCipher_OBJECTS = cipher.$(OBJEXT)
+ucommonCipher_OBJECTS = $(am_ucommonCipher_OBJECTS)
+ucommonCipher_LDADD = $(LDADD)
+ucommonCipher_DEPENDENCIES = ../corelib/libucommon.la
+ucommonCipher_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(ucommonCipher_LDFLAGS) $(LDFLAGS) \
+	-o $@
+am_ucommonDatetime_OBJECTS = datetime.$(OBJEXT)
+ucommonDatetime_OBJECTS = $(am_ucommonDatetime_OBJECTS)
+ucommonDatetime_LDADD = $(LDADD)
+ucommonDatetime_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonDigest_OBJECTS = digest.$(OBJEXT)
+ucommonDigest_OBJECTS = $(am_ucommonDigest_OBJECTS)
+ucommonDigest_LDADD = $(LDADD)
+ucommonDigest_DEPENDENCIES = ../corelib/libucommon.la
+ucommonDigest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+	$(AM_CXXFLAGS) $(CXXFLAGS) $(ucommonDigest_LDFLAGS) $(LDFLAGS) \
+	-o $@
+am_ucommonKeydata_OBJECTS = keydata.$(OBJEXT)
+ucommonKeydata_OBJECTS = $(am_ucommonKeydata_OBJECTS)
+ucommonKeydata_LDADD = $(LDADD)
+ucommonKeydata_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonLinked_OBJECTS = linked.$(OBJEXT)
+ucommonLinked_OBJECTS = $(am_ucommonLinked_OBJECTS)
+ucommonLinked_LDADD = $(LDADD)
+ucommonLinked_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonMemory_OBJECTS = memory.$(OBJEXT)
+ucommonMemory_OBJECTS = $(am_ucommonMemory_OBJECTS)
+ucommonMemory_LDADD = $(LDADD)
+ucommonMemory_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonQueue_OBJECTS = queue.$(OBJEXT)
+ucommonQueue_OBJECTS = $(am_ucommonQueue_OBJECTS)
+ucommonQueue_LDADD = $(LDADD)
+ucommonQueue_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonShell_OBJECTS = shell.$(OBJEXT)
+ucommonShell_OBJECTS = $(am_ucommonShell_OBJECTS)
+ucommonShell_LDADD = $(LDADD)
+ucommonShell_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonSocket_OBJECTS = socket.$(OBJEXT)
+ucommonSocket_OBJECTS = $(am_ucommonSocket_OBJECTS)
+ucommonSocket_LDADD = $(LDADD)
+ucommonSocket_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonStream_OBJECTS = stream.$(OBJEXT)
+ucommonStream_OBJECTS = $(am_ucommonStream_OBJECTS)
+ucommonStream_LDADD = $(LDADD)
+ucommonStream_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonStrings_OBJECTS = string.$(OBJEXT)
+ucommonStrings_OBJECTS = $(am_ucommonStrings_OBJECTS)
+ucommonStrings_LDADD = $(LDADD)
+ucommonStrings_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonThreads_OBJECTS = thread.$(OBJEXT)
+ucommonThreads_OBJECTS = $(am_ucommonThreads_OBJECTS)
+ucommonThreads_LDADD = $(LDADD)
+ucommonThreads_DEPENDENCIES = ../corelib/libucommon.la
+am_ucommonUnicode_OBJECTS = unicode.$(OBJEXT)
+ucommonUnicode_OBJECTS = $(am_ucommonUnicode_OBJECTS)
+ucommonUnicode_LDADD = $(LDADD)
+ucommonUnicode_DEPENDENCIES = ../corelib/libucommon.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)/autoconf/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+SOURCES = $(demoSSL_SOURCES) $(ucommonCipher_SOURCES) \
+	$(ucommonDatetime_SOURCES) $(ucommonDigest_SOURCES) \
+	$(ucommonKeydata_SOURCES) $(ucommonLinked_SOURCES) \
+	$(ucommonMemory_SOURCES) $(ucommonQueue_SOURCES) \
+	$(ucommonShell_SOURCES) $(ucommonSocket_SOURCES) \
+	$(ucommonStream_SOURCES) $(ucommonStrings_SOURCES) \
+	$(ucommonThreads_SOURCES) $(ucommonUnicode_SOURCES)
+DIST_SOURCES = $(demoSSL_SOURCES) $(ucommonCipher_SOURCES) \
+	$(ucommonDatetime_SOURCES) $(ucommonDigest_SOURCES) \
+	$(ucommonKeydata_SOURCES) $(ucommonLinked_SOURCES) \
+	$(ucommonMemory_SOURCES) $(ucommonQueue_SOURCES) \
+	$(ucommonShell_SOURCES) $(ucommonSocket_SOURCES) \
+	$(ucommonStream_SOURCES) $(ucommonStrings_SOURCES) \
+	$(ucommonThreads_SOURCES) $(ucommonUnicode_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=''; \
+    grn=''; \
+    lgn=''; \
+    blu=''; \
+    mgn=''; \
+    brg=''; \
+    std=''; \
+  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)/autoconf/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)/autoconf/test-driver
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+	$(TEST_LOG_FLAGS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECKFLAGS = @CHECKFLAGS@
+COMPAT = @COMPAT@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_GENERIC = @LT_GENERIC@
+LT_VERSION = @LT_VERSION@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+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@
+RANLIB = @RANLIB@
+SECURE = @SECURE@
+SECURE_LIBS = @SECURE_LIBS@
+SECURE_LOCAL = @SECURE_LOCAL@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UCOMMON_CFGPATH = @UCOMMON_CFGPATH@
+UCOMMON_CLINK = @UCOMMON_CLINK@
+UCOMMON_FLAGS = @UCOMMON_FLAGS@
+UCOMMON_INCLUDES = @UCOMMON_INCLUDES@
+UCOMMON_LIBC = @UCOMMON_LIBC@
+UCOMMON_LIBS = @UCOMMON_LIBS@
+UCOMMON_LINKED = @UCOMMON_LINKED@
+UCOMMON_LOCALE = @UCOMMON_LOCALE@
+UCOMMON_MODEL = @UCOMMON_MODEL@
+UCOMMON_PREFIX = @UCOMMON_PREFIX@
+UCOMMON_VARPATH = @UCOMMON_VARPATH@
+UCOMMON_VISIBILITY = @UCOMMON_VISIBILITY@
+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_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+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@
+includes = @includes@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libs = @libs@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MAINTAINERCLEANFILES = Makefile.in Makefile
+AM_CXXFLAGS = -I$(top_srcdir)/inc $(UCOMMON_FLAGS) $(CHECKFLAGS)
+LDADD = ../corelib/libucommon.la @UCOMMON_LIBS@ @UCOMMON_CLINK@
+EXTRA_DIST = *.cpp keydata.conf CMakeLists.txt
+demoSSL_SOURCES = ssl.cpp
+demoSSL_LDFLAGS = @SECURE_LOCAL@
+ucommonThreads_SOURCES = thread.cpp
+ucommonStrings_SOURCES = string.cpp
+ucommonLinked_SOURCES = linked.cpp
+ucommonSocket_SOURCES = socket.cpp
+ucommonMemory_SOURCES = memory.cpp
+ucommonStream_SOURCES = stream.cpp
+ucommonKeydata_SOURCES = keydata.cpp
+ucommonUnicode_SOURCES = unicode.cpp
+ucommonDatetime_SOURCES = datetime.cpp
+ucommonQueue_SOURCES = queue.cpp
+ucommonShell_SOURCES = shell.cpp
+ucommonDigest_SOURCES = digest.cpp
+ucommonDigest_LDFLAGS = @SECURE_LOCAL@
+ucommonCipher_SOURCES = cipher.cpp
+ucommonCipher_LDFLAGS = @SECURE_LOCAL@
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .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 \
+	    *$$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) --gnu test/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu test/Makefile
+.PRECIOUS: 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):
+
+clean-checkPROGRAMS:
+	@list='$(check_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
+
+clean-noinstPROGRAMS:
+	@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
+
+demoSSL$(EXEEXT): $(demoSSL_OBJECTS) $(demoSSL_DEPENDENCIES) $(EXTRA_demoSSL_DEPENDENCIES) 
+	@rm -f demoSSL$(EXEEXT)
+	$(AM_V_CXXLD)$(demoSSL_LINK) $(demoSSL_OBJECTS) $(demoSSL_LDADD) $(LIBS)
+
+ucommonCipher$(EXEEXT): $(ucommonCipher_OBJECTS) $(ucommonCipher_DEPENDENCIES) $(EXTRA_ucommonCipher_DEPENDENCIES) 
+	@rm -f ucommonCipher$(EXEEXT)
+	$(AM_V_CXXLD)$(ucommonCipher_LINK) $(ucommonCipher_OBJECTS) $(ucommonCipher_LDADD) $(LIBS)
+
+ucommonDatetime$(EXEEXT): $(ucommonDatetime_OBJECTS) $(ucommonDatetime_DEPENDENCIES) $(EXTRA_ucommonDatetime_DEPENDENCIES) 
+	@rm -f ucommonDatetime$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonDatetime_OBJECTS) $(ucommonDatetime_LDADD) $(LIBS)
+
+ucommonDigest$(EXEEXT): $(ucommonDigest_OBJECTS) $(ucommonDigest_DEPENDENCIES) $(EXTRA_ucommonDigest_DEPENDENCIES) 
+	@rm -f ucommonDigest$(EXEEXT)
+	$(AM_V_CXXLD)$(ucommonDigest_LINK) $(ucommonDigest_OBJECTS) $(ucommonDigest_LDADD) $(LIBS)
+
+ucommonKeydata$(EXEEXT): $(ucommonKeydata_OBJECTS) $(ucommonKeydata_DEPENDENCIES) $(EXTRA_ucommonKeydata_DEPENDENCIES) 
+	@rm -f ucommonKeydata$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonKeydata_OBJECTS) $(ucommonKeydata_LDADD) $(LIBS)
+
+ucommonLinked$(EXEEXT): $(ucommonLinked_OBJECTS) $(ucommonLinked_DEPENDENCIES) $(EXTRA_ucommonLinked_DEPENDENCIES) 
+	@rm -f ucommonLinked$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonLinked_OBJECTS) $(ucommonLinked_LDADD) $(LIBS)
+
+ucommonMemory$(EXEEXT): $(ucommonMemory_OBJECTS) $(ucommonMemory_DEPENDENCIES) $(EXTRA_ucommonMemory_DEPENDENCIES) 
+	@rm -f ucommonMemory$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonMemory_OBJECTS) $(ucommonMemory_LDADD) $(LIBS)
+
+ucommonQueue$(EXEEXT): $(ucommonQueue_OBJECTS) $(ucommonQueue_DEPENDENCIES) $(EXTRA_ucommonQueue_DEPENDENCIES) 
+	@rm -f ucommonQueue$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonQueue_OBJECTS) $(ucommonQueue_LDADD) $(LIBS)
+
+ucommonShell$(EXEEXT): $(ucommonShell_OBJECTS) $(ucommonShell_DEPENDENCIES) $(EXTRA_ucommonShell_DEPENDENCIES) 
+	@rm -f ucommonShell$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonShell_OBJECTS) $(ucommonShell_LDADD) $(LIBS)
+
+ucommonSocket$(EXEEXT): $(ucommonSocket_OBJECTS) $(ucommonSocket_DEPENDENCIES) $(EXTRA_ucommonSocket_DEPENDENCIES) 
+	@rm -f ucommonSocket$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonSocket_OBJECTS) $(ucommonSocket_LDADD) $(LIBS)
+
+ucommonStream$(EXEEXT): $(ucommonStream_OBJECTS) $(ucommonStream_DEPENDENCIES) $(EXTRA_ucommonStream_DEPENDENCIES) 
+	@rm -f ucommonStream$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonStream_OBJECTS) $(ucommonStream_LDADD) $(LIBS)
+
+ucommonStrings$(EXEEXT): $(ucommonStrings_OBJECTS) $(ucommonStrings_DEPENDENCIES) $(EXTRA_ucommonStrings_DEPENDENCIES) 
+	@rm -f ucommonStrings$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonStrings_OBJECTS) $(ucommonStrings_LDADD) $(LIBS)
+
+ucommonThreads$(EXEEXT): $(ucommonThreads_OBJECTS) $(ucommonThreads_DEPENDENCIES) $(EXTRA_ucommonThreads_DEPENDENCIES) 
+	@rm -f ucommonThreads$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonThreads_OBJECTS) $(ucommonThreads_LDADD) $(LIBS)
+
+ucommonUnicode$(EXEEXT): $(ucommonUnicode_OBJECTS) $(ucommonUnicode_DEPENDENCIES) $(EXTRA_ucommonUnicode_DEPENDENCIES) 
+	@rm -f ucommonUnicode$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(ucommonUnicode_OBJECTS) $(ucommonUnicode_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datetime.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/digest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keydata.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linked.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/queue.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shell.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ssl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stream.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/string.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thread.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unicode.Po@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+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`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(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
+
+# 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; \
+	else \
+	  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 $(check_PROGRAMS)
+	@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 $$?
+ucommonLinked.log: ucommonLinked$(EXEEXT)
+	@p='ucommonLinked$(EXEEXT)'; \
+	b='ucommonLinked'; \
+	$(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)
+ucommonSocket.log: ucommonSocket$(EXEEXT)
+	@p='ucommonSocket$(EXEEXT)'; \
+	b='ucommonSocket'; \
+	$(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)
+ucommonStrings.log: ucommonStrings$(EXEEXT)
+	@p='ucommonStrings$(EXEEXT)'; \
+	b='ucommonStrings'; \
+	$(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)
+ucommonThreads.log: ucommonThreads$(EXEEXT)
+	@p='ucommonThreads$(EXEEXT)'; \
+	b='ucommonThreads'; \
+	$(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)
+ucommonMemory.log: ucommonMemory$(EXEEXT)
+	@p='ucommonMemory$(EXEEXT)'; \
+	b='ucommonMemory'; \
+	$(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)
+ucommonKeydata.log: ucommonKeydata$(EXEEXT)
+	@p='ucommonKeydata$(EXEEXT)'; \
+	b='ucommonKeydata'; \
+	$(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)
+ucommonStream.log: ucommonStream$(EXEEXT)
+	@p='ucommonStream$(EXEEXT)'; \
+	b='ucommonStream'; \
+	$(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)
+ucommonUnicode.log: ucommonUnicode$(EXEEXT)
+	@p='ucommonUnicode$(EXEEXT)'; \
+	b='ucommonUnicode'; \
+	$(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)
+ucommonQueue.log: ucommonQueue$(EXEEXT)
+	@p='ucommonQueue$(EXEEXT)'; \
+	b='ucommonQueue'; \
+	$(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)
+ucommonDatetime.log: ucommonDatetime$(EXEEXT)
+	@p='ucommonDatetime$(EXEEXT)'; \
+	b='ucommonDatetime'; \
+	$(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)
+ucommonShell.log: ucommonShell$(EXEEXT)
+	@p='ucommonShell$(EXEEXT)'; \
+	b='ucommonShell'; \
+	$(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)
+ucommonDigest.log: ucommonDigest$(EXEEXT)
+	@p='ucommonDigest$(EXEEXT)'; \
+	b='ucommonDigest'; \
+	$(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)
+ucommonCipher.log: ucommonCipher$(EXEEXT)
+	@p='ucommonCipher$(EXEEXT)'; \
+	b='ucommonCipher'; \
+	$(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
+check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
+	clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+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
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \
+	clean-checkPROGRAMS 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 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 recheck tags tags-am uninstall \
+	uninstall-am
+
+
+testing:	$(TESTS)
+
+# test using full stdc++ linkage...
+stdcpp:	stdcpp.cpp
+	$(CXX) @UCOMMON_FLAGS@ -o stdcpp -I../inc -L../src/.libs -lucommon stdcpp.cpp @UCOMMON_LIBS@
+
+# 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/jni/libucommon/sources/test/cipher.cpp b/jni/libucommon/sources/test/cipher.cpp
new file mode 100644
index 0000000..f4258d7
--- /dev/null
+++ b/jni/libucommon/sources/test/cipher.cpp
@@ -0,0 +1,56 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef DEBUG
+#define DEBUG
+#endif
+
+#include <ucommon-config.h>
+#include <ucommon/secure.h>
+
+#include <stdio.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+#define STR "this is a test of some text we wish to post"
+
+int main(int argc, char **argv)
+{
+    if(!secure::init())
+        return 0;
+
+    skey_t mykey("aes256", "sha", "testing");
+    cipher_t enc, dec;
+    unsigned char ebuf[256], dbuf[256];
+
+    memset(dbuf, 0, sizeof(dbuf));
+
+    enc.set(&mykey, Cipher::ENCRYPT, ebuf);
+    dec.set(&mykey, Cipher::DECRYPT, dbuf);
+
+    size_t total = enc.puts(STR);
+
+    assert(!eq(STR, (char *)ebuf, strlen(STR)));
+
+    assert(total == 48);
+
+    dec.put(ebuf, total);
+    dec.flush();
+    assert(eq((char *)dbuf, STR));
+    return 0;
+}
+
diff --git a/jni/libucommon/sources/test/datetime.cpp b/jni/libucommon/sources/test/datetime.cpp
new file mode 100644
index 0000000..040eb21
--- /dev/null
+++ b/jni/libucommon/sources/test/datetime.cpp
@@ -0,0 +1,102 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef DEBUG
+#define DEBUG
+#endif
+
+#include <ucommon-config.h>
+#include <ucommon/ucommon.h>
+
+#include <stdio.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+int main(int argc, char **argv)
+{
+    Date date = Date(2003, 1, 6);
+    int exp_year = 2003;
+    unsigned exp_month = 1;
+    unsigned exp_day = 6;
+    unsigned exp_dayofweek = 1;
+    String exp_stringdate;
+    tm_t exp_dt;
+    time_t exp_ctime;
+    char buf[20];
+
+    snprintf(buf, sizeof(buf),
+        "%04d-%02d-%02d", exp_year, exp_month, exp_day);
+
+    memset(&exp_dt, 0, sizeof(exp_dt));
+    exp_dt.tm_year = exp_year - 1900;
+    exp_dt.tm_mon = exp_month - 1;
+    exp_dt.tm_mday = exp_day;
+    exp_ctime = mktime(&exp_dt);
+
+    assert(exp_year == date.year());
+    assert(exp_month == date.month());
+    assert(exp_day == date.day());
+    assert(exp_dayofweek == date.dow());
+
+    // test some conversions...
+    exp_stringdate = date();
+    assert(eq(*exp_stringdate, "2003-01-06"));
+    date.put(buf);
+    assert(eq(buf, "2003-01-06"));
+    assert(exp_ctime == date.timeref());
+
+    // some operator tests...
+    Date aday = date;
+    Date nextday(2003, 1, 7);
+    assert(aday == date);
+    assert((++aday) == nextday);
+    assert(aday != date);
+    assert(date <= aday);
+    assert(date < aday);
+
+    // play with math and casting operators...
+    Date newday = nextday + 5l;
+    assert((long)newday == 20030112l);
+    assert((long)nextday == 20030107l);
+    assert(newday - nextday == 5);
+
+    // test some math...
+    assert(20030106l == date.get());
+    date -= 6;
+    assert(20021231l == date.get());
+
+    // test invalid date...
+    date = "20031306";
+    assert(!is(date));
+
+    // conversion check...
+    date = "2003-08-04";
+    assert((long)date == 20030804l);
+
+    DateTimeString dts("2003-02-28 23:59:55");
+    eq((const char *)dts, "2003-02-28 23:59:55");
+
+    DateTime tmp("2003-02-28 23:59:55");
+    snprintf(buf, sizeof(buf), "%.5f", (double)tmp);
+    assert(eq(buf, "2452699.99994"));
+    assert((long)tmp == 20030228l);
+    tmp += 5;   // add 5 seconds to force rollover...
+    assert((long)tmp == 20030301l);
+
+    return 0;
+}
+
diff --git a/jni/libucommon/sources/test/digest.cpp b/jni/libucommon/sources/test/digest.cpp
new file mode 100644
index 0000000..56cb6c9
--- /dev/null
+++ b/jni/libucommon/sources/test/digest.cpp
@@ -0,0 +1,46 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef DEBUG
+#define DEBUG
+#endif
+
+#include <ucommon-config.h>
+#include <ucommon/secure.h>
+
+#include <stdio.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+int main(int argc, char **argv)
+{
+    digest_t md5 = "md5";
+
+    md5.puts("this is some text");
+    assert(eq("684d9d89b9de8178dcd80b7b4d018103", *md5));
+
+    md5 = "sha";
+    md5.puts("something else");
+    assert(!eq("684d9d89b9de8178dcd80b7b4d018103", *md5));
+
+    md5 = "md5";
+    md5.puts("this is some text");
+    assert(eq("684d9d89b9de8178dcd80b7b4d018103", *md5));
+
+    return 0;
+}
+
diff --git a/jni/libucommon/sources/test/keydata.conf b/jni/libucommon/sources/test/keydata.conf
new file mode 100644
index 0000000..a4cebed
--- /dev/null
+++ b/jni/libucommon/sources/test/keydata.conf
@@ -0,0 +1,12 @@
+key1 = value1
+key2 = value2
+
+# this is a comment
+
+[section1]
+key1 = "this is value 1 quoted"
+key2 = this is value 2 unquoted
+
+[section2]
+key1 = new section
+key1 = replaced value
diff --git a/jni/libucommon/sources/test/keydata.cpp b/jni/libucommon/sources/test/keydata.cpp
new file mode 100644
index 0000000..7545c3c
--- /dev/null
+++ b/jni/libucommon/sources/test/keydata.cpp
@@ -0,0 +1,44 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef DEBUG
+#define DEBUG
+#endif
+
+#include <ucommon/ucommon.h>
+
+#include <stdio.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+extern "C" int main()
+{
+    keydata *keys;
+    keyfile myfile("keydata.conf");
+
+    keys = myfile.get();
+    assert(eq_case(keys->get("key2"), "value2"));
+
+    keys = myfile["section1"];
+    assert(keys != NULL);
+    assert(eq_case(keys->get("key1"), "this is value 1 quoted"));
+
+    keys = myfile["section2"];
+    assert(keys != NULL);
+    assert(eq_case(keys->get("key1"), "replaced value"));
+    return 0;
+}
diff --git a/jni/libucommon/sources/test/linked.cpp b/jni/libucommon/sources/test/linked.cpp
new file mode 100644
index 0000000..c9e3c8f
--- /dev/null
+++ b/jni/libucommon/sources/test/linked.cpp
@@ -0,0 +1,93 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef DEBUG
+#define DEBUG
+#endif
+
+#include <ucommon/ucommon.h>
+
+#include <stdio.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+typedef linked_value<int> ints;
+
+static OrderedIndex list;
+
+class member : public DLinkedObject
+{
+public:
+    inline member(unsigned v) : DLinkedObject() {value = v;}
+
+    unsigned value;
+};
+
+extern "C" int main()
+{
+    linked_pointer<ints> ptr;
+    unsigned count = 0;
+    // Since value templates pass by reference, we must have referencable
+    // objects or variables.  This avoids passing values by duplicating
+    // objects onto the stack frame, though it causes problems for built-in
+    // types...
+    int xv = 3, xn = 5;
+    ints v1(&list, xv);
+    ints v2(&list);
+    v2 = xn;
+
+    ptr = &list;
+    while(ptr) {
+        switch(++count)
+        {
+        case 1:
+            assert(ptr->value == 3);
+            break;
+        case 2:
+            assert(ptr->value == 5);
+        }
+        ++ptr;
+    }
+    assert(count == 2);
+
+    member ov1 = 1, ov2 = 2, ov3 = 3;
+
+    assert(ov2.value == 2);
+
+    objstack_t st;
+    st.push(&ov1);
+    st.push(&ov2);
+    st.push(&ov3);
+
+    member *mv = (member *)st.pop();
+    assert(mv->value == 3);
+    st.pop();
+    st.pop();
+    assert(NULL == st.pop());
+
+    objqueue<member> que;
+    que.add(&ov1);
+    que.add(&ov2);
+    que.add(&ov3);
+    mv = que.pop();
+    assert(mv->value == 3);
+    mv = que.pull();
+    assert(mv != NULL);
+//  assert(mv->value == 1);
+
+    return 0;
+}
diff --git a/jni/libucommon/sources/test/memory.cpp b/jni/libucommon/sources/test/memory.cpp
new file mode 100644
index 0000000..c8ad28e
--- /dev/null
+++ b/jni/libucommon/sources/test/memory.cpp
@@ -0,0 +1,56 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef DEBUG
+#define DEBUG
+#endif
+
+#include <ucommon/ucommon.h>
+
+#include <stdio.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+extern "C" int main()
+{
+    stringlist_t mylist;
+    stringlistitem_t *item;
+
+    mylist.add("100");
+    mylist.add("050");
+    mylist.add("300");
+
+    item = mylist.begin();
+    assert(eq("100", mylist[0u]));
+    mylist.sort();
+    item = mylist.begin();
+    assert(eq(item->get(), "050"));
+
+    assert(eq(mylist[1u], "100"));
+    assert(eq(mylist[2u], "300"));
+
+    const char *str = *mylist;
+    assert(eq(str, "050"));
+    assert(eq(mylist[0u], "100"));
+
+    char **list = mylist;
+    assert(eq(list[0], "100"));
+    assert(eq(list[1], "300"));
+
+    assert(list[2] == NULL);
+    return 0;
+}
diff --git a/jni/libucommon/sources/test/queue.cpp b/jni/libucommon/sources/test/queue.cpp
new file mode 100644
index 0000000..dddc261
--- /dev/null
+++ b/jni/libucommon/sources/test/queue.cpp
@@ -0,0 +1,74 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef DEBUG
+#define DEBUG
+#endif
+
+#include <ucommon/ucommon.h>
+
+#include <stdio.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+static unsigned reused = 0;
+
+class myobject : public ReusableObject
+{
+public:
+    unsigned count;
+
+    myobject()
+        {count = ++reused;};
+};
+
+static mempager pool;
+static paged_reuse<myobject> myobjects(&pool, 100);
+static queueof<myobject> mycache(&pool, 10);
+
+extern "C" int main()
+{
+	unsigned i;
+
+    myobject *x;
+    for(i = 0; i < 10; ++i) {
+        x = myobjects.create();
+        mycache.post(x);
+    }
+    assert(x->count == 10);
+
+    for(i = 0; i < 3; ++i) {
+        x = mycache.lifo();
+        assert(x != NULL);
+    }
+    assert(x->count == 8);
+
+    init<myobject>(x);
+    assert(x->count == 11);
+
+    for(i = 0; i < 3; ++i) {
+        x = mycache.lifo();
+        assert(x != NULL);
+        myobjects.release(x);
+    }
+
+    x = init<myobject>(NULL);
+    assert(x == NULL);
+    assert(reused == 11);
+    return 0;
+}
+
diff --git a/jni/libucommon/sources/test/shell.cpp b/jni/libucommon/sources/test/shell.cpp
new file mode 100644
index 0000000..e4585e6
--- /dev/null
+++ b/jni/libucommon/sources/test/shell.cpp
@@ -0,0 +1,65 @@
+// Copyright (C) 2009-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef DEBUG
+#define DEBUG
+#endif
+
+#include <ucommon/ucommon.h>
+
+#include <stdio.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+extern "C" int main()
+{
+    int test_argc;
+    char *test_argv[6];
+
+    shell::bind("test");
+
+    test_argc = 5;
+    test_argv[0] = (char *)"test";
+
+    test_argv[1] = (char *)"--lines=5";
+    test_argv[2] = (char *)"-r";
+    test_argv[3] = (char *)"a";
+    test_argv[4] = (char *)"b";
+    test_argv[5] = NULL;
+
+    shell::flagopt rflag('r', "--reverse", "reverse order of arguments");
+    shell::flagopt tflag('t', "--testing", "never hit this flag");
+    shell::numericopt lines('l', "--lines", "number of lines in output");
+    shell args(test_argc, test_argv);
+
+    assert(!tflag);
+    assert(is(rflag));
+    assert(*lines == 5);
+    assert(args() == 2);            // two file arguments left
+    assert(eq(args[0], "a"));       // first file argument is "a"
+
+    string_t prefix, subdir, basedir;
+
+    prefix = shell::path(shell::SYSTEM_PREFIX);
+    subdir = shell::path(shell::SYSTEM_PREFIX, "test");
+    basedir = shell::path(shell::SYSTEM_PREFIX, "/test");
+
+    prefix = prefix + "/test";
+
+    assert(eq(basedir, "/test"));
+    assert(eq(subdir, prefix));
+}
diff --git a/jni/libucommon/sources/test/socket.cpp b/jni/libucommon/sources/test/socket.cpp
new file mode 100644
index 0000000..c0f2f54
--- /dev/null
+++ b/jni/libucommon/sources/test/socket.cpp
@@ -0,0 +1,62 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU ucommon.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef DEBUG
+#define DEBUG
+#endif
+
+#include <ucommon/ucommon.h>
+
+#include <stdio.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+static Socket::address localhost("127.0.0.1", 4444);
+#ifdef  AF_INET6
+static Socket::address testing6("44:022:66::1", 4444);
+static Socket::address localhost6("::1", 4444);
+#endif
+
+extern "C" int main()
+{
+    struct sockaddr_internet addr;
+
+    char addrbuf[128];
+    addrbuf[0] = 0;
+    assert(localhost.get(AF_INET) != NULL);
+    Socket::query(localhost.get(AF_INET), addrbuf, sizeof(addrbuf));
+    assert(0 == strcmp(addrbuf, "127.0.0.1"));
+    Socket::via((struct sockaddr *)&addr, localhost.get(AF_INET));
+    Socket::query((struct sockaddr *)&addr, addrbuf, sizeof(addrbuf));
+    assert(0 == strcmp(addrbuf, "127.0.0.1"));
+    assert(eq((struct sockaddr *)&addr, localhost.get(AF_INET)));
+    assert(eq_subnet((struct sockaddr *)&addr, localhost.get(AF_INET)));
+#ifdef  AF_INET6
+    // we can only test if interface/ipv6 support is actually running
+    // so we use getinterface to find out first.  it will return -1 for
+    // localhost interface if ipv6 is down...
+    assert(localhost6.get(AF_INET6) != NULL);
+    if(!Socket::via((struct sockaddr *)&addr, localhost6.get(AF_INET6))) {
+        Socket::query((struct sockaddr *)&addr, addrbuf, sizeof(addrbuf));
+        assert(0 == strcmp(addrbuf, "::1"));
+        assert(Socket::equal((struct sockaddr *)&addr, localhost6.get(AF_INET6)));
+        Socket::query(testing6.get(AF_INET6), addrbuf, sizeof(addrbuf));
+        assert(0 == strcmp(addrbuf, "44:22:66::1"));
+    }
+#endif
+    return 0;
+}
diff --git a/jni/libucommon/sources/test/ssl.cpp b/jni/libucommon/sources/test/ssl.cpp
new file mode 100644
index 0000000..cd92594
--- /dev/null
+++ b/jni/libucommon/sources/test/ssl.cpp
@@ -0,0 +1,61 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef DEBUG
+#define DEBUG
+#endif
+
+#include <ucommon-config.h>
+#include <ucommon/secure.h>
+
+#include <stdio.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+int main(int argc, char **argv)
+{
+    const char *proto = "80";
+    secure::client_t ctx = NULL;
+
+    if(secure::init()) {
+        proto = "443";
+        ctx = secure::client();
+    }
+
+    printf("protocol %s\n", proto);
+
+    if(ctx)
+        printf("ctx %p %d\n", (void *)ctx, ctx->err());
+
+    ssl_t ssl(ctx);
+    ssl.open("www.google.com", proto);
+    printf("open %d\n", ssl.is_open());
+
+    ssl.putline("GET /\r\n\r\n");
+    ssl.flush();
+
+    char buf[256];
+
+    while(!ssl.eof()) {
+        ssl.getline(buf, sizeof(buf));
+        printf("%s\n", buf);
+    }
+
+    ssl.close();
+}
+
+
diff --git a/jni/libucommon/sources/test/stdcpp.cpp b/jni/libucommon/sources/test/stdcpp.cpp
new file mode 100644
index 0000000..4c751e7
--- /dev/null
+++ b/jni/libucommon/sources/test/stdcpp.cpp
@@ -0,0 +1,40 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef DEBUG
+#define DEBUG
+#endif
+
+#include <ucommon/ucommon.h>
+
+#include <iostream>
+#include <cstdio>
+
+using namespace UCOMMON_NAMESPACE;
+
+static string testing("second test");
+
+int main()
+{
+    char buff[33];
+    string::fill(buff, 32, ' ');
+    stringbuf<128> mystr;
+    mystr = (string)"hello" + (string)" this is a test";
+    std::cout << "STARTING " << *mystr << std::endl;
+    std::cout << "SECOND " << *testing << std::endl;
+    std::cout << "AN OFFET " << mystr(-10) << std::endl;
+};
diff --git a/jni/libucommon/sources/test/stream.cpp b/jni/libucommon/sources/test/stream.cpp
new file mode 100644
index 0000000..9d30e5f
--- /dev/null
+++ b/jni/libucommon/sources/test/stream.cpp
@@ -0,0 +1,67 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#if defined(OLD_STDCPP) || defined(NEW_STDCPP)
+#ifndef DEBUG
+#define DEBUG
+#endif
+
+#include <ucommon/ucommon.h>
+
+#include <stdio.h>
+
+using namespace UCOMMON_NAMESPACE;
+using namespace std;
+
+class ThreadOut: public JoinableThread
+{
+public:
+    ThreadOut() : JoinableThread() {};
+
+    void run() {
+        Socket::address localhost("127.0.0.1", 9000);
+        tcpstream tcp(localhost);
+        tcp << "pippo" << endl << ends;
+        tcp.close();
+    }
+};
+
+int main(int argc, char *argv[])
+{
+    ThreadOut thread;
+
+    char line[200];
+    TCPServer sock("127.0.0.1", "9000");
+    thread.start();
+    if (sock.wait(1000)){
+        tcpstream tcp(&sock);
+        tcp.getline(line, 200);
+        assert(!strcmp(line, "pippo"));
+        tcp.close();
+        return 0;
+    }
+    assert(0);
+    return 0;
+}
+#else
+
+int main(int argc, char **argv)
+{
+    return 0;
+}
+
+#endif
diff --git a/jni/libucommon/sources/test/string.cpp b/jni/libucommon/sources/test/string.cpp
new file mode 100644
index 0000000..329120d
--- /dev/null
+++ b/jni/libucommon/sources/test/string.cpp
@@ -0,0 +1,83 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef DEBUG
+#define DEBUG
+#endif
+
+#include <ucommon/ucommon.h>
+
+#include <stdio.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+static string_t testing("second test");
+
+extern "C" int main()
+{
+    char buff[33];
+    char *tokens = NULL;
+    unsigned count = 0;
+    const char *tp;
+    const char *array[5];
+
+    assert(max(3, 2) == 3);
+
+    String::fill(buff, 32, ' ');
+    stringbuf<128> mystr;
+    mystr = (string_t)"hello" + (string_t)" this is a test";
+    assert(eq_case("hello this is a test", *mystr));
+    assert(eq_case("second test", *testing));
+    assert(eq_case(" Is a test", mystr(-10)));
+    mystr = "  abc 123 \n  ";
+    assert(eq_case("abc 123", String::strip(mystr.c_mem(), " \n")));
+    String::set(buff, sizeof(buff), "this is \"a test\"");
+    while(NULL != (tp = String::token(buff, &tokens, " ", "\"\"")) && count < 4)
+        array[count++] = tp;
+    assert(count == 3);
+    assert(eq_case(array[1], "is"));
+    assert(eq_case(array[2], "a test"));
+
+    unsigned char core[4] = {0x01, 0x10, 0x2f, 0x45};
+    char hexbuf[12];
+
+    assert(String::hexdump(core, hexbuf, "3-1") == 9);
+    assert(eq(hexbuf, "01102f-45"));
+
+    unsigned char hcore[4];
+
+    String::hexpack(hcore, hexbuf, "3-1");
+    assert(String::hexdump(hcore, hexbuf, "3-1") == 9);
+    assert(eq(hexbuf, "01102f-45"));
+
+    String numstr = "-33.5,25";
+    Real num1;
+    Unsigned num2;
+
+    numstr % num1 % "," % num2;
+    assert(num1 == -33.5);
+    assert(num2 == 25);
+    assert(numstr.len() == 0);
+
+    char *test = strdup(str("hello") + " test" + str((short)13));
+    assert(eq(test, "hello test13"));
+
+    char *cdup = dup<char>(test[6]);
+    assert(eq(cdup, "test13"));
+
+    return 0;
+}
diff --git a/jni/libucommon/sources/test/thread.cpp b/jni/libucommon/sources/test/thread.cpp
new file mode 100644
index 0000000..a6e5971
--- /dev/null
+++ b/jni/libucommon/sources/test/thread.cpp
@@ -0,0 +1,62 @@
+// Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef DEBUG
+#define DEBUG
+#endif
+
+#include <ucommon/ucommon.h>
+
+#include <stdio.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+static unsigned count = 0;
+
+class testThread : public JoinableThread
+{
+public:
+    testThread() : JoinableThread() {};
+
+    void run(void) {
+        ++count;
+        ::sleep(2);
+    };
+};
+
+extern "C" int main()
+{
+    time_t now, later;
+    testThread *thr;
+
+    time(&now);
+    thr = new testThread();
+    start(thr);
+    Thread::sleep(10);
+    delete thr;
+    assert(count == 1);
+    time(&later);
+    assert(later >= now + 1);
+
+    time(&now);
+    TimedEvent evt;
+    evt.wait(2000);
+    time(&later);
+    assert(later >= now + 1);
+    return 0;
+}
+
diff --git a/jni/libucommon/sources/test/unicode.cpp b/jni/libucommon/sources/test/unicode.cpp
new file mode 100644
index 0000000..02d5978
--- /dev/null
+++ b/jni/libucommon/sources/test/unicode.cpp
@@ -0,0 +1,41 @@
+// Copyright (C) 2009-2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef DEBUG
+#define DEBUG
+#endif
+
+#include <ucommon/ucommon.h>
+
+#include <stdio.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+extern "C" int main()
+{
+    char u1[] = {(char)0xc2, (char)0xa9, 0x00};
+    char u2[] = {(char)0xe2, (char)0x89, (char)0xa0, 0x00};
+
+    assert(utf8::size(u1) == 2);
+    assert(utf8::size(u2) == 3);
+    assert(utf8::count(u1) == 1);
+    assert(utf8::count(u2) == 1);
+    assert(utf8::codepoint(u1) == 0x00a9);
+    assert(utf8::codepoint(u2) == 0x2260);
+
+	return 0;
+}
diff --git a/jni/libucommon/sources/ucommon-config b/jni/libucommon/sources/ucommon-config
new file mode 100644
index 0000000..b89035e
--- /dev/null
+++ b/jni/libucommon/sources/ucommon-config
@@ -0,0 +1,125 @@
+#!/bin/sh
+# Copyright (C) 2006-2007 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+prefix=/usr/local
+exec_prefix=${prefix}
+includedir=${prefix}/include
+
+if [ "`ldd /bin/sh | grep lib64`" = "" ]
+then
+    libdir=${exec_prefix}/lib
+else
+    libdir=${exec_prefix}/lib64
+fi
+
+usage()
+{
+    cat <<EOF
+Usage: ucommon-config [OPTION]
+
+Known values for OPTION are:
+
+  --prefix=DIR		  change ucommon prefix [default $prefix]
+  --exec-prefix=DIR	change ucommon exec prefix [default $exec_prefix]
+  --libs		        print library linking information
+  --clink           print c model linking information
+  --minimal         linking without usecure
+  --cflags		      print pre-processor and compiler flags
+  --includes        print framework include directory
+  --plugins         print framework plugin directory
+  --model           print the linking model used
+  --help		        display this help and exit
+  --version		      output version information
+EOF
+
+    exit $1
+}
+
+if test $# -eq 0; then
+    usage 1
+fi
+
+cflags=false
+libs=false
+
+while test $# -gt 0; do
+  case "$1" in
+  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  case "$1" in
+  --prefix=*)
+	  prefix=$optarg
+	  includedir=$prefix/include
+	  libdir=$prefix/lib
+	  ;;
+
+  --prefix)
+	  echo $prefix
+	  ;;
+
+  --exec-prefix=*)
+    exec_prefix=$optarg
+    libdir=$exec_prefix/lib
+    ;;
+
+   --exec-prefix)
+    echo $exec_prefix
+    ;;
+
+  --version)
+	  echo 6.0.7
+	  exit 0
+	  ;;
+
+  --help)
+	  usage 0
+	  ;;
+
+  --cflags)
+    echo  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+    ;;
+
+  --libtool-libs)
+	  if [ -r ${libdir}/libucommon.la ] ; then
+	    echo ${libdir}/libucommon.la ; fi
+    ;;
+
+  --model)
+    echo CXX
+    ;;
+
+	--clink)
+		echo  -lc
+		;;
+
+  --libs)
+		echo -lusecure -lucommon -lgnutls   -lrt  -ldl -lpthread 
+    ;;
+
+  --minimal)
+		echo -lucommon   -lrt  -ldl -lpthread 
+    ;;
+
+	--includes)
+		echo /usr/local/include/ucommon
+		;;
+
+  *)
+	  usage
+	  exit 1
+	  ;;
+  esac
+  shift
+done
+
+exit 0
diff --git a/jni/libucommon/sources/ucommon-config.1 b/jni/libucommon/sources/ucommon-config.1
new file mode 100644
index 0000000..0b9222e
--- /dev/null
+++ b/jni/libucommon/sources/ucommon-config.1
@@ -0,0 +1,113 @@
+.\" ucommon-config - script to get information about ucommon library
+.\" Copyright (c) 2009 David Sugar <dyfet@gnutelephony.org>
+.\"
+.\" This manual page 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, write to the Free Software
+.\" Foundation, Inc.,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.\"
+.\" This manual page is written especially for Debian GNU/Linux.
+.\"
+.TH ucommon-config "1" "July 2009" "GNU Common C++ uCommon" "GNU Telephony"
+.SH NAME
+ucommon-config \- script to get information about ucommon library
+.SH SYNOPSIS
+.B ucommon-config
+.RB [ options ]
+.SH DESCRIPTION
+.B ucommon-config
+is a tool that is used to configure to determine the compiler and
+linker flags that should be used to compile and link programs that use the
+.BR ucommon
+library.
+.IR Note :
+.B ucommon-config
+is provided for compatibility with legacy software only.  Current
+projects should use
+.B pkg-config
+instead!
+.SH OPTIONS
+.TP
+.B --version
+Print the currently installed version of
+.B ucommon
+on the standard output.
+.TP
+.B --secure
+Print additional libraries needed to link a program with
+.BR ucommon secure crytographic library
+.TP
+.B --scripting
+Print additional linker flags needed to link a program with
+.BR ucommon script library
+.TP
+.B --includes
+Print the include directory for
+.BR ucommon headers
+.TP
+.B --libs
+Print the linker flags that are necessary to link a program with
+.BR ucommon
+.TP
+.B --plugins
+Print the directory for
+.BR ucommon plugins
+.TP
+.B --cflags
+Print the compiler flags that are necessary to compile a program with
+.BR ucommon
+.TP
+.BI  --prefix= PREFIX
+If specified, use
+.I PREFIX
+instead of the installation prefix that
+.B ucommon
+was built with when computing the output for the
+.B --cflags
+and
+.B --libs
+options. This option is also used for the exec prefix if
+.B --exec-prefix
+was not specified. This option must be specified before any
+.B --libs
+or
+.B --cflags
+options.
+.TP
+.BI --exec-prefix= PREFIX
+If specified, use
+.I PREFIX
+instead of the installation exec prefix that
+.B ucommon
+was built with when computing the output for the
+.B --cflags
+and
+.B --libs
+options. This option must be specified before any
+.B --libs
+or
+.B --cflags
+options.
+.SH "SEE ALSO"
+.IR pkg-config (1).
+.SH AUTHOR
+.B ucommon-config
+was written by David Sugar <dyfet@gnutelephony.org>.
+.SH COPYRIGHT
+Copyright \(co 2009 David Sugar, Tycho Softworks.
+.br
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+
+
diff --git a/jni/libucommon/sources/ucommon-config.cmake b/jni/libucommon/sources/ucommon-config.cmake
new file mode 100644
index 0000000..50a9397
--- /dev/null
+++ b/jni/libucommon/sources/ucommon-config.cmake
@@ -0,0 +1,123 @@
+#!/bin/sh
+# Copyright (C) 2006-2007 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+prefix=${CMAKE_INSTALL_PREFIX}
+exec_prefix=${CMAKE_INSTALL_PREFIX}/bin
+includedir=${CMAKE_INSTALL_PREFIX}/include
+libdir=${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
+
+usage()
+{
+    cat <<EOF
+Usage: ucommon-config [OPTION]
+
+Known values for OPTION are:
+
+  --prefix=DIR      change ucommon prefix [default $prefix]
+  --exec-prefix=DIR change ucommon exec prefix [default $exec_prefix]
+  --libs            print library linking information
+  --clink           print c model linking information
+  --cflags          print pre-processor and compiler flags
+  --minimal         print minimal linking information
+  --includes        print framework include directory
+  --plugins         print framework plugin directory
+  --model           print the linking model used
+  --help            display this help and exit
+  --version         output version information
+EOF
+
+    exit $1
+}
+
+if test $# -eq 0; then
+    usage 1
+fi
+
+cflags=false
+libs=false
+
+while test $# -gt 0; do
+  case "$1" in
+  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  case "$1" in
+  --prefix=*)
+    prefix=$optarg
+    includedir=$prefix/include
+    libdir=$prefix/lib
+    ;;
+
+  --prefix)
+    echo $prefix
+    ;;
+
+  --exec-prefix=*)
+    exec_prefix=$optarg
+    libdir=$exec_prefix/lib
+    ;;
+
+  --exec-prefix)
+    echo $exec_prefix
+    ;;
+
+  --version)
+    echo ${PACKAGE_FILE_VERSION}
+    exit 0
+    ;;
+
+  --help)
+    usage 0
+    ;;
+
+  --cflags)
+    echo ${PACKAGE_FLAGS}
+    ;;
+
+  --libtool-libs)
+    if [ -r ${libdir}/libucommon.la ]
+    then
+      echo ${libdir}/libucommon.la
+    fi
+    ;;
+
+  --model)
+    echo CXX
+    ;;
+
+  --clink)
+    echo -lc
+    ;;
+
+  --minimal)
+    echo -lucommon ${PACKAGE_LIBS}
+    ;;
+
+
+  --libs)
+    echo -lusecure -lucommon ${ADDITIONAL_LIBS} ${PACKAGE_LIBS}
+    ;;
+
+  --includes)
+    echo ${CMAKE_INSTALL_PREFIX}/include
+    ;;
+
+  *)
+    usage
+    exit 1
+    ;;
+
+  esac
+  shift
+done
+
+exit 0
diff --git a/jni/libucommon/sources/ucommon-config.h b/jni/libucommon/sources/ucommon-config.h
new file mode 100644
index 0000000..ed16076
--- /dev/null
+++ b/jni/libucommon/sources/ucommon-config.h
@@ -0,0 +1,313 @@
+/* ucommon-config.h.  Generated from ucommon-config.h.in by configure.  */
+/* ucommon-config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* has posix clock functions */
+#define HAVE_CLOCK_GETTIME 1
+
+/* has clocked nanosleep */
+#define HAVE_CLOCK_NANOSLEEP 1
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#define HAVE_DIRENT_H 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the <endian.h> header file. */
+#define HAVE_ENDIAN_H 1
+
+/* has execvp in libc */
+#define HAVE_EXECVP 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* has ftok */
+#define HAVE_FTOK 1
+
+/* can truncate files */
+#define HAVE_FTRUNCATE 1
+
+/* "cannot test in autoconf safely" */
+/* #undef HAVE_GCC_ATOMICS */
+
+/* have getaddrinfo */
+#define HAVE_GETADDRINFO 1
+
+/* have gethostbyname2 */
+#define HAVE_GETHOSTBYNAME2 1
+
+/* has gettext in glibc */
+#define HAVE_GETTEXT 1
+
+/* has localtime_r */
+#define HAVE_GMTIME_R 1
+
+/* have inet_ntop */
+#define HAVE_INET_NTOP 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* international headers */
+#define HAVE_LIBINTL_H 1
+
+/* Define to 1 if you have the <linux/version.h> header file. */
+#define HAVE_LINUX_VERSION_H 1
+
+/* has localtime_r */
+#define HAVE_LOCALTIME_R 1
+
+/* have lstat */
+#define HAVE_LSTAT 1
+
+/* Define to 1 if you have the <mach/clock.h> header file. */
+/* #undef HAVE_MACH_CLOCK_H */
+
+/* Define to 1 if you have the <mach-o/dyld.h> header file. */
+/* #undef HAVE_MACH_O_DYLD_H */
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* has nanosleep */
+#define HAVE_NANOSLEEP 1
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define to 1 if you have the <net/if.h> header file. */
+#define HAVE_NET_IF_H 1
+
+/* Define to 1 if you have the <openssl/fips.h> header file. */
+#define HAVE_OPENSSL_FIPS_H 1
+
+/* Define to 1 if you have the <openssl/ssl.h> header file. */
+#define HAVE_OPENSSL_SSL_H 1
+
+/* Define to 1 if you have the <poll.h> header file. */
+#define HAVE_POLL_H 1
+
+/* can specify access options */
+#define HAVE_POSIX_FADVISE 1
+
+/* posix memory alignment */
+// #define HAVE_POSIX_MEMALIGN 0
+
+/* "pthread clocking" */
+#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
+
+/* "pthread delay" */
+/* #undef HAVE_PTHREAD_DELAY */
+
+/* "pthread delay np" */
+/* #undef HAVE_PTHREAD_DELAY_NP */
+
+/* "pthread concurrency" */
+#define HAVE_PTHREAD_SETCONCURRENCY 1
+
+/* "pthread scheduling" */
+#define HAVE_PTHREAD_SETSCHEDPRIO 1
+
+/* "pthread yield" */
+#define HAVE_PTHREAD_YIELD 1
+
+/* can do atomic write with offset */
+#define HAVE_PWRITE 1
+
+/* has readlink in libc */
+#define HAVE_READLINK 1
+
+/* realpath support */
+#define HAVE_REALPATH 1
+
+/* have regex header */
+#define HAVE_REGEX_H 1
+
+/* can set localization */
+#define HAVE_SETLOCALE 1
+
+/* process group control */
+#define HAVE_SETPGRP 1
+
+/* alternate dyn loader */
+/* #undef HAVE_SHL_LOAD */
+
+/* shared memory open */
+#define HAVE_SHM_OPEN 1
+
+/* have socketpair in libsocket */
+#define HAVE_SOCKETPAIR 1
+
+/* "Socks proxy support" */
+/* #undef HAVE_SOCKS */
+
+/* Define to 1 if you have the <socks.h> header file. */
+/* #undef HAVE_SOCKS_H */
+
+/* Define to 1 if you have the <stdexcept> header file. */
+#define HAVE_STDEXCEPT 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* string collation */
+#define HAVE_STRCOLL 1
+
+/* has strerror_r */
+#define HAVE_STRERROR_R 1
+
+/* string icmp */
+/* #undef HAVE_STRICMP */
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* string istr */
+/* #undef HAVE_STRISTR */
+
+/* has symlink in libc */
+#define HAVE_SYMLINK 1
+
+/* system config */
+#define HAVE_SYSCONF 1
+
+/* Define to 1 if you have the <syslog.h> header file. */
+#define HAVE_SYSLOG_H 1
+
+/* Define to 1 if you have the <sys/event.h> header file. */
+/* #undef HAVE_SYS_EVENT_H */
+
+/* Define to 1 if you have the <sys/file.h> header file. */
+#define HAVE_SYS_FILE_H 1
+
+/* Define to 1 if you have the <sys/filio.h> header file. */
+/* #undef HAVE_SYS_FILIO_H */
+
+/* Define to 1 if you have the <sys/inotify.h> header file. */
+#define HAVE_SYS_INOTIFY_H 1
+
+/* Define to 1 if you have the <sys/lockf.h> header file. */
+/* #undef HAVE_SYS_LOCKF_H */
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#define HAVE_SYS_MMAN_H 1
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/poll.h> header file. */
+#define HAVE_SYS_POLL_H 1
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#define HAVE_SYS_RESOURCE_H 1
+
+/* Define to 1 if you have the <sys/shm.h> header file. */
+#define HAVE_SYS_SHM_H 0
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/timeb.h> header file. */
+#define HAVE_SYS_TIMEB_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define to 1 if you have the <termios.h> header file. */
+#define HAVE_TERMIOS_H 1
+
+/* Define to 1 if you have the <termio.h> header file. */
+#define HAVE_TERMIO_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* has wait4 in libc */
+#define HAVE_WAIT4 1
+
+/* has waitpid in libc */
+#define HAVE_WAITPID 1
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#define HAVE_WCHAR_H 1
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#define LT_OBJDIR ".libs/"
+
+/* Name of package */
+#define PACKAGE "ucommon"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT ""
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "ucommon"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "ucommon 6.0.7"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "ucommon"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "6.0.7"
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* config path */
+#define UCOMMON_CFGPATH "/etc"
+
+/* locale path */
+#define UCOMMON_LOCALE "/usr/local/share/locale"
+
+/* config path */
+#define UCOMMON_PREFIX "/usr/local"
+
+/* config path */
+#define UCOMMON_VARPATH "/var"
+
+/* Version number of package */
+#define VERSION "6.0.7"
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+/* #undef inline */
+#endif
+
+/* Define to the equivalent of the C99 'restrict' keyword, or to
+   nothing if this is not supported.  Do not define if restrict is
+   supported directly.  */
+#define restrict __restrict
+/* Work around a bug in Sun C++: it does not support _Restrict or
+   __restrict__, even though the corresponding Sun C compiler ends up with
+   "#define restrict _Restrict" or "#define restrict __restrict__" in the
+   previous line.  Perhaps some future version of Sun C++ will work with
+   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+# define __restrict__
+#endif
+
+/* Define to empty if the keyword `volatile' does not work. Warning: valid
+   code using `volatile' can become incorrect without. Disable with care. */
+/* #undef volatile */
+
+
+#include <ucommon/platform.h>
+
diff --git a/jni/libucommon/sources/ucommon-config.h.cmake b/jni/libucommon/sources/ucommon-config.h.cmake
new file mode 100644
index 0000000..594dd57
--- /dev/null
+++ b/jni/libucommon/sources/ucommon-config.h.cmake
@@ -0,0 +1,110 @@
+/* Copyright (C) 2009 David Sugar, Tycho Softworks
+
+   This file is free software; as a special exception the author 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.
+*/
+
+#define STDC_HEADERS 1
+
+#cmakedefine PACKAGE ${PROJECT_NAME}
+#cmakedefine VERSION "${VERSION}"
+
+#cmakedefine HAVE_CLOCK_NANOSLEEP 1
+#cmakedefine HAVE_DIRENT_H 1
+#cmakedefine HAVE_DLFCN_H 1
+#cmakedefine HAVE_ENDIAN_H 1
+#cmakedefine HAVE_INTTYPES_H 1
+#cmakedefine HAVE_LINUX_VERSION_H 1
+#cmakedefine HAVE_STDINT_H 1
+#cmakedefine HAVE_STDLIB_H 1
+#cmakedefine HAVE_SYS_FILIO_H 1
+#cmakedefine HAVE_SYS_MMAN_H 1
+#cmakedefine HAVE_SYS_POLL_H 1
+#cmakedefine HAVE_SYS_RESOURCE_H 1
+#cmakedefine HAVE_SYS_SHM_H 1
+#cmakedefine HAVE_SYS_STAT_H 1
+#cmakedefine HAVE_SYS_TIMEB_H 1
+#cmakedefine HAVE_SYS_TYPES_H 1
+#cmakedefine HAVE_SYS_WAIT_H 1
+#cmakedefine HAVE_UNISTD_H 1
+#cmakedefine HAVE_WCHAR_H 1
+#cmakedefine HAVE_REGEX_H 1
+#cmakedefine HAVE_SYS_INOTIFY_H 1
+#cmakedefine HAVE_SYS_EVENT_H 1
+#cmakedefine HAVE_SYSLOG_H 1
+#cmakedefine HAVE_LIBINTL_H 1
+#cmakedefine HAVE_NETINET_IN_H 1
+#cmakedefine HAVE_NET_IF_H 1
+#cmakedefine HAVE_SYS_PARAM_H 1
+#cmakedefine HAVE_SYS_FILE_H 1
+#cmakedefine HAVE_SYS_LOCKF_H 1
+#cmakedefine HAVE_REGEX_H 1
+
+#cmakedefine HAVE_FTOK 1
+#cmakedefine HAVE_GETADDRINFO 1
+#cmakedefine HAVE_GETHOSTBYNAME2 1
+#cmakedefine HAVE_INET_NTOP 1
+#cmakedefine HAVE_GMTIME_R 1
+#cmakedefine HAVE_LOCALTIME_R 1
+#cmakedefine HAVE_STRERROR_R 1
+#cmakedefine HAVE_MACH_CLOCK_H 1
+#cmakedefine HAVE_MACH_O_DYLD_H 1
+#cmakedefine HAVE_MEMORY_H 1
+#cmakedefine HAVE_NANOSLEEP 1
+#cmakedefine HAVE_POLL_H 1
+#cmakedefine HAVE_CLOCK_GETTIME 1
+#cmakedefine HAVE_POSIX_FADVISE 1
+#cmakedefine HAVE_POSIX_MEMALIGN 1
+#cmakedefine HAVE_PTHREAD_CONDATTR_SETCLOCK 1
+#cmakedefine HAVE_PTHREAD_DELAY 1
+#cmakedefine HAVE_PTHREAD_DELAY_NP 1
+#cmakedefine HAVE_PTHREAD_SETCONCURRENCY 1
+#cmakedefine HAVE_PTHREAD_SETSCHEDPRIO 1
+#cmakedefine HAVE_PTHREAD_YIELD 1
+#cmakedefine HAVE_PTHREAD_YIELD_NP 1
+#cmakedefine HAVE_SHL_LOAD 1
+#cmakedefine HAVE_SHM_OPEN 1
+#cmakedefine HAVE_SOCKETPAIR 1
+#define HAVE_STDEXCEPT 1        /* cannot seem to test in cmake... */
+#cmakedefine HAVE_STRICMP 1
+#cmakedefine HAVE_STRCOLL 1
+#cmakedefine HAVE_STRINGS_H 1
+#cmakedefine HAVE_STRISTR 1
+#cmakedefine HAVE_SYSCONF 1
+#cmakedefine HAVE_FTRUNCATE 1
+#cmakedefine HAVE_PWRITE 1
+#cmakedefine HAVE_SETPGRP 1
+#cmakedefine HAVE_SETLOCALE 1
+#cmakedefine HAVE_GETTEXT 1
+#cmakedefine HAVE_EXECVP 1
+#cmakedefine HAVE_ATEXIT 1
+#cmakedefine HAVE_LSTAT 1
+#cmakedefine HAVE_REALPATH 1
+#cmakedefine HAVE_SYMLINK 1
+#cmakedefine HAVE_READLINK 1
+#cmakedefine HAVE_WAITPID 1
+#cmakedefine HAVE_WAIT4 1
+#cmakedefine HAVE_FCNTL_H 1
+#cmakedefine HAVE_TERMIOS_H 1
+#cmakedefine HAVE_TERMIO_H 1
+#cmakedefine HAVE_OPENSSL_FIPS_H 1
+
+#cmakedefine POSIX_TIMERS 1
+#cmakedefine GCC_ATOMICS 1
+
+#cmakedefine UCOMMON_LOCALE "${UCOMMON_LOCALE}"
+#cmakedefine UCOMMON_CFGPATH "${UCOMMON_CFGPATH}"
+#cmakedefine UCOMMON_VARPATH "${UCOMMON_VARPATH}"
+#cmakedefine UCOMMON_PREFIX "${UCOMMON_PREFIX}"
+
+#ifdef  GCC_ATOMICS
+#define HAVE_GCC_ATOMICS
+#endif
+
+#include <ucommon/platform.h>
+
diff --git a/jni/libucommon/sources/ucommon-config.h.in b/jni/libucommon/sources/ucommon-config.h.in
new file mode 100644
index 0000000..eb6bcd1
--- /dev/null
+++ b/jni/libucommon/sources/ucommon-config.h.in
@@ -0,0 +1,312 @@
+/* ucommon-config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* has posix clock functions */
+#undef HAVE_CLOCK_GETTIME
+
+/* has clocked nanosleep */
+#undef HAVE_CLOCK_NANOSLEEP
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#undef HAVE_DIRENT_H
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <endian.h> header file. */
+#undef HAVE_ENDIAN_H
+
+/* has execvp in libc */
+#undef HAVE_EXECVP
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* has ftok */
+#undef HAVE_FTOK
+
+/* can truncate files */
+#undef HAVE_FTRUNCATE
+
+/* "cannot test in autoconf safely" */
+#undef HAVE_GCC_ATOMICS
+
+/* have getaddrinfo */
+#undef HAVE_GETADDRINFO
+
+/* have gethostbyname2 */
+#undef HAVE_GETHOSTBYNAME2
+
+/* has gettext in glibc */
+#undef HAVE_GETTEXT
+
+/* has localtime_r */
+#undef HAVE_GMTIME_R
+
+/* have inet_ntop */
+#undef HAVE_INET_NTOP
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* international headers */
+#undef HAVE_LIBINTL_H
+
+/* Define to 1 if you have the <linux/version.h> header file. */
+#undef HAVE_LINUX_VERSION_H
+
+/* has localtime_r */
+#undef HAVE_LOCALTIME_R
+
+/* have lstat */
+#undef HAVE_LSTAT
+
+/* Define to 1 if you have the <mach/clock.h> header file. */
+#undef HAVE_MACH_CLOCK_H
+
+/* Define to 1 if you have the <mach-o/dyld.h> header file. */
+#undef HAVE_MACH_O_DYLD_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* has nanosleep */
+#undef HAVE_NANOSLEEP
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define to 1 if you have the <net/if.h> header file. */
+#undef HAVE_NET_IF_H
+
+/* Define to 1 if you have the <openssl/fips.h> header file. */
+#undef HAVE_OPENSSL_FIPS_H
+
+/* Define to 1 if you have the <openssl/ssl.h> header file. */
+#undef HAVE_OPENSSL_SSL_H
+
+/* Define to 1 if you have the <poll.h> header file. */
+#undef HAVE_POLL_H
+
+/* can specify access options */
+#undef HAVE_POSIX_FADVISE
+
+/* posix memory alignment */
+#undef HAVE_POSIX_MEMALIGN
+
+/* "pthread clocking" */
+#undef HAVE_PTHREAD_CONDATTR_SETCLOCK
+
+/* "pthread delay" */
+#undef HAVE_PTHREAD_DELAY
+
+/* "pthread delay np" */
+#undef HAVE_PTHREAD_DELAY_NP
+
+/* "pthread concurrency" */
+#undef HAVE_PTHREAD_SETCONCURRENCY
+
+/* "pthread scheduling" */
+#undef HAVE_PTHREAD_SETSCHEDPRIO
+
+/* "pthread yield" */
+#undef HAVE_PTHREAD_YIELD
+
+/* can do atomic write with offset */
+#undef HAVE_PWRITE
+
+/* has readlink in libc */
+#undef HAVE_READLINK
+
+/* realpath support */
+#undef HAVE_REALPATH
+
+/* have regex header */
+#undef HAVE_REGEX_H
+
+/* can set localization */
+#undef HAVE_SETLOCALE
+
+/* process group control */
+#undef HAVE_SETPGRP
+
+/* alternate dyn loader */
+#undef HAVE_SHL_LOAD
+
+/* shared memory open */
+#undef HAVE_SHM_OPEN
+
+/* have socketpair in libsocket */
+#undef HAVE_SOCKETPAIR
+
+/* "Socks proxy support" */
+#undef HAVE_SOCKS
+
+/* Define to 1 if you have the <socks.h> header file. */
+#undef HAVE_SOCKS_H
+
+/* Define to 1 if you have the <stdexcept> header file. */
+#undef HAVE_STDEXCEPT
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* string collation */
+#undef HAVE_STRCOLL
+
+/* has strerror_r */
+#undef HAVE_STRERROR_R
+
+/* string icmp */
+#undef HAVE_STRICMP
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* string istr */
+#undef HAVE_STRISTR
+
+/* has symlink in libc */
+#undef HAVE_SYMLINK
+
+/* system config */
+#undef HAVE_SYSCONF
+
+/* Define to 1 if you have the <syslog.h> header file. */
+#undef HAVE_SYSLOG_H
+
+/* Define to 1 if you have the <sys/event.h> header file. */
+#undef HAVE_SYS_EVENT_H
+
+/* Define to 1 if you have the <sys/file.h> header file. */
+#undef HAVE_SYS_FILE_H
+
+/* Define to 1 if you have the <sys/filio.h> header file. */
+#undef HAVE_SYS_FILIO_H
+
+/* Define to 1 if you have the <sys/inotify.h> header file. */
+#undef HAVE_SYS_INOTIFY_H
+
+/* Define to 1 if you have the <sys/lockf.h> header file. */
+#undef HAVE_SYS_LOCKF_H
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/poll.h> header file. */
+#undef HAVE_SYS_POLL_H
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
+/* Define to 1 if you have the <sys/shm.h> header file. */
+#undef HAVE_SYS_SHM_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/timeb.h> header file. */
+#undef HAVE_SYS_TIMEB_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define to 1 if you have the <termios.h> header file. */
+#undef HAVE_TERMIOS_H
+
+/* Define to 1 if you have the <termio.h> header file. */
+#undef HAVE_TERMIO_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* has wait4 in libc */
+#undef HAVE_WAIT4
+
+/* has waitpid in libc */
+#undef HAVE_WAITPID
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#undef HAVE_WCHAR_H
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#undef LT_OBJDIR
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* config path */
+#undef UCOMMON_CFGPATH
+
+/* locale path */
+#undef UCOMMON_LOCALE
+
+/* config path */
+#undef UCOMMON_PREFIX
+
+/* config path */
+#undef UCOMMON_VARPATH
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to the equivalent of the C99 'restrict' keyword, or to
+   nothing if this is not supported.  Do not define if restrict is
+   supported directly.  */
+#undef restrict
+/* Work around a bug in Sun C++: it does not support _Restrict or
+   __restrict__, even though the corresponding Sun C compiler ends up with
+   "#define restrict _Restrict" or "#define restrict __restrict__" in the
+   previous line.  Perhaps some future version of Sun C++ will work with
+   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+# define __restrict__
+#endif
+
+/* Define to empty if the keyword `volatile' does not work. Warning: valid
+   code using `volatile' can become incorrect without. Disable with care. */
+#undef volatile
+
+
+#include <ucommon/platform.h>
+
diff --git a/jni/libucommon/sources/ucommon-config.in b/jni/libucommon/sources/ucommon-config.in
new file mode 100755
index 0000000..4a6446d
--- /dev/null
+++ b/jni/libucommon/sources/ucommon-config.in
@@ -0,0 +1,125 @@
+#!/bin/sh
+# Copyright (C) 2006-2007 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+includedir=@includedir@
+
+if [ "`ldd /bin/sh | grep lib64`" = "" ]
+then
+    libdir=${exec_prefix}/lib
+else
+    libdir=${exec_prefix}/lib64
+fi
+
+usage()
+{
+    cat <<EOF
+Usage: ucommon-config [OPTION]
+
+Known values for OPTION are:
+
+  --prefix=DIR		  change ucommon prefix [default $prefix]
+  --exec-prefix=DIR	change ucommon exec prefix [default $exec_prefix]
+  --libs		        print library linking information
+  --clink           print c model linking information
+  --minimal         linking without usecure
+  --cflags		      print pre-processor and compiler flags
+  --includes        print framework include directory
+  --plugins         print framework plugin directory
+  --model           print the linking model used
+  --help		        display this help and exit
+  --version		      output version information
+EOF
+
+    exit $1
+}
+
+if test $# -eq 0; then
+    usage 1
+fi
+
+cflags=false
+libs=false
+
+while test $# -gt 0; do
+  case "$1" in
+  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) optarg= ;;
+  esac
+
+  case "$1" in
+  --prefix=*)
+	  prefix=$optarg
+	  includedir=$prefix/include
+	  libdir=$prefix/lib
+	  ;;
+
+  --prefix)
+	  echo $prefix
+	  ;;
+
+  --exec-prefix=*)
+    exec_prefix=$optarg
+    libdir=$exec_prefix/lib
+    ;;
+
+   --exec-prefix)
+    echo $exec_prefix
+    ;;
+
+  --version)
+	  echo @VERSION@
+	  exit 0
+	  ;;
+
+  --help)
+	  usage 0
+	  ;;
+
+  --cflags)
+    echo @UCOMMON_FLAGS@
+    ;;
+
+  --libtool-libs)
+	  if [ -r ${libdir}/libucommon.la ] ; then
+	    echo ${libdir}/libucommon.la ; fi
+    ;;
+
+  --model)
+    echo @UCOMMON_MODEL@
+    ;;
+
+	--clink)
+		echo @UCOMMON_CLINK@
+		;;
+
+  --libs)
+		echo -lusecure -lucommon @SECURE_LIBS@ @UCOMMON_LINKED@ 
+    ;;
+
+  --minimal)
+		echo -lucommon @UCOMMON_LINKED@ 
+    ;;
+
+	--includes)
+		echo @UCOMMON_INCLUDES@
+		;;
+
+  *)
+	  usage
+	  exit 1
+	  ;;
+  esac
+  shift
+done
+
+exit 0
diff --git a/jni/libucommon/sources/ucommon.pc b/jni/libucommon/sources/ucommon.pc
new file mode 100644
index 0000000..d352cc6
--- /dev/null
+++ b/jni/libucommon/sources/ucommon.pc
@@ -0,0 +1,10 @@
+clink= -lc
+model=CXX
+includes=/usr/local/include/ucommon
+minimal="-lucommon   -lrt  -ldl -lpthread"
+
+Name: ucommon
+Description: GNU uCommon C++ class framework
+Version: 6.0.7
+Libs:  -lusecure -lucommon -lgnutls   -lrt  -ldl -lpthread
+Cflags:  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
diff --git a/jni/libucommon/sources/ucommon.pc.cmake b/jni/libucommon/sources/ucommon.pc.cmake
new file mode 100644
index 0000000..86b14c0
--- /dev/null
+++ b/jni/libucommon/sources/ucommon.pc.cmake
@@ -0,0 +1,11 @@
+prefix=${CMAKE_INSTALL_PREFIX}
+libdir=${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}
+includedir=${CMAKE_INSTALL_PREFIX}/include
+minimal="-lucommon ${PACKAGE_LIBS}"
+
+Name: ${PROJECT_NAME}
+Description: ${PROJECT_NAME} library
+Version: ${PACKAGE_FILE_VERSION}
+Libs: -lusecure -lucommon ${ADDITIONAL_LIBS} ${PACKAGE_LIBS}
+Cflags: ${PACKAGE_FLAGS}
+
diff --git a/jni/libucommon/sources/ucommon.pc.in b/jni/libucommon/sources/ucommon.pc.in
new file mode 100644
index 0000000..d6b30a8
--- /dev/null
+++ b/jni/libucommon/sources/ucommon.pc.in
@@ -0,0 +1,10 @@
+clink=@UCOMMON_CLINK@
+model=@UCOMMON_MODEL@
+includes=@UCOMMON_INCLUDES@
+minimal="-lucommon @UCOMMON_LINKED@"
+
+Name: ucommon
+Description: GNU uCommon C++ class framework
+Version: @VERSION@
+Libs:  -lusecure -lucommon @SECURE_LIBS@ @UCOMMON_LINKED@
+Cflags: @UCOMMON_FLAGS@
diff --git a/jni/libucommon/sources/ucommon.spec b/jni/libucommon/sources/ucommon.spec
new file mode 100644
index 0000000..69bbb1a
--- /dev/null
+++ b/jni/libucommon/sources/ucommon.spec
@@ -0,0 +1,144 @@
+# Copyright (c) 2008, 2009 David Sugar, Tycho Softworks.
+# This file is free software; as a special exception the author 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.
+
+Name: ucommon
+Summary: Portable C++ runtime for threads and sockets
+Version: 6.0.7
+Release: 0%{?dist}
+License: LGPLv3+
+URL: http://www.gnu.org/software/commoncpp
+Source0: http://www.gnutelephony.org/dist/tarballs/ucommon-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildRequires: doxygen graphviz-gd openssl-devel
+Group: System Environment/Libraries
+Summary: Runtime library for portable C++ threading and sockets
+
+%description
+GNU uCommon C++ is a lightweight library to facilitate using C++ design
+patterns even for very deeply embedded applications, such as for systems using
+uClibc along with POSIX threading support. For this reason, uCommon disables
+language features that consume memory or introduce runtime overhead. uCommon
+introduces some design patterns from Objective-C, such as reference counted
+objects, memory pools, and smart pointers.  uCommon introduces some new
+concepts for handling of thread locking and synchronization.
+
+%package bin
+Requires: %{name} = %{version}-%{release}
+Group: Applications/System
+Summary: ucommon system and support applications.
+
+%package devel
+Requires: %{name} = %{version}-%{release}
+Requires: %{name}-bin = %{version}-%{release}
+Requires: openssl-devel
+Requires: pkgconfig
+Group: Development/Libraries
+Summary: Headers for building ucommon applications
+
+%package doc
+Group: Documentation
+Summary: Generated class documentation for ucommon
+
+%description bin
+This is a collection of command line tools that use various aspects of the
+ucommon library.  Some may be needed to prepare files or for development of
+applications.
+
+%description devel
+This package provides header and support files needed for building
+applications that use the uCommon library and frameworks.
+
+%description doc
+Generated class documentation for GNU uCommon library from header files,
+html browsable.
+
+%prep
+%setup -q
+%build
+
+%configure --disable-static
+%{__make} %{?_smp_mflags}
+%{__rm} -rf doc/html
+%{__make} doxy
+
+%install
+%{__rm} -rf %{buildroot}
+%{__make} DESTDIR=%{buildroot} INSTALL="install -p" install
+%{__chmod} 0755 %{buildroot}%{_bindir}/ucommon-config
+%{__chmod} 0755 %{buildroot}%{_bindir}/commoncpp-config
+%{__rm} %{buildroot}%{_libdir}/*.la
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS README COPYING COPYING.LESSER COPYRIGHT NEWS SUPPORT ChangeLog
+%{_libdir}/libucommon.so.*
+%{_libdir}/libusecure.so.*
+%{_libdir}/libcommoncpp.so.*
+
+%files bin
+%defattr(-,root,root,-)
+%{_bindir}/args
+%{_bindir}/car
+%{_bindir}/pdetach
+%{_bindir}/scrub-files
+%{_bindir}/mdsum
+%{_bindir}/sockaddr
+%{_bindir}/zerofill
+%{_mandir}/man1/args.*
+%{_mandir}/man1/car.*
+%{_mandir}/man1/pdetach.*
+%{_mandir}/man1/scrub-files.*
+%{_mandir}/man1/mdsum.*
+%{_mandir}/man1/sockaddr.*
+%{_mandir}/man1/zerofill.*
+
+%files devel
+%defattr(-,root,root,-)
+%{_libdir}/*.so
+%{_includedir}/ucommon/
+%{_includedir}/commoncpp/
+%{_libdir}/pkgconfig/*.pc
+%{_bindir}/ucommon-config
+%{_bindir}/commoncpp-config
+%{_mandir}/man1/ucommon-config.*
+%{_mandir}/man1/commoncpp-config.*
+
+%files doc
+%defattr(-,root,root,-)
+%doc doc/html/*
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%changelog
+* Sat Sep 18 2010 - David Sugar <dyfet@gnutelephony.org> - 3.4.0-0
+- simplified packaging and better runtime focus.
+- ccscript moved to bayonne, ccaudio detached.
+
+* Sun Aug 01 2010 - David Sugar <dyfet@gnutelephony.org> - 3.3.0-0
+- internationalization bindings with gnu gettext support.
+- reorganized utils into ucommon-bin subpackage.
+
+* Fri Jun 04 2010 - David Sugar <dyfet@gnutelephony.org> - 3.0.0-0
+- merged ccscript and ccaudio with ucommon to create single framework.
+
+* Sun Jul 19 2009 - David Sugar <dyfet@gnutelephony.org> - 2.0.6-1
+- fixed ucommon-config upstream.
+
+* Tue May 05 2009 - David Sugar <dyfet@gnutelephony.org> - 2.0.5-4
+- removed static libraries, fixed other build issues (#498736)
+
+* Sun May 03 2009 - David Sugar <dyfet@gnutelephony.org> - 2.0.5-3
+- spec file prepared for redhat/fedora (#498736)
+
diff --git a/jni/libucommon/sources/ucommon.spec.cmake b/jni/libucommon/sources/ucommon.spec.cmake
new file mode 100644
index 0000000..340e34d
--- /dev/null
+++ b/jni/libucommon/sources/ucommon.spec.cmake
@@ -0,0 +1,149 @@
+# Copyright (c) 2008, 2009 David Sugar, Tycho Softworks.
+# This file is free software; as a special exception the author 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.
+
+Name: ucommon
+Summary: Portable C++ runtime for threads and sockets
+Version: @VERSION@
+Release: 0%{?dist}
+License: LGPLv3+
+URL: http://www.gnu.org/software/commoncpp
+Source0: http://www.gnutelephony.org/dist/tarballs/ucommon-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildRequires: doxygen graphviz-gd openssl-devel
+Group: System Environment/Libraries
+Summary: Runtime library for portable C++ threading and sockets
+
+%description
+GNU uCommon C++ is a lightweight library to facilitate using C++ design
+patterns even for very deeply embedded applications, such as for systems using
+uClibc along with POSIX threading support. For this reason, uCommon disables
+language features that consume memory or introduce runtime overhead. uCommon
+introduces some design patterns from Objective-C, such as reference counted
+objects, memory pools, and smart pointers.  uCommon introduces some new
+concepts for handling of thread locking and synchronization.
+
+%package bin
+Requires: %{name} = %{version}-%{release}
+Group: Applications/System
+Summary: ucommon system and support applications.
+
+%package devel
+Requires: %{name} = %{version}-%{release}
+Requires: %{name}-bin = %{version}-%{release}
+Requires: openssl-devel
+Requires: pkgconfig
+Group: Development/Libraries
+Summary: Headers for building ucommon applications
+
+%package doc
+Group: Documentation
+Summary: Generated class documentation for ucommon
+
+%description bin
+This is a collection of command line tools that use various aspects of the
+ucommon library.  Some may be needed to prepare files or for development of
+applications.
+
+%description devel
+This package provides header and support files needed for building
+applications that use the uCommon library and frameworks.
+
+%description doc
+Generated class documentation for GNU uCommon library from header files,
+html browsable.
+
+%prep
+%setup -q
+
+%build
+%{__rm} -rf build
+%{__mkdir} build
+cd build
+cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+      -DSYSCONFDIR=%{_sysconfdir} \
+      -DMANDIR=%{_mandir} \
+      -DCMAKE_VERBOSE_MAKEFILE=TRUE \
+      -DCMAKE_C_FLAGS_RELEASE:STRING="$RPM_OPT_FLAGS" \
+      -DCMAKE_CXX_FLAGS_RELEASE:STRING="$RPM_OPT_FLAGS" \
+      ..
+%{__make} %{?_smp_mflags}
+
+%install
+cd build
+%{__rm} -rf %{buildroot}
+make install DESTDIR=%{buildroot}
+%{__chmod} 0755 %{buildroot}%{_bindir}/ucommon-config
+%{__chmod} 0755 %{buildroot}%{_bindir}/commoncpp-config
+%{__rm} -rf %{buildroot}%{_libdir}/*.la
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS README COPYING COPYING.LESSER COPYRIGHT NEWS SUPPORT ChangeLog
+%{_libdir}/libucommon.so.*
+%{_libdir}/libusecure.so.*
+%{_libdir}/libcommoncpp.so.*
+
+%files bin
+%defattr(-,root,root,-)
+%{_bindir}/args
+%{_bindir}/car
+%{_bindir}/scrub-files
+%{_bindir}/mdsum
+%{_bindir}/sockaddr
+%{_bindir}/zerofill
+%{_mandir}/man1/args.*
+%{_mandir}/man1/car.*
+%{_mandir}/man1/scrub-files.*
+%{_mandir}/man1/mdsum.*
+%{_mandir}/man1/sockaddr.*
+%{_mandir}/man1/zerofill.*
+
+%files devel
+%defattr(-,root,root,-)
+%{_libdir}/*.so
+%{_includedir}/ucommon/
+%{_includedir}/commoncpp/
+%{_libdir}/pkgconfig/*.pc
+%{_bindir}/ucommon-config
+%{_bindir}/commoncpp-config
+# %{_mandir}/man1/ucommon-config.*
+
+%files doc
+%defattr(-,root,root,-)
+# %doc doc/html/*
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%changelog
+* Sat Sep 18 2010 - David Sugar <dyfet@gnutelephony.org> - 3.4.0-0
+- simplified packaging and better runtime focus.
+- ccscript moved to bayonne, ccaudio detached.
+
+* Sun Aug 01 2010 - David Sugar <dyfet@gnutelephony.org> - 3.3.0-0
+- internationalization bindings with gnu gettext support.
+- reorganized utils into ucommon-bin subpackage.
+
+* Fri Jun 04 2010 - David Sugar <dyfet@gnutelephony.org> - 3.0.0-0
+- merged ccscript and ccaudio with ucommon to create single framework.
+
+* Sun Jul 19 2009 - David Sugar <dyfet@gnutelephony.org> - 2.0.6-1
+- fixed ucommon-config upstream.
+
+* Tue May 05 2009 - David Sugar <dyfet@gnutelephony.org> - 2.0.5-4
+- removed static libraries, fixed other build issues (#498736)
+
+* Sun May 03 2009 - David Sugar <dyfet@gnutelephony.org> - 2.0.5-3
+- spec file prepared for redhat/fedora (#498736)
+
diff --git a/jni/libucommon/sources/ucommon.spec.in b/jni/libucommon/sources/ucommon.spec.in
new file mode 100644
index 0000000..a863294
--- /dev/null
+++ b/jni/libucommon/sources/ucommon.spec.in
@@ -0,0 +1,144 @@
+# Copyright (c) 2008, 2009 David Sugar, Tycho Softworks.
+# This file is free software; as a special exception the author 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.
+
+Name: ucommon
+Summary: Portable C++ runtime for threads and sockets
+Version: @VERSION@
+Release: 0%{?dist}
+License: LGPLv3+
+URL: http://www.gnu.org/software/commoncpp
+Source0: http://www.gnutelephony.org/dist/tarballs/ucommon-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildRequires: doxygen graphviz-gd openssl-devel
+Group: System Environment/Libraries
+Summary: Runtime library for portable C++ threading and sockets
+
+%description
+GNU uCommon C++ is a lightweight library to facilitate using C++ design
+patterns even for very deeply embedded applications, such as for systems using
+uClibc along with POSIX threading support. For this reason, uCommon disables
+language features that consume memory or introduce runtime overhead. uCommon
+introduces some design patterns from Objective-C, such as reference counted
+objects, memory pools, and smart pointers.  uCommon introduces some new
+concepts for handling of thread locking and synchronization.
+
+%package bin
+Requires: %{name} = %{version}-%{release}
+Group: Applications/System
+Summary: ucommon system and support applications.
+
+%package devel
+Requires: %{name} = %{version}-%{release}
+Requires: %{name}-bin = %{version}-%{release}
+Requires: openssl-devel
+Requires: pkgconfig
+Group: Development/Libraries
+Summary: Headers for building ucommon applications
+
+%package doc
+Group: Documentation
+Summary: Generated class documentation for ucommon
+
+%description bin
+This is a collection of command line tools that use various aspects of the
+ucommon library.  Some may be needed to prepare files or for development of
+applications.
+
+%description devel
+This package provides header and support files needed for building
+applications that use the uCommon library and frameworks.
+
+%description doc
+Generated class documentation for GNU uCommon library from header files,
+html browsable.
+
+%prep
+%setup -q
+%build
+
+%configure --disable-static
+%{__make} %{?_smp_mflags}
+%{__rm} -rf doc/html
+%{__make} doxy
+
+%install
+%{__rm} -rf %{buildroot}
+%{__make} DESTDIR=%{buildroot} INSTALL="install -p" install
+%{__chmod} 0755 %{buildroot}%{_bindir}/ucommon-config
+%{__chmod} 0755 %{buildroot}%{_bindir}/commoncpp-config
+%{__rm} %{buildroot}%{_libdir}/*.la
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS README COPYING COPYING.LESSER COPYRIGHT NEWS SUPPORT ChangeLog
+%{_libdir}/libucommon.so.*
+%{_libdir}/libusecure.so.*
+%{_libdir}/libcommoncpp.so.*
+
+%files bin
+%defattr(-,root,root,-)
+%{_bindir}/args
+%{_bindir}/car
+%{_bindir}/pdetach
+%{_bindir}/scrub-files
+%{_bindir}/mdsum
+%{_bindir}/sockaddr
+%{_bindir}/zerofill
+%{_mandir}/man1/args.*
+%{_mandir}/man1/car.*
+%{_mandir}/man1/pdetach.*
+%{_mandir}/man1/scrub-files.*
+%{_mandir}/man1/mdsum.*
+%{_mandir}/man1/sockaddr.*
+%{_mandir}/man1/zerofill.*
+
+%files devel
+%defattr(-,root,root,-)
+%{_libdir}/*.so
+%{_includedir}/ucommon/
+%{_includedir}/commoncpp/
+%{_libdir}/pkgconfig/*.pc
+%{_bindir}/ucommon-config
+%{_bindir}/commoncpp-config
+%{_mandir}/man1/ucommon-config.*
+%{_mandir}/man1/commoncpp-config.*
+
+%files doc
+%defattr(-,root,root,-)
+%doc doc/html/*
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%changelog
+* Sat Sep 18 2010 - David Sugar <dyfet@gnutelephony.org> - 3.4.0-0
+- simplified packaging and better runtime focus.
+- ccscript moved to bayonne, ccaudio detached.
+
+* Sun Aug 01 2010 - David Sugar <dyfet@gnutelephony.org> - 3.3.0-0
+- internationalization bindings with gnu gettext support.
+- reorganized utils into ucommon-bin subpackage.
+
+* Fri Jun 04 2010 - David Sugar <dyfet@gnutelephony.org> - 3.0.0-0
+- merged ccscript and ccaudio with ucommon to create single framework.
+
+* Sun Jul 19 2009 - David Sugar <dyfet@gnutelephony.org> - 2.0.6-1
+- fixed ucommon-config upstream.
+
+* Tue May 05 2009 - David Sugar <dyfet@gnutelephony.org> - 2.0.5-4
+- removed static libraries, fixed other build issues (#498736)
+
+* Sun May 03 2009 - David Sugar <dyfet@gnutelephony.org> - 2.0.5-3
+- spec file prepared for redhat/fedora (#498736)
+
diff --git a/jni/libucommon/sources/utils/.deps/args.Po b/jni/libucommon/sources/utils/.deps/args.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/utils/.deps/args.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/utils/.deps/car.Po b/jni/libucommon/sources/utils/.deps/car.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/utils/.deps/car.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/utils/.deps/mdsum.Po b/jni/libucommon/sources/utils/.deps/mdsum.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/utils/.deps/mdsum.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/utils/.deps/pdetach.Po b/jni/libucommon/sources/utils/.deps/pdetach.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/utils/.deps/pdetach.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/utils/.deps/scrub.Po b/jni/libucommon/sources/utils/.deps/scrub.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/utils/.deps/scrub.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/utils/.deps/sockaddr.Po b/jni/libucommon/sources/utils/.deps/sockaddr.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/utils/.deps/sockaddr.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/utils/.deps/zerofill.Po b/jni/libucommon/sources/utils/.deps/zerofill.Po
new file mode 100644
index 0000000..9ce06a8
--- /dev/null
+++ b/jni/libucommon/sources/utils/.deps/zerofill.Po
@@ -0,0 +1 @@
+# dummy
diff --git a/jni/libucommon/sources/utils/Makefile b/jni/libucommon/sources/utils/Makefile
new file mode 100644
index 0000000..3faf282
--- /dev/null
+++ b/jni/libucommon/sources/utils/Makefile
@@ -0,0 +1,825 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# utils/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994-2013 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.
+
+
+
+# Copyright (C) 2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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)/ucommon
+pkgincludedir = $(includedir)/ucommon
+pkglibdir = $(libdir)/ucommon
+pkglibexecdir = $(libexecdir)/ucommon
+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 = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+target_triplet = x86_64-unknown-linux-gnu
+bin_PROGRAMS = args$(EXEEXT) scrub-files$(EXEEXT) mdsum$(EXEEXT) \
+	zerofill$(EXEEXT) car$(EXEEXT) sockaddr$(EXEEXT) \
+	pdetach$(EXEEXT)
+subdir = utils
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/autoconf/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_args_OBJECTS = args.$(OBJEXT)
+args_OBJECTS = $(am_args_OBJECTS)
+args_LDADD = $(LDADD)
+args_DEPENDENCIES = ../corelib/libucommon.la
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+am_car_OBJECTS = car.$(OBJEXT)
+car_OBJECTS = $(am_car_OBJECTS)
+car_LDADD = $(LDADD)
+car_DEPENDENCIES = ../corelib/libucommon.la
+car_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(car_LDFLAGS) $(LDFLAGS) -o $@
+am_mdsum_OBJECTS = mdsum.$(OBJEXT)
+mdsum_OBJECTS = $(am_mdsum_OBJECTS)
+mdsum_LDADD = $(LDADD)
+mdsum_DEPENDENCIES = ../corelib/libucommon.la
+mdsum_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(mdsum_LDFLAGS) $(LDFLAGS) -o $@
+am_pdetach_OBJECTS = pdetach.$(OBJEXT)
+pdetach_OBJECTS = $(am_pdetach_OBJECTS)
+pdetach_LDADD = $(LDADD)
+pdetach_DEPENDENCIES = ../corelib/libucommon.la
+am_scrub_files_OBJECTS = scrub.$(OBJEXT)
+scrub_files_OBJECTS = $(am_scrub_files_OBJECTS)
+scrub_files_LDADD = $(LDADD)
+scrub_files_DEPENDENCIES = ../corelib/libucommon.la
+scrub_files_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(scrub_files_LDFLAGS) $(LDFLAGS) -o $@
+am_sockaddr_OBJECTS = sockaddr.$(OBJEXT)
+sockaddr_OBJECTS = $(am_sockaddr_OBJECTS)
+sockaddr_LDADD = $(LDADD)
+sockaddr_DEPENDENCIES = ../corelib/libucommon.la
+am_zerofill_OBJECTS = zerofill.$(OBJEXT)
+zerofill_OBJECTS = $(am_zerofill_OBJECTS)
+zerofill_LDADD = $(LDADD)
+zerofill_DEPENDENCIES = ../corelib/libucommon.la
+zerofill_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(zerofill_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_$(V))
+am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = -I. -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_$(V))
+am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY))
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_$(V))
+am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+SOURCES = $(args_SOURCES) $(car_SOURCES) $(mdsum_SOURCES) \
+	$(pdetach_SOURCES) $(scrub_files_SOURCES) $(sockaddr_SOURCES) \
+	$(zerofill_SOURCES)
+DIST_SOURCES = $(args_SOURCES) $(car_SOURCES) $(mdsum_SOURCES) \
+	$(pdetach_SOURCES) $(scrub_files_SOURCES) $(sockaddr_SOURCES) \
+	$(zerofill_SOURCES)
+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 = 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; }; \
+  }
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man_MANS)
+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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing aclocal-1.13
+AMTAR = $${TAR-tar}
+AM_DEFAULT_VERBOSITY = 1
+AR = ar
+AS = as
+AUTOCONF = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoconf
+AUTOHEADER = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing autoheader
+AUTOMAKE = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing automake-1.13
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CHECKFLAGS = 
+COMPAT = commoncpp
+CPP = gcc -E
+CPPFLAGS = 
+CXX = g++
+CXXCPP = g++ -E
+CXXDEPMODE = depmode=gcc3
+CXXFLAGS =  -g -O2
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+DLLTOOL = dlltool
+DOXYGEN = /usr/bin/doxygen
+DSYMUTIL = 
+DUMPBIN = 
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /usr/bin/grep -E
+EXEEXT = 
+FGREP = /usr/bin/grep -F
+GNUTLS_CFLAGS = 
+GNUTLS_LIBS = -lgnutls
+GREP = /usr/bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS = 
+LIBOBJS = 
+LIBS = 
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO = 
+LN_S = ln -s
+LTLIBOBJS = 
+LT_GENERIC = $(SHELL) $(top_builddir)/libtool
+LT_VERSION = 6:3:0
+MAKEINFO = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/missing makeinfo
+MANIFEST_TOOL = :
+MKDIR_P = /usr/bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT = 
+OBJDUMP = objdump
+OBJEXT = o
+OPENSSL_CFLAGS = 
+OPENSSL_LIBS = -lssl -lcrypto -lz 
+OTOOL = 
+OTOOL64 = 
+PACKAGE = ucommon
+PACKAGE_BUGREPORT = 
+PACKAGE_NAME = ucommon
+PACKAGE_STRING = ucommon 6.0.7
+PACKAGE_TARNAME = ucommon
+PACKAGE_URL = 
+PACKAGE_VERSION = 6.0.7
+PATH_SEPARATOR = :
+PKG_CONFIG = /usr/bin/pkg-config
+PKG_CONFIG_LIBDIR = 
+PKG_CONFIG_PATH = 
+RANLIB = ranlib
+SECURE = gnutls
+SECURE_LIBS = -lgnutls
+SECURE_LOCAL = ../gnutls/libusecure.la -lgnutls
+SED = /usr/bin/sed
+SET_MAKE = 
+SHELL = /bin/sh
+STRIP = strip
+UCOMMON_CFGPATH = /etc
+UCOMMON_CLINK =  -lc
+UCOMMON_FLAGS =  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+UCOMMON_INCLUDES = /usr/local/include/ucommon
+UCOMMON_LIBC = -lc
+UCOMMON_LIBS =   -lrt  -ldl -lpthread -lc
+UCOMMON_LINKED =   -lrt  -ldl -lpthread
+UCOMMON_LOCALE = /usr/local/share/locale
+UCOMMON_MODEL = CXX
+UCOMMON_PREFIX = /usr/local
+UCOMMON_VARPATH = /var
+UCOMMON_VISIBILITY = 1
+VERSION = 6.0.7
+abs_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources/utils
+abs_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources/utils
+abs_top_builddir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+abs_top_srcdir = /home/lisional/git/sflphone-android/jni/libucommon/sources
+ac_ct_AR = ar
+ac_ct_CC = gcc
+ac_ct_CXX = g++
+ac_ct_DUMPBIN = 
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+includes = ${includedir}/ucommon
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/lisional/git/sflphone-android/jni/libucommon/sources/autoconf/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+libs = /usr/local/lib
+localedir = ${datarootdir}/locale
+localstatedir = /var
+mandir = ${datarootdir}/man
+mkdir_p = $(MKDIR_P)
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = /etc
+target = x86_64-unknown-linux-gnu
+target_alias = 
+target_cpu = x86_64
+target_os = linux-gnu
+target_vendor = unknown
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = ..
+MAINTAINERCLEANFILES = Makefile.in Makefile
+AM_CXXFLAGS = -I$(top_srcdir)/inc  -Wno-long-long -DNEW_STDCPP -pthread -fno-check-new -finline -fvisibility=hidden -DUCOMMON_VISIBILITY=1
+AM_CPPFLAGS = -I$(top_srcdir)/inc
+LDADD = ../corelib/libucommon.la   -lrt  -ldl -lpthread -lc  -lc
+EXTRA_DIST = *.1
+man_MANS = args.1 scrub-files.1 mdsum.1 zerofill.1 car.1 sockaddr.1 pdetach.1
+args_SOURCES = args.cpp
+sockaddr_SOURCES = sockaddr.cpp
+pdetach_SOURCES = pdetach.cpp
+scrub_files_SOURCES = scrub.cpp
+scrub_files_LDFLAGS = ../gnutls/libusecure.la -lgnutls
+mdsum_SOURCES = mdsum.cpp
+mdsum_LDFLAGS = ../gnutls/libusecure.la -lgnutls
+zerofill_SOURCES = zerofill.cpp
+zerofill_LDFLAGS = ../gnutls/libusecure.la -lgnutls
+car_SOURCES = car.cpp
+car_LDFLAGS = ../gnutls/libusecure.la -lgnutls
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(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) --gnu utils/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu utils/Makefile
+.PRECIOUS: 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):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@list='$(bin_PROGRAMS)'; 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 echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p \
+	 || test -f $$p1 \
+	  ; then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' \
+	    -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' \
+	`; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_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
+
+args$(EXEEXT): $(args_OBJECTS) $(args_DEPENDENCIES) $(EXTRA_args_DEPENDENCIES) 
+	@rm -f args$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(args_OBJECTS) $(args_LDADD) $(LIBS)
+
+car$(EXEEXT): $(car_OBJECTS) $(car_DEPENDENCIES) $(EXTRA_car_DEPENDENCIES) 
+	@rm -f car$(EXEEXT)
+	$(AM_V_CXXLD)$(car_LINK) $(car_OBJECTS) $(car_LDADD) $(LIBS)
+
+mdsum$(EXEEXT): $(mdsum_OBJECTS) $(mdsum_DEPENDENCIES) $(EXTRA_mdsum_DEPENDENCIES) 
+	@rm -f mdsum$(EXEEXT)
+	$(AM_V_CXXLD)$(mdsum_LINK) $(mdsum_OBJECTS) $(mdsum_LDADD) $(LIBS)
+
+pdetach$(EXEEXT): $(pdetach_OBJECTS) $(pdetach_DEPENDENCIES) $(EXTRA_pdetach_DEPENDENCIES) 
+	@rm -f pdetach$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(pdetach_OBJECTS) $(pdetach_LDADD) $(LIBS)
+
+scrub-files$(EXEEXT): $(scrub_files_OBJECTS) $(scrub_files_DEPENDENCIES) $(EXTRA_scrub_files_DEPENDENCIES) 
+	@rm -f scrub-files$(EXEEXT)
+	$(AM_V_CXXLD)$(scrub_files_LINK) $(scrub_files_OBJECTS) $(scrub_files_LDADD) $(LIBS)
+
+sockaddr$(EXEEXT): $(sockaddr_OBJECTS) $(sockaddr_DEPENDENCIES) $(EXTRA_sockaddr_DEPENDENCIES) 
+	@rm -f sockaddr$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(sockaddr_OBJECTS) $(sockaddr_LDADD) $(LIBS)
+
+zerofill$(EXEEXT): $(zerofill_OBJECTS) $(zerofill_DEPENDENCIES) $(EXTRA_zerofill_DEPENDENCIES) 
+	@rm -f zerofill$(EXEEXT)
+	$(AM_V_CXXLD)$(zerofill_LINK) $(zerofill_OBJECTS) $(zerofill_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/args.Po
+include ./$(DEPDIR)/car.Po
+include ./$(DEPDIR)/mdsum.Po
+include ./$(DEPDIR)/pdetach.Po
+include ./$(DEPDIR)/scrub.Po
+include ./$(DEPDIR)/sockaddr.Po
+include ./$(DEPDIR)/zerofill.Po
+
+.cpp.o:
+	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	$(AM_V_CXX)source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	$(AM_V_CXX)source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+#	$(AM_V_CXX)source='$<' object='$@' libtool=yes \
+#	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
+#	$(AM_V_CXX_no)$(LTCXXCOMPILE) -c -o $@ $<
+
+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)
+
+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`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(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
+
+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
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(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:
+
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+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-binPROGRAMS
+
+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:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-man
+
+uninstall-man: uninstall-man1
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+	clean-binPROGRAMS clean-generic clean-libtool 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-binPROGRAMS \
+	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 installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+	uninstall-binPROGRAMS uninstall-man uninstall-man1
+
+
+# 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/jni/libucommon/sources/utils/Makefile.am b/jni/libucommon/sources/utils/Makefile.am
new file mode 100644
index 0000000..30aebec
--- /dev/null
+++ b/jni/libucommon/sources/utils/Makefile.am
@@ -0,0 +1,37 @@
+# Copyright (C) 2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+MAINTAINERCLEANFILES = Makefile.in Makefile
+AM_CXXFLAGS = -I$(top_srcdir)/inc @UCOMMON_FLAGS@
+AM_CPPFLAGS = -I$(top_srcdir)/inc
+LDADD = ../corelib/libucommon.la @UCOMMON_LIBS@ @UCOMMON_CLINK@
+EXTRA_DIST = *.1
+
+man_MANS = args.1 scrub-files.1 mdsum.1 zerofill.1 car.1 sockaddr.1 pdetach.1
+bin_PROGRAMS = args scrub-files mdsum zerofill car sockaddr pdetach
+
+args_SOURCES = args.cpp
+
+sockaddr_SOURCES = sockaddr.cpp
+
+pdetach_SOURCES = pdetach.cpp
+
+scrub_files_SOURCES = scrub.cpp
+scrub_files_LDFLAGS = @SECURE_LOCAL@
+
+mdsum_SOURCES = mdsum.cpp
+mdsum_LDFLAGS = @SECURE_LOCAL@
+
+zerofill_SOURCES = zerofill.cpp
+zerofill_LDFLAGS = @SECURE_LOCAL@
+
+car_SOURCES = car.cpp
+car_LDFLAGS = @SECURE_LOCAL@
+
diff --git a/jni/libucommon/sources/utils/Makefile.in b/jni/libucommon/sources/utils/Makefile.in
new file mode 100644
index 0000000..ec610c9
--- /dev/null
+++ b/jni/libucommon/sources/utils/Makefile.in
@@ -0,0 +1,825 @@
+# Makefile.in generated by automake 1.13.4 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 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@
+
+# Copyright (C) 2010 David Sugar, Tycho Softworks.
+#
+# This file is free software; as a special exception the author 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.
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+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@
+target_triplet = @target@
+bin_PROGRAMS = args$(EXEEXT) scrub-files$(EXEEXT) mdsum$(EXEEXT) \
+	zerofill$(EXEEXT) car$(EXEEXT) sockaddr$(EXEEXT) \
+	pdetach$(EXEEXT)
+subdir = utils
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/autoconf/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/ucommon-config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_args_OBJECTS = args.$(OBJEXT)
+args_OBJECTS = $(am_args_OBJECTS)
+args_LDADD = $(LDADD)
+args_DEPENDENCIES = ../corelib/libucommon.la
+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 = 
+am_car_OBJECTS = car.$(OBJEXT)
+car_OBJECTS = $(am_car_OBJECTS)
+car_LDADD = $(LDADD)
+car_DEPENDENCIES = ../corelib/libucommon.la
+car_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(car_LDFLAGS) $(LDFLAGS) -o $@
+am_mdsum_OBJECTS = mdsum.$(OBJEXT)
+mdsum_OBJECTS = $(am_mdsum_OBJECTS)
+mdsum_LDADD = $(LDADD)
+mdsum_DEPENDENCIES = ../corelib/libucommon.la
+mdsum_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(mdsum_LDFLAGS) $(LDFLAGS) -o $@
+am_pdetach_OBJECTS = pdetach.$(OBJEXT)
+pdetach_OBJECTS = $(am_pdetach_OBJECTS)
+pdetach_LDADD = $(LDADD)
+pdetach_DEPENDENCIES = ../corelib/libucommon.la
+am_scrub_files_OBJECTS = scrub.$(OBJEXT)
+scrub_files_OBJECTS = $(am_scrub_files_OBJECTS)
+scrub_files_LDADD = $(LDADD)
+scrub_files_DEPENDENCIES = ../corelib/libucommon.la
+scrub_files_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(scrub_files_LDFLAGS) $(LDFLAGS) -o $@
+am_sockaddr_OBJECTS = sockaddr.$(OBJEXT)
+sockaddr_OBJECTS = $(am_sockaddr_OBJECTS)
+sockaddr_LDADD = $(LDADD)
+sockaddr_DEPENDENCIES = ../corelib/libucommon.la
+am_zerofill_OBJECTS = zerofill.$(OBJEXT)
+zerofill_OBJECTS = $(am_zerofill_OBJECTS)
+zerofill_LDADD = $(LDADD)
+zerofill_DEPENDENCIES = ../corelib/libucommon.la
+zerofill_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(zerofill_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)/autoconf/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
+AM_V_CXX = $(am__v_CXX_@AM_V@)
+am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
+am__v_CXX_0 = @echo "  CXX     " $@;
+am__v_CXX_1 = 
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
+am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
+am__v_CXXLD_0 = @echo "  CXXLD   " $@;
+am__v_CXXLD_1 = 
+SOURCES = $(args_SOURCES) $(car_SOURCES) $(mdsum_SOURCES) \
+	$(pdetach_SOURCES) $(scrub_files_SOURCES) $(sockaddr_SOURCES) \
+	$(zerofill_SOURCES)
+DIST_SOURCES = $(args_SOURCES) $(car_SOURCES) $(mdsum_SOURCES) \
+	$(pdetach_SOURCES) $(scrub_files_SOURCES) $(sockaddr_SOURCES) \
+	$(zerofill_SOURCES)
+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 = 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; }; \
+  }
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(man_MANS)
+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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CHECKFLAGS = @CHECKFLAGS@
+COMPAT = @COMPAT@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOXYGEN = @DOXYGEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GNUTLS_CFLAGS = @GNUTLS_CFLAGS@
+GNUTLS_LIBS = @GNUTLS_LIBS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_GENERIC = @LT_GENERIC@
+LT_VERSION = @LT_VERSION@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+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@
+RANLIB = @RANLIB@
+SECURE = @SECURE@
+SECURE_LIBS = @SECURE_LIBS@
+SECURE_LOCAL = @SECURE_LOCAL@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+UCOMMON_CFGPATH = @UCOMMON_CFGPATH@
+UCOMMON_CLINK = @UCOMMON_CLINK@
+UCOMMON_FLAGS = @UCOMMON_FLAGS@
+UCOMMON_INCLUDES = @UCOMMON_INCLUDES@
+UCOMMON_LIBC = @UCOMMON_LIBC@
+UCOMMON_LIBS = @UCOMMON_LIBS@
+UCOMMON_LINKED = @UCOMMON_LINKED@
+UCOMMON_LOCALE = @UCOMMON_LOCALE@
+UCOMMON_MODEL = @UCOMMON_MODEL@
+UCOMMON_PREFIX = @UCOMMON_PREFIX@
+UCOMMON_VARPATH = @UCOMMON_VARPATH@
+UCOMMON_VISIBILITY = @UCOMMON_VISIBILITY@
+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_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+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@
+includes = @includes@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+libs = @libs@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MAINTAINERCLEANFILES = Makefile.in Makefile
+AM_CXXFLAGS = -I$(top_srcdir)/inc @UCOMMON_FLAGS@
+AM_CPPFLAGS = -I$(top_srcdir)/inc
+LDADD = ../corelib/libucommon.la @UCOMMON_LIBS@ @UCOMMON_CLINK@
+EXTRA_DIST = *.1
+man_MANS = args.1 scrub-files.1 mdsum.1 zerofill.1 car.1 sockaddr.1 pdetach.1
+args_SOURCES = args.cpp
+sockaddr_SOURCES = sockaddr.cpp
+pdetach_SOURCES = pdetach.cpp
+scrub_files_SOURCES = scrub.cpp
+scrub_files_LDFLAGS = @SECURE_LOCAL@
+mdsum_SOURCES = mdsum.cpp
+mdsum_LDFLAGS = @SECURE_LOCAL@
+zerofill_SOURCES = zerofill.cpp
+zerofill_LDFLAGS = @SECURE_LOCAL@
+car_SOURCES = car.cpp
+car_LDFLAGS = @SECURE_LOCAL@
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(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) --gnu utils/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu utils/Makefile
+.PRECIOUS: 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):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@list='$(bin_PROGRAMS)'; 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 echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p \
+	 || test -f $$p1 \
+	  ; then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' \
+	    -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' \
+	`; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_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
+
+args$(EXEEXT): $(args_OBJECTS) $(args_DEPENDENCIES) $(EXTRA_args_DEPENDENCIES) 
+	@rm -f args$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(args_OBJECTS) $(args_LDADD) $(LIBS)
+
+car$(EXEEXT): $(car_OBJECTS) $(car_DEPENDENCIES) $(EXTRA_car_DEPENDENCIES) 
+	@rm -f car$(EXEEXT)
+	$(AM_V_CXXLD)$(car_LINK) $(car_OBJECTS) $(car_LDADD) $(LIBS)
+
+mdsum$(EXEEXT): $(mdsum_OBJECTS) $(mdsum_DEPENDENCIES) $(EXTRA_mdsum_DEPENDENCIES) 
+	@rm -f mdsum$(EXEEXT)
+	$(AM_V_CXXLD)$(mdsum_LINK) $(mdsum_OBJECTS) $(mdsum_LDADD) $(LIBS)
+
+pdetach$(EXEEXT): $(pdetach_OBJECTS) $(pdetach_DEPENDENCIES) $(EXTRA_pdetach_DEPENDENCIES) 
+	@rm -f pdetach$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(pdetach_OBJECTS) $(pdetach_LDADD) $(LIBS)
+
+scrub-files$(EXEEXT): $(scrub_files_OBJECTS) $(scrub_files_DEPENDENCIES) $(EXTRA_scrub_files_DEPENDENCIES) 
+	@rm -f scrub-files$(EXEEXT)
+	$(AM_V_CXXLD)$(scrub_files_LINK) $(scrub_files_OBJECTS) $(scrub_files_LDADD) $(LIBS)
+
+sockaddr$(EXEEXT): $(sockaddr_OBJECTS) $(sockaddr_DEPENDENCIES) $(EXTRA_sockaddr_DEPENDENCIES) 
+	@rm -f sockaddr$(EXEEXT)
+	$(AM_V_CXXLD)$(CXXLINK) $(sockaddr_OBJECTS) $(sockaddr_LDADD) $(LIBS)
+
+zerofill$(EXEEXT): $(zerofill_OBJECTS) $(zerofill_DEPENDENCIES) $(EXTRA_zerofill_DEPENDENCIES) 
+	@rm -f zerofill$(EXEEXT)
+	$(AM_V_CXXLD)$(zerofill_LINK) $(zerofill_OBJECTS) $(zerofill_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/args.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/car.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mdsum.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdetach.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scrub.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sockaddr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zerofill.Po@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
+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)
+
+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`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(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
+
+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
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS) $(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:
+
+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."
+	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+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-binPROGRAMS
+
+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:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-man
+
+uninstall-man: uninstall-man1
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+	clean-binPROGRAMS clean-generic clean-libtool 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-binPROGRAMS \
+	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 installdirs \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+	pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+	uninstall-binPROGRAMS uninstall-man uninstall-man1
+
+
+# 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/jni/libucommon/sources/utils/args.1 b/jni/libucommon/sources/utils/args.1
new file mode 100644
index 0000000..a34506e
--- /dev/null
+++ b/jni/libucommon/sources/utils/args.1
@@ -0,0 +1,75 @@
+.\" args - manipulate and output command arguments.
+.\" Copyright (c) 2010 David Sugar <dyfet@gnutelephony.org>
+.\"
+.\" This manual page 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, write to the Free Software
+.\" Foundation, Inc.,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.\"
+.\" This manual page is written especially for Debian GNU/Linux.
+.\"
+.TH args "1" "January 2010" "GNU uCommon" "GNU Telephony"
+.SH NAME
+args \- manipulate and output command arguments.
+.SH SYNOPSIS
+.B args
+.RI [ options ]
+.I args...
+.br
+.SH DESCRIPTION
+This command is used to manipulate and echo command line arguments to
+standard out.  This can include adding quotes around each argument passed
+or a separator, or to output each argument on a separate line.  The program
+source also offers a basic example of how to use shell argument parsing and
+localization in ucommon.
+.SH OPTIONS
+.TP
+.BI \-\-delim= char
+Set a deliminator character, such as ',', to use between each argument when
+outputing arguments.
+.TP
+.B \-\-directory
+If argument is a directory, list directory contents as arguments.
+.TP
+.B \-\-follow
+If argument is a directory and a symlink, follow symlinks recursively.
+.TP
+.B \-\-lines
+Output each argument on a separate line.
+.TP
+.BI \-\-quote= char|pair
+Set a quote or special leading and trailing pair of characters to surround
+each argument with when output.  A typical use might be --quote=() to surround
+arguments in parenthesis.
+.TP
+.B \-\-recursive
+If argument is a directory, recursively scan directory and any subdirectory
+contents as arguments.
+.TP
+.B \-\-reverse
+Reverse order of arguments.
+.TP
+.B \-\-help
+Outputs help screen for the user.
+.SH AUTHOR
+.B args
+was written by David Sugar <dyfet@gnutelephony.org>.
+.SH "REPORTING BUGS"
+Report bugs to bug-commoncpp@gnu.org.
+.SH COPYRIGHT
+Copyright \(co 2009 David Sugar, Tycho Softworks.
+.br
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+
diff --git a/jni/libucommon/sources/utils/args.cpp b/jni/libucommon/sources/utils/args.cpp
new file mode 100644
index 0000000..d5c6065
--- /dev/null
+++ b/jni/libucommon/sources/utils/args.cpp
@@ -0,0 +1,142 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon/ucommon.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+static shell::flagopt helpflag('h',"--help",    _TEXT("display this list"));
+static shell::flagopt althelp('?', NULL, NULL);
+static shell::charopt delim('d',    "--delim", _TEXT("set deliminter between arguments"));
+static shell::flagopt directory('D', "--directory", _TEXT("expand directory into file arguments"));
+static shell::flagopt lines('l',    "--lines", _TEXT("list arguments on separate lines"));
+static shell::stringopt quote('q',  "--quote",  _TEXT("set quote for each argument"), "string", "");
+static shell::flagopt recursive('R', "--recursive", _TEXT("recursive directory scan"));
+static shell::flagopt follow('F', "--follow", _TEXT("follow symlinks"));
+static shell::flagopt rflag('r',    "--reverse", _TEXT("reverse order of arguments"));
+
+static char prefix[80] = {0, 0};
+static char suffix[80] = {0, 0};
+
+static void output(bool middle, const char *arg)
+{
+    if(is(lines))
+        file::cout << prefix << arg << suffix << "\n";
+    else if(middle)
+        file::cout << *delim << prefix << arg << suffix;
+    else
+        file::cout << prefix << arg << suffix;
+}
+
+static void dirpath(bool middle, String path, bool top = true)
+{
+    char filename[128];
+    string_t subdir;
+    dir_t dir(path);
+    unsigned count = 0;
+
+    while(is(dir) && dir.read(filename, sizeof(filename))) {
+        if(*filename == '.')
+            continue;
+
+        ++count;
+        subdir = (String)path + (String)"/" + (String)filename;
+        output(middle, subdir);
+        middle = true;
+
+        if(fsys::is_dir(*subdir)) {
+            if(is(follow) || is(recursive)) {
+                if(!fsys::is_link(*subdir) || is(follow))
+                    dirpath(true, subdir, false);
+            }
+        }
+    }
+    if(top && !count)
+        output(middle, path);
+}
+
+PROGRAM_MAIN(argc, argv)
+{
+    unsigned count = 0;
+    char *ep;
+    bool middle = false;
+
+    shell::bind("args");
+    shell args(argc, argv);
+
+    if(is(helpflag) || is(althelp)) {
+        printf("%s\n", _TEXT("Usage: args [options] arguments..."));
+        printf("%s\n\n", _TEXT("Echo command line arguments"));
+        printf("%s\n", _TEXT("Options:"));
+        shell::help();
+        printf("\n%s\n", _TEXT("Report bugs to dyfet@gnu.org"));
+        PROGRAM_EXIT(0);
+    }
+
+    if(!args())
+        PROGRAM_EXIT(0);
+
+    if(quote[0]) {
+        if(!quote[1]) {
+            prefix[0] = quote[0];
+            suffix[0] = quote[0];
+        }
+        else if(!quote[2]) {
+            prefix[0] = quote[0];
+            suffix[0] = quote[1];
+        }
+        else if(quote[0] == '<') {
+            String::set(prefix, sizeof(prefix), *quote);
+            snprintf(suffix, sizeof(suffix), "</%s", *quote + 1);
+        }
+        else if(quote[0] == '(') {
+            String::set(prefix, sizeof(prefix), quote);
+            ep = strchr((char *)*quote, ')');
+            if(ep)
+                *ep = 0;
+            suffix[0] = ')';
+        }
+        else {
+            String::set(prefix, sizeof(prefix), quote);
+            String::set(suffix, sizeof(suffix), quote);
+        }
+    }
+
+    if(is(rflag)) {
+        count = args();
+        while(count--) {
+            if(fsys::is_dir(args[count]) && (is(directory) || is(recursive) || is(follow)))
+                dirpath(middle, (String)args[count]);
+            else
+                output(middle, args[count]);
+            middle = true;
+        }
+    }
+    else while(count < args()) {
+        if(fsys::is_dir(args[count]) && (is(directory) || is(recursive) || is(follow)))
+            dirpath(middle, (String)args[count++]);
+        else
+            output(middle, (String)args[count++]);
+        middle = true;
+    }
+
+    if(!lines)
+        file::cout << "\n";
+
+    PROGRAM_EXIT(0);
+}
+
diff --git a/jni/libucommon/sources/utils/car.1 b/jni/libucommon/sources/utils/car.1
new file mode 100644
index 0000000..55a3102
--- /dev/null
+++ b/jni/libucommon/sources/utils/car.1
@@ -0,0 +1,78 @@
+.\" car - crytographic archiver
+.\" Copyright (c) 2010 David Sugar <dyfet@gnutelephony.org>
+.\"
+.\" This manual page 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, write to the Free Software
+.\" Foundation, Inc.,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.\"
+.\" This manual page is written especially for Debian GNU/Linux.
+.\"
+.TH car "1" "January 2010" "GNU uCommon" "GNU Telephony"
+.SH NAME
+car \- crytographic archiver.
+.SH SYNOPSIS
+.B car
+.RI [ options ]
+.RI [ paths... ]
+.br
+.B car
+.B \-\-decode
+.RI [ .carfile ]
+.br
+.SH DESCRIPTION
+Creates and decodes portable cross-platform crytographic archives.  An archive
+can be a collection of files, or an in-stream message that is piped.  Output
+can be to a binary .car file, or ascified text.  A symetric cipher is used,
+and the passhrase is hashed to form a key.
+.SH OPTIONS
+.TP
+.BI \-\-cipher= name
+Specify symetric cipher.  By default 256 bit aes is used.
+.TP
+.B \-\-decrypt
+Specify decryption operation on an existing car stream or file.  If no
+file is specified, stdin is used.
+.TP
+.BI \-\-digest= name
+Specify name of digest algorithm.  By default sha will be used.
+.TP
+.B \-\-follow
+Dereference and follow symlinks.  Otherwise they are ignored.
+.TP
+.BI \-\-output= filename
+Specify output file for a new archive.  By default stdout is used.
+.TP
+.B \-\-overwrite
+Always overwrite existing files without prompting.
+.TP
+.B \-\-quiet
+Non-interactive and no status output.
+.TP
+.B \-\-recursive
+If argument is a directory, recursively scan directory and any subdirectory
+contents as arguments.
+.TP
+.B \-\-help
+Outputs help screen for the user.
+.SH AUTHOR
+.B car
+was written by David Sugar <dyfet@gnutelephony.org>.
+.SH "REPORTING BUGS"
+Report bugs to bug-commoncpp@gnu.org.
+.SH COPYRIGHT
+Copyright \(co 2010 David Sugar, Tycho Softworks.
+.br
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
diff --git a/jni/libucommon/sources/utils/car.cpp b/jni/libucommon/sources/utils/car.cpp
new file mode 100644
index 0000000..0a7636d
--- /dev/null
+++ b/jni/libucommon/sources/utils/car.cpp
@@ -0,0 +1,532 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon/secure.h>
+#include <sys/stat.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+static shell::flagopt helpflag('h',"--help",    _TEXT("display this list"));
+static shell::flagopt althelp('?', NULL, NULL);
+static shell::stringopt tag('t', "--tag", _TEXT("tag annotation"), "text", "");
+static shell::stringopt algo('c', "--cipher", _TEXT("cipher method (aes256)"), "method", "aes256");
+static shell::flagopt decode('d', "--decode", _TEXT("decode archive"));
+static shell::stringopt hash('h', "--digest", _TEXT("digest method (sha)"), "method", "sha");
+static shell::flagopt noheader('n', "--no-header", _TEXT("without wrapper"));
+static shell::stringopt out('o', "--output", _TEXT("output file"), "filename", "-");
+static shell::flagopt quiet('q', "--quiet", _TEXT("quiet operation"));
+static shell::flagopt recursive('R', "--recursive", _TEXT("recursive directory scan"));
+static shell::flagopt altrecursive('r', NULL, NULL);
+static shell::flagopt hidden('s', "--hidden", _TEXT("include hidden files"));
+static shell::flagopt yes('y', "--overwrite", _TEXT("overwrite existing files"));
+
+static bool binary = false;
+static int exit_code = 0;
+static const char *argv0 = "car";
+static unsigned char frame[48], cbuf[48];
+static cipher_t cipher;
+static FILE *output = stdout;
+static enum {d_text, d_file, d_scan, d_init} decoder = d_init;
+static unsigned frames;
+
+static void report(const char *path, int code)
+{
+    const char *err = _TEXT("i/o error");
+
+    switch(code) {
+    case EACCES:
+    case EPERM:
+        err = _TEXT("permission denied");
+        break;
+    case EROFS:
+        err = _TEXT("read-only file system");
+        break;
+    case ENODEV:
+    case ENOENT:
+        err = _TEXT("no such file or directory");
+        break;
+    case ENOTDIR:
+        err = _TEXT("not a directory");
+        break;
+    case ENOTEMPTY:
+        err = _TEXT("directory not empty");
+        break;
+    case ENOSPC:
+        err = _TEXT("no space left on device");
+        break;
+    case EBADF:
+    case ENAMETOOLONG:
+        err = _TEXT("bad file path");
+        break;
+    case EBUSY:
+    case EINPROGRESS:
+        err = _TEXT("file or directory busy");
+        break;
+    case EINTR:
+        err = _TEXT("operation interupted");
+        break;
+    case EISDIR:
+        err = _TEXT("is a directory");
+        break;
+#ifdef  ELOOP
+    case ELOOP:
+        err = _TEXT("too many sym links");
+        break;
+#endif
+    }
+
+    if(path)
+        shell::printf("%s: %s: %s\n", argv0, path, err);
+    else
+        shell::errexit(1, "*** %s: %s\n", argv0, err);
+
+    exit_code = 1;
+}
+
+static bool encode(const char *path, FILE *fp, size_t offset = 0)
+{
+    memset(frame, 0, sizeof(frame));
+
+    size_t count = fread(frame + offset, 1, sizeof(frame) - offset, fp);
+    char buffer[128];
+
+    if(ferror(fp)) {
+        report(path, errno);
+        return false;
+    }
+
+    if(count)
+        count += offset;
+
+    // add padd value for last frame...
+    if(count < sizeof(frame))
+        frame[sizeof(frame) - 1] = (char)(count - offset);
+
+    // cipher it...
+    size_t encoded = cipher.put(frame, sizeof(frame));
+    if(encoded != sizeof(frame)) {
+        report(path, EINTR);
+        return false;
+    }
+
+    if(binary)
+        fwrite(cbuf, sizeof(cbuf), 1, output);
+    else {
+        String::b64encode(buffer, cbuf, 48);
+        fprintf(output, "%s\n", buffer);
+    }
+
+    // return status
+    if(count == sizeof(frame))
+        return true;
+
+    return false;
+}
+
+static void encodestream(void)
+{
+
+    size_t offset = 6;
+
+    if(fsys::is_tty(shell::input()))
+        fputs("car: type your message\n", stderr);
+
+    memset(frame, 0, sizeof(frame));
+
+    for(;;) {
+        if(!encode("-", stdin, offset))
+            break;
+        offset = 0;
+    }
+
+    if(!binary && !is(noheader))
+        fprintf(output, "-----END CAR STREAM-----\n");
+}
+
+static void header(void)
+{
+    binary = true;
+
+    memset(frame, 0, sizeof(frame));
+    String::set((char *)frame, 6, ".car");
+    frame[5] = 1;
+    frame[4] = 0xff;
+    String::set((char *)frame + 6, sizeof(frame) - 6, *tag);
+    fwrite(frame, sizeof(frame), 1, output);
+}
+
+static void encodefile(const char *path, const char *name)
+{
+    char buffer[128];
+
+    fsys::fileinfo_t ino;
+
+    fsys::info(path, &ino);
+
+    FILE *fp = fopen(path, "r");
+    if(!fp) {
+        report(name, errno);
+        return;
+    }
+
+    lsb_setlong(frame, ino.st_size);
+    frame[4] = 1;
+    frame[5] = 0;
+    String::set((char *)(frame + 6), sizeof(frame) - 6, name);
+
+    cipher.put(frame, sizeof(frame));
+
+    if(binary)
+        fwrite(cbuf, sizeof(cbuf), 1, output);
+    else {
+        String::b64encode(buffer, cbuf, 48);
+        fprintf(output, "%s\n", buffer);
+    }
+
+    for(;;) {
+        if(!encode(name, fp))
+            break;
+    }
+}
+
+static void final(void)
+{
+    size_t size;
+
+    switch(decoder) {
+    case d_init:
+        return;
+    case d_scan:
+        cipher.put(frame, sizeof(frame));
+        if(cbuf[4] > 0)
+            return;
+        size = cbuf[sizeof(frame) - 1];
+        if(size)
+            fwrite(cbuf + 6, size, 1, output);
+        break;
+    default:
+        decoder = d_scan;
+        cipher.put(frame, sizeof(frame));
+        size = cbuf[sizeof(frame) - 1];
+        if(size)
+            fwrite(cbuf, size, 1, output);
+    }
+}
+
+static void process(void)
+{
+    string_t path;
+    int key;
+    char *cp;
+
+    switch(decoder) {
+    case d_init:
+        decoder = d_scan;
+        return;
+    case d_scan:
+        cipher.put(frame, sizeof(frame));
+        if(cbuf[4] == 0xff) // header...
+            break;
+        if(!cbuf[4]) {      // if message
+            fwrite(cbuf + 6, sizeof(frame) - 6, 1, output);
+            decoder = d_text;
+            break;
+        }
+        decoder = d_file;
+        frames = lsb_getlong(cbuf) / sizeof(frame);
+        path = str((char *)(cbuf + 6));
+        cp = strrchr((char *)(cbuf + 6), '/');
+        if(cp) {
+            *cp = 0;
+            dir::create((char *)(cbuf + 6), 0640);
+        }
+        if(fsys::is_dir(*path))
+            shell::errexit(8, "*** %s: %s: %s\n",
+                argv0, *path, _TEXT("output is directory"));
+
+        if(fsys::is_file(*path) && !is(yes)) {
+            string_t prompt = str("overwrite ") + path + " <y/n>? ";
+            if(is(quiet))
+                key = 0;
+            else
+                key = shell::inkey(prompt);
+            switch(key)
+            {
+            case 'y':
+            case 'Y':
+                printf("y\n");
+                break;
+            default:
+                printf("n\n");
+            case 0:
+                shell::errexit(8, "*** %s: %s: %s\n",
+                    argv0, *path, _TEXT("will not overwrite"));
+            }
+        }
+
+        output = fopen(*path, "w");
+        if(!output)
+            shell::errexit(8, "*** %s: %s: %s\n",
+                argv0, *path, _TEXT("cannot create"));
+        if(!is(quiet))
+            printf("decoding %s...\n", *path);
+        break;
+    case d_file:
+        if(!frames) {
+            final();
+            break;
+        }
+        --frames;
+    default:
+        cipher.put(frame, sizeof(frame));
+        fwrite(cbuf, sizeof(frame), 1, output);
+    }
+}
+
+static void binarydecode(FILE *fp, const char *path)
+{
+    char buffer[48];
+
+    memset(frame, 0, sizeof(frame));
+    memset(buffer, 0, sizeof(buffer));
+    if(fread(frame, sizeof(frame), 1, fp) < 1)
+        shell::errexit(6, "*** %s: %s: %s\n",
+            argv0, path, _TEXT("cannot read archive"));
+
+    if(!eq((char *)frame, ".car", 4) || (frame[4] != 0xff))
+        shell::errexit(6, "*** %s: %s: %s\n",
+            argv0, path, _TEXT("not a cryptographic archive"));
+
+    for(;;) {
+        if(feof(fp)) {
+            final();
+            return;
+        }
+
+        if(ferror(fp)) {
+            exit_code = errno;
+            report(path, exit_code);
+            return;
+        }
+
+        if(fread(buffer, sizeof(buffer), 1, fp) < 1)
+            continue;
+        process();
+        memcpy(frame, buffer, sizeof(frame));
+    }
+}
+
+static void streamdecode(FILE *fp, const char *path)
+{
+    char buffer[128];
+    for(;;) {
+        if(NULL == fgets(buffer, sizeof(buffer), fp) || feof(fp)) {
+            shell::errexit(5, "*** %s: %s: %s\n",
+                argv0, path, _TEXT("no archive found"));
+        }
+        if(ferror(fp)) {
+            exit_code = errno;
+            report(path, exit_code);
+            return;
+        }
+        if(eq("-----BEGIN CAR STREAM-----\n", buffer))
+            break;
+    }
+    for(;;) {
+        if(feof(fp)) {
+            final();
+            return;
+        }
+
+        if(ferror(fp)) {
+            exit_code = errno;
+            report(path, exit_code);
+            return;
+        }
+
+        if(fgets(buffer, sizeof(buffer), fp) == NULL)
+            continue;
+
+        if(eq("-----END CAR STREAM-----\n", buffer)) {
+            final();
+            return;
+        }
+
+        // ignore extra headers...
+        if(strstr(buffer, ": "))
+            continue;
+
+        process();
+        unsigned len = String::b64decode(frame, buffer, 48);
+        if(len < 48) {
+            report(path, EINTR);
+            return;
+        }
+    }
+}
+
+static void scan(string_t path, string_t prefix)
+{
+    char filename[128];
+    string_t filepath;
+    string_t name;
+    string_t subdir;
+    dir_t dir(path);
+
+    while(is(dir) && dir.read(filename, sizeof(filename))) {
+        if(*filename == '.' && (filename[1] == '.' || !filename[1]))
+            continue;
+
+        if(*filename == '.' && !is(hidden))
+            continue;
+
+        filepath = str(path) + str("/") + str(filename);
+        if(prefix[0])
+            name ^= prefix + str("/") + str(filename);
+        else
+            name ^= str(filename);
+
+        if(fsys::is_dir(filepath)) {
+            if(is(recursive) || is(altrecursive))
+                scan(filepath, name);
+            else
+                report(*filepath, EISDIR);
+        }
+        else
+            encodefile(*filepath, *name);
+    }
+}
+
+PROGRAM_MAIN(argc, argv)
+{
+    shell::bind("car");
+    shell args(argc, argv);
+    argv0 = args.argv0();
+    unsigned count = 0;
+    char passphrase[256];
+    char confirm[256];
+    const char *ext;
+
+    argv0 = args.argv0();
+
+    if(is(helpflag) || is(althelp)) {
+        printf("%s\n", _TEXT("Usage: car [options] path..."));
+        printf("%s\n\n", _TEXT("Crytographic archiver"));
+        printf("%s\n", _TEXT("Options:"));
+        shell::help();
+        printf("\n%s\n", _TEXT("Report bugs to dyfet@gnu.org"));
+        PROGRAM_EXIT(0);
+    }
+
+    if(!secure::init())
+        shell::errexit(1, "*** %s: %s\n", argv0, _TEXT("not supported"));
+
+    if(!Digest::has(*hash))
+        shell::errexit(2, "*** %s: %s: %s\n",
+            argv0, *hash, _TEXT("unkown or unsupported digest method"));
+
+    if(!Cipher::has(*algo))
+        shell::errexit(2, "*** %s: %s: %s\n",
+            argv0, *algo, _TEXT("unknown or unsupported cipher method"));
+
+    shell::getpass("passphrase: ", passphrase, sizeof(passphrase));
+    shell::getpass("confirm: ", confirm, sizeof(confirm));
+
+    if(!eq(passphrase, confirm))
+        shell::errexit(3, "*** %s: %s\n",
+            argv0, _TEXT("passphrase does not match confirmation"));
+
+    // set key and cleanup buffers...
+    skey_t key(*algo, *hash, passphrase);
+    memset(passphrase, 0, sizeof(passphrase));
+    memset(confirm, 0, sizeof(confirm));
+    memset(cbuf, 0, sizeof(cbuf));
+
+    if(is(decode))
+        cipher.set(&key, Cipher::DECRYPT, cbuf, sizeof(cbuf));
+    else
+        cipher.set(&key, Cipher::ENCRYPT, cbuf, sizeof(cbuf));
+
+    if(is(decode) && !args()) {
+        streamdecode(stdin, "-");
+        goto end;
+    }
+
+    if(is(decode) && args() > 1)
+        shell::errexit(3, "*** %s: %s\n", argv0, _TEXT("specify only one file for decoder"));
+
+    if(is(decode)) {
+        FILE *fp = fopen(args[0], "r");
+        if(!fp)
+            shell::errexit(7, "*** %s: %s: %s\n",
+                argv0, args[0], _TEXT("cannot open or access"));
+
+        const char *ext = strrchr(args[0], '.');
+        if(eq_case(ext, ".car"))
+            binarydecode(fp, args[0]);
+        else
+            streamdecode(fp, args[0]);
+        goto end;
+    }
+
+    if(!eq(*out, "-")) {
+        output = fopen(*out, "w");
+        if(!output) {
+            shell::errexit(4, "*** %s: %s: %s\n",
+                argv0, *out, _TEXT("cannot create"));
+        }
+    }
+
+    // if we are outputting to a car file, do it in binary
+    ext = strrchr(*out, '.');
+    if(eq_case(ext, ".car"))
+        header();
+
+    if(!binary && !is(noheader)) {
+        fprintf(output, "-----BEGIN CAR STREAM-----\n");
+        if(tag)
+            fprintf(output, "Tag: %s\n", *tag);
+    }
+
+    if(!args()) {
+        encodestream();
+        goto end;
+    }
+
+    while(count < args()) {
+        if(fsys::is_dir(args[count]))
+            scan(str(args[count++]), "");
+        else {
+            const char *cp = args[count++];
+            const char *ep = strrchr(cp, '/');
+            if(!ep)
+                ep = strrchr(cp, '\\');
+            if(ep)
+                ++ep;
+            else
+                ep = cp;
+            encodefile(cp, ep);
+        }
+    }
+
+    if(!binary && !is(noheader))
+        fprintf(output, "-----END CAR STREAM-----\n");
+
+end:
+    PROGRAM_EXIT(exit_code);
+}
+
diff --git a/jni/libucommon/sources/utils/mdsum.1 b/jni/libucommon/sources/utils/mdsum.1
new file mode 100644
index 0000000..9d3f319
--- /dev/null
+++ b/jni/libucommon/sources/utils/mdsum.1
@@ -0,0 +1,60 @@
+.\" mdsum - compute file digests using any supported algorithms.
+.\" Copyright (c) 2010 David Sugar <dyfet@gnutelephony.org>
+.\"
+.\" This manual page 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, write to the Free Software
+.\" Foundation, Inc.,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.\"
+.\" This manual page is written especially for Debian GNU/Linux.
+.\"
+.TH mdsum "1" "January 2010" "GNU uCommon" "GNU Telephony"
+.SH NAME
+mdsum \- compute file digests using any supported algorithms.
+.SH SYNOPSIS
+.B mdsum
+.RI [ options ]
+.RI [ paths... ]
+.br
+.SH DESCRIPTION
+This command computes a message digest for one or more specified files.  If
+no files are specified, then stdin can be used.  Any digest algorithm
+available in libusecure may be selected and used.  Entire directory trees
+may also be examined and computed using the -R (--recursive) option.
+.SH OPTIONS
+.TP
+.BI \-\-digest= name
+Specify name of digest algorithm.  By default md5 will be used, unless the
+command is executed through a symlink which happens to match an algorithm
+name.
+.TP
+.B \-\-follow
+Dereference and follow symlinks.  Otherwise they are ignored.
+.TP
+.B \-\-recursive
+If argument is a directory, recursively scan directory and any subdirectory
+contents as arguments.
+.TP
+.B \-\-help
+Outputs help screen for the user.
+.SH AUTHOR
+.B mdsum
+was written by David Sugar <dyfet@gnutelephony.org>.
+.SH "REPORTING BUGS"
+Report bugs to bug-commoncpp@gnu.org.
+.SH COPYRIGHT
+Copyright \(co 2010 David Sugar, Tycho Softworks.
+.br
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
diff --git a/jni/libucommon/sources/utils/mdsum.cpp b/jni/libucommon/sources/utils/mdsum.cpp
new file mode 100644
index 0000000..6973433
--- /dev/null
+++ b/jni/libucommon/sources/utils/mdsum.cpp
@@ -0,0 +1,201 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon/secure.h>
+#include <sys/stat.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+static shell::flagopt helpflag('h',"--help",    _TEXT("display this list"));
+static shell::flagopt althelp('?', NULL, NULL);
+static shell::stringopt hash('d', "--digest", _TEXT("digest method (md5)"), "method", "md5");
+static shell::flagopt recursive('R', "--recursive", _TEXT("recursive directory scan"));
+static shell::flagopt altrecursive('r', NULL, NULL);
+static shell::flagopt hidden('s', "--hidden", _TEXT("show hidden files"));
+
+static int exit_code = 0;
+static const char *argv0 = "md";
+static digest_t md;
+
+static void result(const char *path, int code)
+{
+    const char *err = _TEXT("i/o error");
+
+    switch(code) {
+    case EACCES:
+    case EPERM:
+        err = _TEXT("permission denied");
+        break;
+    case EROFS:
+        err = _TEXT("read-only file system");
+        break;
+    case ENODEV:
+    case ENOENT:
+        err = _TEXT("no such file or directory");
+        break;
+    case ENOTDIR:
+        err = _TEXT("not a directory");
+        break;
+    case ENOTEMPTY:
+        err = _TEXT("directory not empty");
+        break;
+    case ENOSPC:
+        err = _TEXT("no space left on device");
+        break;
+    case EBADF:
+    case ENAMETOOLONG:
+        err = _TEXT("bad file path");
+        break;
+    case EBUSY:
+    case EINPROGRESS:
+        err = _TEXT("file or directory busy");
+        break;
+    case EINTR:
+        err = _TEXT("operation interupted");
+        break;
+    case EISDIR:
+        err = _TEXT("is a directory");
+        break;
+#ifdef  ELOOP
+    case ELOOP:
+        err = _TEXT("too many sym links");
+        break;
+#endif
+    }
+
+    if(!code) {
+        if(!path)
+            path="-";
+        shell::printf("%s %s\n", *md, path);
+        return;
+    }
+
+    if(path)
+        shell::printf("%s: %s: %s\n", argv0, path, err);
+    else
+        shell::errexit(1, "*** %s: %s\n", argv0, err);
+
+    exit_code = 1;
+}
+
+static void digest(const char *path = NULL)
+{
+    fsys_t fs;
+    fsys::fileinfo_t ino;
+    unsigned char buffer[1024];
+
+    if(path) {
+        int err = fsys::info(path, &ino);
+
+        if(err) {
+            result(path, err);
+            return;
+        }
+
+        if(fsys::is_sys(&ino)) {
+            result(path, EBADF);
+            return;
+        }
+
+        fs.open(path, fsys::STREAM);
+    }
+    else
+        fs.assign(shell::input());
+
+    if(!is(fs)) {
+        result(path, fs.err());
+        return;
+    }
+
+    for(;;) {
+        ssize_t size = fs.read(buffer, sizeof(buffer));
+        if(size < 1)
+            break;
+        md.put(buffer, size);
+    }
+
+    fs.close();
+    result(path, fs.err());
+    md.reset();
+}
+
+static void scan(String path, bool top = true)
+{
+    char filename[128];
+    string_t filepath;
+    dir_t dir(path);
+
+    while(is(dir) && dir.read(filename, sizeof(filename))) {
+        if(*filename == '.' && (filename[1] == '.' || !filename[1]))
+            continue;
+
+        if(*filename == '.' && !is(hidden))
+            continue;
+
+        filepath = str(path) + str("/") + str(filename);
+        if(fsys::is_dir(filepath)) {
+            if(is(recursive) || is(altrecursive))
+                scan(filepath, false);
+            else
+                result(filepath, EISDIR);
+        }
+        else
+            digest(filepath);
+    }
+}
+
+PROGRAM_MAIN(argc, argv)
+{
+    shell::bind("mdsum");
+    shell args(argc, argv);
+    argv0 = args.argv0();
+    unsigned count = 0;
+
+    argv0 = args.argv0();
+
+    if(is(helpflag) || is(althelp)) {
+        printf("%s\n", _TEXT("Usage: mdsum [options] path..."));
+        printf("%s\n\n", _TEXT("Compute digests for files"));
+        printf("%s\n", _TEXT("Options:"));
+        shell::help();
+        printf("\n%s\n", _TEXT("Report bugs to dyfet@gnu.org"));
+        PROGRAM_EXIT(0);
+    }
+
+    secure::init();
+    if(!Digest::has(*hash))
+        shell::errexit(2, "*** %s: %s: %s\n",
+            argv0, *hash, _TEXT("unkown or unsupported digest method"));
+
+    md = *hash;
+
+    // we can symlink md as md5, etc, to set alternate default digest names
+    if(!is(hash) && Digest::has(argv0))
+        md = argv0;
+
+    if(!args())
+        digest();
+    else while(count < args()) {
+        if(fsys::is_dir(args[count]))
+            scan(str(args[count++]));
+        else
+            digest(args[count++]);
+    }
+
+    PROGRAM_EXIT(exit_code);
+}
+
diff --git a/jni/libucommon/sources/utils/pdetach.1 b/jni/libucommon/sources/utils/pdetach.1
new file mode 100644
index 0000000..7eb5ca0
--- /dev/null
+++ b/jni/libucommon/sources/utils/pdetach.1
@@ -0,0 +1,56 @@
+.\" pdetach - execute detached processes.
+.\" Copyright (c) 2010 David Sugar <dyfet@gnutelephony.org>
+.\"
+.\" This manual page 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, write to the Free Software
+.\" Foundation, Inc.,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.\"
+.\" This manual page is written especially for Debian GNU/Linux.
+.\"
+.TH args "1" "January 2010" "GNU uCommon" "GNU Telephony"
+.SH NAME
+pdetach \- execute detached processes
+.SH SYNOPSIS
+.B args
+.RI [ stdio options ]
+.B command
+.RI [ args... ]
+.br
+.SH DESCRIPTION
+This command is used to execute processes that are fully detached from the
+shell and the user's controlling terminal.  Detached processes will not exit
+if the user logs out.  The stdio options can be manipulated to attach the
+process to another device or file.
+.SH OPTIONS
+.TP
+.BI \-\-error= path
+Set stderr for the detached process.
+.TP
+.BI \-\-input= path
+Set stdin for the detached process.
+.TP
+.BI \-\-output= path
+Set stdout for the detached process.
+.SH AUTHOR
+.B pdetach
+was written by David Sugar <dyfet@gnutelephony.org>.
+.SH "REPORTING BUGS"
+Report bugs to bug-commoncpp@gnu.org.
+.SH COPYRIGHT
+Copyright \(co 2009 David Sugar, Tycho Softworks.
+.br
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+
diff --git a/jni/libucommon/sources/utils/pdetach.cpp b/jni/libucommon/sources/utils/pdetach.cpp
new file mode 100644
index 0000000..eb414ad
--- /dev/null
+++ b/jni/libucommon/sources/utils/pdetach.cpp
@@ -0,0 +1,78 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon/ucommon.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+static shell::flagopt helpflag('h',"--help",    _TEXT("display this list"));
+static shell::flagopt althelp('?', NULL, NULL);
+static shell::stringopt error('e', "--error", _TEXT("stderr path to use"), "filename");
+static shell::stringopt input('i', "--input", _TEXT("stdin path to use"), "filename");
+static shell::stringopt output('o', "--output", _TEXT("stdout path to use"), "filename");
+
+PROGRAM_MAIN(argc, argv)
+{
+    fd_t stdio[3] = {INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE, INVALID_HANDLE_VALUE};
+    const char *argv0;
+
+    shell::bind("pdetach");
+    shell args(argc, argv);
+
+    if(is(helpflag) || is(althelp)) {
+        printf("%s\n", _TEXT("Usage: pdetach [stdio options] command [arguments...]"));
+        printf("%s\n\n", _TEXT("Create detached process"));
+        printf("%s\n", _TEXT("Options:"));
+        shell::help();
+        printf("\n%s\n", _TEXT("Report bugs to dyfet@gnu.org"));
+        PROGRAM_EXIT(0);
+    }
+
+    if(!args())
+        shell::errexit(10, "*** pdetach %s", _TEXT("no command specified"));
+
+    argv = args.argv();
+    argv0 = *argv;
+
+    if(is(input)) {
+        stdio[0] = fsys::input(*input);
+        if(stdio[0] == INVALID_HANDLE_VALUE)
+            shell::errexit(1, "*** pdetach: %s: %s",
+                _TEXT("cannot access"), *input);
+    }
+
+    if(is(output)) {
+        stdio[1] = fsys::output(*output);
+        if(stdio[1] == INVALID_HANDLE_VALUE)
+            shell::errexit(2, "*** pdetach: %s: %s",
+                _TEXT("cannot access"), *output);
+    }
+
+    if(is(error)) {
+        stdio[2] = fsys::output(*error);
+        if(stdio[2] == INVALID_HANDLE_VALUE)
+            shell::errexit(3, "*** pdetach: %s: %s",
+                _TEXT("cannot access"), *error);
+    }
+
+    if(shell::detach(argv0, argv, NULL, stdio))
+        shell::errexit(-1, "*** pdetach: %s: %s",
+            argv0, _TEXT("failed to execute"));
+
+    PROGRAM_EXIT(0);
+}
+
diff --git a/jni/libucommon/sources/utils/scrub-files.1 b/jni/libucommon/sources/utils/scrub-files.1
new file mode 100644
index 0000000..6a02405
--- /dev/null
+++ b/jni/libucommon/sources/utils/scrub-files.1
@@ -0,0 +1,78 @@
+.\" scrub-files - securely erase files by filling with random data first.
+.\" Copyright (c) 2010 David Sugar <dyfet@gnutelephony.org>
+.\"
+.\" This manual page 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, write to the Free Software
+.\" Foundation, Inc.,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.\"
+.\" This manual page is written especially for Debian GNU/Linux.
+.\"
+.TH scrub-files "1" "January 2010" "GNU uCommon" "GNU Telephony"
+.SH NAME
+scrub\-files \- securely erase files by filling with random data first.
+.SH SYNOPSIS
+.B scrub
+.RI [ options ]
+.I paths...
+.br
+.SH DESCRIPTION
+This command is used to securely erase files.  This is accomplished by
+filling the file with random data in pre-sized chunks.  Multiple passes
+of random data may also be used.  The pre-sized chunks are used to remove
+information about exact original file size.  Other options include random
+renaming of the original file before deletion and the use of truncation to
+break down meta-data on what blocks in the file system were originally
+associated with a securely deleted file.  This is specifically intended to
+make it harder to perform forensic analysis on securely erased files.
+.SH OPTIONS
+.TP
+.BI \-\-blocksize " size"
+Set the default block size (in 1 k increments) for scrub\-files to use when
+writing random data.  This effects both the final file length, which will
+be aligned to the specified size, and the way the truncate option decomposes
+files.  The default is 1k.
+.TP
+.B \-\-follow
+Dereference and follow symlinks, erasing the target file.
+.TP
+.BI \-\-passes= count
+The number of passes used when writing random data.  The default is 1 pass.
+.TP
+.B \-\-recursive
+If argument is a directory, recursively scan directory and any subdirectory
+contents as arguments.
+.TP
+.B \-\-rename
+Rename the file randomly before deletion to clear persistant inode data.
+.TP
+.B \-\-truncate
+Decompose the file through truncation to break down file system page maps.
+.TP
+.B \-\-verbose
+Display each file being processed to the console.
+.TP
+\fB--help\fR
+Outputs help screen for the user.
+.SH AUTHOR
+.B scrub\-files
+was written by David Sugar <dyfet@gnutelephony.org>.
+.SH "REPORTING BUGS"
+Report bugs to bug-commoncpp@gnu.org.
+.SH COPYRIGHT
+Copyright \(co 2010 David Sugar, Tycho Softworks.
+.br
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+
diff --git a/jni/libucommon/sources/utils/scrub.cpp b/jni/libucommon/sources/utils/scrub.cpp
new file mode 100644
index 0000000..49e245f
--- /dev/null
+++ b/jni/libucommon/sources/utils/scrub.cpp
@@ -0,0 +1,262 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon/secure.h>
+#include <sys/stat.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+static shell::flagopt helpflag('h',"--help",    _TEXT("display this list"));
+static shell::flagopt althelp('?', NULL, NULL);
+static shell::numericopt blocks('b', "--blocksize", _TEXT("size of i/o blocks in k (1-x)"), "size k", 1);
+static shell::flagopt follow('F', "--follow", _TEXT("follow symlinks"));
+static shell::numericopt passes('p', "--passes", _TEXT("passes with randomized data (0-x)"), "count", 1);
+static shell::flagopt renamefile('n', "--rename", _TEXT("rename file randomly"));
+static shell::flagopt recursive('R', "--recursive", _TEXT("recursive directory scan"));
+static shell::flagopt altrecursive('r', NULL, NULL);
+static shell::flagopt truncflag('t', "--truncate", _TEXT("decompose file by truncation"));
+static shell::flagopt verbose('v', "--verbose", _TEXT("show active status"));
+
+static int exit_code = 0;
+static const char *argv0 = "scrub";
+
+static void report(const char *path, int code)
+{
+    const char *err = _TEXT("i/o error");
+
+    switch(code) {
+    case EACCES:
+    case EPERM:
+        err = _TEXT("permission denied");
+        break;
+    case EROFS:
+        err = _TEXT("read-only file system");
+        break;
+    case ENODEV:
+    case ENOENT:
+        err = _TEXT("no such file or directory");
+        break;
+    case ENOTDIR:
+        err = _TEXT("not a directory");
+        break;
+    case ENOTEMPTY:
+        err = _TEXT("directory not empty");
+        break;
+    case ENOSPC:
+        err = _TEXT("no space left on device");
+        break;
+    case EBADF:
+    case ENAMETOOLONG:
+        err = _TEXT("bad file path");
+        break;
+    case EBUSY:
+    case EINPROGRESS:
+        err = _TEXT("file or directory busy");
+        break;
+    case EINTR:
+        err = _TEXT("operation interupted");
+        break;
+#ifdef  ELOOP
+    case ELOOP:
+        err = _TEXT("too many sym links");
+        break;
+#endif
+    }
+
+    if(!code) {
+        if(is(verbose))
+            shell::printf("%s\n", _TEXT(" removed"));
+        return;
+    }
+
+    if(is(verbose))
+        shell::printf(" - %s\n", err);
+    else
+        shell::errexit(1, "*** %s: %s: %s\n", argv0, path, err);
+
+    exit_code = 1;
+}
+
+static void scrub(const char *path)
+{
+    fsys_t fs;
+    fsys::fileinfo_t ino;
+    unsigned char block[1024];
+    unsigned long count;
+    fsys::offset_t pos = 0l;
+    unsigned dots = 0;
+    unsigned pass = 0;
+
+    if(is(verbose))
+        shell::printf("%s", path);
+
+    int err = fsys::info(path, &ino);
+
+    if(err == ENOENT || fsys::is_link(path)) {
+        report(path, fsys::unlink(path));
+        return;
+    }
+
+    if(fsys::is_dir(&ino)) {
+        report(path, dir::remove(path));
+        return;
+    }
+
+    if(err == ENOENT || !ino.st_size || fsys::is_sys(&ino) || fsys::is_dev(&ino)) {
+        report(path, fsys::erase(path));
+        return;
+    }
+
+    count = (ino.st_size + 1023l) / 1024;
+    count /= (fsys::offset_t)(*blocks);
+    count *= (fsys::offset_t)(*blocks);
+
+    fs.open(path, fsys::REWRITE);
+    if(!is(fs)) {
+        report(path, fs.err());
+        return;
+    }
+
+    while(count--) {
+        while(++dots > 16384) {
+            dots = 0;
+            if(is(verbose))
+                shell::printf(".");
+        }
+        pass = 0;
+
+repeat:
+        fs.seek(pos);
+        if(fs.err()) {
+            report(path, fs.err());
+            fs.close();
+            return;
+        }
+        if(pass < (unsigned)(*passes)) {
+            Random::fill(block, 1024);
+            fs.write(block, 1024);
+            if(fs.err()) {
+                report(path, fs.err());
+                fs.close();
+                return;
+            }
+            if(++pass < (unsigned)(*passes))
+                goto repeat;
+        }
+
+        // we followup with a zero fill always as it is friendly for many
+        // virtual machine image formats which can later re-pack unused disk
+        // space, and if no random passes are specified, we at least do this.
+
+        if(pass)
+            fs.seek(pos);
+
+        memset(block, 0, sizeof(block));
+        fs.write(block, 1024);
+        if(fs.err()) {
+            report(path, fs.err());
+            fs.close();
+            return;
+        }
+
+        pos += 1024l;
+    }
+
+    while(is(truncflag) && pos > 0l) {
+        pos -= 1024l * (fsys::offset_t)*blocks;
+        fs.trunc(pos);
+        if(fs.err()) {
+            report(path, fs.err());
+            fs.close();
+            return;
+        }
+    }
+
+    report(path, dir::remove(path));
+
+    fs.close();
+
+}
+
+static void scan(String path, bool top = true)
+{
+    char filename[128];
+    String filepath;
+    dir_t dir(path);
+
+    while(is(dir) && dir.read(filename, sizeof(filename))) {
+        if(*filename == '.' && (filename[1] == '.' || !filename[1]))
+            continue;
+
+        filepath = str(path) + str("/") + str(filename);
+        if(fsys::is_dir(filepath)) {
+            if(is(follow) || is(recursive) || is(altrecursive)) {
+                if(fsys::is_link(filepath) && !is(follow))
+                    scrub(filepath);
+                else
+                    scan(filepath, false);
+            }
+            else
+                scrub(filepath);
+        }
+        else
+            scrub(filepath);
+    }
+    scrub(path);
+}
+
+PROGRAM_MAIN(argc, argv)
+{
+    shell::bind("scrub");
+    shell args(argc, argv);
+    argv0 = args.argv0();
+    unsigned count = 0;
+
+    if(*blocks < 1)
+        shell::errexit(2, "*** %s: blocksize: %ld: %s\n",
+            argv0, *blocks, _TEXT("must be greater than zero"));
+
+    if(*passes < 0)
+        shell::errexit(2, "*** %s: passes: %ld: %s\n",
+            argv0, *passes, _TEXT("negative passes invalid"));
+
+    argv0 = args.argv0();
+
+    if(is(helpflag) || is(althelp)) {
+        printf("%s\n", _TEXT("Usage: scrub [options] path..."));
+        printf("%s\n\n", _TEXT("Securely erase files"));
+        printf("%s\n", _TEXT("Options:"));
+        shell::help();
+        printf("\n%s\n", _TEXT("Report bugs to dyfet@gnu.org"));
+        PROGRAM_EXIT(0);
+    }
+
+    if(!args())
+        PROGRAM_EXIT(0);
+
+    secure::init();
+
+    while(count < args()) {
+        if(fsys::is_dir(args[count]))
+            scan(str(args[count++]));
+        else
+            scrub(args[count++]);
+    }
+
+    PROGRAM_EXIT(exit_code);
+}
+
diff --git a/jni/libucommon/sources/utils/sockaddr.1 b/jni/libucommon/sources/utils/sockaddr.1
new file mode 100644
index 0000000..c6fac07
--- /dev/null
+++ b/jni/libucommon/sources/utils/sockaddr.1
@@ -0,0 +1,53 @@
+.\" sockaddr - list address resolution.
+.\" Copyright (c) 2010 David Sugar <dyfet@gnutelephony.org>
+.\"
+.\" This manual page 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, write to the Free Software
+.\" Foundation, Inc.,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.\"
+.\" This manual page is written especially for Debian GNU/Linux.
+.\"
+.TH sockaddr "1" "January 2010" "GNU uCommon" "GNU Telephony"
+.SH NAME
+sockaddr \- list address resolution.
+.SH SYNOPSIS
+.B sockaddr
+.RI [ options ]
+.I host
+.I service
+.br
+.SH DESCRIPTION
+This command lists out the resolved (lookup) addresses for a given host
+and service name combination.  If multiple addresses are returned by
+the resolver, each valid address is listed.  Services can be specified by
+name or port number.
+.SH OPTIONS
+.TP
+.B \-\-udp
+Lookup a udp service.
+.TP
+.B \-\-help
+Outputs help screen for the user.
+.SH AUTHOR
+.B sockaddr
+was written by David Sugar <dyfet@gnutelephony.org>.
+.SH "REPORTING BUGS"
+Report bugs to bug-commoncpp@gnu.org.
+.SH COPYRIGHT
+Copyright \(co 2009 David Sugar, Tycho Softworks.
+.br
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+
diff --git a/jni/libucommon/sources/utils/sockaddr.cpp b/jni/libucommon/sources/utils/sockaddr.cpp
new file mode 100644
index 0000000..57a1e73
--- /dev/null
+++ b/jni/libucommon/sources/utils/sockaddr.cpp
@@ -0,0 +1,83 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon/ucommon.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+static shell::flagopt helpflag('h',"--help",    _TEXT("display this list"));
+static shell::flagopt althelp('?', NULL, NULL);
+static shell::flagopt udp('u', "--udp", _TEXT("lookup udp service"));
+
+PROGRAM_MAIN(argc, argv)
+{
+    unsigned type = SOCK_STREAM;
+    unsigned port;
+    char buffer[256];
+
+    shell::bind("sockaddr");
+    shell args(argc, argv);
+
+    if(is(helpflag) || is(althelp)) {
+        printf("%s\n", _TEXT("Usage: sockaddr [options] arguments..."));
+        printf("%s\n\n", _TEXT("Echo command line arguments"));
+        printf("%s\n", _TEXT("Options:"));
+        shell::help();
+        printf("\n%s\n", _TEXT("Report bugs to dyfet@gnu.org"));
+        PROGRAM_EXIT(0);
+    }
+
+    const char *host = args[0];
+    const char *service = args[1];
+
+    if(!host || !service)
+        shell::errexit(1, "use: sockaddr [options] host service\n");
+
+    if(udp)
+        type = SOCK_DGRAM;
+
+    Socket::address addr(host, service, type);
+    linked_pointer<struct sockaddr> ap = addr;
+
+    if(!is(ap))
+        shell::errexit(2, "*** sockaddr: %s/%s: %s\n",
+            host, service, _TEXT("could not find"));
+
+    while(is(ap)) {
+        port = 0;
+        switch(ap->sa_family) {
+        case AF_INET:
+            port = ntohs(ap.in()->sin_port);
+            break;
+#ifdef  AF_INET6
+        case AF_INET6:
+            port = ntohs(ap.in6()->sin6_port);
+            break;
+#endif
+        }
+
+        if(port) {
+            Socket::query(*ap, buffer, sizeof(buffer));
+            printf("%s/%u\n", buffer, port);
+        }
+
+        ap.next();
+    }
+
+    PROGRAM_EXIT(0);
+}
+
diff --git a/jni/libucommon/sources/utils/zerofill.1 b/jni/libucommon/sources/utils/zerofill.1
new file mode 100644
index 0000000..f28ce79
--- /dev/null
+++ b/jni/libucommon/sources/utils/zerofill.1
@@ -0,0 +1,55 @@
+.\" zerofill - clear unused disk space and blank devices.
+.\" Copyright (c) 2010 David Sugar <dyfet@gnutelephony.org>
+.\"
+.\" This manual page 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, write to the Free Software
+.\" Foundation, Inc.,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+.\"
+.\" This manual page is written especially for Debian GNU/Linux.
+.\"
+.TH zerofill "1" "January 2010" "GNU uCommon" "GNU Telephony"
+.SH NAME
+zerofill \- clear unused disk space and blank devices.
+.SH SYNOPSIS
+.B zerofill
+.RI [ options ]
+.RI [ devices ]
+.I ...
+.br
+.SH DESCRIPTION
+This command is a relative of nullfile.  Like nullfile, it can be used
+to write all unused disk space with '0', thereby making file systems that
+are stored on virtual machines easier to pack.  In addition, zerofill can
+fill unused disk space with random data before zeroing, which can be useful
+to remove forensic trace of deleted files.  Finally, zerofile can be told
+to operate on and zero (erase) complete disk devices.
+.SH OPTIONS
+.TP
+.BI \-\-random= count
+Number of passes to use writing random data before wiping data.
+.TP
+.B \-\-help
+Outputs help screen for the user.
+.SH AUTHOR
+.B zerofill
+was written by David Sugar <dyfet@gnutelephony.org>.
+.SH "REPORTING BUGS"
+Report bugs to bug-commoncpp@gnu.org.
+.SH COPYRIGHT
+Copyright \(co 2010 David Sugar, Tycho Softworks.
+.br
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.
+
+
diff --git a/jni/libucommon/sources/utils/zerofill.cpp b/jni/libucommon/sources/utils/zerofill.cpp
new file mode 100644
index 0000000..57c2f26
--- /dev/null
+++ b/jni/libucommon/sources/utils/zerofill.cpp
@@ -0,0 +1,163 @@
+// Copyright (C) 2010 David Sugar, Tycho Softworks.
+//
+// This file is part of GNU uCommon C++.
+//
+// GNU uCommon C++ 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 3 of the License, or
+// (at your option) any later version.
+//
+// GNU uCommon C++ 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 GNU uCommon C++.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <ucommon/secure.h>
+
+using namespace UCOMMON_NAMESPACE;
+
+static shell::flagopt helpflag('h',"--help",    _TEXT("display this list"));
+static shell::flagopt althelp('?', NULL, NULL);
+static shell::numericopt passes('r', "--random", _TEXT("optional passes with randomized data (0-x)"), "count", 0);
+
+static unsigned char buffer[65536];
+static bool live = false;
+static bool temp = false;
+
+static void cleanup(void)
+{
+    if(temp)
+        fsys::erase("zerofill.tmp");
+    if(live)
+        shell::printf("\n");
+    live = false;
+}
+
+static void zerofill(void)
+{
+    fsys::offset_t pos = 0l;
+    ssize_t size = 65536;
+    unsigned long count = 0;
+    fsys_t fs;
+
+    temp = true;
+
+    fs.open("zerofill.tmp", 0666, fsys::STREAM);
+    if(!is(fs))
+        shell::errexit(1, "*** zerofill: %s\n",
+            _TEXT("cannot create temporary file"));
+
+    live = true;
+    while(size == 65536 && live) {
+        unsigned pass = 0;
+
+        while(pass < (unsigned)*passes) {
+            fs.seek(pos);
+            Random::fill(buffer, sizeof(buffer));
+            fs.write(buffer, sizeof(buffer));
+            ++pass;
+        }
+
+        fs.seek(pos);
+        memset(buffer, 0, sizeof(buffer));
+        size = fs.write(buffer, sizeof(buffer));
+        pos += sizeof(buffer);
+        if(++count >= 256) {
+            shell::printf(".");
+            count = 0;
+        }
+    }
+
+    cleanup();
+
+    if(fs.err() != ENOSPC)
+        shell::errexit(3, "*** zerofill: %s\n",
+            _TEXT("failed before end of space"));
+}
+
+static void zerofill(const char *devname)
+{
+    fsys::fileinfo_t ino;
+    fsys::offset_t pos = 0l;
+    ssize_t size = 65536;
+    unsigned long count = 0;
+    fsys_t fs;
+
+    if(fsys::info(devname, &ino))
+        shell::errexit(5, "*** zerofill: %s: %s\n",
+            devname, _TEXT("cannot access"));
+
+    if(!fsys::is_disk(&ino))
+        shell::errexit(6, "*** zerofill: %s: %s\n",
+            devname, _TEXT("not block device"));
+
+    fs.open(devname, fsys::WRONLY);
+    if(fs.err())
+        shell::errexit(5, "*** zerofill: %s: %s\n",
+            devname, _TEXT("cannot modify"));
+
+    shell::printf("%s", devname);
+
+    live = true;
+    while(size == 65536 && live) {
+        unsigned pass = 0;
+
+        while(pass < (unsigned)*passes) {
+            fs.seek(pos);
+            Random::fill(buffer, sizeof(buffer));
+            fs.write(buffer, sizeof(buffer));
+            ++pass;
+        }
+
+        fs.seek(pos);
+        memset(buffer, 0, sizeof(buffer));
+        size = fs.write(buffer, sizeof(buffer));
+        pos += sizeof(buffer);
+        if(++count >= 256) {
+            shell::printf(".");
+            count = 0;
+        }
+    }
+
+    cleanup();
+
+    if(fs.err() != ENOSPC)
+        shell::errexit(3, "*** zerofill: %s\n",
+            _TEXT("failed before end of space"));
+}
+
+PROGRAM_MAIN(argc, argv)
+{
+    shell::bind("zerofill");
+    shell args(argc, argv);
+    unsigned count = 0;
+
+    if(*passes < 0)
+        shell::errexit(2, "*** zerofill: random: %ld: %s\n",
+            *passes, _TEXT("negative random passes invalid"));
+
+    if(is(helpflag) || is(althelp)) {
+        printf("%s\n", _TEXT("Usage: zerofill [options] path..."));
+        printf("%s\n\n", _TEXT("Erase and fill unused space with zeros"));
+        printf("%s\n", _TEXT("Options:"));
+        shell::help();
+        printf("\n%s\n", _TEXT("Report bugs to dyfet@gnu.org"));
+        PROGRAM_EXIT(0);
+    }
+
+    secure::init();
+
+    shell::exiting(&cleanup);
+
+    if(!args())
+        zerofill();
+
+    while(count < args() && live)
+        zerofill(args[count++]);
+
+    PROGRAM_EXIT(0);
+}
+