./PaxHeaders.1390/ui-utilcpp-1.8.50000644000000000000000000000013212751415300013347 xustar0030 mtime=1470503616.098341409 30 atime=1470503616.118341032 30 ctime=1470503616.098341409 ui-utilcpp-1.8.5/0000755000175000017500000000000012751415300014440 5ustar00absurdabsurd00000000000000ui-utilcpp-1.8.5/PaxHeaders.1390/README0000644000000000000000000000013212751117070014152 xustar0030 mtime=1470406200.111952115 30 atime=1470475214.676752903 30 ctime=1470503615.954344123 ui-utilcpp-1.8.5/README0000644000175000017500000000417412751117070015331 0ustar00absurdabsurd00000000000000README for ui-utilcpp ===================== Abstract -------- A toolbox-like C++ library, with a diverse set of utilities: * Exception: Generic Exception classes and THROW macros. * Sys: C++ "exception" wrappers for a wide range of system C functions. * Cap: Capabilities C++ wrapper. * CharsetMagic: Charset guessing. * Recoder: Charset recoding. * Time: Misc date and time utilities. * File: Misc file utilities. * Text: Misc string utilities. * http/: Minimal HTTP implementiation. * PosixRegex: Simple wrapper for C 'regexec'. * QuotaInfo: Wrapper to fs quota information. * SMLog[Mono]: Syslog Macro Log. * Socket: Simple Socket abstraction (inet+unix). * Thread: Process based pseudo thread abstraction. * CmdLine: Create CLI-like programs. * GetOpt: Abstraction of GNU C getopt_long(3). Copyright (c) 2001-2014 United Internet AG, under LGPLv3. LFS support since 1.8.3 ----------------------- Since 1.8.3, ui-utilcpp is compiled with large file system support. This is potentially harmful if you are mixing ui-utilcpp (especially the wrappers in namespace Sys) C call wrappers with your own C code. To be on the safe side, also compile your project with LFS support. For autotools, it's as simple as adding:: AC_SYS_LARGEFILE to your configure.ac. You should also check that your are actually using 1.8.3 or better; with m4-macros from "ui-auto", this looks like:: UI_CHECK(ui_utilcpp, ui-utilcpp, 1, 8, 3, 9, 0, 0) (You can craft your own check w/o ui-auto using the 'ui-utilcpp-version' script). Upgrading from 1.0 ------------------ -> Includes: Old New ToolboxSys Some of File, Thread, Time, Text. ToolboxCPP Some of Text, Time, File. ToolboxSTL Some of Text, Time, File, Misc. -> Interface changes: strtok: Separator must be changed from char ('.') to std::string (","). -> Exceptions: All catch() blocks must be updated. In the simplest case, the old exception handler can be replaced by catch (UI::Util::Exception const & e) { std::cerr << e.what() << std::endl; // or whatever } For diversed error handling, use the respective exception classes if needed. ui-utilcpp-1.8.5/PaxHeaders.1390/compile0000644000000000000000000000007412657715017014664 xustar0030 atime=1470503346.479422671 30 ctime=1470503615.954344123 ui-utilcpp-1.8.5/compile0000755000175000017500000001624512657715017016043 0ustar00absurdabsurd00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ui-utilcpp-1.8.5/PaxHeaders.1390/NEWS0000644000000000000000000000013212751415207013774 xustar0030 mtime=1470503559.195413798 30 atime=1470503559.255412666 30 ctime=1470503615.954344123 ui-utilcpp-1.8.5/NEWS0000644000175000017500000012421712751415207015154 0ustar00absurdabsurd00000000000000Summaries of important changes how ui-utilcpp is used or behaves. See ChangeLog for more details. Downloads: o Generic: http://sourceforge.net/projects/ui-utilcpp/files//ui-utilcpp o Current: http://sourceforge.net/projects/ui-utilcpp/files//ui-utilcpp/stable/ui-utilcpp-1.8.5.tar.gz ================================================================ ui-utilcpp-1.8.5 (stable) (Sat, 06 Aug 2016 17:12:38 +0000): Patched stable release. Changes since 1.8.4: Stephan Sürken (4): * [4d06b10] auto_ptr compat: To be on the safe side, use namespace UI::Util (not UI). * [634d630] Add 'ui-utilcpp/auto_ptr_compat.hpp': "Reimplementing" auto_ptr compat (fixes include of ui-utilcpp/Text.hpp). * [9e6e6c6] tools/GetOpt.cpp: Don't print build time in getopt example. * [3d51d36] configure.ac: Prepare 1.8.5. ---------------------------------------------------------------- ui-utilcpp-1.8.4 (stable) (Fri, 05 Aug 2016 13:59:37 +0000): Patched stable release. Changes since 1.8.3: Stephan Sürken (4): * [48cc11e] README: Add note about LFS. * [4df1268] Use 'unique_ptr' instead of 'auto_ptr' when using C++11 or better. * [2392787] .ui-auto.conf: Fix for hellfield using '~SID' version appendix. * [998aa57] configure.ac: Prepare 1.8.4. ---------------------------------------------------------------- ui-utilcpp-1.8.3 (stable) (Sun Jul 20 10:49:35 UTC 2014): Patched stable release. Changes: Stephan Sürken (7): * [f55307a] README: Update, add a short desc for all sets. * [d9bdbfd] src/tools/Cap.cpp: Improve code to avoid warning with '-D_FORTIFY_SOURCE=2'. * [eb0c5b6] configure.ac: Add AC_SYS_LARGEFILE (adds large FS support for FsInfo). * [d21d847] .ui-auto.conf: Fix Debian VC location (connect with packaging on alioth). * [991eed6] UnitTests: Don't run test that requires a running HTTPD on localhost:80 by default. * [eeb3738] .ui-auto.conf: Debian connector: Clean up, and add alternative. * [581d5ae] configure.ac: Prepare 1.8.3. ---------------------------------------------------------------- ui-utilcpp-1.8.2 (stable) (Mon Jul 7 13:29:27 UTC 2014): Initial open source release. Stephan Sürken (7): * [1094251] .ui-auto.conf: Adapt for move to SF. * [0246ad8] Switch license to LGPLv3, and update README. * [f229d6c] Doxyfile.in: Update to doxygen-1.8.7. * [679ebde] Add proper .gitignore. * [e86b463] Makefile.am: Add '.gitignore' to dist * [df464be] PosixRegex::runMatch: Bugfix: Use correct pmatch index (0 not 1); fixes begin,end values in Match. * [d114366] configure.ac: Prepare 1.8.2. ---------------------------------------------------------------- ui-utilcpp-1.8.1 (stable) (Tue May 7 12:33:00 UTC 2013): Bugfix release. Fixes Socket::getId() to be more failsafe. srken (4): * [cec83b3] argl: Never commit release tarballs. * [95ee948] .ui-auto.conf: Update stable branch to new stable Debian branch. * [d9ac711] Socket::getId: Catch std::exception, not Exception (this method should never fail/raise Exception). (cherry picked from commit 6267022c2165bb5fe9c0b2f914617a044d5bf7d6) * [45f2d7e] * configure.ac: Prepare 1.8.1 ---------------------------------------------------------------- ui-utilcpp-1.8.0 (stable) (Mon May 7 16:35:09 UTC 2012): New major stable release; this main changes are support for IPv6 for the socket library and the "cache code" removal (which has travelled to ui-apache-support). Note: The socket library changes inflicted library ABI-Changes so that a backport to the stable branch was not feasable. The new library main version is "9". It also includes some other minor cumulated and windows related changes: ewetzel (1): * [9d6d48b] WSAStartup and WSACleanup added slinder (2): * [0a9408e] fixed: yet another quota issue; forgot to divide by blocksize, so the value was to big for unsigned long * [6e64072] fixed: removed exceptions that were thrown in Windows build; that led to unsalvagable db files srken (21): * [282988a] .ui-auto.conf: Update to build for sid/squeeze by default. * [f7af1ed] configure.ac: Update to a new developemnt version to avoid confusion. * [b1e6a30] Move docroot cache helpers to apache2 common code. * [2c2be8d] Move docroot cache helpers to apache2 common code. * [90bbd0e] Removing helper and container ("Nico Cache") from build system (now in apache 2 common code). * [bb1ea3e] Add source lines of code estimation. * [062d74d] Sys: Add system wrappers for ::getaddrinfo and ::getnameinfo. * [2ac2ff7] Sockets: Support IPv6 for class INetSocket. * [2cab04d] svn-ignore: Add *-cap tool utility. * [43a897d] INetSocket: Disable default copy constructor. * [2874025] c++: Fix last three compiler warnings. * [bc9341f] Remove helper tools for already removed code: ContainerUnitTests, HelperUnitTests. * [7a11ec4] Doxygen: Update config to 1.7.6.1. * [2a38892] Doxygen: Eliminate new warning with Caps.?pp. * [144022e] Remove all vc-proprietary $Id$ tags from source. * [37c898e] ui-auto: Add Eduard && Patrick to release notify (for the Win port). * [9cc86a9] Prepare stable release 1.8.0 (library main version 9). * [3d3f8d4] Prepare release notes for 1.8.0 * [b648f02] .ui-auto.conf: Update to new svn URL (TECITO 1544i). * [793cf6c] .ui-auto.conf: Only build for squeeze. * [031f6e6] Revert ".ui-auto.conf: Only build for squeeze." ---------------------------------------------------------------- ui-utilcpp-1.6.0 (stable) (Fri Sep 17 14:07:36 UTC 2010): New major release; this mainly adds support for linux capabilities and windows quota. Simon Linder (7): fixed: make compilable for Win32 removed: some compiler warnings Lots of clean up. Disabled another warning. fixed: Win2k8 support SL added: Quota for W2k8 SL: fixed: Quota/W2k8 fixed: quota fixed: UID was 1000 which it cannot be (always 0 for Windows) Stephan Sürken (37): RealTime: When normalizing negative values, silently set to 0 instead of throwing exception Code cleanup: Fix possible warnings (envp not used). Changing prefix "_" for POSIX calls back to non-prefixed. Half reverting/fixing change for a a VC++ warning Sys: Add getgrnam(3) c++ wrapper. QuotaInfo: Fix class variable order which leads to gcc compile errors with -pedantic. Fix ignore (used old "sp" prefix). Sys: Add wrapper support for prctl (linux only). Sys: Add C++ system wrappers for (nearly) all libcap library calls (linux only) Add new header/class "Cap": Abstraction class for posix capabilities. Capabilities: Add scope capabilities helper class CapScope. Capabilities: Compatibility for libcap1 (Debian etch). Capabilties: Add example program. typo fix in dox docs. docs: Fix some doxygen warnings. * Socket: Add shutdown() method. * Connection: Add simpleHttpRequest method. src/ui-utilcpp/Sys.cpp: Add support for setfsuid and setfsgid linux calls. src/ui-utilcpp/GetOpt: Add support for default argument values. * src/ui-utilcpp/Sys: Fix three exception error strings. * src/ui-utilcpp/GetOpt: Doxygen fix. * src/ui-utilcpp/Sys.hpp: chown: default 2nd arg to -1. * src/ui-utilcpp/Sys.cpp: Add support for "pseudo" calls getfsuid() and getfsgid(). * src/ui-utilcpp/Sys: getfsuid(): Workaround: Unlike described in the man page, result may be -1 sometimes; use geteuid() then. * configure.ac: Add --enable-libproc: Optionally use libproc. * src/ui-utilcpp/Sys: getfsuid must be implemented the hard way, parsing procfs. * src/ui-utilcpp/Sys: getfsgid must be implemented the hard way, parsing procfs. * src/ui-utilcpp/Sys.cpp: Cosmetic: Adapt exception texts for ui-utilcpp wording. * src/ui-utilcpp/Sys.cpp: setfsuid: Fix check for error using new getfsuid|gid methods. * src/ui-utilcpp/Sys: Fix throws to use ui-utilcpp convention. * src/ui-utilcpp/Sys.cpp: Fix: Should not use ERRNO here. * src/ui-utilcpp/Sys: Add support for linux' gettid(), and use that as default for 'fsuid' calls. * src/ui-utilcpp/Sys: getenv(3): Fix: On error, throw (don't return null pointer). fix revapx. add NEWS entry for Simon's uid bug fix. ---------------------------------------------------------------- ui-utilcpp-1.5.0 (unstable) (UNRELEASED): Bug fixes: * Windows: UID was 1000 which it cannot be (always 0 for Windows) (Simon). ---------------------------------------------------------------------- ui-utilcpp-1.4.0 (stable) (Fri Mar 27 10:36:04 UTC 2009): This is a new stable version, updating to boost1.35 and some new features. Old code is compatible, but needs to be recompiled; SO main version dumped to 5 (stable). Changes since 1.3.3: * QuotaInfo: - Add method for quota via rpc (for nfs). - Add new class FS (dev+fstype instead of dev only) to construct QuotaInfo (API extension, old code using QuotaInfo is compatible but need to be recompiled). - Add helper function file2fs to generate an FS (dev+fstype) from any file on that fs. - New class FQuotaInfo that uses the above tool automatically. - Change internal code so that methods tried depend on fs type. * Update tar format to tar-pax. ---------------------------------------------------------------------- ui-utilcpp-1.3.3 (unstable) (Mon Jan 19 15:09:34 UTC 2009): * Release with ui-auto from svn (adds man page for ui-utilcpp-version). * Fix some g++ warnings only showing when compiling with -O2: - PosixRegexx: Subclass not initialized. - ContainerUnitTests: Uninitialized variable. ---------------------------------------------------------------------- ui-utilcpp-1.3.2 (unstable) (Mon Dec 1 16:36:08 UTC 2008): * Added documentation for cache_map and the functions in Helper namespace * Added a unit test for the functions in Helper namespace * modified Helper::to_time_t to return 0 if its given ptime value is special * CmdLine: Fix a g++ warning (use std::string::size_type). * Update doxygen config for doxygen 1.5.6 (fixing some warnings). ---------------------------------------------------------------------- ui-utilcpp-1.3.1 (unstable) (Do 25. Sep 11:43:12 UTC 2008): * Fixed atime setting with calls using iterator ranges * Set library version to 4:0:0 ---------------------------------------------------------------------- ui-utilcpp-1.3.0 (unstable) (Di 23. Sep 16:11:00 UTC 2008): * Introduced namespaces "Container" and "Helper" * Added hash container Container::cache_map which is particular useful for cache entries * Added several boost-related helper hunctions in helper/Boost.hpp * Bug fix: Http::Connection: Protect constructors against exceptions (potential missing data/fd removal on failing connects). ---------------------------------------------------------------------- ui-utilcpp-1.2.0 (stable) (Thu Jun 19 10:38:02 UTC 2008): Stable release 1.2; library main version dumped to 3 (stable). * sp2ui: Fix: Also update macros SP_THROW to UI_THROW. ---------------------------------------------------------------------- ui-utilcpp-1.1.40 (unstable) (Tue Jan 8 16:36:22 UTC 2008): * boost test: Boost 34 deprecated some parts of API; updated to a variant that works for both, 33 and 34. * Tested against upcoming g++-3.4 and fixed all compile errors and warnings. * README/AUTHORS updates: - SP->UI fixes. - Temp. 1.2 todo section: remove hints to very old (fixed) bugs - mv old SPRelease explanation to ui-auto. ---------------------------------------------------------------------- ui-utilcpp-1.1.39 (unstable) (Mon Jan 7 16:48:56 UTC 2008): Initial "ui" release: * Update to ui-auto. * Update _all_ "sp" prefixes to "ui" (macro names, file names, C++ namespaces). * Add tool ui-utilcpp-sp2ui to automatically update projects using us. Other changes: * iconvctl() support (sloppy) for non-linux systems (using GNU libiconv). ---------------------------------------------------------------------- sp-utilcpp-1.1.38 (unstable) (Fri Oct 19 13:01:20 UTC 2007): * Http::HeaderField: Bugfix: Allow empty header field values when parsing line. ---------------------------------------------------------------------- sp-utilcpp-1.1.37 (unstable) (Thu Aug 23 16:40:11 UTC 2007): * Recoder: rfc2047 encoder: Fix possible segfaults due to typo; add unit test for the segfault case. ---------------------------------------------------------------------- sp-utilcpp-1.1.36 (unstable) (Wed Jul 11 15:28:12 UTC 2007): * Recoder: Add "idn-email" (any-string w/ emails to string w/ IDN-encoded EMail domains) converter. ---------------------------------------------------------------------- sp-utilcpp-1.1.35 (unstable) (Mon Jul 9 15:41:11 UTC 2007): * Recoder: Add rfc2047 (Q-MIME) converter. * Add dependency to "libidn" (for IDNA recode facility). * Recoder: Add rfc3490 (International Domain Names, IDN) converter. ---------------------------------------------------------------------- sp-utilcpp-1.1.34 (unstable) (Mon Mar 12 13:52:30 UTC 2007): * Initial etch-based release (automake 1.10, sp-auto 103). * New Sys-Macros: getpwnam. * New Sys-Macros: confstr,getconf (POSIX system configuration variables). * CmdLine.cpp: Using 320 chars (was 160) to read lines from scripts; this should be enough for any decent script. ---------------------------------------------------------------------- sp-utilcpp-1.1.33 (unstable) (Wed Jan 31 15:33:59 UTC 2007): * Text.?pp: Switch to use boost's random to produce pseudo random alpha-numeric keys. * [win32] Remove "DiskInfo as quota method" hack from QuotaInfo. * New "FsInfo" class (fs usage). * New Sys-Macro: statvfs. * Having the SP_PROG_CXX c++ checker (rules out g++-2.95): Removed all gcc 2.95 compat code. ---------------------------------------------------------------------- sp-utilcpp-1.1.32 (unstable) (Fri Nov 3 13:40:56 UTC 2006): This release contains updates for sp-auto 0.2 only. ---------------------------------------------------------------------- sp-utilcpp-1.1.31 (unstable) (Wed Sep 6 12:45:30 UTC 2006): * Text: Some convenience stream operators. ---------------------------------------------------------------------- sp-utilcpp-1.1.30 (unstable) (Fri Aug 18 14:10:16 UTC 2006): * Add Http::Connection::getConnId() convenience method. ---------------------------------------------------------------------- sp-utilcpp-1.1.29 (unstable) (Thu Aug 17 08:43:42 UTC 2006): * Add "isToken()" for already existing StrVecs (speedup). * Fix: Use "const ref" for join() method. ---------------------------------------------------------------------- sp-utilcpp-1.1.28 (unstable) (Fri Jul 21 08:49:20 UTC 2006): I did it again release * added a perl like join method for strings ---------------------------------------------------------------------- sp-utilcpp-1.1.27 (unstable) (Tue Jul 4 11:04:47 UTC 2006): * New text tool: str2ascii. * Http fix: Force pure ASCII values for any Headerfield. ---------------------------------------------------------------------- sp-utilcpp-1.1.26 (unstable) (Wed Jun 7 17:05:12 UTC 2006): "Jaber Al-Ahmad Al-Jaber Al-Sabah" weird Lama release. * Obsolete tool "misc" removed. * Bugfix File: Remove a number of now-obsolete exception specifications. * New Sys-Macros: mkdir,rmdir. * A number of cleanups && stabilisation in exception support code: - Remove unused macros: SP_THROW_SP, SP_THROW_ERRNO_E. - Sys::Exception: Making it non "Code" exception again (getErrNo() is already available in all exceptions were aplicable). - Set default errNo to 0=Success (was global errno); this means exceptions not dealing w/ "errnos" always have getErrNo()==Success instead of "random", which is more reasonable. - SP_THROW_ERRNO, SP_THROW_CODE_ERRNO: Catching global errno early in these two macros to avoid the possibility that code in argument evaluation tampers w/ the value. - Adding initial exception unit tests. - Doc: Little exception HOWTO. * "Shortcuts.hpp" fix: Make sure all namespaces are defined. * PIDFile fix: Use chmod on file, defaults to "rw-r--r--". ---------------------------------------------------------------------- sp-utilcpp-1.1.25 (unstable) (Thu May 18 16:05:12 UTC 2006): Sam Peckinpah's Flue Season release. * QuotaInfo: Adapt method order to real world: "linux v2", "linux xfs", "linux v1". * QuotaInfo: Fix bug due to wrong struct comment in "linux version 2". * QuotaInfo: Clean up quota methods "linux version 1" and "linux version 2". * QuotaInfo: Use "effective uid" as default (was: real uid). * Remove support for non-standard g++-2.95 code. Mark g++-2.95 compatibilty helper functions deprecated. * Replace Sys:Exception by a CodeException (thus having errno transported up in exception object). * Add "Shortcuts.hpp" helper include. * Doc updates: - Obsolete && unmaintained docs removed: doc/ANNOUNCE+DEVELOPERS+MainPage.doc. - Sys docs and other doxygen docs updates. ---------------------------------------------------------------------- sp-utilcpp-1.1.24 (unstable) (Wed May 10 12:21:51 UTC 2006): The Haunted World of Edward D. Wood, Jrelease. * Bugfix: UnixSocket: Protect sun_path C-string from being undefined when constructed via fd -- as it might be used in getId(). * Fix all doxygen warnings (needs doxygen >= 1.4.6 [in bpo for debian sarge]). ---------------------------------------------------------------------- sp-utilcpp-1.1.23 (unstable) (Wed May 10 06:44:05 UTC 2006): Dharmsamrat Paramhans Swami Madhavananda's atomic Reissack release. * Sys-macros support for resource limits. ---------------------------------------------------------------------- sp-utilcpp-1.1.22 (unstable) (Fri Apr 7 15:24:25 UTC 2006): "Mad Jens" race car simulation release. * More Sys-macros around uid. ---------------------------------------------------------------------- sp-utilcpp-1.1.21 (unstable) (Thu Apr 6 12:11:00 UTC 2006): Maria Gorokhovskaya's "moistured barrel" release. * Two more unrecommended cerr uses fixed (from nightly tests). * RealTimeScope: No default stream on destructor (fixes cerr usage). * Recoder: Also add run(char,size) convenience method. ---------------------------------------------------------------------- sp-utilcpp-1.1.20 (unstable) (Wed Apr 5 14:12:15 UTC 2006): Sun Myung Moon's "world's largest point release". * Recoder changes && fixes: - Renaming all factory calls from "run" to "make", so nobody has excuses any more ;). - librecode: Fix deletion order. - librecode: Fix: Move "task" into the factory level (i.e. Converter::make()) as this obviously can't be thread-safe. - Adding Recoder::run(char const *) for convenience. * "Sys::"-Update completed. - System/library calls added to Sys: sleep(3), realpath(3), seteuid(2), setegid(2), quotactl(2), malloc(2), calloc(2), free(2), [fl]stat(2), getenv(2), open[m](2), read(2), write(2), fcntl(2), flock(2), getpguid(2), chown(2), fcntl(2), socket(2), getpeername(2), getsockname(2), setsockopt(2), recv(2), send(2), listen(2), bind(2), connect(2), select(2), socketpair(2), iconv_open(3), iconv_close(3), gettimeofday(2), settimeofday(2). - This triggered a bunch of updates (mostly less code) throughout the code. Some user-visible changes: - Rm obsolete FileDescriptor::read/write wrappers (now in Sys). - Renaming FileDescriptor::stdRead/stdWrite virtuals to read/write. - Exception: Rm SP_THROW_CODE_ERRNO_E macro: No longer needed w/ Sys. - File/Socket: Code cleanup; now-obsolete (by Sys::, we now catch down to throw matching the abstraction) exception codes removed: CloseErr_, SocketErr_, HostnameErr_, PathErr_, ReuseaddrErr_, SetuidErr_, PermErr_. - This also brings down the number of WIN32 ifdefs (from about 59 to 35 in non-Sys code); more is possible, only obvious "should work" cases updated. ---------------------------------------------------------------------- sp-utilcpp-1.1.19 (unstable) (Thu Mar 30 15:13:51 UTC 2006): "Hector Abhayavardhana"'s librecode sucks release. * New RecoderCache singleton to cache recoders (speed improvments && workaround against librecode memory leaks). * REMOVING PROPOSED OBSOLETE: AtomicMutex, NaiveCloneThread (also purges --enable-linux-atomic configure option). ---------------------------------------------------------------------- sp-utilcpp-1.1.18 (unstable) (Thu Mar 23 17:34:03 UTC 2006): Sys-omat, cleanup && bugfixing "Stirling Silliphant" release. * New Sys.?pp: Long-due "errno exception" drop-in replacements for system(2) and library(3) calls. * Partial updates for the above in Thread, File (not finished). * Thread: New fd2DevNull() helper tool. * Thread: Harden "daemonize" to reopen std fd's 0,1,2 to protect against library xyz reading from/writing to fds. * PROPOSED OBSOLETE: AtomicMutex, NaiveCloneThread. Will be removed on next release unless there are vetos. ---------------------------------------------------------------------- sp-utilcpp-1.1.17 (unstable) (Wed Mar 22 14:01:42 UTC 2006): Sid-able "Zsa Zsa Gabor" release. * File: New little helper class "AutoRemoveFile". * Separate File.?pp into File.?pp + Socket.?pp (confusing, too much code). * Text: Remove tool function "sha1sum" as this is not used, unavaible for win32 and code is missing in newer libcommoncpp2 upstreams (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=352122). * --disable-linux-atomic -> --enable-linux-atomic: Opt-in, as this is non-standard. ---------------------------------------------------------------------- sp-utilcpp-1.1.16 (unstable) (Tue Feb 28 13:35:04 UTC 2006): * QuotaInfo: Fix compile for newer systems (e.g. Debian Etch) using _LINUX_QUOTA_VERSION = 2 for 2.6 style quota in quota.h. * File: New "SocketPair" abstraction (helps writing tests for protocols). * File: PIDFile: Check for pid file existence. Default is now to throw if found (was: overwrite silently). ---------------------------------------------------------------------- sp-utilcpp-1.1.15 (unstable) (Fri Feb 17 09:49:10 UTC 2006): * Time: Add ScopeRealTime class (easy latency logging for scopes). * Http::URL: addParam() support; generate URL(). ---------------------------------------------------------------------- sp-utilcpp-1.1.14 (unstable) (Thu Feb 9 21:18:01 UTC 2006): * Http: Update Exception for debug support; use SP_THROW for all exceptions. * Http: Add Http.hpp for convenience: Include all http headers. * Http: New class URL: Parse HTTP URLs (rfc 2616, 3.2.2). * Http: New class URLGet: Simple HTTP GET impl. based on given HTTP URL. * Http: StatusLine: Allow status lines w/o "reason" text. * Bugfix strerror(errNum): Actually use errNum arg, not errno. * Exception: Updated Exception base class internals; new errno macros "*_E" to give errNo explicitely. * Bugfix File: Fixes w/ new *_E macros where appropriate (fixes wrong errno messages in some circumstances). ---------------------------------------------------------------------- sp-utilcpp-1.1.13 (unstable) (Tue Jan 31 18:00:47 UTC 2006): * File: New tools: getenv(), PIDFile class, guessConfFile. ---------------------------------------------------------------------- sp-utilcpp-1.1.12 (unstable) (Wed Jan 25 18:15:36 UTC 2006): * Text: strerror(int) now defaults to strerror(int=error). * Text: Separate "PosixRegex" into own header to avoid include wars. * Text: New tool strVec2Str. * _More_ socket id fixes: - Fix possible random c-string w/ getPeerId/UnixSockets. - Enable ids when not connected/bound. - Remove obsolete UnixSocket::getPath(). ---------------------------------------------------------------------- sp-utilcpp-1.1.11 (unstable) (Thu Jan 5 17:08:26 UTC 2006): * Sockets::getId() should now finally work reliably. Honest. * Sockets:bind/connect/listen: Now all return *this for convenience. * Sockets:bind(): Now virtual like connect() for convenience. * UnixSocket:unixBind/bind(): Default for "silent unlink" now "true". ---------------------------------------------------------------------- sp-utilcpp-1.1.10 (unstable) (Wed Jan 4 15:27:32 UTC 2006): * UnixSocket:bind(): Silent unlink support for destructor. * UnixSockets: getId(): Fix broken unix path (socklen). * INetSockets: getId(): Fix broken port (ntoh). ---------------------------------------------------------------------- sp-utilcpp-1.1.9 (unstable) (Fri Dec 30 15:22:31 UTC 2005): * SetCookie/SetCookies: Const/add(key) -> Const/add(key, value="") for convenience. * SetCookie: Support for defaults on composition (expires, path, domain). * Text: New tool functions md5sum, sha1sum; update build system to use CommonCPP "--stdlibs" (includes ccext2 w/ digests). * Cookie/SetCookie: Add prefix support for cookie names. * Text: Replacing some strange/possibly dangerous usage of string constructor w/ explicit resize(). ---------------------------------------------------------------------- sp-utilcpp-1.1.8 (unstable) (Tue Dec 20 17:18:51 UTC 2005): * Add Util::strerror (wrapper for ::strerror(3)); replacing all calls. * Add --disable-strerror (to fix known strange segfaults on static compilations running under wrong libc). ---------------------------------------------------------------------- sp-utilcpp-1.1.7 (unstable) (Mon Dec 19 13:15:17 UTC 2005): * Bugfix: SetCookie value parsing. * Bugfix: URLEncode: Encode non-ASCII characters. * Text.hpp: Add StrVec, StrList, StrMap convenience shortcuts. * Fixing ccgnu2/pthread library dependency. ---------------------------------------------------------------------- sp-utilcpp-1.1.6 (unstable) (Fri Dec 2 16:39:31 UTC 2005): * Cookies/SetCookies: Good (tm) interface updates/enhancements (required for shop). * Partly RFC 2616 (HTTP 1.1) implementation: header, cookie, connection. * Text: New tool function "getlineCRLF" (std::getline trashing trailing CR). * Text: New tool function "strtoks" (like strtok, but allowing multiple one-char delims). * Text: "EmptyString_" static helper. * File: Socket implementation: Fix up getId() to generically use getsockname(); Add getPeerId() using getpeername(). ---------------------------------------------------------------------- sp-utilcpp-1.1.5 (unstable) (Fri Jun 17 15:18:03 UTC 2005): * Update to sp-auto >= 0.1.1 (fixes cruft-leftover-bug in tarball). ---------------------------------------------------------------------- sp-utilcpp-1.1.4 (unstable) (Fri Jun 17 12:04:01 UTC 2005): - First release using "sp-auto" as meta-maintainer tool. - Doxygen docs update, most warnings fixed. - Recoder updates: - librecode converter: Using task level to allow sloppy converting. - Add general "sloppy" tag for Recoder objects (active for converters that support it - i.e., currently librecode only). - Adding first unit test to test (some) convertions. - Improving recoder test tool: Input charset guessing, sloppy support. - Implementing proper converter exception handling; exception error texts much improved; errno support where applicable. - Move more control up to Converter father class. - Fixing all todos/bugs notes. - Adding libboost unit test skeleton. - Fixed memory leak in Recoder.[ch]pp - "g++-3.4 -pedantic"able (nightly test now lethal). - Add CharsetMagic: Heuristics to guess char encodings (from file). ---------------------------------------------------------------------- sp-utilcpp-1.1.3 (Tue Feb 15 15:17:14 UTC 2005): This is the unstable relase series 1.1.x. DON'T USE THIS for any PRODUCTION code. Purpose of this release is to provide an easy way to TEST it and ideally report bugs. - Corrections so it (mostly) works with "g++-3.4 -pedantic". - streambuf binary data bug fixed. - File.cpp: Added proper error handling for stdRead/stdWrite. - New little helpers: freeAnySeqContainer, strdup, CStrArray. - QuotaInfo: Support for kernel 2.6 interface (version 1 and version 2). - Dropping library diversification. Simplify autotools. - Complete rewrite of Recoder, new Converter+Conversions setup. - +asciiCAPS +isToken text utilities. - +eato,etos: Converter tools with error handling. - Helper class CFileStream, helper method copyFile. - SMLog[Mono]: Support for logging to clog. Support for 4 extra debug levels. Giving severity levels as human readable 3-char-prefix. Making LOG_ADD postfix. - Text, File: Much better exception error descriptions. - tos,ato: Add support for arbitrary stream modifier (converting from/to std::hex etc). Removing explicit str2str converter. ---------------------------------------------------------------------- sp-utilcpp-1.1.2 (Mon Aug 30 12:31:33 UTC 2004): This is the unstable relase series 1.1.x. DON'T USE THIS for any PRODUCTION code. Purpose of this release is to provide an easy way to TEST it and ideally report bugs. - Fix: auto_abstract -> auto_base, removing abstract destructor, adding set() method. - Adding some upgrade notes to README. - Merging .strap_run/.strap_dev into ".strap_dev [runonly|ggcenv]". - Use ./configure to produce that file. It can now be sourced properly (no need for backticks). - Default bevaviour now is to taint autotool-supported variables only. This should always work if your project using this library alos uses autotools. - "gccenv" sets the gcc environment variables as before. autotools test may fail unexpectedly. - Protecting all enum values from preprocessor by naming convention ("CatDog_" like for constant class variables). - Update to automake 1.9, using "tar-ustar < 155" as archive format. This fixes both, the "filename too long" and the "make dist keeps silent" bug. Warn about libtool <1.5.8 in strap_auto. - Moving SPRelease/SPUpload to src/tools. ---------------------------------------------------------------------- sp-utilcpp-1.1.1 (Fri Aug 13 13:14:32 UTC 2004): This is the unstable relase series 1.1.x. DON'T USE THIS for any PRODUCTION code. Purpose of this release is to provide an easy way to TEST it and ideally report bugs. * Added Dominik's proposed setup for library checking (in templates see http://volvic.schlund.de/pipermail/abteilung/2003-July/000315.html ), albeit with these signifcant changes: - Don't use a unsigned int as assembled version number. It's not portable (to M$ compilers, for example), as STDC does not guarantee unsigned int to be 4 bytes. Instead, seperate functions/variables/defines for each version part (major,minor,patch) are provided. - Don't use libtools (IF:REV:AGE) version schema for checking. Instead, this is recomputed to the real (system) version numbers. This also fixes an order error that is still in templates. - A check macro is added to protect against header/library implementation mismatch at run time. - Not using acinclude.m4 (not recommended), using recommende m4 directory setup instead (see automake docs). - The needed library macros are "extending aclocal" as recommended in the automake docs. I.e., you don't use the macros by copying to your project, but by installing sp-utilcpp, which will automatically (depending on how you install it, you might still need to extend the global aclocal dirlist) extend the sclocal macro path. Libraries that don't need sp-utilcpp otherwise should still copy these macros, though. The macros are in "m4/sp-lib.m4". For the time being, I recommend to copy the setup from sp-utilcpp, not templates. * src/examples renamed to src/tools. * DESTDIR support for local install targets. * Adding checks for librecode, doxygen, xfs headers. * Adding mass string replace utility functions "strrpl". ---------------------------------------------------------------------- sp-utilcpp-1.1.0 (Mon May 24 13:40:55 UTC 2004): This is the unstable relase series 1.1.x. DON'T USE THIS for any PRODUCTION code. Purpose of this release is to provide an easy way to TEST it and ideally report bugs. * Removed class CVector. STDC++-2003 defines std::vector to have memory in one chunk. * Removed file CSLog. Obsolete. * Removed file Regexx. Obsolete. Never worked. * Removed file SPUtil.hpp. This was compat for unstable versions < 1.0. * Removed class GCCFDStream (class using gcc extensions). With 3.4, new changes. Too silly to maintain this with even more ifdefs. * Removed class Random: Seemed strange enough to me. * New template classes: auto_abstract auto_cvec auto_free Handle (memory pointers) and freeing of memory that does not work with standard delete (auto_ptr). * Removed class ArrDelAdapter: Use auto_cvec. * Removed class NullOStream: I don't think we need this. * Update to CommonCPP2 (SMLog macros only). * Some updates for "g++-3.4 -pedantic" (one internal and some external problems left). * More straighforward directory layout, putting all C++-Source under src/: sp-utilcpp (the library) and examples (Example applications). * New Header & libary Layout: Exception Time Text libsp-utilcpp-cppsys File Run time dependencies on Thread STDC, STDC++ and system only. GetOpt Misc ... CmdLine Specials Recode Extra run time dependencies, header SMLog* only, etc.. ... * Imported from tincas: Recode, C++ wrapper for GNU librecode (class, file, special library). - Updates to support any conversion in a efficient fashion, not just string->string via copy. - Imporved error/exception handling. * Imported from tincas: QuotaInfo (class, file, cppsys). * Imported from tincas: strtok, RealPath, istream2Vector (Text, cppsys). - strtok: Update to support string delimiters (Thorsten). * Update to new exception scheme: - SP::Exception: S+P father exception class (at least when u use us). In short: std::exception interface, handling for an error description and a debug information string. Special support for errno handling provided. - SP:.Util::Excpetion derived from SP::Exception. - SP::Util::CodeException: SP::Util::Exception template adding the simple facility to add an (arbitrary) error code to SP::Util::Exception. => Anything in namespace SP::Util does now throw SP::Util::Exception only (usual exceptions apply for indirect throws; ideally, these are catched down internally and encapsulated). - Updated all classes to have a subclass "Exception". Classes that used to throw enums are now throwing "CodeException", with ErrorCode being the old enum-type exceptions, and the subclass "Exception" being a typedef to that. - 4 basic macros provided to provide for automatic file name and line no debugging. => An "Exception" for every context, enabling diversed or generic catches, automatic errno errors and file name/line no debugging. Read more about that in the doxygen docs. * Code/style review of all files: - Generic class variable naming convention ("_myName"). - Some const correctness correctiotions (note: correct last word). - Removing all "one line scopes". - Complete doxygen documentation, no warnings with 1.3.7. ---------------------------------------------------------------------- sp-utilcpp-1.0.20040430 (Fri Apr 30 12:18:24 UTC 2004): Patch release: * Bugfix for GetOpt(Markus): Buggy use of char instead of int. This produced problems on a (at least) powerpc arch. ---------------------------------------------------------------------- sp-utilcpp-1.0.20030812: Convenience fix release: - Removing hardcoded "-Werror" from Makefile.ams. - Fixes to make it compile with gcc's "-pedantic-error". Note0: The "default value" template for "long long" (there is no "long long") is removed. Note1: Variable length c-arrays replaced by std::string resp. std::vector; this should work fine on almost all implementations, but STDC++ does not ensure memory management is in one chunk. In unstable, there is now "CVector" as replacement to safely and portably replace variable length arrays where the data must be guaranteed to be in one chunk. - Changes to make it pass rc tests "cppstyle_nonrefconst.log", "cppstyle_namespace_none.log". ---------------------------------------------------------------------- sp-utilcpp-1.0.20030807: Bugfix release. Braindead linking problem occuring with libtool-1.4.3 only (needs extra -lpthread) fixed. ---------------------------------------------------------------------- sp-utilcpp-1.0.20030801: Bugfix release: Make it work with g++-3.3. ---------------------------------------------------------------------- sp-utilcpp-1.0.20030318: This is the very first stable release of sp-utilcpp. There has been busy development from the last (unstable) release. Some important new features: * A number of small tools/utilities for every day use (URL, daemonize, ...) * A (complete, yet very simple) alternate framework for Linux multithreading. * A alternate framework for file descriptor handling, POSIX and BSD file locking, TCP and Unix sockets, and a general stream[buf] template for all file descriptor based classes. * RealTimeStamp: Encapsulation of BSD's gettimeofday(2); can be used to measure latency in realtime (precision of 10^-6 seconds). ---------------------------------------------------------------------- sp-utilcpp-0.1.20021120: unstable * Significant Source Code updates: - Header file dependencies moved back to the header files directly. - Completely compilable with GCC 3.X. - Completely documented (i.e., doxygen does no longer produce warnings). * New: - PosixRegex: Wrapper class for POSIX.2 regex functions. Allows s.th. like "if (PosixRegex("ABC.*").run("ABC-Pflaster")) ...". I never could make proper use of the old "Regex" class, hence this rewrite. * New from "dvdb" project: - "SMLogMono": Analogous to "SMLog", this provides a infrastructure for logging in a non-multithreaded environment (not using Common C++). - "NaiveCloneThread": Simple ("naive") thread implementation based on Linux clone(2); also added a mutex class (AtomicMutex), a guard class (MutexLock) and a pseudo thread class using fork(2) (ForkThread). Motivation: "NaiveCloneThread" under Linux can be useful if you need real multithreading, but for some reason you cannot use "pthreads". - "CmdLine": Simple command line abstraction; automatically shows help on commands, handles errors, can set variables, does simple variable expansion. This was created for use in "dvdb-tool", but may be of more common use. * New from "tincas" project: - "Conversion": New class "Conversion" added, with currently two tool function to convert from decimal to any base. - "SP::Util::daemonize(...)": Should be used whenever a program needs to go into background. * SPRelease: now uses "cvs edit" before trying to edit files for those who use that cvs feature; does no longer add release tarballs into CVS (this should be done manually if needed). ---------------------------------------------------------------------- sp-utilcpp-0.1.20020916: unstable * Now completely diversified: "Toolbox" is seperated into "ToolboxCPP" (code depends on STDC++ only, without templates), "ToolboxSTL" (code depends on STDC++ only, with templates) and "ToolboxSys" (code may depend on STDC++ plus system code (POSIX, Linux, BSD, ...). This thoroughly solves the compile time (header includes) dependency problems. A compatability header "Toolbox" ist still provided, but should not be used. * Libraries are build for all segments of the library, where each library now has its real and exact dependencies. This thoroughly solves the run time dependency problems. A compatability library containing all code is still provided, but should not be used. * Header includes are now suffixed "hpp", as required by "templates". Compatability headers are included for all former (not new) header files. * Includes a number of small fixes in documentation, examples, and SPRelease. ---------------------------------------------------------------------- sp-utilcpp-0.1.20020912: * The "SPRelease" script now supports "AC_INIT"-based ("modern", automake1.6) "configure.ac"s and projects that use manual "ChangeLog"s. * Using Include-Scheme as indicated in "templates" - i.e., all includes from header files are removed, and the synopsis for these files is updated in the documentation. NOTE: This moves responsibility for including all neccessary files completely to the *.cpp files, so existing source might need some update. * GetOpt convenience imrovements: new method wrongUsage(), method printUsage() now has an optional title argument. ---------------------------------------------------------------------- sp-utilcpp-0.1.20020902: unstable * Following improved Styleguides for shared libraries (cmp. http://manwe.schlund.de/~absurd/spprojects/). I.e. all unneeded library dependencies are removed, CSLog support is removed from proper library and added into an alternative library with postfix "-global". This enables us to use sp-utilcpp without having dependencies on all libraries sp-utilcpp itself uses. Thus, for example, sp-utilcpp can now be used directly together with dvdb/libpth. ["libccgnu" itself has global variables, and, as sideeffect, always needs pthread, which means that the binary will execute pthread initializations, which will conflict with (at least) "libpth") ]. ---------------------------------------------------------------------- sp-utilcpp-0.1.20020830: unstable * Now compiling with "-pthread", which make this library compatible for use in program using pthreads (i.e. tincas). * SPRelease slightly improved -- it now automates snapshot tarball versions. * More general cleanup and improvements in documentation/automake/autoconf/libtool. ---------------------------------------------------------------------- sp-utilcpp-0.1.20020822: unstable * Changed name; this effects the include path, the library and the project name. The change was necessary because of some part of CVS doesn't work whith paths including "+". So, explicitly: Project name = "sp-utilcpp" include synopsis = "#include " library name = "libsp-utilcpp" * Added new class "URL" which is related to URL specific functionality. ---------------------------------------------------------------------- ui-utilcpp-1.8.5/PaxHeaders.1390/COPYING0000644000000000000000000000013112751117070014324 xustar0029 mtime=1470406200.10795221 30 atime=1470475214.676752903 30 ctime=1470503615.950344198 ui-utilcpp-1.8.5/COPYING0000644000175000017500000001674312751117070015511 0ustar00absurdabsurd00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. 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. ui-utilcpp-1.8.5/PaxHeaders.1390/src0000644000000000000000000000013212751415300014001 xustar0030 mtime=1470503616.066342012 30 atime=1470503616.118341032 30 ctime=1470503616.066342012 ui-utilcpp-1.8.5/src/0000755000175000017500000000000012751415300015227 5ustar00absurdabsurd00000000000000ui-utilcpp-1.8.5/src/PaxHeaders.1390/tools0000644000000000000000000000013212751415300015141 xustar0030 mtime=1470503616.094341484 30 atime=1470503616.118341032 30 ctime=1470503616.094341484 ui-utilcpp-1.8.5/src/tools/0000755000175000017500000000000012751415300016367 5ustar00absurdabsurd00000000000000ui-utilcpp-1.8.5/src/tools/PaxHeaders.1390/Makefile.am0000644000000000000000000000013212751117070017255 xustar0030 mtime=1470406200.111952115 30 atime=1470498360.499590521 30 ctime=1470503616.082341711 ui-utilcpp-1.8.5/src/tools/Makefile.am0000644000175000017500000000423412751117070020431 0ustar00absurdabsurd00000000000000AM_CPPFLAGS = -I$(top_srcdir)/src AM_CXXFLAGS = -Wall LIBS += $(OST_CXXX2_LIBS) scripts = ui-utilcpp-sp2ui EXTRA_DIST = ${scripts} bin_SCRIPTS = ${scripts} bin_PROGRAMS = \ ui-utilcpp-unittests \ ui-utilcpp-getopt \ ui-utilcpp-getopt \ ui-utilcpp-smlog \ ui-utilcpp-smlogmono \ ui-utilcpp-regex \ ui-utilcpp-cmdline \ ui-utilcpp-threads \ ui-utilcpp-filelock \ ui-utilcpp-echoserver \ ui-utilcpp-quota \ ui-utilcpp-recoder \ ui-utilcpp-wget \ ui-utilcpp-cap docdir = $(datadir)/doc/$(PACKAGE)/examples doc_DATA = GetOpt.cpp SMLog.cpp SMLogMono.cpp Regex.cpp CmdLine.cpp Threads.cpp FileLock.cpp EchoServer.cpp Quota.cpp ui_utilcpp_unittests_SOURCES = UnitTests.cpp ui_utilcpp_unittests_LDADD = $(XML_LIBS) $(XSLT_LIBS) -lboost_unit_test_framework ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_getopt_SOURCES = GetOpt.cpp ui_utilcpp_getopt_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_smlog_SOURCES = SMLog.cpp ui_utilcpp_smlog_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_smlog_CXXFLAGS = -pthread $(OST_CXXX2_FLAGS) -DSM_LOGFACILITY=ost::Slog::classUser -DSM_LOGLEVEL=7 ui_utilcpp_smlog_LDFLAGS = -pthread ui_utilcpp_smlogmono_SOURCES = SMLogMono.cpp ui_utilcpp_smlogmono_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_smlogmono_CXXFLAGS = -DSM_LOGLEVEL=7 ui_utilcpp_regex_SOURCES = Regex.cpp ui_utilcpp_regex_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_cmdline_SOURCES = CmdLine.cpp ui_utilcpp_cmdline_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_threads_SOURCES = Threads.cpp ui_utilcpp_threads_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_filelock_SOURCES = FileLock.cpp ui_utilcpp_filelock_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_echoserver_SOURCES = EchoServer.cpp ui_utilcpp_echoserver_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_quota_SOURCES = Quota.cpp ui_utilcpp_quota_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_recoder_SOURCES = Recoder.cpp ui_utilcpp_recoder_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_wget_SOURCES = WGet.cpp ui_utilcpp_wget_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_cap_SOURCES = Cap.cpp ui_utilcpp_cap_LDADD = ../ui-utilcpp/libui-utilcpp.la check-local: ./ui-utilcpp-unittests ui-utilcpp-1.8.5/src/tools/PaxHeaders.1390/Recoder.cpp0000644000000000000000000000013112751117070017307 xustar0030 mtime=1470406200.111952115 30 atime=1470498397.850885015 29 ctime=1470503616.09034156 ui-utilcpp-1.8.5/src/tools/Recoder.cpp0000644000175000017500000000235612751117070020467 0ustar00absurdabsurd00000000000000// Local #include "config.h" // STDC++ #include #include // C++ Libraries #include #include #include int main(int argc, char *argv[]) { int exitCode(0); try { if (argc < 2) { throw UI::Util::Exception("Wrong usage"); } std::string const data(argv[1]); std::string const outEnc((argc > 2 && std::string(argv[2]) != "") ? argv[2] : "UTF-8"); std::string const inEnc ((argc > 3 && std::string(argv[3]) != "") ? argv[3] : UI::Util::CharsetMagic::guess(data)); bool const sloppy((argc > 4) && std::string(argv[4]) == "sloppy"); std::cerr << "Input charset : " << inEnc << std::endl; std::cerr << "Output charset : " << outEnc << std::endl; std::cerr << "Sloppy conversion: " << sloppy << std::endl; std::cout << UI::Util::Recoder(inEnc, outEnc, sloppy).run(data); } catch (std::exception const & e) { std::cerr << "Exception: " << e.what() << "." << std::endl; std::cerr << std::endl; std::cerr << "Usage: ui-utilcpp-recoder data [outEnc [inEnc [\"sloppy\"]]]" << std::endl << std::endl; std::cerr << "Writes conversion result to cout, informational output to cerr." << std::endl; exitCode=1; } return exitCode; } ui-utilcpp-1.8.5/src/tools/PaxHeaders.1390/SMLogMono.cpp0000644000000000000000000000013212751117070017537 xustar0030 mtime=1470406200.111952115 30 atime=1470498397.850885015 30 ctime=1470503616.094341484 ui-utilcpp-1.8.5/src/tools/SMLogMono.cpp0000644000175000017500000000066212751117070020714 0ustar00absurdabsurd00000000000000// Local configuration #include "config.h" // C++ Libraries #include int main() { // configure syslog UI::Util::SysLogMonoSingleton logger("ui-utilcpp_smlogmono", LOG_PERROR, LOG_USER); SM_LOGEMERG("EMERG log"); SM_LOGALERT("ALERT log"); SM_LOGCRIT("CRIT log"); SM_LOGERR("ERR log"); SM_LOGWARNING("WARNING log"); SM_LOGNOTICE("NOTICE log"); SM_LOGINFO("INFO log"); SM_LOGDEBUG("DEBUG log"); } ui-utilcpp-1.8.5/src/tools/PaxHeaders.1390/EchoServer.cpp0000644000000000000000000000013212751403734017777 xustar0030 mtime=1470498780.318118416 30 atime=1470498780.334118109 30 ctime=1470503616.086341635 ui-utilcpp-1.8.5/src/tools/EchoServer.cpp0000644000175000017500000000432712751403734021156 0ustar00absurdabsurd00000000000000// Local configuration #include "config.h" // STDC++ #include #include #include #include #include // C++ library #include #include #include std::string const unSock("/tmp/ui-utilcpp-echoserver.sock"); std::string const inHost("localhost"); unsigned int const inPort(9999); void client(UI::Util::Socket & client) { std::cout << "Connected: " << client.getId() << "->" << client.connect().getPeerId() << std::endl; UI::Util::FDTypeStream clientStream(client.getFd()); clientStream << "12345" << std::flush; clientStream.clear(); std::string response; clientStream >> response; std::cout << "Response: \"" << response << "\"" << std::endl; } void server(UI::Util::Socket & server) { std::cout << "Listening: " << server.bind().listen().getId() << std::endl; std::cout << "Echoing first 5 bytes on each connect." << std::endl; while (1) { UI::Util::Socket connection(server.accept()); assert(connection.getFd() != -1); std::cout << "Connection: " << connection.getId() << "<-" << connection.getPeerId() << " (setting snd/rcv timeout on connections 5 seconds)" << std::endl; connection. setRcvTimeout(5). setSndTimeout(5); UI::Util::FDTypeStream stream(connection.getFd(), true); char line[6]; stream.read(line, 5); assert(stream.gcount() == 5); line[5] = '\0'; std::cout << "ECHOING: " << line << std::endl; stream.write(line, 5); } } int main(int argc, char *argv[]) { try { if (argc < 3) { throw UI::Exception("Wrong usage"); }; UI::Util::auto_ptr socket((std::strcmp(argv[1], "unix") == 0) ? (UI::Util::Socket *) new UI::Util::UnixSocket(unSock, true) : (UI::Util::Socket *) new UI::Util::INetSocket(inHost, inPort, true, true)); std::strcmp(argv[2], "server") == 0 ? server(*socket.get()) : client(*socket.get()); } catch (std::exception const & e) { std::cerr << "Error: " << e.what() << "." << std::endl; std::cerr << "Usage: ui-utilcpp-echoserver inet|unix client|server" << std::endl; return 1; } return 0; } ui-utilcpp-1.8.5/src/tools/PaxHeaders.1390/Quota.cpp0000644000000000000000000000013112751117070017015 xustar0030 mtime=1470406200.111952115 30 atime=1470498397.850885015 29 ctime=1470503616.09034156 ui-utilcpp-1.8.5/src/tools/Quota.cpp0000644000175000017500000000355112751117070020173 0ustar00absurdabsurd00000000000000// Local #include "config.h" // STDC++ #include #include // POSIX C // C++ Libraries #include #include #include int main(int argc, char *argv[]) { std::string arg1(""); if (argc > 1) arg1=argv[1]; std::string arg2(""); if (argc > 2) arg2=argv[2]; int exitCode(0); try { UI::Util::FsInfo const fsInfo("", arg1); std::cout << "FsInfo(" << arg1 << "): [1024er blocks]" << std::endl; std::cout << " Total: " << fsInfo.getTotal() << std::endl; std::cout << " Avail: " << fsInfo.getAvail() << std::endl; std::cout << " Free: " << fsInfo.getFree() << std::endl; std::cout << " Used: " << fsInfo.getUsed() << std::endl << std::endl; UI::Util::QuotaInfo::FS const fs(UI::Util::QuotaInfo::file2fs(arg1)); std::cout << "All methods: " << fs.getMethods("__all__") << std::endl; std::cout << "Device/type: " << fs.getDevice() << "/" << fs.getType() << std::endl; std::cout << "FS methods: " << fs.getMethods() << std::endl; UI::Util::QuotaInfo qi(fs, std::atoi(arg2.c_str())); std::cout << "Quota for uid: " << arg2.c_str() << std::endl; std::cout << "Method used : " << qi.getMethod() << std::endl; std::cout << "Blocks : " << qi.getBlocks() << std::endl; std::cout << "BlockHL: " << qi.getBlockHL() << std::endl; std::cout << "BlockSL: " << qi.getBlockSL() << std::endl; std::cout << "BlockTL: " << qi.getBlockTL() << std::endl; std::cout << "Inodes : " << qi.getINodes() << std::endl; std::cout << "INodeHL: " << qi.getINodeHL() << std::endl; std::cout << "INodeSL: " << qi.getINodeSL() << std::endl; std::cout << "INodeTL: " << qi.getINodeTL() << std::endl; } catch (UI::Exception const & e) { std::cerr << e.what() << std::endl << std::endl; std::cerr << "Usage: quota " << std::endl; exitCode=1; } return exitCode; } ui-utilcpp-1.8.5/src/tools/PaxHeaders.1390/FileLock.cpp0000644000000000000000000000013212751117070017415 xustar0030 mtime=1470406200.111952115 30 atime=1470498397.850885015 30 ctime=1470503616.086341635 ui-utilcpp-1.8.5/src/tools/FileLock.cpp0000644000175000017500000000347212751117070020574 0ustar00absurdabsurd00000000000000// Local #include "config.h" // STDC++ #include #include // POSIX C // C++ Libraries #include #include #include using UI::Util::MutexLock; using UI::Util::FileDescriptor; using UI::Util::PosixFileMutex; using UI::Util::BSDFileMutex; template int lock(const std::string & fileName) { int exitCode(0); try { M m(fileName); MutexLock l(m, false); std::cout << "Locked (do some input to finish): " << fileName << std::flush; std::string dummy; std::cin >> dummy; } catch(typename MutexLock::Exception const & ex) { std::cerr << "MutexLock exception: " << ex.getCode() << ": " << ex.what() << std::endl; exitCode = 1; } catch(typename M::Exception const & ex) { std::cerr << "FileLock exception: " << ex.getCode() << ": " << ex.what() << std::endl; exitCode = 2; } catch(std::exception const & ex) { std::cerr << "std::exception: " << ex.what() << std::endl; exitCode = 3; } catch(...) { std::cerr << "ERROR: Unknown exception!" << std::endl; exitCode = 4; } return(exitCode); } int main(int argc, char *argv[]) { if (argc != 3) { std::cerr << "Lock a file via POSIX or BSD advisory locking." << std::endl << std::endl; std::cerr << "Usage: " << argv[0] << " posix|bsd " << std::endl << std::endl; std::cerr << "Exit Codes: 0 for success, 1 if file was locked, 2 if creat(2) failed, 3 for unknown error." << std::endl; std::cerr << "Exit Codes: 42 for some other error." << std::endl; return(42); } if ((std::string) argv[1] == "posix") { return(lock(argv[2])); } else if ((std::string) argv[1] == "bsd") { return(lock(argv[2])); } else { std::cerr << "Argument 1 must be either \"posix\" or \"bsd\"." << std::endl; return(42); } } ui-utilcpp-1.8.5/src/tools/PaxHeaders.1390/UnitTests.cpp0000644000000000000000000000013212751117070017667 xustar0030 mtime=1470406200.111952115 30 atime=1470498397.850885015 30 ctime=1470503616.094341484 ui-utilcpp-1.8.5/src/tools/UnitTests.cpp0000644000175000017500000003551312751117070021047 0ustar00absurdabsurd00000000000000/** * @file */ // Local configuration #include "config.h" // STDC++ #include #include // C++ Libraries #include #include #include #include #include #include #include #ifdef WIN32 #define BOOST_TEST_MAIN #include #else #define BOOST_AUTO_TEST_MAIN #define BOOST_TEST_DYN_LINK #include #endif namespace UI { namespace Util { BOOST_AUTO_TEST_CASE(test_Exceptions) { // Tool class for static helpers class T { public: static void showException(UI::Exception const & e) { std::cout << "Exception what : " << e.what() << std::endl; std::cout << "Exception debug: " << e.getDebug() << std::endl; std::cout << "Exception errno: " << e.getErrno() << std::endl; } }; // Errno simple I try { Sys::chmod("AyIuiePKIyBRudLB28YFzEzwLECuaMCoax0oBc9GBftQHJwEiveXvfqnExnTQr9I", 0); } catch (UI::Exception const & e) { T::showException(e); BOOST_CHECK(e.getErrno() == ENOENT); } // Errno simple II try { Sys::chmod("AyIuiePKIyBRudLB28YFzEzwLECuaMCoax0oBc9GBftQHJwEiveXvfqnExnTQr9I", 0); } catch (Sys::Exception const & e) { T::showException(e); BOOST_CHECK(e.getErrno() == ENOENT); } catch (UI::Exception const & e) { T::showException(e); BOOST_CHECK(false && "We should have been catched already as Sys::Exception"); } } BOOST_AUTO_TEST_CASE(test_Encoding) { unsigned char const c_ucs4[] = { 0x00, 0x00, 0x00, 0xf6, 0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xdf, 0x00, 0x00, 0x20, 0xac}; std::string const ucs4((char *)c_ucs4, 20); unsigned char const c_utf16be[] = { 0x00, 0xf6, 0x00, 0xe4, 0x00, 0xfc, 0x00, 0xdf, 0x20, 0xac }; std::string const utf16be((char *)c_utf16be, 10); unsigned char const c_utf8[] = { 0xc3, 0xb6, 0xc3, 0xa4, 0xc3, 0xbc, 0xc3, 0x9f, 0xe2, 0x82, 0xac }; std::string const utf8((char *)c_utf8, 11); unsigned char const c_iso_8859_15[] = { 0xf6, 0xe4, 0xfc, 0xdf, 0xa4 }; std::string const iso_8859_15((char *)c_iso_8859_15, 5); // Some non-sloppy full conversions BOOST_CHECK(UI::Util::RecoderCache::get("UCS-4", "ISO-8859-15").run(ucs4) == iso_8859_15); BOOST_CHECK(UI::Util::RecoderCache::get("UTF-16BE", "ISO-8859-15").run(utf16be) == iso_8859_15); BOOST_CHECK(UI::Util::RecoderCache::get("UTF-8", "ISO-8859-15").run(utf8) == iso_8859_15); BOOST_CHECK(UI::Util::RecoderCache::get("ISO-8859-15", "UTF-8").run(iso_8859_15) == utf8); BOOST_CHECK(UI::Util::RecoderCache::get("ISO-8859-15", "UTF-16BE").run(iso_8859_15) == utf16be); // Non-ISO-8859 character "ACCUTE ACCENT" char const c_utf8_noniso[] = { (char) 0xc2, (char) 0xb4 }; std::string const utf8_noniso(c_utf8_noniso, 2); // Non-sloppy must fail with Conversion::Exception try { UI::Util::RecoderCache::get("UTF-8", "ISO-8859-15").run(utf8_noniso); BOOST_CHECK(false && "UTF-8..ISO-8859-15 exact conversion of ACUTE ACCENT should have failed"); } catch (Converter::Exception const &) {} // Sloppy must succeed to "'" BOOST_CHECK(UI::Util::RecoderCache::get("UTF-8", "ISO-8859-15", true).run(utf8_noniso) == "'"); // b64..data tests std::string const b64("SFVNQlVH"); std::string const data("HUMBUG"); BOOST_CHECK(UI::Util::RecoderCache::get("b64", "data").run(b64) == data); BOOST_CHECK(UI::Util::RecoderCache::get("data", "b64").run(data) == b64); std::string const url("eins+zwei+drei"); std::string const plain("eins zwei drei"); BOOST_CHECK(UI::Util::RecoderCache::get("data", "url").run(plain) == url); BOOST_CHECK(UI::Util::RecoderCache::get("url", "data").run(url) == plain); std::string const percentBugPlain("95%"); std::string const percentBugURL("95%25"); BOOST_CHECK(UI::Util::RecoderCache::get("data", "url").run(percentBugPlain) == percentBugURL); std::string const nonASCIIBugURL("%F6%E4%FC"); std::string const nonASCIIBugPlain("öäü"); BOOST_CHECK(UI::Util::RecoderCache::get("data", "url").run(nonASCIIBugPlain) == nonASCIIBugURL); BOOST_CHECK(UI::Util::RecoderCache::get("url", "data").run(nonASCIIBugURL) == nonASCIIBugPlain); { // This generates a bug with librecode0, version 3.6 // Fixed by a debian patch since 3.6-7. // http://bugs.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=156635 UI::Util::Recoder recode("UTF-8","ISO-8859-15"); std::string const a("Bitte_Xenden_Sie_dieYe_Mail_zurück,_um_Zich_anzumelden."); std::string const b("C000035A300000006DBCD1409@pmt.1and1.com"); std::string const a2(recode.run(a)); std::string const b2(recode.run(b)); BOOST_CHECK(b == b2); } // rfc2047 (MIME) BOOST_CHECK(UI::Util::RecoderCache::get("ISO-8859-15", "rfc2047").run(iso_8859_15) == "=?ISO-8859-15?Q?=F6=E4=FC=DF=A4?="); BOOST_CHECK(UI::Util::RecoderCache::get("UTF-8", "rfc2047").run(utf8) == "=?UTF-8?Q?=C3=B6=C3=A4=C3=BC=C3=9F=E2=82=AC?="); BOOST_CHECK(UI::Util::RecoderCache::get("UTF-8", "rfc2047").run("Données du formulaire") == "=?UTF-8?Q?Donn=E9es_du_formulaire?="); // rfc3490 (IDN) BOOST_CHECK(UI::Util::RecoderCache::get("UTF-8", "rfc3490").run("tinc-test-fünf.de") == "xn--tinc-test-fnf-6ob.de"); BOOST_CHECK(UI::Util::RecoderCache::get("rfc3490", "UTF-8").run("xn--tinc-test-fnf-6ob.de") == "tinc-test-fünf.de"); // IDN-EMAIL BOOST_CHECK(UI::Util::RecoderCache::get("UTF-8", "idn-email").run("test@tinc-test-fünf.de") == "test@xn--tinc-test-fnf-6ob.de"); BOOST_CHECK(UI::Util::RecoderCache::get("ISO-8859-15", "idn-email").run("test@tinc-test-fünf.de") == "test@xn--tinc-test-fnf-6ob.de"); BOOST_CHECK(UI::Util::RecoderCache::get("ISO-8859-15", "idn-email").run(" test@tinc-test-fünf.de(Theo Test),a@würfel.de,c@d.de a@süß.de Humbug") == " test@xn--tinc-test-fnf-6ob.de(Theo Test),a@xn--wrfel-kva.de,c@d.de a@xn--sss-hoa.de Humbug"); BOOST_CHECK(UI::Util::RecoderCache::get("ISO-8859-15", "idn-email").run("") == ""); BOOST_CHECK(UI::Util::RecoderCache::get("ISO-8859-15", "idn-email").run("@") == "@"); BOOST_CHECK(UI::Util::RecoderCache::get("ISO-8859-15", "idn-email").run("@ö") == "@xn--nda"); } BOOST_AUTO_TEST_CASE(test_Strtok) { // strtok: delim can be any string (default is ","). { std::vector t(strtok("")); BOOST_CHECK(t.size() == 0); } { std::vector t(strtok(",")); BOOST_CHECK(t.size() == 0); } { std::vector t(strtok("A,Bee,Zeh")); BOOST_CHECK(t.size() == 3 && t.at(0) == "A" && t.at(1) == "Bee" && t.at(2) == "Zeh"); } { std::vector t(strtok(",A,Bee,Zeh,")); BOOST_CHECK(t.size() == 3 && t.at(0) == "A" && t.at(1) == "Bee" && t.at(2) == "Zeh"); } { std::vector t(strtok(",A,Bee,Zeh,", "Bee")); BOOST_CHECK(t.size() == 2 && t.at(0) == ",A," && t.at(1) == ",Zeh,"); } // strtoks: all single chars in delims act as delimiter (default is " \t\n\r"). { std::vector t(strtoks("")); BOOST_CHECK(t.size() == 0); } { std::vector t(strtoks(",")); BOOST_CHECK(t.size() == 1 && t.at(0) == ","); } { std::vector t(strtoks("A Bee \t Zeh\n")); BOOST_CHECK(t.size() == 3 && t.at(0) == "A" && t.at(1) == "Bee" && t.at(2) == "Zeh"); } { std::vector t(strtoks("Bettwurstende", "ewu")); BOOST_CHECK(t.size() == 4 && t.at(0) == "B" && t.at(1) == "tt" && t.at(2) == "rst" && t.at(3) == "nd"); } } BOOST_AUTO_TEST_CASE(test_join) { // strtok: delim can be any string (default is ","). { std::vector t; std::string s( join( "xxx", t ) ); BOOST_CHECK(s.size() == 0); } { std::vector t; t.push_back( "aa" ); t.push_back( "bb" ); t.push_back( "cc" ); t.push_back( "dd" ); std::string s( join( ",", t ) ); BOOST_CHECK( s == "aa,bb,cc,dd" ); } { std::set t; t.insert( "aa" ); t.insert( "bb" ); t.insert( "cc" ); t.insert( "dd" ); std::string s( join( ",", t ) ); BOOST_CHECK( s == "aa,bb,cc,dd" ); } } BOOST_AUTO_TEST_CASE(test_HttpCookie) { { Http::Cookies c; BOOST_CHECK(c.size() == 0); } { Http::Cookies c("a=aval"); BOOST_CHECK(c.size() == 1); BOOST_CHECK(c.at(0).getName() == "a" && c.at(0).getValue() == "aval"); } { Http::Cookies c("a=aval;"); BOOST_CHECK(c.size() == 1); BOOST_CHECK(c.at(0).getName() == "a" && c.at(0).getValue() == "aval"); } { Http::Cookies c("a=aval; b=bval;"); BOOST_CHECK(c.size() == 2); BOOST_CHECK(c.at(0).getName() == "a" && c.at(0).getValue() == "aval"); BOOST_CHECK(c.at(1).getName() == "b" && c.at(1).getValue() == "bval"); } { Http::Cookies c("a=aval;b=bval;"); BOOST_CHECK(c.size() == 2); BOOST_CHECK(c.at(0).getName() == "a" && c.at(0).getValue() == "aval"); BOOST_CHECK(c.at(1).getName() == "b" && c.at(1).getValue() == "bval"); } { Http::Cookies c("a=aval; b=bval"); BOOST_CHECK(c.size() == 2); BOOST_CHECK(c.at(0).getName() == "a" && c.at(0).getValue() == "aval"); BOOST_CHECK(c.at(1).getName() == "b" && c.at(1).getValue() == "bval"); } { Http::Cookies c("a=aval;b=bval"); BOOST_CHECK(c.size() == 2); BOOST_CHECK(c.at(0).getName() == "a" && c.at(0).getValue() == "aval"); BOOST_CHECK(c.at(1).getName() == "b" && c.at(1).getValue() == "bval"); } { Http::Cookies c("a=a val; b=bval"); BOOST_CHECK(c.size() == 1); BOOST_CHECK(c.at(0).getName() == "b" && c.at(0).getValue() == "bval"); } { Http::Cookies c("a=aval;foo;b=bval;c=cval"); BOOST_CHECK(c.size() == 2); BOOST_CHECK(c.at(0).getName() == "a" && c.at(0).getValue() == "aval"); BOOST_CHECK(c.at(1).getName() == "c" && c.at(1).getValue() == "cval"); } { Http::Header header; std::string const line("pre0_eins=1; pre0_zwei=2; pre1_drei=3; pre0_=no_name"); header.add("Cookie: " + line); BOOST_CHECK(Http::Cookies(header).getLine() == line); BOOST_CHECK(Http::Cookies(header, "pre0_").getLine() == "eins=1; zwei=2; =no_name"); BOOST_CHECK(Http::Cookies(header, "pre1_").getLine() == "drei=3"); BOOST_CHECK(Http::Cookies(header, "pre0_").getLine("proll_") == "proll_eins=1; proll_zwei=2; proll_=no_name"); } } BOOST_AUTO_TEST_CASE(test_HttpSetCookie) { Http::SetCookie("sessid").setLine("sessid=test;"); } BOOST_AUTO_TEST_CASE(test_HttpHeader) { Http::Header iHeader; iHeader. add("Content-Length: 1000"). add("X-PREFIX-PH-0: PV-0"). add("Multiple: MV-0"). add("X-PREFIX-PH-1: PV-1"). add("Multiple: MV-1"). add("X-PREFIX-PH-2: PV-2"). add("Multiple: MV-2"). add("X-Non-ASCII: äöüÄÖÜbertragÜ"). add("empty0:"). add("empty1: "); // Check plain header BOOST_CHECK(iHeader.size() == 10); BOOST_CHECK(iHeader.get("Content-Length") == 1000); BOOST_CHECK(iHeader.get("X-PREFIX-PH-1") == "PV-1"); BOOST_CHECK(iHeader.get("X-Non-ASCII") == "??????bertrag?"); BOOST_CHECK(iHeader.get("empty0") == ""); BOOST_CHECK(iHeader.get("empty1") == ""); // Get multi header fields (exact match) Http::Header multiHeader(iHeader.getMulti("Multiple")); BOOST_CHECK(multiHeader.size() == 3); BOOST_CHECK(multiHeader.at(0).getName() == "Multiple" && multiHeader.at(0).getValue() == "MV-0"); BOOST_CHECK(multiHeader.at(1).getName() == "Multiple" && multiHeader.at(1).getValue() == "MV-1"); BOOST_CHECK(multiHeader.at(2).getName() == "Multiple" && multiHeader.at(2).getValue() == "MV-2"); // Get all headerfields w/ prefix Http::Header prefixHeader(iHeader.getPrefix("X-PREFIX-")); BOOST_CHECK(prefixHeader.size() == 3); BOOST_CHECK(prefixHeader.at(0).getName() == "PH-0" && prefixHeader.at(0).getValue() == "PV-0"); BOOST_CHECK(prefixHeader.at(1).getName() == "PH-1" && prefixHeader.at(1).getValue() == "PV-1"); BOOST_CHECK(prefixHeader.at(2).getName() == "PH-2" && prefixHeader.at(2).getValue() == "PV-2"); } #ifndef WIN32 BOOST_AUTO_TEST_CASE(test_Http) { // Open an internal socket pair for testing UI::Util::SocketPair sp; Http::Connection server(sp.first()); Http::Connection client(sp.second()); // Client writes GET request { client.write(Http::RequestLine(Http::RequestLine::Get_, "/hotzenplotz")); client.write(Http::Header().add("Host", "localhost")); client.writeLine(); client.s().flush(); } // Server reads incoming request { Http::RequestLine requestLine(server.readLine()); BOOST_CHECK(requestLine.getMethod() == Http::RequestLine::Get_); BOOST_CHECK(requestLine.getMethodStr() == "GET"); BOOST_CHECK(requestLine.getURI() == "/hotzenplotz"); Http::Header header(server.readHeader()); BOOST_CHECK(header.get("Host") == "localhost"); } std::string const body("Test response body."); // Server writes response { server.write(Http::StatusLine(200)); server.write(Http::Header(). add("Content-Length", tos(body.size())). add("Content-Type", "text/plain")); server.writeLine(); server.write(body); } // Client reads response { Http::StatusLine status(client.readLine()); BOOST_CHECK(status.getCode() == 200); BOOST_CHECK(status.getReason() == "OK"); std::cerr << status.getReason() << std::endl; Http::Header header(client.readHeader()); BOOST_CHECK(header.get("Content-Type") == "text/plain"); BOOST_CHECK(body == client.readBlock(header.get("Content-Length"))); } } #endif BOOST_AUTO_TEST_CASE(test_Http_Get) { #ifdef WIN32 WSADATA wsaData; int iResult = ::WSAStartup(MAKEWORD(2,2), &wsaData); if (iResult != NO_ERROR) { BOOST_CHECK(false); return; } #endif #ifdef UI_UTILCPP_UNITTESTS_HTTP_LOCALHOST // Note: These tests only work if you have a local httpd server running. Http::URLGet get1("http://localhost"); Http::URLGet get2("http://localhost/"); Http::URLGet get3("http://localhost:80"); Http::URLGet get4("http://localhost:80/"); Http::URLGet get5("http://localhost:80?a=b&c=d"); #endif #ifdef WIN32 ::WSACleanup(); #endif } BOOST_AUTO_TEST_CASE(test_RealTimeStamp) { RealTimeStamp s0; RealTimeStamp s1; s0.stamp(); Sys::sleep(1); s1.stamp(); RealTimeStamp const diff(s1-s0); RealTimeStamp const bottomMargin(0,400000); RealTimeStamp const topMargin(1,600000); BOOST_CHECK(bottomMargin < diff); BOOST_CHECK(diff < topMargin); std::cout << "RealTimeStamp diff is: " << diff << " (should be: about 1 seconds)." << std::endl; } BOOST_AUTO_TEST_CASE(test_FsInfo) { FsInfo fsInfo("C:", "."); std::cout << "Total: " << fsInfo.getTotal() << std::endl; std::cout << "Used : " << fsInfo.getUsed() << std::endl; std::cout << "Avail: " << fsInfo.getAvail() << std::endl; std::cout << "Free : " << fsInfo.getFree() << std::endl; } BOOST_AUTO_TEST_CASE(test_PosixRegex) { // ---------------------012345678901234567890 std::string const text("Pumpernickelwurstbrot"); { PosixRegex::Match const match(PosixRegex("nickel").runMatch(text)); BOOST_CHECK(match.matches); BOOST_CHECK(match.begin == 6); BOOST_CHECK(match.end == 12); std::cout << "Matches/Begin/End: " << match.matches << "/" << match.begin << "/" << match.end << std::endl; } { PosixRegex::Match const match(PosixRegex("nixdrin").runMatch(text)); BOOST_CHECK(not match.matches); std::cout << "Matches/Begin/End: " << match.matches << "/" << match.begin << "/" << match.end << std::endl; } } }} ui-utilcpp-1.8.5/src/tools/PaxHeaders.1390/Regex.cpp0000644000000000000000000000013112751117070016776 xustar0030 mtime=1470406200.111952115 30 atime=1470498397.850885015 29 ctime=1470503616.09034156 ui-utilcpp-1.8.5/src/tools/Regex.cpp0000644000175000017500000000323512751117070020153 0ustar00absurdabsurd00000000000000// Local #include "config.h" // STDC++ #include #include // C++ Libraries #include #include int main(int argc, char *argv[]) { int retValue(0); if (argc != 3) { std::cerr << "Simple grep-like test program: compares line per line, prints matching lines." << std::endl; std::cerr << "Usage0: " << argv[0] << " " << std::endl; std::cerr << "Usage1: " << argv[0] << " RANDOM " << std::endl; exit(1); } try { std::string regex((std::string) argv[1]); if (regex == "RANDOM") { // Random test const long max(UI::Util::ato(argv[2])); long count(0); long matches(0); std::string regex(UI::Util::genAlphaNumericKey(4)); std::cout << "Regex: " << regex << std::endl; while (count < max) { std::string text(UI::Util::genAlphaNumericKey(160)); if (UI::Util::PosixRegex(regex, REG_EXTENDED).run(text)) { std::cout << text << std::endl; ++matches; } ++count; } std::cout << matches << " matches in " << count << " random comparisons." << std::endl; } else { std::string fileName((std::string) argv[2]); std::ifstream f(fileName.c_str(), std::ios::in); char line[160]; while (!f.eof()) { f.getline(line, 160); if (UI::Util::PosixRegex(regex, REG_EXTENDED).run(line)) std::cout << line << std::endl; } } } catch (UI::Util::PosixRegex::Exception const & e) { std::cerr << "Posix Err Code: " << e.getCode() << "." << std::endl; std::cerr << "Posix Err Text: " << e.what() << "." << std::endl; } catch (...) { std::cerr << "Unknown exception" << std::endl; } return(retValue); } ui-utilcpp-1.8.5/src/tools/PaxHeaders.1390/Threads.cpp0000644000000000000000000000013212751117070017317 xustar0030 mtime=1470406200.111952115 30 atime=1470498397.850885015 30 ctime=1470503616.094341484 ui-utilcpp-1.8.5/src/tools/Threads.cpp0000644000175000017500000000135612751117070020475 0ustar00absurdabsurd00000000000000// Local #include "config.h" // STDC++ #include #include #include // POSIX C // C++ Libraries #include #include template class MyThread: public T { private: int run() { for (int i(0); i < 5; ++i) { std::cout << "(PID " << T::getPID() << ": blurp)..." << std::flush; UI::Util::nssleep(1); } return(42); } }; void test(UI::Util::ProcessThread * t) { std::cout << "Starting thread: " << std::flush; t->start(); int exitCode(t->wait()); std::cout << "finished with status: " << exitCode << std::endl; } int main() { try { MyThread ft; test(&ft); } catch(...) { std::cerr << "Exception" << std::endl; } } ui-utilcpp-1.8.5/src/tools/PaxHeaders.1390/WGet.cpp0000644000000000000000000000013212751117070016573 xustar0030 mtime=1470406200.111952115 30 atime=1470498397.850885015 30 ctime=1470503616.094341484 ui-utilcpp-1.8.5/src/tools/WGet.cpp0000644000175000017500000000140512751117070017744 0ustar00absurdabsurd00000000000000// Local configuration #include "config.h" // STDC++ #include #include // C++ Libraries #include #include int main(int argc, char *argv[]) { #ifdef WIN32 UI::Util::Sys::wsaStartup(); #endif int retVal(0); try { if (argc < 2) throw UI::Exception("Wrong usage"); UI::Util::Http::URLGet get(argv[1]); std::cout << get.getStatus().get() << std::endl; std::cout << get.getHeader().get() << std::endl; std::cout << get.getBody() << std::endl; } catch (std::exception const & e) { std::cerr << "Exception: " << e.what() << "." << std::endl; std::cerr << "Usage: ui-utilcpp-wget URL" << std::endl; retVal = 1; } #ifdef WIN32 UI::Util::Sys::wsaCleanup(); #endif return retVal; } ui-utilcpp-1.8.5/src/tools/PaxHeaders.1390/GetOpt.cpp0000644000000000000000000000013112751407565017141 xustar0030 mtime=1470500725.508960636 30 atime=1470500725.612958674 29 ctime=1470503616.09034156 ui-utilcpp-1.8.5/src/tools/GetOpt.cpp0000644000175000017500000000336212751407565020317 0ustar00absurdabsurd00000000000000// Local configuration #include "config.h" // STDC++ #include // POSIX C // SYSTEM C // C++ Libraries #include int main(int argc, char *argv[]) { int retValue(0); // Define Command Line Arguments UI::Util::GetOpt getOpt(argc, argv); getOpt .set("version", 'v', UI::Util::GetOpt::NoArg_, "Show version information.") .set("help", 'h', UI::Util::GetOpt::NoArg_, "Show usage information.") .set("noarg", 'n', UI::Util::GetOpt::NoArg_, "Option with no argument.") .set("arg", 'a', UI::Util::GetOpt::Arg_, "Option with mandatory argument.") .set("optarg", 'o', UI::Util::GetOpt::OptArg_, "Option with optional argument."); // Process standard options if (!getOpt.isValid()) { retValue = getOpt.wrongUsage("Parse error"); } else if (getOpt.get("version")->isGiven()) { std::cout << "Release: " << PACKAGE << "-" << VERSION << "." << std::endl << std::endl; } else if (getOpt.get("help")->isGiven()) { std::cout << std::endl << "Blah tool to do blah." << std::endl; getOpt.printUsage(); } else { // Go down all other options sequentially if (getOpt.get("noarg")->isGiven()) { std::cout << "Option \"noarg\" given." << std::endl; } if (getOpt.get("arg")->isGiven()) { std::cout << "Option \"arg\" given." << std::endl; std::cout << "Argument is: " << getOpt.get("arg")->getArg() << std::endl; } if (getOpt.get("optarg")->isGiven()) { std::cout << "Option \"arg\" given." << std::endl; std::cout << "Argument is: " << getOpt.get("optarg")->getArg() << std::endl; } // Here, some main program code starts std::cout << "Program Main Run" << std::endl; std::cout << "Try --help if you want to test GetOpt" << std::endl; } return retValue; } ui-utilcpp-1.8.5/src/tools/PaxHeaders.1390/Makefile.in0000644000000000000000000000013212751415267017277 xustar0030 mtime=1470503607.258508002 30 atime=1470503613.550389427 30 ctime=1470503616.082341711 ui-utilcpp-1.8.5/src/tools/Makefile.in0000644000175000017500000011036712751415267020460 0ustar00absurdabsurd00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = ui-utilcpp-unittests$(EXEEXT) \ ui-utilcpp-getopt$(EXEEXT) ui-utilcpp-getopt$(EXEEXT) \ ui-utilcpp-smlog$(EXEEXT) ui-utilcpp-smlogmono$(EXEEXT) \ ui-utilcpp-regex$(EXEEXT) ui-utilcpp-cmdline$(EXEEXT) \ ui-utilcpp-threads$(EXEEXT) ui-utilcpp-filelock$(EXEEXT) \ ui-utilcpp-echoserver$(EXEEXT) ui-utilcpp-quota$(EXEEXT) \ ui-utilcpp-recoder$(EXEEXT) ui-utilcpp-wget$(EXEEXT) \ ui-utilcpp-cap$(EXEEXT) subdir = src/tools 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) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(docdir)" PROGRAMS = $(bin_PROGRAMS) am_ui_utilcpp_cap_OBJECTS = Cap.$(OBJEXT) ui_utilcpp_cap_OBJECTS = $(am_ui_utilcpp_cap_OBJECTS) ui_utilcpp_cap_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.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_ui_utilcpp_cmdline_OBJECTS = CmdLine.$(OBJEXT) ui_utilcpp_cmdline_OBJECTS = $(am_ui_utilcpp_cmdline_OBJECTS) ui_utilcpp_cmdline_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la am_ui_utilcpp_echoserver_OBJECTS = EchoServer.$(OBJEXT) ui_utilcpp_echoserver_OBJECTS = $(am_ui_utilcpp_echoserver_OBJECTS) ui_utilcpp_echoserver_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la am_ui_utilcpp_filelock_OBJECTS = FileLock.$(OBJEXT) ui_utilcpp_filelock_OBJECTS = $(am_ui_utilcpp_filelock_OBJECTS) ui_utilcpp_filelock_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la am_ui_utilcpp_getopt_OBJECTS = GetOpt.$(OBJEXT) ui_utilcpp_getopt_OBJECTS = $(am_ui_utilcpp_getopt_OBJECTS) ui_utilcpp_getopt_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la am_ui_utilcpp_quota_OBJECTS = Quota.$(OBJEXT) ui_utilcpp_quota_OBJECTS = $(am_ui_utilcpp_quota_OBJECTS) ui_utilcpp_quota_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la am_ui_utilcpp_recoder_OBJECTS = Recoder.$(OBJEXT) ui_utilcpp_recoder_OBJECTS = $(am_ui_utilcpp_recoder_OBJECTS) ui_utilcpp_recoder_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la am_ui_utilcpp_regex_OBJECTS = Regex.$(OBJEXT) ui_utilcpp_regex_OBJECTS = $(am_ui_utilcpp_regex_OBJECTS) ui_utilcpp_regex_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la am_ui_utilcpp_smlog_OBJECTS = ui_utilcpp_smlog-SMLog.$(OBJEXT) ui_utilcpp_smlog_OBJECTS = $(am_ui_utilcpp_smlog_OBJECTS) ui_utilcpp_smlog_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_smlog_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(ui_utilcpp_smlog_CXXFLAGS) $(CXXFLAGS) \ $(ui_utilcpp_smlog_LDFLAGS) $(LDFLAGS) -o $@ am_ui_utilcpp_smlogmono_OBJECTS = \ ui_utilcpp_smlogmono-SMLogMono.$(OBJEXT) ui_utilcpp_smlogmono_OBJECTS = $(am_ui_utilcpp_smlogmono_OBJECTS) ui_utilcpp_smlogmono_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_smlogmono_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(ui_utilcpp_smlogmono_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_ui_utilcpp_threads_OBJECTS = Threads.$(OBJEXT) ui_utilcpp_threads_OBJECTS = $(am_ui_utilcpp_threads_OBJECTS) ui_utilcpp_threads_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la am_ui_utilcpp_unittests_OBJECTS = UnitTests.$(OBJEXT) ui_utilcpp_unittests_OBJECTS = $(am_ui_utilcpp_unittests_OBJECTS) ui_utilcpp_unittests_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la am_ui_utilcpp_wget_OBJECTS = WGet.$(OBJEXT) ui_utilcpp_wget_OBJECTS = $(am_ui_utilcpp_wget_OBJECTS) ui_utilcpp_wget_DEPENDENCIES = ../ui-utilcpp/libui-utilcpp.la 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; }; \ } SCRIPTS = $(bin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/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 = $(ui_utilcpp_cap_SOURCES) $(ui_utilcpp_cmdline_SOURCES) \ $(ui_utilcpp_echoserver_SOURCES) \ $(ui_utilcpp_filelock_SOURCES) $(ui_utilcpp_getopt_SOURCES) \ $(ui_utilcpp_quota_SOURCES) $(ui_utilcpp_recoder_SOURCES) \ $(ui_utilcpp_regex_SOURCES) $(ui_utilcpp_smlog_SOURCES) \ $(ui_utilcpp_smlogmono_SOURCES) $(ui_utilcpp_threads_SOURCES) \ $(ui_utilcpp_unittests_SOURCES) $(ui_utilcpp_wget_SOURCES) DIST_SOURCES = $(ui_utilcpp_cap_SOURCES) $(ui_utilcpp_cmdline_SOURCES) \ $(ui_utilcpp_echoserver_SOURCES) \ $(ui_utilcpp_filelock_SOURCES) $(ui_utilcpp_getopt_SOURCES) \ $(ui_utilcpp_quota_SOURCES) $(ui_utilcpp_recoder_SOURCES) \ $(ui_utilcpp_regex_SOURCES) $(ui_utilcpp_smlog_SOURCES) \ $(ui_utilcpp_smlogmono_SOURCES) $(ui_utilcpp_threads_SOURCES) \ $(ui_utilcpp_unittests_SOURCES) $(ui_utilcpp_wget_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(doc_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCGNU2_CONFIG = @CCGNU2_CONFIG@ CFLAGS = @CFLAGS@ 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@ EXTLIBS = @EXTLIBS@ FGREP = @FGREP@ GNULIBS = @GNULIBS@ 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@ $(OST_CXXX2_LIBS) LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OST_CXXX2_FLAGS = @OST_CXXX2_FLAGS@ OST_CXXX2_LIBS = @OST_CXXX2_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@ PERL = @PERL@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SINGLE_FLAGS = @SINGLE_FLAGS@ SINGLE_LIBS = @SINGLE_LIBS@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ UI_UTILCPP_CXXFLAGS = @UI_UTILCPP_CXXFLAGS@ 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 = $(datadir)/doc/$(PACKAGE)/examples dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I$(top_srcdir)/src AM_CXXFLAGS = -Wall scripts = ui-utilcpp-sp2ui EXTRA_DIST = ${scripts} bin_SCRIPTS = ${scripts} doc_DATA = GetOpt.cpp SMLog.cpp SMLogMono.cpp Regex.cpp CmdLine.cpp Threads.cpp FileLock.cpp EchoServer.cpp Quota.cpp ui_utilcpp_unittests_SOURCES = UnitTests.cpp ui_utilcpp_unittests_LDADD = $(XML_LIBS) $(XSLT_LIBS) -lboost_unit_test_framework ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_getopt_SOURCES = GetOpt.cpp ui_utilcpp_getopt_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_smlog_SOURCES = SMLog.cpp ui_utilcpp_smlog_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_smlog_CXXFLAGS = -pthread $(OST_CXXX2_FLAGS) -DSM_LOGFACILITY=ost::Slog::classUser -DSM_LOGLEVEL=7 ui_utilcpp_smlog_LDFLAGS = -pthread ui_utilcpp_smlogmono_SOURCES = SMLogMono.cpp ui_utilcpp_smlogmono_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_smlogmono_CXXFLAGS = -DSM_LOGLEVEL=7 ui_utilcpp_regex_SOURCES = Regex.cpp ui_utilcpp_regex_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_cmdline_SOURCES = CmdLine.cpp ui_utilcpp_cmdline_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_threads_SOURCES = Threads.cpp ui_utilcpp_threads_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_filelock_SOURCES = FileLock.cpp ui_utilcpp_filelock_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_echoserver_SOURCES = EchoServer.cpp ui_utilcpp_echoserver_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_quota_SOURCES = Quota.cpp ui_utilcpp_quota_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_recoder_SOURCES = Recoder.cpp ui_utilcpp_recoder_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_wget_SOURCES = WGet.cpp ui_utilcpp_wget_LDADD = ../ui-utilcpp/libui-utilcpp.la ui_utilcpp_cap_SOURCES = Cap.cpp ui_utilcpp_cap_LDADD = ../ui-utilcpp/libui-utilcpp.la 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 src/tools/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/tools/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 ui-utilcpp-cap$(EXEEXT): $(ui_utilcpp_cap_OBJECTS) $(ui_utilcpp_cap_DEPENDENCIES) $(EXTRA_ui_utilcpp_cap_DEPENDENCIES) @rm -f ui-utilcpp-cap$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_cap_OBJECTS) $(ui_utilcpp_cap_LDADD) $(LIBS) ui-utilcpp-cmdline$(EXEEXT): $(ui_utilcpp_cmdline_OBJECTS) $(ui_utilcpp_cmdline_DEPENDENCIES) $(EXTRA_ui_utilcpp_cmdline_DEPENDENCIES) @rm -f ui-utilcpp-cmdline$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_cmdline_OBJECTS) $(ui_utilcpp_cmdline_LDADD) $(LIBS) ui-utilcpp-echoserver$(EXEEXT): $(ui_utilcpp_echoserver_OBJECTS) $(ui_utilcpp_echoserver_DEPENDENCIES) $(EXTRA_ui_utilcpp_echoserver_DEPENDENCIES) @rm -f ui-utilcpp-echoserver$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_echoserver_OBJECTS) $(ui_utilcpp_echoserver_LDADD) $(LIBS) ui-utilcpp-filelock$(EXEEXT): $(ui_utilcpp_filelock_OBJECTS) $(ui_utilcpp_filelock_DEPENDENCIES) $(EXTRA_ui_utilcpp_filelock_DEPENDENCIES) @rm -f ui-utilcpp-filelock$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_filelock_OBJECTS) $(ui_utilcpp_filelock_LDADD) $(LIBS) ui-utilcpp-getopt$(EXEEXT): $(ui_utilcpp_getopt_OBJECTS) $(ui_utilcpp_getopt_DEPENDENCIES) $(EXTRA_ui_utilcpp_getopt_DEPENDENCIES) @rm -f ui-utilcpp-getopt$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_getopt_OBJECTS) $(ui_utilcpp_getopt_LDADD) $(LIBS) ui-utilcpp-quota$(EXEEXT): $(ui_utilcpp_quota_OBJECTS) $(ui_utilcpp_quota_DEPENDENCIES) $(EXTRA_ui_utilcpp_quota_DEPENDENCIES) @rm -f ui-utilcpp-quota$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_quota_OBJECTS) $(ui_utilcpp_quota_LDADD) $(LIBS) ui-utilcpp-recoder$(EXEEXT): $(ui_utilcpp_recoder_OBJECTS) $(ui_utilcpp_recoder_DEPENDENCIES) $(EXTRA_ui_utilcpp_recoder_DEPENDENCIES) @rm -f ui-utilcpp-recoder$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_recoder_OBJECTS) $(ui_utilcpp_recoder_LDADD) $(LIBS) ui-utilcpp-regex$(EXEEXT): $(ui_utilcpp_regex_OBJECTS) $(ui_utilcpp_regex_DEPENDENCIES) $(EXTRA_ui_utilcpp_regex_DEPENDENCIES) @rm -f ui-utilcpp-regex$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_regex_OBJECTS) $(ui_utilcpp_regex_LDADD) $(LIBS) ui-utilcpp-smlog$(EXEEXT): $(ui_utilcpp_smlog_OBJECTS) $(ui_utilcpp_smlog_DEPENDENCIES) $(EXTRA_ui_utilcpp_smlog_DEPENDENCIES) @rm -f ui-utilcpp-smlog$(EXEEXT) $(AM_V_CXXLD)$(ui_utilcpp_smlog_LINK) $(ui_utilcpp_smlog_OBJECTS) $(ui_utilcpp_smlog_LDADD) $(LIBS) ui-utilcpp-smlogmono$(EXEEXT): $(ui_utilcpp_smlogmono_OBJECTS) $(ui_utilcpp_smlogmono_DEPENDENCIES) $(EXTRA_ui_utilcpp_smlogmono_DEPENDENCIES) @rm -f ui-utilcpp-smlogmono$(EXEEXT) $(AM_V_CXXLD)$(ui_utilcpp_smlogmono_LINK) $(ui_utilcpp_smlogmono_OBJECTS) $(ui_utilcpp_smlogmono_LDADD) $(LIBS) ui-utilcpp-threads$(EXEEXT): $(ui_utilcpp_threads_OBJECTS) $(ui_utilcpp_threads_DEPENDENCIES) $(EXTRA_ui_utilcpp_threads_DEPENDENCIES) @rm -f ui-utilcpp-threads$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_threads_OBJECTS) $(ui_utilcpp_threads_LDADD) $(LIBS) ui-utilcpp-unittests$(EXEEXT): $(ui_utilcpp_unittests_OBJECTS) $(ui_utilcpp_unittests_DEPENDENCIES) $(EXTRA_ui_utilcpp_unittests_DEPENDENCIES) @rm -f ui-utilcpp-unittests$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_unittests_OBJECTS) $(ui_utilcpp_unittests_LDADD) $(LIBS) ui-utilcpp-wget$(EXEEXT): $(ui_utilcpp_wget_OBJECTS) $(ui_utilcpp_wget_DEPENDENCIES) $(EXTRA_ui_utilcpp_wget_DEPENDENCIES) @rm -f ui-utilcpp-wget$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(ui_utilcpp_wget_OBJECTS) $(ui_utilcpp_wget_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Cap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CmdLine.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EchoServer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FileLock.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GetOpt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Quota.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Recoder.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Regex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Threads.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UnitTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WGet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_utilcpp_smlog-SMLog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ui_utilcpp_smlogmono-SMLogMono.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 $@ $< ui_utilcpp_smlog-SMLog.o: SMLog.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ui_utilcpp_smlog_CXXFLAGS) $(CXXFLAGS) -MT ui_utilcpp_smlog-SMLog.o -MD -MP -MF $(DEPDIR)/ui_utilcpp_smlog-SMLog.Tpo -c -o ui_utilcpp_smlog-SMLog.o `test -f 'SMLog.cpp' || echo '$(srcdir)/'`SMLog.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ui_utilcpp_smlog-SMLog.Tpo $(DEPDIR)/ui_utilcpp_smlog-SMLog.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='SMLog.cpp' object='ui_utilcpp_smlog-SMLog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ui_utilcpp_smlog_CXXFLAGS) $(CXXFLAGS) -c -o ui_utilcpp_smlog-SMLog.o `test -f 'SMLog.cpp' || echo '$(srcdir)/'`SMLog.cpp ui_utilcpp_smlog-SMLog.obj: SMLog.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ui_utilcpp_smlog_CXXFLAGS) $(CXXFLAGS) -MT ui_utilcpp_smlog-SMLog.obj -MD -MP -MF $(DEPDIR)/ui_utilcpp_smlog-SMLog.Tpo -c -o ui_utilcpp_smlog-SMLog.obj `if test -f 'SMLog.cpp'; then $(CYGPATH_W) 'SMLog.cpp'; else $(CYGPATH_W) '$(srcdir)/SMLog.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ui_utilcpp_smlog-SMLog.Tpo $(DEPDIR)/ui_utilcpp_smlog-SMLog.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='SMLog.cpp' object='ui_utilcpp_smlog-SMLog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ui_utilcpp_smlog_CXXFLAGS) $(CXXFLAGS) -c -o ui_utilcpp_smlog-SMLog.obj `if test -f 'SMLog.cpp'; then $(CYGPATH_W) 'SMLog.cpp'; else $(CYGPATH_W) '$(srcdir)/SMLog.cpp'; fi` ui_utilcpp_smlogmono-SMLogMono.o: SMLogMono.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ui_utilcpp_smlogmono_CXXFLAGS) $(CXXFLAGS) -MT ui_utilcpp_smlogmono-SMLogMono.o -MD -MP -MF $(DEPDIR)/ui_utilcpp_smlogmono-SMLogMono.Tpo -c -o ui_utilcpp_smlogmono-SMLogMono.o `test -f 'SMLogMono.cpp' || echo '$(srcdir)/'`SMLogMono.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ui_utilcpp_smlogmono-SMLogMono.Tpo $(DEPDIR)/ui_utilcpp_smlogmono-SMLogMono.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='SMLogMono.cpp' object='ui_utilcpp_smlogmono-SMLogMono.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ui_utilcpp_smlogmono_CXXFLAGS) $(CXXFLAGS) -c -o ui_utilcpp_smlogmono-SMLogMono.o `test -f 'SMLogMono.cpp' || echo '$(srcdir)/'`SMLogMono.cpp ui_utilcpp_smlogmono-SMLogMono.obj: SMLogMono.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ui_utilcpp_smlogmono_CXXFLAGS) $(CXXFLAGS) -MT ui_utilcpp_smlogmono-SMLogMono.obj -MD -MP -MF $(DEPDIR)/ui_utilcpp_smlogmono-SMLogMono.Tpo -c -o ui_utilcpp_smlogmono-SMLogMono.obj `if test -f 'SMLogMono.cpp'; then $(CYGPATH_W) 'SMLogMono.cpp'; else $(CYGPATH_W) '$(srcdir)/SMLogMono.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ui_utilcpp_smlogmono-SMLogMono.Tpo $(DEPDIR)/ui_utilcpp_smlogmono-SMLogMono.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='SMLogMono.cpp' object='ui_utilcpp_smlogmono-SMLogMono.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ui_utilcpp_smlogmono_CXXFLAGS) $(CXXFLAGS) -c -o ui_utilcpp_smlogmono-SMLogMono.obj `if test -f 'SMLogMono.cpp'; then $(CYGPATH_W) 'SMLogMono.cpp'; else $(CYGPATH_W) '$(srcdir)/SMLogMono.cpp'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-docDATA: $(doc_DATA) @$(NORMAL_INSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-docDATA: @$(NORMAL_UNINSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docdir)'; $(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 $(MAKE) $(AM_MAKEFLAGS) check-local check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(docdir)"; 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." 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-docDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-binSCRIPTS 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-binPROGRAMS uninstall-binSCRIPTS \ uninstall-docDATA .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am check-local 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-binSCRIPTS install-data install-data-am \ install-docDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am 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-binPROGRAMS \ uninstall-binSCRIPTS uninstall-docDATA .PRECIOUS: Makefile check-local: ./ui-utilcpp-unittests # 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: ui-utilcpp-1.8.5/src/tools/PaxHeaders.1390/ui-utilcpp-sp2ui0000644000000000000000000000007412354527746020322 xustar0030 atime=1470498397.850885015 30 ctime=1470503616.094341484 ui-utilcpp-1.8.5/src/tools/ui-utilcpp-sp2ui0000755000175000017500000000225212354527746021472 0ustar00absurdabsurd00000000000000#!/bin/bash -e . ui-libopt.sh ui_opt_init "Interactively update a project using sp-utilcpp to to ui-utilcpp. Just run this from your project's top level." ui_opt_parse "$@" replace() { local f="$1" local s="$2" local d="$3" local f_tmp="$f.ui-utilcpp-sp2ui.tmp" cp "${f}" "${f_tmp}" sed "s/${s}/${d}/g" "${f_tmp}" >"${f}" rm "${f_tmp}" } echo "Assuming project using old sp-utilcpp in wd." read -p "RETURN to update project (changes only local files), C-c to cancel." ui-auto-uvc check_sync for f in `find . -type f ! -wholename "*/.svn/*" ! -wholename "*/CVS/*" ! -name "*~" ! -name "ChangeLog" ! -name "NEWS" ! -name "*sp2ui*"`; do echo "Updating ${f}..." replace "$f" "sp-utilcpp" "ui-utilcpp" replace "$f" "sp_utilcpp" "ui_utilcpp" replace "$f" "namespace SP" "namespace UI" replace "$f" "SP::" "UI::" replace "$f" "SP_THROW" "UI_THROW" done echo echo "=> Project updated; remaining TODOS for you:" echo echo "* Verify all changed files via VCS. You should only see sp->ui naming conversions for ui-utilcpp related strings." echo "* Run \"ui-auto-strap && ./configure && make distcheck\" to test changes." echo "* VC: You may need to fix up 'ignore settings'." exit 0 ui-utilcpp-1.8.5/src/tools/PaxHeaders.1390/SMLog.cpp0000644000000000000000000000013112751117070016705 xustar0030 mtime=1470406200.111952115 30 atime=1470498397.850885015 29 ctime=1470503616.09034156 ui-utilcpp-1.8.5/src/tools/SMLog.cpp0000644000175000017500000000065312751117070020063 0ustar00absurdabsurd00000000000000// Local configuration #include "config.h" // C++ Libraries #include int main() { // configure ost::slog.open("ui-utilcpp_smlogm", ost::Slog::classUser); ost::slog.clogEnable(true); SM_LOGEMERG("EMERG log"); SM_LOGALERT("ALERT log"); SM_LOGCRIT("CRIT log"); SM_LOGERR("ERR log"); SM_LOGWARNING("WARNING log"); SM_LOGNOTICE("NOTICE log"); SM_LOGINFO("INFO log"); SM_LOGDEBUG("DEBUG log"); } ui-utilcpp-1.8.5/src/tools/PaxHeaders.1390/Cap.cpp0000644000000000000000000000013212751117070016430 xustar0030 mtime=1470406200.111952115 30 atime=1470498397.850885015 30 ctime=1470503616.086341635 ui-utilcpp-1.8.5/src/tools/Cap.cpp0000644000175000017500000000352412751117070017605 0ustar00absurdabsurd00000000000000// Local #include "config.h" // STDC++ #include // C++ Libraries #include #include void showCaps(std::string const & s, UI::Util::Cap const & c=UI::Util::Cap()) { std::cout << s << ": " << c.get() << std::endl; } void changeCaps(std::string const & s) { showCaps("pre : [" + s + "]"); UI::Util::Cap(s).apply(); showCaps("post: [" + s + "]"); } std::string USAGE("\nOnly a little dirty capabilities example program; see source.\n" " Roughly this should run w/o exception:\n" " $ touch ./local-capabilities.test\n" " $ sudo ui-utilcpp-cap\n"); int main() { try { std::cout << "UID/EUID:" << UI::Util::Sys::getuid() << "/" << UI::Util::Sys::geteuid() << std::endl; showCaps("Initial"); // Run this as root with this local file existing std::string const testfile("./local-capabilities.test"); // Change file permissions to root UI::Util::Sys::chown(testfile.c_str(), 0, 0); // Keep capabilities when running setuid UI::Util::Sys::prctl(PR_SET_KEEPCAPS, 1); // Lower capabilities UI::Util::Cap("cap_chown+p", UI::Util::Cap::Clear_).apply(); showCaps("Lowered"); // Set user and group id // Note: we just use 1000 (Debian's default for the first user/group) hardcoded here; change if needed. assert(::setuid(1000) == 0); assert(::setgid(1000) == 0); std::cout << "UID/EUID:" << UI::Util::Sys::getuid() << "/" << UI::Util::Sys::geteuid() << std::endl; #ifdef HAVE_CAP_COMPARE UI::Util::Cap c; assert(UI::Util::Cap() == c); #endif showCaps("After setuid"); { UI::Util::CapScope cs("cap_chown"); showCaps("In CapScope"); UI::Util::Sys::chown(testfile.c_str(), 1000, 1000); } showCaps("After CapScope"); } catch (std::exception const & e) { std::cerr << std::endl << "*EXCEPTION*: " << e.what() << std::endl; std::cerr << USAGE << std::endl; } } ui-utilcpp-1.8.5/src/tools/PaxHeaders.1390/CmdLine.cpp0000644000000000000000000000013212751117070017240 xustar0030 mtime=1470406200.111952115 30 atime=1470498397.850885015 30 ctime=1470503616.086341635 ui-utilcpp-1.8.5/src/tools/CmdLine.cpp0000644000175000017500000000216512751117070020415 0ustar00absurdabsurd00000000000000// Local #include "config.h" // STDC++ #include #include #include // POSIX C // C++ Libraries #include class TestCmd: public UI::Util::CmdLine::Cmd { public: TestCmd() :Cmd("test", "Test command") { addArg("testarg", "Mandatory test argument documentation"); addOptArg("testoptarg", "Optional test argument documentation"); } private: int runCmd() { cl_->os() << "Test command running" << std::endl; cl_->os() << "Arg(1) == " << getArg(1) << std::endl; cl_->os() << "Arg(2) == " << getArg(2) << std::endl; // Return "0" for ok, anything else for error return(0); } }; class TestCmdLine: public UI::Util::CmdLine::CmdLine { public: TestCmdLine(std::istream * is, std::ostream * os) :CmdLine(is, os, &std::cerr, "Test Command Line", "\nTest Prompt# ") { // You can set some intital variables here setVar("NATIVE_MOJO", "YES"); // You add any amount of Commands here add(new UI::Util::CmdLine::HeaderCmd("Custom command line functions")); add(new TestCmd()); } ~TestCmdLine() {} }; int main() { return(TestCmdLine(0, &std::cout).run()); } ui-utilcpp-1.8.5/src/PaxHeaders.1390/Makefile.am0000644000000000000000000000013212751117070016115 xustar0030 mtime=1470406200.111952115 30 atime=1470498360.479590898 30 ctime=1470503615.982343595 ui-utilcpp-1.8.5/src/Makefile.am0000644000175000017500000000006412751117070017266 0ustar00absurdabsurd00000000000000SUBDIRS = ui-utilcpp tools EXTRA_DIST = xfs/swab.h ui-utilcpp-1.8.5/src/PaxHeaders.1390/ui-utilcpp0000644000000000000000000000013012751415300016072 xustar0029 mtime=1470503616.03834254 30 atime=1470503616.118341032 29 ctime=1470503616.03834254 ui-utilcpp-1.8.5/src/ui-utilcpp/0000755000175000017500000000000012751415300017322 5ustar00absurdabsurd00000000000000ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/SysLogMono.hpp0000644000000000000000000000013212751117070020736 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.854884939 30 ctime=1470503616.014342992 ui-utilcpp-1.8.5/src/ui-utilcpp/SysLogMono.hpp0000644000175000017500000000332112751117070022106 0ustar00absurdabsurd00000000000000/** * @file SysLogMono.hpp * @author Schlund + Partner AG * @brief Syslog Mono Log: Singleton logger using syslog() for mono threaded applications * @see SMLogMono.hpp * * Synopsis: * @code * #include * @endcode * */ #ifndef UI_UTIL_SYSLOGMONO_HPP #define UI_UTIL_SYSLOGMONO_HPP // STDC++ #include #include // POSIX C #include namespace UI { namespace Util { /** @brief C++ Abstraction of syslog(3) for mono threaded applications. */ class SysLogMono: public std::streambuf, public std::ostream { public: /** * @param ident Identifier (prefix) for the log lines. * @param option Options as described in syslog(3). * @param facility Facility as described in syslog(3). */ SysLogMono(std::string const & ident, int option, int facility); /** @brief Destructor. */ ~SysLogMono(); /** @brief Log operator. * * @param level Log level as described in syslog(3). */ SysLogMono & operator() (int level); private: int overflow(int c); std::string const ident_; std::string buf_; int level_; }; /** @brief Singleton class holding one SysLogMono object. */ class SysLogMonoSingleton { public: /** * @param ident Identifier (prefix) for the log lines. * @param option Options as described in syslog(3). * @param facility Facility as described in syslog(3). */ SysLogMonoSingleton(std::string const & ident, int option, int facility); /** */ ~SysLogMonoSingleton(); /** @brief Log function; you may stream directly into the result. * * @param level Log level as described in syslog(3). * @returns SysLogMono stream ready to stream into. */ static SysLogMono & log(int level); private: static SysLogMono * singleton_; }; }} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Time.hpp0000644000000000000000000000013212751117070017563 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.854884939 30 ctime=1470503616.018342917 ui-utilcpp-1.8.5/src/ui-utilcpp/Time.hpp0000644000175000017500000000704512751117070020742 0ustar00absurdabsurd00000000000000/** * @file */ #ifndef UI_UTIL_TIME_HPP #define UI_UTIL_TIME_HPP // STDC++ #include // C++ libraries #include namespace UI { namespace Util { /** @brief Get "sec"-part from gettimeofday(2). */ long int getTimeValSec(); /** @brief Get "usec"-part from gettimeofday(2). */ long int getTimeValUSec(); /** @brief No Signal Sleep: Using POSIX nanosleep(2). * * @see nanosleep(2), POSIX.1. * * @return Return values of POSIX nanosleep(2) call (0 for no error). * */ unsigned int nanosleep(unsigned int seconds, long int nanoseconds); /** @brief No Signal Seconds Sleep: Using POSIX nanosleep(2). * * You may use this as drop-in replacement for sleep(3) if you do * not want any signals to be raised. * * @see nanosleep. */ unsigned int nssleep(unsigned int seconds); /** @brief No Signal Nano Sleep. * * @see nanosleep. */ unsigned int nsnsleep(long int nanoseconds); /** @brief RealTimeStamp class encapsulating "gettimeofday". * * @see time(2) (POSIX), gettimeofday(2) (BSD). */ class RealTimeStamp { public: /** @brief Error codes for exceptions. */ enum ErrorCode { NegativeStamp_=1 }; /** @brief This classes exceptions. */ typedef CodeException Exception; /** @brief Standard constructor. * * @param sec Seconds since Epoch. * @param usec Micro (10^-6) seconds since Epoch+sec. * @note Values will be "normalised" (make microseconds < 10^6). Altogether, it must not * be a negative date (before Epoch). */ RealTimeStamp(long int const & sec=0, long int const & usec=0); /** @brief Set time stamp manually. * * @param sec Seconds since Epoch. * @param usec Micro (10^-6) seconds since Epoch+sec. * @returns Reference to itself */ RealTimeStamp & set(long int const & sec, long int const & usec); /** @brief Set this stamp to maximum. */ RealTimeStamp & setMax(); /** @brief Set this stamp to minimum (Epoch) */ RealTimeStamp & setMin(); /** @brief Set time stamp from current time. * * @returns Reference to itself */ RealTimeStamp & stamp(); /** @brief Get seconds since Epoch. */ long int getSec() const; /** @brief Get micro seconds since Epoch+sec. */ long int getUSec() const; /** @brief Get seconds (since Epoch) as real number (including micro seconds). */ long double getSeconds() const; /** @brief Standard == operator. */ bool operator == (RealTimeStamp const & rt) const; /** @brief Standard < operator. */ bool operator < (RealTimeStamp const & rt) const; /** @brief Standard <= operator. */ bool operator <= (RealTimeStamp const & rt) const; /** @brief Standard += operator. */ RealTimeStamp & operator += (RealTimeStamp const & rt); /** @brief Standard + operator. */ RealTimeStamp operator + (RealTimeStamp const & rt) const; /** @brief Standard -= operator. */ RealTimeStamp & operator -= (RealTimeStamp const & rt); /** @brief Standard - operator. */ RealTimeStamp operator - (RealTimeStamp const & rt) const; private: long int sec_; long int usec_; static long int const tenExpSix_; void normalize(); }; /** @brief Streaming operator for RealTimeStamp. */ std::ostream & operator << (std::ostream & os, RealTimeStamp const & rt); /** @brief Log time used for a scope. * * - Usage as-is: Automatic logging to out stream (nothing if NULL). * - Usage custom logging: Derive class, add custom logging to derived class' destructor, construct w/ out=0. */ class ScopeRealTime: private RealTimeStamp { private: std::ostream * const out_; public: ScopeRealTime(std::ostream * const out); ~ScopeRealTime(); RealTimeStamp get() const; }; }} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/SysLogMono.cpp0000644000000000000000000000013212751117070020731 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.854884939 30 ctime=1470503616.034342615 ui-utilcpp-1.8.5/src/ui-utilcpp/SysLogMono.cpp0000644000175000017500000000225312751117070022104 0ustar00absurdabsurd00000000000000// Local configuration #include "config.h" // Implementation #include "SysLogMono.hpp" // STDC++ #include // C: Syslog #include // Local #include "Misc.hpp" namespace UI { namespace Util { SysLogMono::SysLogMono(std::string const & ident, int option, int facility) :std::streambuf() ,std::ostream((std::streambuf *)this) ,ident_(ident) ,buf_("") ,level_(LOG_DEBUG) { ::openlog(ident_.c_str(), option, facility); } SysLogMono::~SysLogMono(void) { ::closelog(); } int SysLogMono::overflow(int c) { if (c == '\n' || c == '\0') { ::syslog(level_, "%s", buf_.c_str()); buf_ = ""; } else { buf_ += (char)c; } return c; } SysLogMono & SysLogMono::operator()(int level) { level_ = level; return *this; } SysLogMonoSingleton::SysLogMonoSingleton(std::string const & ident, int option, int facility) { assert(singleton_ == 0); singleton_ = new SysLogMono(ident, option, facility); } SysLogMonoSingleton::~SysLogMonoSingleton() { assert(singleton_); delete singleton_; singleton_ = 0; } SysLogMono & SysLogMonoSingleton::log(int level) { assert(singleton_); return (*singleton_)(level); } SysLogMono * SysLogMonoSingleton::singleton_(0); }} ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Misc.cpp0000644000000000000000000000013212751117070017553 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.854884939 30 ctime=1470503616.030342691 ui-utilcpp-1.8.5/src/ui-utilcpp/Misc.cpp0000644000175000017500000000114512751117070020725 0ustar00absurdabsurd00000000000000#include "config.h" // Implementation #include "Misc.hpp" // Local #include "Text.hpp" namespace UI { namespace Util { std::string realpath(std::string const & path) { char buffer[PATH_MAX]; Sys::realpath(path.c_str(), buffer); return std::string(buffer); } EUIDSwap::EUIDSwap(uid_t uid) :origEUID_(Sys::geteuid()) { try { Sys::seteuid(uid); } catch(std::exception const & e) { UI_THROW_CODE(SetEuidErr_, "Cannot set euid to " + tos(uid) + ": " + e.what()); } } EUIDSwap::~EUIDSwap() { try { Sys::seteuid(origEUID_); } catch(...) { } } uid_t EUIDSwap::getOrigUID() const { return origEUID_; } }} ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Time.cpp0000644000000000000000000000013212751117070017556 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.854884939 30 ctime=1470503616.034342615 ui-utilcpp-1.8.5/src/ui-utilcpp/Time.cpp0000644000175000017500000000726012751117070020734 0ustar00absurdabsurd00000000000000#include "config.h" // Implementation #include "Time.hpp" // STDC++ #include #include // Local #include "Sys.hpp" #include "Text.hpp" namespace UI { namespace Util { long int getTimeValSec() { struct timeval tv; Sys::gettimeofday(&tv, 0); return tv.tv_sec; } long int getTimeValUSec() { struct timeval tv; Sys::gettimeofday(&tv, 0); return tv.tv_usec; } unsigned int nanosleep(unsigned int seconds, long int nanoseconds) { assert(nanoseconds >= 0); #ifndef WIN32 timespec sleep; sleep.tv_sec = seconds; sleep.tv_sec += nanoseconds / 1000000000; sleep.tv_nsec = nanoseconds % 1000000000; return ::nanosleep(&sleep, 0); #else int nMS = seconds * 1000 + nanoseconds / 1000000; Sleep(nMS); return 0; #endif } unsigned int nssleep(unsigned int seconds) { return nanosleep(seconds, 0); } unsigned int nsnsleep(long int nanoseconds) { return nanosleep(0, nanoseconds); } long int const RealTimeStamp::tenExpSix_(1000000); RealTimeStamp::RealTimeStamp(long int const & sec, long int const & usec) { set(sec, usec); } RealTimeStamp & RealTimeStamp::set(long int const & sec, long int const & usec) { sec_ = sec; usec_ = usec; normalize(); return *this; } RealTimeStamp & RealTimeStamp::setMax() { #if defined( max ) #undef max #endif sec_ = std::numeric_limits::max(); usec_ = std::numeric_limits::max(); return *this; } RealTimeStamp & RealTimeStamp::setMin() { set(0, 0); return *this; } RealTimeStamp & RealTimeStamp::stamp() { struct timeval tv; Sys::gettimeofday(&tv, 0); sec_ = tv.tv_sec; usec_ = tv.tv_usec; return *this; } long int RealTimeStamp::getSec() const { return sec_; } long int RealTimeStamp::getUSec() const { return usec_; } long double RealTimeStamp::getSeconds() const { return (long double) sec_ + (long double) usec_ / tenExpSix_; } bool RealTimeStamp::operator == (RealTimeStamp const & rt) const { return sec_ == rt.getSec() && usec_ == rt.getUSec(); } bool RealTimeStamp::operator < (RealTimeStamp const & rt) const { return sec_ < rt.sec_ || (sec_ == rt.sec_ && usec_ < rt.usec_); } bool RealTimeStamp::operator <= (RealTimeStamp const & rt) const { return sec_ < rt.sec_ || (sec_ == rt.sec_ && usec_ <= rt.usec_); } RealTimeStamp & RealTimeStamp::operator += (RealTimeStamp const & rt) { sec_ += rt.sec_; usec_ += rt.usec_; normalize(); return *this; } RealTimeStamp RealTimeStamp::operator + (RealTimeStamp const & rt) const { RealTimeStamp result(*this); result += rt; return result; } RealTimeStamp & RealTimeStamp::operator -= (RealTimeStamp const & rt) { sec_ -= rt.sec_; usec_ -= rt.usec_; if (usec_ < 0) { sec_ += usec_ / tenExpSix_; usec_ = usec_ % tenExpSix_; if (usec_ != 0) { --sec_; usec_ += tenExpSix_; } } normalize(); return *this; } RealTimeStamp RealTimeStamp::operator - (RealTimeStamp const & rt) const { RealTimeStamp result(*this); result -= rt; return result; } void RealTimeStamp::normalize() { sec_ += usec_ / tenExpSix_; usec_ = usec_ % tenExpSix_; // Never leave us with negative values; silently set to 0 // // We are not imposing an exception here as this might happen // with a diff (s1-s0) when the system time has changed between // the two stamps (administrator, ntp, etc...). sec_ = std::max(0, sec_); usec_ = std::max(0, usec_); } std::ostream & operator << (std::ostream & os, RealTimeStamp const & rt) { os << rt.getSeconds() << " seconds"; return os; } ScopeRealTime::ScopeRealTime(std::ostream * const out) :out_(out) { stamp(); } ScopeRealTime::~ScopeRealTime() { if (out_) { *out_ << "Scope real time: " << get() << std::endl; } } RealTimeStamp ScopeRealTime::get() const { return RealTimeStamp().stamp() - *this; } }} ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/ascmagic.c0000644000000000000000000000007312354527746020111 xustar0030 atime=1470475338.469953071 29 ctime=1470503616.03834254 ui-utilcpp-1.8.5/src/ui-utilcpp/ascmagic.c0000644000175000017500000002205212354527746021257 0ustar00absurdabsurd00000000000000/* * This is from file-4.12: An excerpt from "ascmagic.c", almost * verbatim albeit for syntactic fixes to make it compile with g++ * -pedantic. * */ /* * Copyright (c) Ian F. Darwin 1986-1995. * Software written by Ian F. Darwin and others; * maintained 1995-present by Christos Zoulas and others. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice immediately at the beginning of the file, without modification, * this list of conditions, and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * ASCII magic -- file types that we know based on keywords * that can appear anywhere in the file. * * Extensively modified by Eric Fischer in July, 2000, * to handle character codes other than ASCII on a unified basis. * * Joerg Wunsch wrote the original support for 8-bit * international characters, now subsumed into this file. */ /* * This table reflects a particular philosophy about what constitutes * "text," and there is room for disagreement about it. * * Version 3.31 of the file command considered a file to be ASCII if * each of its characters was approved by either the isascii() or * isalpha() function. On most systems, this would mean that any * file consisting only of characters in the range 0x00 ... 0x7F * would be called ASCII text, but many systems might reasonably * consider some characters outside this range to be alphabetic, * so the file command would call such characters ASCII. It might * have been more accurate to call this "considered textual on the * local system" than "ASCII." * * It considered a file to be "International language text" if each * of its characters was either an ASCII printing character (according * to the real ASCII standard, not the above test), a character in * the range 0x80 ... 0xFF, or one of the following control characters: * backspace, tab, line feed, vertical tab, form feed, carriage return, * escape. No attempt was made to determine the language in which files * of this type were written. * * * The table below considers a file to be ASCII if all of its characters * are either ASCII printing characters (again, according to the X3.4 * standard, not isascii()) or any of the following controls: bell, * backspace, tab, line feed, form feed, carriage return, esc, nextline. * * I include bell because some programs (particularly shell scripts) * use it literally, even though it is rare in normal text. I exclude * vertical tab because it never seems to be used in real text. I also * include, with hesitation, the X3.64/ECMA-43 control nextline (0x85), * because that's what the dd EBCDIC->ASCII table maps the EBCDIC newline * character to. It might be more appropriate to include it in the 8859 * set instead of the ASCII set, but it's got to be included in *something* * we recognize or EBCDIC files aren't going to be considered textual. * Some old Unix source files use SO/SI (^N/^O) to shift between Greek * and Latin characters, so these should possibly be allowed. But they * make a real mess on VT100-style displays if they're not paired properly, * so we are probably better off not calling them text. * * A file is considered to be ISO-8859 text if its characters are all * either ASCII, according to the above definition, or printing characters * from the ISO-8859 8-bit extension, characters 0xA0 ... 0xFF. * * Finally, a file is considered to be international text from some other * character code if its characters are all either ISO-8859 (according to * the above definition) or characters in the range 0x80 ... 0x9F, which * ISO-8859 considers to be control characters but the IBM PC and Macintosh * consider to be printing characters. */ typedef unsigned long unichar; #define F 0 /* character never appears in text */ #define T 1 /* character appears in plain ASCII text */ #define I 2 /* character appears in ISO-8859 text */ #define X 3 /* character appears in non-ISO extended ASCII (Mac, IBM PC) */ char text_chars[256] = { /* BEL BS HT LF FF CR */ F, F, F, F, F, F, F, T, T, T, T, F, T, T, F, F, /* 0x0X */ /* ESC */ F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, /* 0x1X */ T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x2X */ T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x3X */ T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x4X */ T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x5X */ T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x6X */ T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, F, /* 0x7X */ /* NEL */ X, X, X, X, X, T, X, X, X, X, X, X, X, X, X, X, /* 0x8X */ X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, /* 0x9X */ I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xaX */ I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xbX */ I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xcX */ I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xdX */ I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xeX */ I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I /* 0xfX */ }; int looks_ascii(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) { unsigned int i; *ulen = 0; for (i = 0; i < nbytes; i++) { int t = text_chars[buf[i]]; if (t != T) return 0; ubuf[(*ulen)++] = buf[i]; } return 1; } int looks_latin1(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) { unsigned int i; *ulen = 0; for (i = 0; i < nbytes; i++) { int t = text_chars[buf[i]]; if (t != T && t != I) return 0; ubuf[(*ulen)++] = buf[i]; } return 1; } int looks_extended(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) { unsigned int i; *ulen = 0; for (i = 0; i < nbytes; i++) { int t = text_chars[buf[i]]; if (t != T && t != I && t != X) return 0; ubuf[(*ulen)++] = buf[i]; } return 1; } int looks_utf8(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) { unsigned int i; int n; unichar c; int gotone = 0; *ulen = 0; for (i = 0; i < nbytes; i++) { if ((buf[i] & 0x80) == 0) { /* 0xxxxxxx is plain ASCII */ /* * Even if the whole file is valid UTF-8 sequences, * still reject it if it uses weird control characters. */ if (text_chars[buf[i]] != T) return 0; ubuf[(*ulen)++] = buf[i]; } else if ((buf[i] & 0x40) == 0) { /* 10xxxxxx never 1st byte */ return 0; } else { /* 11xxxxxx begins UTF-8 */ int following; if ((buf[i] & 0x20) == 0) { /* 110xxxxx */ c = buf[i] & 0x1f; following = 1; } else if ((buf[i] & 0x10) == 0) { /* 1110xxxx */ c = buf[i] & 0x0f; following = 2; } else if ((buf[i] & 0x08) == 0) { /* 11110xxx */ c = buf[i] & 0x07; following = 3; } else if ((buf[i] & 0x04) == 0) { /* 111110xx */ c = buf[i] & 0x03; following = 4; } else if ((buf[i] & 0x02) == 0) { /* 1111110x */ c = buf[i] & 0x01; following = 5; } else return 0; for (n = 0; n < following; n++) { i++; if (i >= nbytes) goto done; if ((buf[i] & 0x80) == 0 || (buf[i] & 0x40)) return 0; c = (c << 6) + (buf[i] & 0x3f); } ubuf[(*ulen)++] = c; gotone = 1; } } done: return gotone; /* don't claim it's UTF-8 if it's all 7-bit */ } int looks_unicode(const unsigned char *buf, size_t nbytes, unichar *ubuf, size_t *ulen) { int bigend; unsigned int i; if (nbytes < 2) return 0; if (buf[0] == 0xff && buf[1] == 0xfe) bigend = 0; else if (buf[0] == 0xfe && buf[1] == 0xff) bigend = 1; else return 0; *ulen = 0; for (i = 2; i + 1 < nbytes; i += 2) { /* XXX fix to properly handle chars > 65536 */ if (bigend) ubuf[(*ulen)++] = buf[i + 1] + 256 * buf[i]; else ubuf[(*ulen)++] = buf[i] + 256 * buf[i + 1]; if (ubuf[*ulen - 1] == 0xfffe) return 0; if (ubuf[*ulen - 1] < 128 && text_chars[(size_t)ubuf[*ulen - 1]] != T) return 0; } return 1 + bigend; } #undef F #undef T #undef I #undef X ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Exception.hpp0000644000000000000000000000013212751117070020623 xustar0030 mtime=1470406200.115952021 30 atime=1470498310.800529326 30 ctime=1470503616.006343143 ui-utilcpp-1.8.5/src/ui-utilcpp/Exception.hpp0000644000175000017500000001415512751117070022002 0ustar00absurdabsurd00000000000000/** * @file */ #ifndef UI_UTIL_EXCEPTION_HPP #define UI_UTIL_EXCEPTION_HPP // STDC++ #include #include // C++ libraries #include #define UI_SOURCEDEBUG __FILE__ + std::string(":") + UI::Util::tos(__LINE__) /** @name Throw macro shortcuts with automatic debug info and optimized errno handling. * * @{ */ /** @brief Throw non-code exception. */ #define UI_THROW(desc) throw Exception(desc, UI_SOURCEDEBUG) /** @brief Throw non-code exception w/ errno handling. */ #define UI_THROW_ERRNO(call) { int const myErrno(errno); throw Exception(call + Exception::Errno_, UI_SOURCEDEBUG, myErrno); } /** @brief Throw code exception. */ #define UI_THROW_CODE(code, desc) throw Exception(code, desc, UI_SOURCEDEBUG) /** @brief Throw code exception w/ errno handling. */ #define UI_THROW_CODE_ERRNO(code, call) { int const myErrno(errno); throw Exception(code, call + Exception::Errno_, UI_SOURCEDEBUG, myErrno); } /** @} */ /** @brief Namespace for any Schlund+Partner C++ code. */ namespace UI { /** @brief Generic exception class for namespace UI. * * @section Exception_HowTo Exception HOWTO * * @subsection Exception_HowTo_U User's guide (exception handlers) * * - For standard (no "code" support), just use intuitively. For * example, UI::Exception catches any S+P Exception, * UI::Util::Exception any S+P exception in namespace UI::Util, * UI::Util::File::Exception any exception of class UI::Util::File. * * - Any time you want to catch code exceptions, you will * always need a dedicated handler (knowing the code semantics) * anyway. For example, knowing UI::Util::File::Exception is * a code exception, catch exactly that exception and evaluate further * using getCode(). * * @subsection Exception_HowTo_D Developer's guide (write own exception classes) * * @subsubsection Exception_HowTo_D_P Preliminaries * * - In any context (namespace or class), a class "Exception" should * be available, using UI::Exception or UI::CodeException constructor * syntax; this is needed so UI_THROW* macros can be used. * * - Note that the "interfacing" exception class is always called * "Exception", even if it is a code exception. The * CodeException template is only used to ease writing * classes w/ dedicated code number support. * * - Be sure that your exception class always inherits the next class * "context up". For example UI::Util::Sys::Exception must inherit * from UI::Util::Exception, not UI::Exception; else a handler * on UI::Util::Exception would not catch UI::Util::Sys::Exception, * which is against intuitive use of exceptions. The same holds true * for mere typedefs. * * @subsubsection Exception_HowTo_D_E Quickstart * * Let's say, you invented a new namespace "UI::Humbug". * * - In the simplest case, if you don't need support to catch down all * UI::Humbug's exceptions, you may just use UI_THROW*-macros w/o any * additional code. * * - Alternatively, if UI::Humbug needs a generic exception class so * we can catch it all down, just use the very same source code for * UI::Util::Exception in your new namespace. * * - Optionally, if you want to ease the use of code exceptions in * your namespace for sub-contexts, just use the very code for * the UI::Util::CodeException template in your namespace. * * - Alernatively, if your new namespace's generic exception class is * to be a code exception itself, inherit UI::Humbug::Exception from * UI::CodeException. * * The above three points typically go into "Exception.hpp" of your project. * * - Optionally, you can now add exception classes for sub-contexts * (sub-namespaces or classes) if needed. * * - To throw exceptions, always use macros UI_THROW, UI_THROW_CODE, * UI_THROW_ERRNO or UI_THROW_CODE_ERRNO. * */ class Exception: public std::exception { protected: /** @name These constants may be used for description default values for derived classes. * @{ */ static std::string const NoWhatGiven_; static std::string const NoDebugGiven_; /** @} */ public: /** @brief If this string is used in a "what" description message, it will be replaced by an errno error string. */ static std::string const Errno_; /** @brief Construct with description text. * * @note You usually do not call this constructor directly, but instead * always use one of the UI_THROW_* macros above. * * @param what Exception description. Errno_ text in string will be replaced with error string. * @param debug Any debug text. * @param errNo Dedicated "errno" error number. */ Exception(std::string const & what=NoWhatGiven_, std::string const & debug=NoDebugGiven_, int const & errNo=0); virtual ~Exception() throw(); /** @name Get exception information. * @{ */ char const * what() const throw(); int const & getErrno() const; std::string getDebug() const; /** @} */ private: std::string const what_; std::string const debug_; int const errNo_; }; /** @brief Adding code facility to Exception. */ template class CodeException: public Exception { public: CodeException(Code const & code, std::string const & what=NoWhatGiven_, std::string const & debug=NoDebugGiven_, int const & errNo=0) :UI::Exception(what, debug, errNo) ,code_(code) {}; Code const & getCode() const { return code_; } private: Code const code_; }; /** @brief Namespace for ui-utilcpp. */ namespace Util { /** @brief Generic exception class for namespace UI::Util. */ class Exception: public UI::Exception { public: Exception(std::string const & what=NoWhatGiven_, std::string const & debug=NoDebugGiven_, int const & errNo=0) :UI::Exception(what, debug, errNo) {} virtual ~Exception() throw() {}; }; /** @brief Adding code facility to Exception. */ template class CodeException: public Exception { public: CodeException(Code const & code, std::string const & what=NoWhatGiven_, std::string const & debug=NoDebugGiven_, int const & errNo=0) :Exception(what, debug, errNo) ,code_(code) {}; Code const & getCode() const { return code_; } private: Code const code_; }; }} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Thread.cpp0000644000000000000000000000013212751117070020067 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.854884939 30 ctime=1470503616.034342615 ui-utilcpp-1.8.5/src/ui-utilcpp/Thread.cpp0000644000175000017500000000450512751117070021244 0ustar00absurdabsurd00000000000000#include "config.h" // Implementation #include "Thread.hpp" // STDC++ #include #include // Local #include "Time.hpp" #include "Text.hpp" namespace UI { namespace Util { void fd2DevNull(int const & fd, mode_t const & mode) { Sys::close(fd); int const newFd(Sys::open("/dev/null", mode)); if (newFd != fd) { Sys::dup2(newFd, fd); Sys::close(newFd); } } void daemonize(bool closeStdFds, bool changeToRootdir, bool resetUMask) { #ifndef WIN32 switch (Sys::fork()) { case 0: // We are in the new child if (closeStdFds) { fd2DevNull(0, O_RDONLY); fd2DevNull(1, O_WRONLY); fd2DevNull(2, O_WRONLY); } if (changeToRootdir) { Sys::chdir("/"); } if (resetUMask) { Sys::umask(0); } Sys::setsid(); break; default: // Old pid, silently leave std::exit(0); } #endif } #ifndef WIN32 ProcessThread::ProcessThread() :pid_(-1) ,status_(NotRunYet_) {} ProcessThread::~ProcessThread() {} pid_t ProcessThread::getPID() const { return pid_; } void ProcessThread::checkStatus(bool wait) { if (status_ == Running_) { assert(pid_ != -1); // Process is running, but might be finished (zombie) int status; switch (pid_t pid = Sys::waitpid(pid_, &status, wait ? 0 : WNOHANG)) { case 0: // No child available; still running, nothing to do break; default: // Child exited; status_ becomes the process exit status assert(pid == pid_); if (WIFEXITED(status)) // Child exited normally { status_ = WEXITSTATUS(status); } else if (WIFSIGNALED(status)) { status_ = KilledByUncatchedSignal_; } else { status_ = WaitpidErr_; } pid_ = -1; } } } int ProcessThread::getStatus() const { return status_; } bool ProcessThread::isRunning() { checkStatus(false); return (status_ == Running_); } int ProcessThread::wait() { checkStatus(true); return status_; } void ForkThread::start() { if (status_ != Running_) // Just be happy if we are already running { switch (int pid = Sys::fork()) { case 0: // We are in the new child // We do not share context, but at least local getPID() should work ... ;( // getStatus() wont work, but is not needed in the child really ... pid_ = Sys::getpid(); std::exit(run()); break; default: // Ok, father process status_ = Running_; pid_ = pid; } } } #endif }} ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/CmdLine.hpp0000644000000000000000000000013212751117070020200 xustar0030 mtime=1470406200.111952115 30 atime=1470498397.854884939 30 ctime=1470503616.002343218 ui-utilcpp-1.8.5/src/ui-utilcpp/CmdLine.hpp0000644000175000017500000001440112751117070021351 0ustar00absurdabsurd00000000000000/** * @file CmdLine.hpp * @author Schlund + Partner AG * @brief Utility for easy command line interfaces. * * Simple command line abstraction; automatically shows help on commands, * handles errors, can set variables, does variable expansion. * * Does not include a "real" scripting language (loops, variable * expansion, etc...); for this, rather rewrite this or use some * existing solution for embedded scripting. * */ /** * @example CmdLine.cpp * CmdLine example program * Should be installed as ui-utilcpp-cmdline along with the library. */ #ifndef UI_UTIL_CMDLINE_HPP #define UI_UTIL_CMDLINE_HPP // STDC++ #include #include #include #include #include namespace UI { namespace Util { // Better to have this extra namespace to avoid problems with local implementation-only Standard Command Classes namespace CmdLine { class Cmd; /** @brief Simple Command Line interface. * * Short howto: Write your own command line class, inherit from CmdLine, inherit * custom command classes from Cmd (overwrite private run function). * Use run() to start the interface. * * When run interactively, libreadline is used. * * This class defines some common commands that cannot be used as * custom commands later. */ class CmdLine { /** @brief These two need access to CmdLine variables -- might be better to encapsulate further ;). */ friend class HelpCmd; /** @brief These two need access to CmdLine variables -- might be better to encapsulate further ;). */ friend class SourceCmd; public: /** * @param is In-Stream; use Null-Pointer to run interactive (using libreadline). * @param os Out-Stream. * @param es Error-Out-Stream. * @param title Initial description of the command line (variable __TITLE). * @param prompt Initial prompt (variable __PROMPT). */ CmdLine(std::istream * is=&std::cin, std::ostream * os=&std::cout, std::ostream * es=&std::cerr, std::string const & title="Simple Command Line Interface", std::string const & prompt="\nCommand # "); ~CmdLine(); /** @brief Add a command to the command line. * * @param cmd Command to add. * @note Command must be created via "new"; will be deleted automatically in CmdLine's destructor. */ void add(Cmd * cmd); /** @brief Get variable value. */ std::string getVar(std::string const & key) const; /** @brief Set variable value. */ void setVar(std::string const & key, std::string const & value); /** @brief Show (print) variable value. */ void showVar(std::string const & key); /** @brief Show (print) variable values. */ void showVar(std::map::iterator i); /** @brief Show (print) all variable values. */ void showVars(); /** @brief Get out-stream. */ std::ostream & os(); /** @brief Get in-stream. */ std::ostream & es(); /** @brief Find a command from name. */ Cmd * findCmd(std::string const & name) const; /** * @returns: 0 if everything was fine (no errors), >0 if there have been # ignored errors, * <0 if it returned on error (with __FATAL set to 1). Negative amount of former errors. */ int run(); protected: /** @brief Only source for input. */ std::string readLine(std::string const & promptVar="__PROMPT"); private: std::istream * is_; bool isNeedsDeletion_; // Should be set if in stream was created inside CmdLine (currently avoids leak with the source command) std::ostream * const os_; std::ostream * const es_; std::vector commands_; std::map variables_; }; /** @brief Represents a command. */ class Cmd { public: /** @brief Standard constructor. * * @param name Name of the command. * @param help Documentation string for this command. */ Cmd(std::string const & name, std::string const & help="No help for this command"); virtual ~Cmd(); /** @brief Get command name. */ std::string getName() const; /** @brief Add mandatory argument. Use this in constructors of custom Cmd classes. * * @param name Name of the argument. * @param help Help for this command. */ void addArg(std::string const & name, std::string const & help="No help for this option"); /** @brief Add optional argument. Use this in constructors of custom Cmd classes. * * @param name Name of the argument. * @param help Help for this command. */ void addOptArg(std::string const & name, std::string const & help="No help for this option"); /** @brief Get min args. */ int getMinArgs() const; /** @brief Get max args. */ int getMaxArgs() const; /** @brief Get syntax line: cmd arg1 arg2 [arg3]. */ std::string getSyntax() const; /** @brief Print help (i.e., syntax + documentation text). */ std::string getHelp(bool showArgs=false) const; /** @brief Parse a line. * * @param line Input line. */ bool parse(std::string const & line); /** @brief Check if we are in "parsed" state. */ bool isParsed() const; /** @brief Get the argument of a parsed command. * * @param i Number of argument to get. */ std::string getArg(int i) const; /** @brief Public run function. Use this to run commands. */ int run(); /** @brief Helper function. */ static std::string stripLine(std::string const & line); /** @brief Helper function. */ static std::string commandFromLine(std::string const & line); /** @brief Set Command Line Pointer; This must be run when adding commands from a CmdLine. */ void setCL(CmdLine * cl); protected: /** @brief Should be there to access CmdLine. */ CmdLine * cl_; private: /** @brief Virtual run function. Define this in custom Cmd classes. * * In this command, it is guaranteed to have "cl_" ready for use. */ virtual int runCmd() = 0; /** @brief Internal helper function. */ std::string getArgString(int i) const; /** @brief Initializing variables. */ std::string const name_; std::string const help_; /** @brief Argument variables. */ std::vector > args_; int minArgs_; /** @brief Parser variables. */ std::vector tokens_; bool isParsed_; /** @brief Helper variables. */ static std::string const spaces_; }; /** @brief Pseudo command class to add header like seperators in help descriptions. */ class HeaderCmd: public Cmd { public: /** * @param header Text to show as header. */ HeaderCmd(std::string const & header); private: int runCmd(); }; }}} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Socket.hpp0000644000000000000000000000013112751117070020114 xustar0030 mtime=1470406200.115952021 29 atime=1470498318.68038047 30 ctime=1470503616.006343143 ui-utilcpp-1.8.5/src/ui-utilcpp/Socket.hpp0000644000175000017500000001311012751117070021262 0ustar00absurdabsurd00000000000000/** * @file * @brief Socket, descriptors and sockets. */ #ifndef UI_UTIL_SOCKET_HPP #define UI_UTIL_SOCKET_HPP // STDC++ #include #include #include // STDC #include #include // C++ libraries #include #include #include namespace UI { namespace Util { /** * @example EchoServer.cpp * Example program for socket / socket streams implementation. * Should be installed as ui-utilcpp-echoserver along with the library. */ /** @brief Socket abstraction. */ class Socket #ifndef WIN32 : public FileDescriptor #endif { public: /** @brief Construct socket. */ Socket(int fd=-1, bool closeFd=false); #ifdef WIN32 ~Socket(); /** @brief Exceptions for this class. */ typedef CodeException Exception; #endif public: /** @brief Get human-readable id string. */ std::string getId(bool const & peer=false) const; /** @brief Get peer id. */ std::string getPeerId() const; /** @name Configure socket behaviour. * @{ */ Socket & setRcvTimeout(long int seconds, long int microseconds=0); Socket & setSndTimeout(long int seconds, long int microseconds=0); Socket & setUnblock(bool unblock=true); /** @} */ /** @brief Connect this socket. */ virtual Socket & connect(); /** @brief Bind this socket. */ virtual Socket & bind(); /** @brief Start listening. */ Socket & listen(int backlog=16); /** @brief Accept an incoming socket connection. */ int accept(long int toSeconds=0, long int toMicroSeconds=0); /** @brief Shutdown socket. */ int shutdown(int how, bool doThrow=true); /** @name Wrappers for recv(2) and send(2). * @{ */ ssize_t recv(void * const buf, size_t len, int flags=0); ssize_t send(void const * const msg, size_t len, int flags=0); /** @} */ /** @brief C++-like virtual read method * * This implementation uses recv(2). */ virtual std::streamsize read(void * const buf, std::streamsize count); /** @brief C++-like virtual write method * * This implementation uses send(2). */ virtual std::streamsize write(void const * const buf, std::streamsize count); #ifdef WIN32 int getFd() const { return (int)fd_; } void sendStoredBuffer(); protected: SOCKET fd_; bool closeFd_; std::vector sendBuffer; // This buffer stores all data that is send using the stdSend() method; // all stored data is actually send before destroying the object. #endif }; /** @brief INet Socket. */ class INetSocket: public Socket { private: INetSocket(INetSocket const &); public: INetSocket(std::string const & host, unsigned int port, bool closeFd=true, bool reuseAddr=false); INetSocket(int fd, bool closeFd=false); ~INetSocket(); virtual INetSocket & bind(); virtual INetSocket & connect(); private: struct addrinfo * addrInfo_; struct addrinfo * addr_; }; /** @brief Unix Socket. */ #ifndef WIN32 class UnixSocket: public Socket { public: UnixSocket(std::string const & path, bool closeFd=true); UnixSocket(int fd, bool closeFd=false); ~UnixSocket(); /** @brief Bind this unix socket. * * @note Default permissions: "srw-------" (Only owner has rw-Access). */ UnixSocket & unixBind(uid_t uid=::geteuid(), gid_t gid=::getegid(), mode_t mode=S_IRUSR | S_IWUSR, bool silentUnlink=true); virtual UnixSocket & bind(); virtual UnixSocket & connect(); private: struct sockaddr_un unSa_; bool silentUnlink_; }; #endif /** @brief Template IO stream buffer for all file descriptors types. */ template class FDTypeBuf: public std::streambuf, private FDType { public: /** @brief Constructor for file descriptor stream buffer. */ FDTypeBuf(int fd, bool closeFd=false, int bufPutbackSize=4, int bufDataSize=1024) :FDType(fd, closeFd) ,bufPutbackSize_(bufPutbackSize) ,bufDataSize_(bufDataSize) ,buf_(new char[bufPutbackSize_+bufDataSize_]) { setg(buf_+bufPutbackSize, buf_+bufPutbackSize, buf_+bufPutbackSize); } ~FDTypeBuf() { delete[] buf_; } /** @brief Shortcut. */ typedef std::streambuf::traits_type traits; protected: /** @brief Buffer control variables. */ int bufPutbackSize_, bufDataSize_; /** @brief Internal buffer. */ char * buf_; /** @brief streambuf overflow overload. */ virtual int overflow(int c) { if (c != traits::eof()) { char ch((char)c); if (FDType::write(&ch, 1) != 1) { return traits::eof(); } } return c; } /** @brief streambuf xsputn overload. */ virtual std::streamsize xsputn(const char * s, std::streamsize n) { return FDType::write(s, n); } /** @brief streambuf underflow overload. */ virtual int underflow() { if (gptr() >= egptr()) { int numPutback(gptr() - eback()); if (numPutback > bufPutbackSize_) { numPutback = bufPutbackSize_; } std::memmove(buf_+(bufPutbackSize_-numPutback), gptr()-numPutback, numPutback); std::streamsize num(FDType::read(buf_+bufPutbackSize_, bufDataSize_)); if (num <= 0) { return traits::eof(); } setg(buf_+(bufPutbackSize_-numPutback), buf_+bufPutbackSize_, buf_+bufPutbackSize_+num); } return traits::to_int_type(*gptr()); } }; /** @brief IO stream for file descriptors. */ template class FDTypeStream: public std::iostream { public: /** Constructor for file descriptor stream. */ FDTypeStream(int fd, bool closeFd=false) :std::iostream(0) ,buf_(fd, closeFd) { rdbuf(&buf_); } private: FDTypeBuf buf_; }; /** @brief socketpair(2) abstraction. */ class SocketPair { private: bool const closeFd_; int sv_[2]; public: SocketPair(bool const & closeFd=true); ~SocketPair(); int const & first() const; int const & second() const; }; }} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/QuotaInfo.cpp0000644000000000000000000000013212751117070020565 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.854884939 30 ctime=1470503616.030342691 ui-utilcpp-1.8.5/src/ui-utilcpp/QuotaInfo.cpp0000644000175000017500000003177312751117070021751 0ustar00absurdabsurd00000000000000// Local configuration #include "config.h" // Implementation #include "QuotaInfo.hpp" // System C #ifndef WIN32 #include // unix: read mtab #endif // Windows DiskQuota #ifdef W2K8 #include #include #include #include #endif #ifdef __linux__ #include // linux-std #include // linux-std #ifdef HAVE_XFS_XQM_H #include // linux-xfs #endif #include // linux-rpc #include // linux-rpc #endif // Local #include "Text.hpp" namespace UI { namespace Util { std::string QuotaInfo::FS::getMethods(std::string const & fstype) const { std::string const fst(fstype == "" ? getType() : fstype); std::string result(""); Methods::MethodVec const & mv(methods_.getMethods(fst)); for (Methods::MethodVec::const_iterator m(mv.begin()); m != mv.end(); ++m) { result += (*m)->first + " "; } return result; } QuotaInfo::FS QuotaInfo::file2fs(std::string const & fName, std::string const & tab) { QuotaInfo::FS res(""); #ifdef WIN32 if(fName.length() < 3) { UI_THROW("File name to short; can't extract drive: " + fName); } res = QuotaInfo::FS(fName.substr(0, 3)); #else std::string::size_type resDirOverhang(std::string::npos); struct mntent * mnt; FILE * fp(setmntent(tab.c_str(), "r")); if (!fp) { UI_THROW("Error opening mount table: " + tab); } while ((mnt = getmntent(fp))) { std::string const dir(mnt->mnt_dir); if (fName.compare(0, dir.size(), dir) == 0) { std::string::size_type const overhang(fName.size()-dir.size()); if ((resDirOverhang == std::string::npos) || (overhang <= resDirOverhang)) { res=QuotaInfo::FS(mnt->mnt_fsname, mnt->mnt_type); resDirOverhang=overhang; } } } endmntent(fp); #endif return res; } QuotaInfo::Methods::Methods() { // Method Map #ifdef HAVE_SYS_QUOTA_H m_["linux-v2"] = &QuotaInfo::methodLinuxV2; #endif #ifdef HAVE_XFS_XQM_H m_["linux-xfs"] = &QuotaInfo::methodLinuxXfs; #endif #ifdef __linux__ m_["linux-rpc"] = &QuotaInfo::methodLinuxRpc; #endif #ifdef HAVE_SYS_QUOTA_H m_["linux-v1"] = &QuotaInfo::methodLinuxV1; #endif #ifdef WIN32 #ifndef W2K8 m_["no-quota"] = &QuotaInfo::noQuota; #else m_["w2k8-quota"] = &QuotaInfo::w2k8Quota; #endif #endif // FS Map #ifdef __linux__ // Default f_["__all__"].push_back(m_.find("linux-v2")); f_["__all__"].push_back(m_.find("linux-xfs")); f_["__all__"].push_back(m_.find("linux-v1")); f_["__all__"].push_back(m_.find("linux-rpc")); // XFS f_["xfs"].push_back(m_.find("linux-xfs")); // NFS f_["nfs"].push_back(m_.find("linux-rpc")); // NFS4 f_["nfs4"].push_back(m_.find("linux-rpc")); #endif #ifdef WIN32 #ifndef W2K8 f_["__all__"].push_back(m_.find("no-quota")); #else f_["__all__"].push_back((m_.find("w2k8-quota"))); #endif #endif } QuotaInfo::Methods::MethodVec const & QuotaInfo::Methods::getMethods(std::string const & fstype) const { FSMap::const_iterator mv(f_.find(fstype)); if (mv == methods_.f_.end()) { mv = methods_.f_.find("__all__"); } return mv->second; } // No quota method: Limit "0" means no limit #ifdef WIN32 #ifndef W2K8 void QuotaInfo::noQuota(std::string const & dev, uid_t const uid) { blockHL_=0; blockSL_=0; blocks_=0; inodeHL_=0; inodeSL_=0; inodes_=0; blockTL_=0; inodeTL_=0; } #else void QuotaInfo::w2k8Quota(std::string const & dev, uid_t const uid) { if (home_ == "") { UI_THROW("Home not provided: " + home_); } // reduce the home path to the customers root path // e.g. E:\kunden\homepages\18\d12345678\www\wsb123456\ -> E:\kunden\homepages\18\d12345678 boost::regex regExNormal("^(e:\\\\kunden\\\\homepages\\\\[0-9][0-9]?\\\\d[0-9]+)(\\\\www\\\\.+)"); boost::cmatch what; if (!boost::regex_match(home_.c_str(), what, regExNormal)) { // may also be e.g. E:\kunden\homepages\18\d12345678\www boost::regex regExOtherNormal("^(e:\\\\kunden\\\\homepages\\\\[0-9][0-9]?\\\\d[0-9]+)(\\\\www)"); if (!boost::regex_match(home_.c_str(), what, regExOtherNormal)) { // may already be without "www" boost::regex regExAlreadyCut("^(e:\\\\kunden\\\\homepages\\\\[0-9][0-9]?\\\\d[0-9]+)"); if (!boost::regex_match(home_.c_str(), what, regExAlreadyCut)) { UI_THROW("File path not matched: " + home_); } } } std::string cstrCustomersRoot = what[1]; HRESULT hr = CoInitializeEx(NULL, 0); if (SUCCEEDED(hr)) { IFsrmQuotaManager* pQuotaManager; IFsrmQuota* pQuota; ULONGLONG ullQuotaLimit = 0; ULONGLONG ullQuotaUsed = 0; hr = CoCreateInstance(CLSID_FsrmQuotaManager, NULL, CLSCTX_LOCAL_SERVER, IID_IFsrmQuotaManager, reinterpret_cast(&pQuotaManager)); if (SUCCEEDED(hr)) { hr = pQuotaManager->GetQuota(_bstr_t(cstrCustomersRoot.c_str()), &pQuota); if (FAILED(hr)) { if (hr == (LONG)0x80045301) //no quota defined, so just go on { blockHL_=0; blockSL_=0; blocks_=0; inodeHL_=0; inodeSL_=0; inodes_=0; blockTL_=0; inodeTL_=0; } } else { VARIANT var; VariantInit(&var); hr = pQuota->get_QuotaLimit(&var); if (SUCCEEDED(hr)) { ullQuotaLimit = var.ullVal; } VariantClear(&var); hr = pQuota->get_QuotaUsed(&var); if (SUCCEEDED(hr)) { ullQuotaUsed = var.ullVal; } blockHL_ = static_cast(ullQuotaLimit / BlockSize_); blockSL_ = 0; blocks_ = static_cast(ullQuotaUsed / BlockSize_); inodeHL_ = 0; inodeSL_ = 0; inodes_ = 0; blockTL_ = 0; inodeTL_ = 0; VariantClear(&var); pQuota->Release(); } pQuotaManager->Release(); } CoUninitialize(); } } #endif #endif QuotaInfo::Methods const QuotaInfo::methods_; QuotaInfo::QuotaInfo(FS const & fs, int const id, Type const type, std::string const & strPath) #ifndef WIN32 :sub_(type == Usr_ ? USRQUOTA : GRPQUOTA) #else :sub_(0) #endif ,home_(strPath) ,method_("none") { bool found(false); std::string errorText("QuotaInfo failed:"); Methods::MethodVec const & mv(methods_.getMethods(fs.fstype_)); for (Methods::MethodVec::const_iterator m(mv.begin()); !found && m != mv.end(); ++m) { try { (this->*(*m)->second)(fs.dev_, id); method_=(*m)->first; found=true; } catch (std::exception const & e) { errorText+=" Method " + (*m)->first + " said: " + e.what() + "."; } } if (!found) { UI_THROW(errorText); } } #ifdef HAVE_SYS_QUOTA_H void QuotaInfo::methodLinuxV1(std::string const & dev, uid_t const uid) { // This is struct "dqblk" from "sys/quota.h" for Linux Quota Version 1 struct { u_int32_t dqb_bhardlimit; /* absolute limit on disk blks alloc */ u_int32_t dqb_bsoftlimit; /* preferred limit on disk blks */ u_int32_t dqb_curblocks; /* current block count */ u_int32_t dqb_ihardlimit; /* maximum # allocated inodes */ u_int32_t dqb_isoftlimit; /* preferred inode limit */ u_int32_t dqb_curinodes; /* current # allocated inodes */ time_t dqb_btime; /* time limit for excessive disk use */ time_t dqb_itime; /* time limit for excessive files */ } q; // 0x0300 is Q_GETQUOTA from "sys/quota.h" for Linux Quota Version 1 Sys::quotactl(QCMD(0x0300, sub_), dev.c_str(), uid, (caddr_t) &q); blockHL_=q.dqb_bhardlimit; blockSL_=q.dqb_bsoftlimit; blocks_=q.dqb_curblocks; inodeHL_=q.dqb_ihardlimit; inodeSL_=q.dqb_isoftlimit; inodes_=q.dqb_curinodes; blockTL_=q.dqb_btime; inodeTL_=q.dqb_itime; } void QuotaInfo::methodLinuxV2(std::string const & dev, uid_t const uid) { // This is struct "dqblk" from "sys/quota.h" for Linux Quota Version 2 struct { u_int64_t dqb_bhardlimit; /* absolute limit on disk quota blocks alloc */ u_int64_t dqb_bsoftlimit; /* preferred limit on disk quota blocks */ u_int64_t dqb_curspace; /* current quota block count */ /* WRONG: This actually holds bytes; absurd@schlund.de 2006-May */ u_int64_t dqb_ihardlimit; /* maximum # allocated inodes */ u_int64_t dqb_isoftlimit; /* preferred inode limit */ u_int64_t dqb_curinodes; /* current # allocated inodes */ u_int64_t dqb_btime; /* time limit for excessive disk use */ u_int64_t dqb_itime; /* time limit for excessive files */ u_int32_t dqb_valid; /* bitmask of QIF_* constants */ } q; // 0x800007 is Q_GETQUOTA from "sys/quota.h" for Linux Quota Version 2 Sys::quotactl(QCMD(0x800007, sub_), dev.c_str(), uid, (caddr_t) &q); blockHL_=q.dqb_bhardlimit; blockSL_=q.dqb_bsoftlimit; // If block size is not hard coded to BlockSize_, we have a problem here ;( blocks_=q.dqb_curspace / BlockSize_; if (q.dqb_curspace % BlockSize_ != 0) { ++blocks_; } inodeHL_=q.dqb_ihardlimit; inodeSL_=q.dqb_isoftlimit; inodes_=q.dqb_curinodes; blockTL_=q.dqb_btime; inodeTL_=q.dqb_itime; } #endif #ifdef HAVE_XFS_XQM_H void QuotaInfo::methodLinuxXfs(std::string const & dev, uid_t const uid) { struct fs_disk_quota q; Sys::quotactl(QCMD(Q_XGETQUOTA,sub_), dev.c_str(), uid, (caddr_t) &q); /** @bug: Maybe there is some more effort needed to make this * portable. At least there's no overflow check here (on linux, * values are 64bit; unsgigned long ist 32bit only). */ blockHL_=q.d_blk_hardlimit >> 1; blockSL_=q.d_blk_softlimit >> 1; blocks_=q.d_bcount >> 1; inodeHL_=q.d_ino_hardlimit; inodeSL_=q.d_ino_softlimit; inodes_=q.d_icount; blockTL_=q.d_btimer; inodeTL_=q.d_itimer; } #endif #ifdef __linux__ void QuotaInfo::methodLinuxRpc(std::string const & dev, uid_t const uid) { class RPCClient { public: RPCClient(std::string const & host) :clnt_(0) ,host_(host) { clnt_ = clnt_create(host.c_str(), RQUOTAPROG, RQUOTAVERS, "udp"); if (clnt_ == 0) { UI_THROW("RPC clnt_create(3) failed for " + host_); } clnt_->cl_auth = authunix_create_default(); } ~RPCClient() { auth_destroy(clnt_->cl_auth); clnt_destroy(clnt_); } getquota_rslt request(std::string const & path, uid_t const uid) { struct timeval const timeout = {2,0}; // Set up args getquota_args args; args.gqa_pathp = (char *) path.c_str(); args.gqa_uid = uid; // Set up result getquota_rslt result; memset((char *) &result, 0, sizeof(result)); // Run request enum clnt_stat retval(clnt_call(clnt_, RQUOTAPROC_GETQUOTA, (xdrproc_t) xdr_getquota_args, (caddr_t) &args, (xdrproc_t) xdr_getquota_rslt, (caddr_t) &result, timeout)); // Error handling if (retval != RPC_SUCCESS || result.status != Q_OK) { UI_THROW("RPC clnt_call(3) failed (" + host_ + ":" + path + " uid=" + tos(uid) + "): retval/status=" + tos(retval) + "/" + tos(result.status)); } return result; } private: CLIENT * clnt_; std::string const host_; }; // We don't use quotactl for this, and we only have a method for user quota if (sub_ == GRPQUOTA) { UI_THROW("No method for group quota for rpc; device was: " + dev); } std::string::size_type const col(dev.find_first_of(':')); if (col == std::string::npos || col >= dev.length() || dev[col+1] == '(') { UI_THROW("Invalid NFS mount syntax: " + dev); } std::string const host(dev.substr(0, col)); std::string const path(dev.substr(col+1)); RPCClient client(host); getquota_rslt result(client.request(path, uid)); struct rquota * n(&result.getquota_rslt_u.gqr_rquota); // Finally, fill quota vars blockHL_ = n->rq_bhardlimit; blockSL_ = n->rq_bsoftlimit; inodeHL_ = n->rq_fhardlimit; inodeSL_ = n->rq_fsoftlimit; inodes_ = n->rq_curfiles; blocks_ = n->rq_curblocks; // Adapt from remote block size if needed if ((unsigned long) n->rq_bsize != BlockSize_) { blockHL_ = (blockHL_ * n->rq_bsize) / BlockSize_; blockSL_ = (blockSL_ * n->rq_bsize) / BlockSize_; blocks_ = (blocks_ * n->rq_bsize) / BlockSize_; } // Timer values are in "time left" -- adapt time_t now; time(&now); blockTL_ = (n->rq_btimeleft ? n->rq_btimeleft + now : 0); inodeTL_ = (n->rq_ftimeleft ? n->rq_ftimeleft + now : 0); } #endif std::string QuotaInfo::getMethod() const { return method_; } unsigned long QuotaInfo::getBlockHL() const { return blockHL_; } unsigned long QuotaInfo::getBlockSL() const { return blockSL_; } unsigned long QuotaInfo::getBlocks() const { return blocks_; } unsigned long QuotaInfo::getINodeHL() const { return inodeHL_; } unsigned long QuotaInfo::getINodeSL() const { return inodeSL_; } unsigned long QuotaInfo::getINodes() const { return inodes_; } time_t QuotaInfo::getBlockTL() const { return blockTL_; } time_t QuotaInfo::getINodeTL() const { return inodeTL_; } bool QuotaInfo::getFreeBlocksHL(unsigned long & free) const { return getFree(getBlockHL(), getBlocks(), free); } bool QuotaInfo::getFreeBlocksSL(unsigned long & free) const { return getFree(getBlockSL(), getBlocks(), free); } bool QuotaInfo::getFreeINodesHL(unsigned long & free) const { return getFree(getINodeHL(), getINodes(), free); } bool QuotaInfo::getFreeInodesSL(unsigned long & free) const { return getFree(getINodeSL(), getINodes(), free); } bool QuotaInfo::getFree(unsigned long const limit, unsigned long const blocks, unsigned long & free) const { bool haveLimit(limit > 0); if (haveLimit) { free=0; if (limit > blocks) { free = limit-blocks; } } return haveLimit; } unsigned long QuotaInfo::BlockSize_(1024); }} ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Makefile.am0000644000000000000000000000013212751407565020223 xustar0030 mtime=1470500725.488961014 30 atime=1470500725.492960938 30 ctime=1470503616.002343218 ui-utilcpp-1.8.5/src/ui-utilcpp/Makefile.am0000644000175000017500000000165712751407565021405 0ustar00absurdabsurd00000000000000AM_CPPFLAGS = -I$(top_srcdir)/src AM_CXXFLAGS = -Wall -pthread $(OST_CXXX2_FLAGS) $(UI_UTILCPP_CXXFLAGS) SUBDIRS = http EXTRA_DIST=ascmagic.c incdir = $(includedir)/$(PACKAGE) inc_HEADERS = \ CmdLine.hpp \ Exception.hpp \ Sys.hpp \ File.hpp \ Socket.hpp \ GetOpt.hpp \ Misc.hpp \ QuotaInfo.hpp \ Recoder.hpp \ CharsetMagic.hpp \ SMLog.hpp SMLogMono.hpp SysLogMono.hpp \ Text.hpp \ PosixRegex.hpp \ Thread.hpp \ Time.hpp \ Cap.hpp \ \ Http.hpp Shortcuts.hpp \ \ auto_ptr_compat.hpp lib_LTLIBRARIES = libui-utilcpp.la libui_utilcpp_la_SOURCES = \ CmdLine.cpp \ Exception.cpp \ Sys.cpp \ File.cpp \ Socket.cpp \ GetOpt.cpp \ Misc.cpp \ QuotaInfo.cpp \ Recoder.cpp \ CharsetMagic.cpp \ SysLogMono.cpp \ Text.cpp \ PosixRegex.cpp \ Thread.cpp \ Time.cpp \ Cap.cpp libui_utilcpp_la_LIBADD = http/libui-utilcpp-http.la $(OST_CXXX2_LIBS) -lpthread -lrpcsvc libui_utilcpp_la_LDFLAGS = -version-info @SO_VERSION@ ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Shortcuts.hpp0000644000000000000000000000013212751117070020663 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.854884939 30 ctime=1470503616.018342917 ui-utilcpp-1.8.5/src/ui-utilcpp/Shortcuts.hpp0000644000175000017500000000045212751117070022035 0ustar00absurdabsurd00000000000000/** * @file * @brief Include this to use the namespace shortcuts. */ #ifndef UI_UTIL_SHORTCUTS_HPP #define UI_UTIL_SHORTCUTS_HPP namespace UI { namespace Util { namespace Sys {} namespace Http {} }} namespace U = UI::Util; namespace US = UI::Util::Sys; namespace UH = UI::Util::Http; #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Recoder.cpp0000644000000000000000000000013212751404032020240 xustar0030 mtime=1470498842.852913607 30 atime=1470498842.868913299 30 ctime=1470503616.030342691 ui-utilcpp-1.8.5/src/ui-utilcpp/Recoder.cpp0000644000175000017500000003567212751404032021426 0ustar00absurdabsurd00000000000000#include "config.h" // Declaration #include "Recoder.hpp" // STDC++ #include // C libraries #include // C++ libraries #include // Local #include "auto_ptr_compat.hpp" #include "Exception.hpp" #include "Text.hpp" #include "Misc.hpp" namespace UI { namespace Util { Conversion::Conversion(char const * const cStr, size_t const cSize) :cStr_(cStr) ,cSize_(cSize) { assert(cStr); } Conversion::~Conversion() {} char const * Conversion::get() const { return cStr_; } size_t Conversion::getSize() const { return cSize_; } std::string Conversion::getString() const { return std::string(cStr_, cSize_); } StdFreeConversion::StdFreeConversion(char * cStr, size_t const cSize) :Conversion(cStr, cSize) ,freeObject_(cStr) {} StdFreeConversion::~StdFreeConversion() { Sys::free(freeObject_); } StringConversion::StringConversion(std::string * str) :Conversion(str->c_str(), str->size()) ,delObject_(str) {} StringConversion::~StringConversion() { delete delObject_; } Converter::Converter(std::string const & inEnc, std::string const & outEnc, bool const & sloppy) :inEnc_(inEnc) ,outEnc_(outEnc) ,sloppy_(sloppy) {} Converter::~Converter() {} Conversion const * Converter::make(char const * cStr) const { return make(cStr, std::strlen(cStr)); } Conversion const * Converter::make(std::string const & str) const { return make(str.c_str(), str.size()); } std::string Converter::getID() const { return inEnc_ + ".." + outEnc_ + "(" + (sloppy_ ? "sloppy" : "precise") + ")"; } #ifndef WIN32 LibRecodeConverter::LibRecodeConverter(std::string const & inEnc, std::string const & outEnc, bool const & sloppy) :Converter(inEnc, outEnc, sloppy) ,outer_(0) ,request_(0) { std::string const encInOut(inEnc + ".." + outEnc); if (! ((outer_ = ::recode_new_outer(1)) && (request_ = ::recode_new_request(outer_)) && ::recode_scan_request(request_, encInOut.c_str()))) { if (request_) { ::recode_delete_request(request_); }; if (outer_) { ::recode_delete_outer(outer_); }; UI_THROW_CODE(EncUnknown_, "LibRecodeConverter: Some encoding is unknown: " + getID()); } // Non run-dependent task configuration } LibRecodeConverter::~LibRecodeConverter() { ::recode_delete_request(request_); ::recode_delete_outer(outer_); } // Start: From librecode /* Guarantee four NULs at the end of the output memory buffer for TASK, yet not counting them as data. The number of NULs should depend on the goal charset: often one, but two for UCS-2 and four for UCS-4. FIXME! */ void LibRecodeConverter::guarantee_nul_terminator(RECODE_TASK task) { if (task->output.cursor + 4 >= task->output.limit) { RECODE_OUTER outer = task->request->outer; size_t old_size = task->output.cursor - task->output.buffer; size_t new_size = task->output.cursor + 4 - task->output.buffer; /* FIXME: Rethink about how the error should be reported. */ if (REALLOC (task->output.buffer, new_size, char)) { task->output.cursor = task->output.buffer + old_size; task->output.limit = task->output.buffer + new_size; } } task->output.cursor[0] = NUL; task->output.cursor[1] = NUL; task->output.cursor[2] = NUL; task->output.cursor[3] = NUL; } // End: From librecode Conversion const * LibRecodeConverter::make(char const * const buf, size_t const bufSize) const { class Task { public: Task(RECODE_REQUEST request, char const * const buf, size_t const bufSize, bool const & sloppy) :task_(::recode_new_task(request)) { // Task config task_->strategy = RECODE_SEQUENCE_IN_MEMORY; task_->fail_level = sloppy ? RECODE_INVALID_INPUT : RECODE_NOT_CANONICAL; task_->input.buffer = buf; task_->input.cursor = buf; task_->input.limit = buf + bufSize; task_->output.buffer = 0; task_->output.cursor = 0; task_->output.limit = 0; } ~Task() { ::recode_delete_task(task_); } Conversion const * make() { if (!::recode_perform_task(task_)) { // So far allocated buffer must be freed Sys::free(task_->output.buffer); UI_THROW_CODE(ConversionErr_, "LibRecodeConverter: Task error, \"error_so_far\"=" + tos(task_->error_so_far)); } guarantee_nul_terminator(task_); return new StdFreeConversion(task_->output.buffer, task_->output.cursor-task_->output.buffer); } RECODE_TASK task_; }; return Task(request_, buf, bufSize, sloppy_).make(); } #endif IConvConverter::IConvConverter(std::string const & inEnc, std::string const & outEnc, const bool & sloppy ) :Converter(inEnc, outEnc, sloppy) ,conversion_(Sys::iconv_open(outEnc_.c_str(), inEnc_.c_str())) { // Linux uses gcc with iconv build-in. The non-standard iconvctl feature is in GNU libiconv only. #ifndef __linux__ const int transliterate = (int)sloppy; iconvctl( conversion_, ICONV_SET_TRANSLITERATE, (void *)&transliterate ); #endif } IConvConverter::~IConvConverter() { try { Sys::iconv_close(conversion_); } catch (...) {} } Conversion const * IConvConverter::make(char const * const buf, size_t const bufSize) const { size_t nLength = bufSize; const char* pInput = buf; char * dest((char *) Sys::malloc(nLength + 1)); assert(dest); size_t destSize(0); int nIteration(1); while (true) { const char* pIn = pInput; char* pOut = dest; size_t nIn = nLength; size_t nOut = nLength * nIteration; #ifdef WIN32 size_t code = iconv( conversion_, &pIn, &nIn, &pOut, &nOut ); #else size_t code = iconv( conversion_, const_cast(&pIn), &nIn, &pOut, &nOut ); #endif dest[nLength*nIteration-nOut] = 0; if( ( (size_t)(-1) == code ) && ( E2BIG == errno ) ) { if (NULL != dest) { // Huh? Sys::free(dest); dest = 0; } nIteration++; dest = (char *) Sys::malloc(nLength * nIteration + 1); } else { if ((size_t)(-1) == code) { /** @bug memory leak (malloc)? */ UI_THROW_CODE(ConversionErr_, "IConvConverter: Conversion error: " + getID()); } destSize = nLength*nIteration-nOut; break; } } return new StdFreeConversion(dest, destSize); } URLConverter::URLConverter(bool const encode) :Converter(encode ? "data" : "url", encode ? "url" : "data") {} Conversion const * URLConverter::make(char const * const buf, size_t const bufSize) const { // Note: Encoder and decoder directly from c-str would be nice for efficiency. std::string src(buf, bufSize); return new StringConversion(new std::string((inEnc_ == "data" ? encode(src) : decode(src)))); } unsigned char URLConverter::number(unsigned char inNum) { unsigned char outNum = 0; if ((inNum >= MinNum && inNum <= MaxNum) || (inNum >= MinAlp && inNum <= MaxAlp) || (inNum >= MinAlp2 && inNum <= MaxAlp2)) { if (inNum > MaxNum) { if (inNum > MaxAlp) { outNum = inNum-AlpMod2; } else { outNum = inNum-AlpMod; } } else { outNum = inNum-NumMod; } } return outNum; } std::string URLConverter::encode(std::string const & url) { unsigned char check = 0; char buf[4]; int i = 0; std::string out(""); for (i=0 ; i < (int) url.size(); i++) { check = (url.data())[i]; switch ( check ) { case 0x20: // "(space)" out.append( 1, '+' ); break; case 0x2a: // "*" case 0x2d: // "-" case 0x2e: // "." case 0X5f: // "_" out.append( 1, check ); break; default: if ((check >= 0x21 && check <= 0x2f) || // "!" - "/" (check >= 0x3a && check <= 0x40) || // ":" - "@" (check >= 0x5b && check <= 0x60) || // "[" - "'" (check >= 0x7b && check <= 0x7f) || // "{" - "~" (check > 0x7f)) // non-ASCII { std::sprintf(buf, "%%%X", check); out.append(buf); } else { out.append(1, check); } } } return out; } std::string URLConverter::decode(std::string const & url) { unsigned char check = 0; unsigned char low, high, ascii = 0; int i = 0; std::string out(""); for ( i=0 ; i< (int) url.size() ; i++ ) { check = (url.data())[i]; switch (check) { case 0x2b: // "+" out.append( 1, ' ' ); break; case 0x25: // "%" high = number((url.data())[i+1]); low = number((url.data())[i+2]); high = (high << 4); ascii = (low | high); out.append( 1, ascii ); i = i+2; break; default: out.append( 1, check ); break; } } return out; } Cpp2Base64Converter::Cpp2Base64Converter(bool const encode) :Converter(encode ? "data" : "b64", encode ? "b64" : "data") {} Conversion const * Cpp2Base64Converter::make(char const * const buf, size_t const bufSize) const { char * dest(0); size_t destSize(0); if (inEnc_ == "data") { long lDestSize((bufSize+2) / 3*4 + 1); dest = (char*) Sys::malloc(lDestSize); destSize = ost::b64Encode((const unsigned char *)buf, bufSize, dest, lDestSize); } else { long lDestSize(bufSize / 4*3 + 1); dest = (char*) Sys::malloc(lDestSize); destSize = ost::b64Decode(buf, (unsigned char *)dest, lDestSize); } return new StdFreeConversion(dest, destSize); } Rfc2047Converter::Rfc2047Converter(std::string const & inCharEnc) :Converter(inCharEnc, "rfc2047") {} Conversion const * Rfc2047Converter::make(char const * const buf, size_t const bufSize) const { std::string * result(new std::string()); try { /* Check if further encoding is neccessary */ bool noEncoding(true); for (size_t i(0); noEncoding && i < bufSize; ++i) { noEncoding = noEncoding && ((unsigned char) buf[i] <= 127); } if (noEncoding) { *result = buf; } else { /* at least one special character (>127) occurred -> encode */ /* encoded characters look like this: =XX where XX is hexadecimal*/ /* this small buffer holds one encoded char.*/ char const * hexTable="0123456789ABCDEF"; char hex[4]; hex[0]='='; hex[3]=0; /* header with character encoding */ result->append("=?"); result->append(inEnc_); result->append("?Q?"); /* and now the content */ for (size_t i(0); i < bufSize; ++i) { if (buf[i] == ' ') { *result += '_'; } else if ((unsigned char) buf[i] > 127 || buf[i] == '\t' || buf[i] == '?' || buf[i] == '=' || buf[i] == '_') { hex[1]=hexTable[(unsigned char) buf[i] >> 4]; hex[2]=hexTable[(unsigned char) buf[i] &0xF]; result->append(hex); } else { *result += buf[i]; } } result->append("?="); } } catch(...) { delete result; throw; } return new StringConversion(result); } Rfc3490Utf8Converter::Rfc3490Utf8Converter(bool const encode) :Converter(encode ? "UTF-8" : "idn", encode ? "idn" : "UTF-8") {} Conversion const * Rfc3490Utf8Converter::make(char const * const buf, size_t const bufSize) const { // bufSize not used by ::idna_* funcs (must be 0-terminated); this line avoids compiler warnings only if (bufSize) {}; char * output(0); int result; if (inEnc_ == "UTF-8") { result = ::idna_to_ascii_8z(buf, &output, 0); } else { result = ::idna_to_unicode_8z8z(buf, &output, 0); } if (result != IDNA_SUCCESS) { std::free(output); UI_THROW_CODE(ConversionErr_, "IDNA converter error: " + std::string(::idna_strerror((Idna_rc) result))); } return new StdFreeConversion(output, std::strlen(output)); } IdnEMailConverter::IdnEMailConverter(std::string const & inEnc) :Converter(inEnc, "idn-email") {} Conversion const * IdnEMailConverter::make(char const * const buf, size_t const bufSize) const { class T { public: static bool isAllowedChar(char const & c) { unsigned short int const i(c); return (i > 127) // Non-ASCII (UTF-8 multibyte) || (i >= 48 && i <= 57) // ASCII: 0-9 || (i >= 65 && i <= 90) // ASCII: A-Z || (i >= 97 && i <= 122) // ASCII: a-z || (c == '-') || (c == '.'); } }; // First, we need UNICODE: UTF-8 std::string result(RecoderCache::get(inEnc_, "UTF-8", true).run(buf, bufSize)); // Find "@" std::string::size_type atPos(result.find('@')); while (atPos != std::string::npos) { std::string::size_type spacePos(atPos+1); while (spacePos < result.size() && T::isAllowedChar(result[spacePos])) { ++spacePos; } std::string const domain(result.substr(atPos+1, spacePos == std::string::npos ? std::string::npos : spacePos-atPos)); std::string const idnDomain(RecoderCache::get("UTF-8", "idn").run(domain)); result.replace(atPos+1, domain.size(), idnDomain); atPos = result.find('@', atPos+1); } // Lastly, re-encode into original char encoding return new StringConversion(new std::string(RecoderCache::get("UTF-8", inEnc_, true).run(result))); } bool Recoder::isEnc(std::string const & enc, std::string const & encs) const { return isToken(enc, encs, ",", -1); } Recoder::Recoder(std::string const & inEnc, std::string const & outEnc, bool const & sloppy) :converter_(0) { if (isEnc(inEnc, "data") && isEnc(outEnc, "base64,b64,64")) { converter_ = new Cpp2Base64Converter(true); } else if (isEnc(inEnc, "base64,b64,64") && isEnc(outEnc, "data")) { converter_ = new Cpp2Base64Converter(false); } else if (isEnc(inEnc, "data") && isEnc(outEnc, "url,urlenc")) { converter_ = new URLConverter(true); } else if (isEnc(inEnc, "url,urlenc") && isEnc(outEnc, "data")) { converter_ = new URLConverter(false); } else if (isEnc(outEnc, "rfc2047")) { converter_ = new Rfc2047Converter(inEnc); } else if (isEnc(inEnc, "utf-8,utf8") && isEnc(outEnc, "rfc3490,idn")) { converter_ = new Rfc3490Utf8Converter(true); } else if (isEnc(inEnc, "rfc3490,idn") && isEnc(outEnc, "utf-8,utf8")) { converter_ = new Rfc3490Utf8Converter(false); } else if (isEnc(outEnc, "idn-email")) { converter_ = new IdnEMailConverter(inEnc); } else { #ifdef WIN32 converter_ = new IConvConverter(inEnc, outEnc, sloppy); #else converter_ = new LibRecodeConverter(inEnc, outEnc, sloppy); #endif } assert(converter_); } Recoder::~Recoder() { delete converter_; } Conversion const * Recoder::make(char const * src, size_t srcSize) const { return converter_->make(src, srcSize); } Conversion const * Recoder::make(char const * src) const { return make(src, std::strlen(src)); } std::string Recoder::run(char const * const buf, size_t const bufSize) const { UI::Util::auto_ptr conv(make(buf, bufSize)); return conv->getString(); } std::string Recoder::run(char const * const src) const { UI::Util::auto_ptr conv(make(src)); return conv->getString(); } std::string Recoder::run(std::string const & src) const { UI::Util::auto_ptr conv(make(src.c_str(), src.size())); return conv->getString(); } RecoderCache * RecoderCache::instance_(0); Recoder const & RecoderCache::get(std::string const & inEnc, std::string const & outEnc, bool const & sloppy) { if (!instance_) { instance_ = new RecoderCache(); } std::string const key(inEnc + ".." + outEnc + "/" + tos(sloppy)); RecoderMap::const_iterator i(instance_->cache_.find(key)); if (i == instance_->cache_.end()) { instance_->cache_[key] = new Recoder(inEnc, outEnc, sloppy); return *(instance_->cache_[key]); } else { return *i->second; } } RecoderCache::~RecoderCache() { delStringMap(cache_); } }} ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Socket.cpp0000644000000000000000000000013212751117070020110 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.854884939 30 ctime=1470503616.022342841 ui-utilcpp-1.8.5/src/ui-utilcpp/Socket.cpp0000644000175000017500000002235012751117070021263 0ustar00absurdabsurd00000000000000#include "config.h" // Implementation #include "Socket.hpp" // STDC++ #include #include // Local #include "Text.hpp" namespace UI { namespace Util { Socket::Socket(int fd, bool closeFd) #ifndef WIN32 :FileDescriptor(fd, closeFd) #else :fd_(fd), closeFd_(closeFd) #endif { #ifdef WIN32 // clear inner buffer sendBuffer.clear(); #endif } #ifdef WIN32 void Socket::sendStoredBuffer() { // all stored data must be sent now if(sendBuffer.size() > 0) { void *pBuffer = (void*)new char[sendBuffer.size()]; void *tmp = pBuffer; for(size_t i = 0; i < sendBuffer.size(); i++) ((char*)pBuffer)[i] = sendBuffer[i]; int nSent = 0; int nRemaining = sendBuffer.size(); while( nRemaining > 0 ) { nSent = ::send( fd_, (const char*)pBuffer, nRemaining, 0 ); if(nSent > 0) { pBuffer = (char*)pBuffer + nSent; nRemaining -= nSent; } else { delete [] tmp; UI_THROW_CODE(FileDescriptor::WriteErr_, "Error sending response, sent " + tos(sendBuffer.size() - nRemaining) + " out of " + tos(sendBuffer.size())); } } delete [] tmp; // clear buffer sendBuffer.clear(); } } Socket::~Socket() { // send buffer if any sendStoredBuffer(); if (closeFd_) { if (::shutdown(fd_, SD_SEND) != 0) { ::closesocket(fd_); // No exception possible -- destructor. } } } #endif std::string Socket::getId(bool const & peer) const { try { // Get addr struct from file descriptor struct sockaddr_storage addr; memset(&addr, 0, sizeof(addr)); socklen_t addrLen(sizeof(addr));; peer ? Sys::getpeername(getFd(), (sockaddr *) &addr, &addrLen) : Sys::getsockname(getFd(), (sockaddr *) &addr, &addrLen); // Get human-readable string return Sys::getnameinfo((sockaddr *) &addr, addrLen); } catch (std::exception const & e) { return e.what(); } } std::string Socket::getPeerId() const { return getId(true); } Socket & Socket::setRcvTimeout(long int seconds, long int microseconds) { struct timeval const to = {seconds, microseconds}; // 1/1 seconds, 1/1000000 seconds Sys::setsockopt_to(fd_, SOL_SOCKET, SO_RCVTIMEO, to); return *this; } Socket & Socket::setSndTimeout(long int seconds, long int microseconds) { struct timeval const to = {seconds, microseconds}; // 1/1 seconds, 1/1000000 seconds Sys::setsockopt_to(fd_, SOL_SOCKET, SO_SNDTIMEO, to); return *this; } Socket & Socket::setUnblock(bool unblock) { try { if (unblock) { #ifndef WIN32 Sys::fcntl(fd_, F_SETFL, O_NONBLOCK); #endif } return *this; } catch(std::exception const & e) { UI_THROW_CODE(FileDescriptor::UnblockErr_, "Can't unblock " + getId() + ": " + e.what()); } } Socket & Socket::bind() { UI_THROW_CODE(FileDescriptor::ConnectErr_, "Don't know how to bind socket " + getId()); } Socket & Socket::connect() { UI_THROW_CODE(FileDescriptor::ConnectErr_, "Don't know how to connect socket " + getId()); } Socket & Socket::listen(int backlog) { try { Sys::listen(fd_, backlog); return *this; } catch(std::exception const & e) { UI_THROW_CODE(FileDescriptor::ListenErr_, "Can't set " + getId() + " to listen: " + e.what()); } } int Socket::accept(long int toSeconds, long int toMicroSeconds) { if (toSeconds == 0 && toMicroSeconds == 0) { return ::accept(fd_, 0, 0); } else { // We need to use select to set a timeout fd_set fdSet; FD_ZERO(&fdSet); FD_SET(fd_, &fdSet); struct timeval timeout = {toSeconds, toMicroSeconds}; // seconds, microseconds int selectResult(::select(fd_+1, &fdSet, 0, 0, &timeout)); if (selectResult > 0) { assert(selectResult == 1); return ::accept(fd_, 0, 0); } else { return selectResult; } } } int Socket::shutdown(int how, bool doThrow) { int const res(::shutdown(fd_, how)); if (res != 0 && doThrow) { UI_THROW_CODE(FileDescriptor::ShutdownErr_, "Error on shutdown(2) of fd " + tos(fd_)); } return res; } ssize_t Socket::recv(void * const buf, size_t len, int flags) { #ifdef WIN32 // send stored buffer if any sendStoredBuffer(); // receive something size_t result(::recv(fd_, (char*)buf, len, flags)); if (result < 0) { throw UI::Exception("Error recv(2)ing from socket fd " + tos(fd_)); } return result; #else return Sys::recv(fd_, buf, len, flags); #endif } ssize_t Socket::send(void const * const msg, size_t len, int flags) { #ifdef WIN32 // put all data in the inner buffer and send nothing for(size_t i = 0; i < len; i++) sendBuffer.push_back(((char*)msg)[i]); // send the data if around 64k if(sendBuffer.size() > 60000) sendStoredBuffer(); // return send OK if (len < 0) { throw UI::Exception("Error send(2)ing to socket fd " + tos(fd_)); } return len; #else return Sys::send(fd_, msg, len, flags); #endif } std::streamsize Socket::read(void * const buf, std::streamsize count) { try { return static_cast(recv(buf, count)); } catch(std::exception const & e) { UI_THROW_CODE(FileDescriptor::ReadErr_, "Error reading from socket " + getId() + ": " + e.what()); } } std::streamsize Socket::write(void const * const buf, std::streamsize count) { try { return static_cast(send(buf, count)); } catch(std::exception const & e) { UI_THROW_CODE(FileDescriptor::WriteErr_, "Error writing to socket " + getId() + ": " + e.what()); } } INetSocket::INetSocket(std::string const & host, unsigned int port, bool closeFd, bool reuseAddr) :Socket(-1, closeFd) ,addrInfo_(0) ,addr_(0) { try { // Generate hints struct (for getaddrinfolater). struct addrinfo hints; memset(&hints, 0, sizeof(struct addrinfo)); hints.ai_family = AF_UNSPEC; // IPv4 or IPv6 hints.ai_socktype = SOCK_STREAM; // TCP stream hints.ai_flags = AI_PASSIVE; hints.ai_protocol = 0; hints.ai_canonname = 0; hints.ai_addr = 0; hints.ai_next = 0; // Get addr info from host & port std::string const service(tos(port)); Sys::getaddrinfo(host.c_str(), service.c_str(), &hints, &addrInfo_); // Try open socket in the given order addr_ = addrInfo_; while (addr_ != 0 && (fd_ = ::socket(addr_->ai_family, addr_->ai_socktype, addr_->ai_protocol)) < 0) { addr_ = addr_->ai_next; } if (fd_ < 0) { UI_THROW_CODE(FileDescriptor::OpenErr_, "Can't open network address: " + host + ":" + service); } // Optionally set SO_REUSEADDR flag if (reuseAddr) { int const one(1); Sys::setsockopt(fd_, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)); } } catch(std::exception const & e) { UI_THROW_CODE(FileDescriptor::OpenErr_, e.what()); } } INetSocket::INetSocket(int fd, bool closeFd) :Socket(fd, closeFd) ,addrInfo_(0) ,addr_(0) {} INetSocket::~INetSocket() { ::freeaddrinfo(addrInfo_); } INetSocket & INetSocket::bind() { try { Sys::bind(fd_, addr_->ai_addr, addr_->ai_addrlen); return *this; } catch(std::exception const & e) { UI_THROW_CODE(FileDescriptor::BindErr_, e.what()); } } INetSocket & INetSocket::connect() { try { Sys::connect(fd_, addr_->ai_addr, addr_->ai_addrlen); return *this; } catch(std::exception const & e) { UI_THROW_CODE(FileDescriptor::ConnectErr_, e.what()); } } #ifndef WIN32 UnixSocket::UnixSocket(std::string const & path, bool closeFd) :Socket(-1, closeFd) ,silentUnlink_(false) { try { // Create Socket fd_ = Sys::socket(PF_UNIX, SOCK_STREAM, 0); // Initialize Unix Address if (strlen(path.c_str()) >= sizeof(unSa_.sun_path)) { UI_THROW_CODE(OpenErr_, "Path name for unix socket too long"); } unSa_.sun_family = AF_LOCAL; std::strncpy(unSa_.sun_path, path.c_str(), sizeof(unSa_.sun_path)); } catch(std::exception const & e) { UI_THROW_CODE(FileDescriptor::OpenErr_, "Can't open unix socket " + path + ": " + e.what()); } } UnixSocket::UnixSocket(int fd, bool closeFd) :Socket(fd, closeFd) ,silentUnlink_(false) { // We need to protect this from being undefined for getId(). unSa_.sun_path[0] = '\0'; } UnixSocket::~UnixSocket() { if (silentUnlink_) { try { Sys::unlink(unSa_.sun_path); } catch(...) {}; } } UnixSocket & UnixSocket::bind() { return unixBind(); } UnixSocket & UnixSocket::unixBind(uid_t uid, gid_t gid, mode_t mode, bool silentUnlink) { try { silentUnlink_ = silentUnlink; if (silentUnlink_) { try { Sys::unlink(unSa_.sun_path); } catch(...) {}; } // Bind Socket to Unix Address; this will, too, create the socket file in the filesystem Sys::bind(fd_, (struct sockaddr *) &unSa_, sizeof(unSa_.sun_family) + (size_t) strlen(unSa_.sun_path)); // Set both uid and user's default group id Sys::chown(unSa_.sun_path, uid, gid); // Set permissions Sys::chmod(unSa_.sun_path, mode); return *this; } catch(std::exception const & e) { UI_THROW_CODE(FileDescriptor::BindErr_, "Can't bind " + getId() + ": " + e.what()); } } UnixSocket & UnixSocket::connect() { try { Sys::connect(fd_, (struct sockaddr *) &unSa_, sizeof(unSa_.sun_family) + (size_t) strlen(unSa_.sun_path)); return *this; } catch(std::exception const & e) { UI_THROW_CODE(FileDescriptor::ConnectErr_, "Can't connect " + getId() + ": " + e.what()); } } #endif /** @brief socketpair(2) abstraction. */ SocketPair::SocketPair(bool const & closeFd) :closeFd_(closeFd) { Sys::socketpair(AF_UNIX, SOCK_STREAM, 0, sv_); } SocketPair::~SocketPair() { FileDescriptor::fdClose(sv_[0], "SocketPair", closeFd_); FileDescriptor::fdClose(sv_[1], "SocketPair", closeFd_); } int const & SocketPair::first() const { return sv_[0]; } int const & SocketPair::second() const { return sv_[1]; } }} ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/CharsetMagic.cpp0000644000000000000000000000013212751117070021212 xustar0030 mtime=1470406200.111952115 30 atime=1470498397.858884864 30 ctime=1470503616.030342691 ui-utilcpp-1.8.5/src/ui-utilcpp/CharsetMagic.cpp0000644000175000017500000000501512751117070022364 0ustar00absurdabsurd00000000000000// Local configuration #include "config.h" // Implementation #include "CharsetMagic.hpp" // STDC++ #include #include // SYSTEM C // Local #include "Exception.hpp" namespace UI { namespace Util { namespace CharsetMagic { // From "file", somewhat adjusted. namespace File { #include "ascmagic.c" } bool looksLikeASCII(char const * const buf, size_t const & len) { std::vector ubuf(len+1); size_t ulen; return File::looks_ascii((unsigned char *)buf, len, &ubuf[0], &ulen) != 0; } bool looksLikeUTF8(char const * const buf, size_t const & len) { std::vector ubuf(len+1); size_t ulen; return File::looks_utf8((unsigned char *)buf, len, &ubuf[0], &ulen) != 0; } bool looksLikeLatin1(char const * const buf, size_t const & len) { std::vector ubuf(len+1); size_t ulen; return File::looks_latin1((unsigned char *)buf, len, &ubuf[0], &ulen) != 0; } bool looksLikeUTF16LE(char const * const buf, size_t const & len) { std::vector ubuf(len+1); size_t ulen; return File::looks_unicode((unsigned char *)buf, len, &ubuf[0], &ulen) == 1; } bool looksLikeUTF16BE(char const * const buf, size_t const & len) { std::vector ubuf(len+1); size_t ulen; return File::looks_unicode((unsigned char *)buf, len, &ubuf[0], &ulen) > 1; } typedef bool (* LooksLikeFunc) (char const * const, size_t const &); typedef std::pair LooksLikePair; typedef std::vector LooksLikePairVec; // This determines available "looks like" tests and their order LooksLikePairVec const genLooksLikePairs() { LooksLikePairVec result; result.push_back(std::make_pair(&looksLikeASCII, "ASCII")); result.push_back(std::make_pair(&looksLikeUTF8, "UTF-8")); result.push_back(std::make_pair(&looksLikeUTF16LE, "UTF-16LE")); result.push_back(std::make_pair(&looksLikeUTF16BE, "UTF-16BE")); // This will also detect UTF-16 as latin, so this must come after utf16 tests result.push_back(std::make_pair(&looksLikeLatin1, "ISO-8859-15")); return result; } // The actual static test vector static LooksLikePairVec const LooksLikePairs(genLooksLikePairs()); std::string guess(char const * const buf, size_t const & len) { for (LooksLikePairVec::const_iterator f(LooksLikePairs.begin()); f != LooksLikePairs.end(); ++f) { if (f->first(buf, len)) { return f->second; } } return ""; } std::string guess(std::string const & buf, std::string::size_type const & len) { return guess(buf.c_str(), len == std::string::npos ? buf.size() : len); } }}} ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Sys.cpp0000644000000000000000000000013212751117070017436 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.858884864 30 ctime=1470503616.022342841 ui-utilcpp-1.8.5/src/ui-utilcpp/Sys.cpp0000644000175000017500000005323112751117070020613 0ustar00absurdabsurd00000000000000// Local configuration #include "config.h" // Implementation #include "Sys.hpp" // STDC++ #include #include // POSIX C #ifdef WIN32 #include #else #include #include #include #endif // System C #ifdef __linux__ #include #include #ifdef HAVE_LIBPROC #include #endif #endif // C++ libraries #include #include namespace UI { namespace Util { namespace Sys { #ifdef WIN32 // From MSDN: // The WSAStartup function must be the first Windows Sockets function called by an application or DLL. // It allows an application or DLL to specify the version of Windows Sockets required and retrieve details of the specific Windows Sockets implementation. // The application or DLL can only issue further Windows Sockets functions after successfully calling WSAStartup. void wsaStartup() { WSADATA wsaData = {}; int err = ::WSAStartup(MAKEWORD(2,2), &wsaData); if (err != 0) { UI_THROW_ERRNO("WSAStartup failed with error " + tos(err)); } // Confirm that the WinSock DLL supports 2.2. // Note that if the DLL supports versions greater than 2.2 in addition to 2.2, it will still return // 2.2 in wVersion since that is the version we requested. if (LOBYTE(wsaData.wVersion) != 2 || HIBYTE(wsaData.wVersion) != 2) { ::WSACleanup(); UI_THROW_ERRNO("Could not find a usable version of Winsock.dll"); } } void wsaCleanup() { ::WSACleanup(); } std::string convertPath(std::string const & path) { // initialize result CString strResult( path.c_str() ); // replace slashes with backslashes strResult.Replace( "/", "\\" ); // remove slashes and backslashes (some paths have even 3 slashes at the end) while( ( 1 < strResult.GetLength() ) && ( '\\' == strResult[strResult.GetLength()-1] ) ) strResult = strResult.Left( strResult.GetLength() - 1 ); while( -1 != strResult.Find( "\\\\" ) ) { strResult.Replace( "\\\\", "\\" ); } // return fixed path return std::string( (LPCTSTR)strResult ); } #endif void * calloc(size_t nmemb, size_t size) { void * result(std::calloc(nmemb, size)); if (result == 0) { UI_THROW_ERRNO("Error calloc(3)ing " + tos(size) + " bytes: "); } return result; } void * malloc(size_t size) { void * result(std::malloc(size)); if (result == 0) { UI_THROW_ERRNO("Error malloc(3)ing " + tos(size) + " bytes: "); } return result; } void free(void *ptr) { std::free(ptr); } int system(char const * s) { int const result(std::system(s)); if (result < 0) { UI_THROW_ERRNO("Error system(3)ing: " + std::string(s)); } return result; } char * getenv(char const * name) { char * result(::getenv(name)); if (result == 0) { UI_THROW("Error getenv(3)ing: No such environment variable \"" + std::string(name) + "\""); } return result; } void realpath(char const * path, char * resolved_path) { if (::realpath(path, resolved_path) == 0) { UI_THROW_ERRNO("Error resolving realpath(3) for " + std::string(path) + ": "); } } FILE * fopen(char const * path, char const * mode) { FILE * result(std::fopen(path, mode)); if (result == 0) { UI_THROW_ERRNO("Error fopen(3)ing " + std::string(path) + ": "); } return result; } FILE * freopen(char const * path, char const * mode, FILE * stream) { FILE * result(std::freopen(path, mode, stream)); if (result == 0) { UI_THROW_ERRNO("Error freopen(3)ing " + std::string(path) + ": "); } return result; } void fclose(FILE * fp) { if (std::fclose(fp) != 0) { UI_THROW_ERRNO("Error fclosing(3)ing file ptr " + tos(fp) + ": "); } } mode_t umask(mode_t mask) { return ::umask(mask); } void chdir(char const * path) { if (::chdir(path) != 0) { UI_THROW_ERRNO("Error chdir(2)ing to " + std::string(path) + ": "); } } void chown(char const * path, uid_t owner, gid_t group) { #ifdef WIN32 // note SL: do not just throw an exception here because this will cause a lot of problems // Windows doesn't have to change any ownership so just ignore this //UI_THROW("No chown for WIN32"); #else if (::chown(path, owner, group) != 0) { UI_THROW_ERRNO("Error chown(2)ing " + std::string(path) + ": "); } #endif } void chmod(char const * path, mode_t mode) { if (::chmod(path, mode) != 0) { UI_THROW_ERRNO("Error chmod(2)ing " + std::string(path) + ": "); } } void stat(char const * file_name, struct stat * buf) { #ifdef WIN32 std::string strPath = convertPath( file_name ); if(::stat(strPath.c_str(), buf) != 0) { UI_THROW_ERRNO("Error stat(2)ing " + std::string(file_name) + ": "); } #else if(::stat(file_name, buf) != 0) { UI_THROW_ERRNO("Error stat(2)ing " + std::string(file_name) + ": "); } #endif } void fstat(int filedes, struct stat * buf) { if (::fstat(filedes, buf) != 0) { UI_THROW_ERRNO("Error fstat(2)ing fd " + tos(filedes) + ": "); } } void lstat(char const * file_name, struct stat * buf) { #ifdef WIN32 // note SL: do not just throw an exception here because this will cause a lot of problems //UI_THROW("No lstat for WIN32"); #else if (::lstat(file_name, buf) != 0) { UI_THROW_ERRNO("Error lstat(2)ing " + std::string(file_name) + ": "); } #endif } void statvfs(char const * path, struct statvfs * buf) { #ifdef WIN32 // note SL: do not just throw an exception here because this will cause a lot of problems //UI_THROW("No statvfs for WIN32"); #else if (::statvfs(path, buf) != 0) { UI_THROW_ERRNO("Error statvfs(2)ing " + std::string(path) + ": "); } #endif } void unlink(char const * pathname) { if (::unlink(pathname) != 0) { UI_THROW_ERRNO("Error unlink(2)ing " + std::string(pathname) + ": "); } } void remove(char const * pathname) { if (::remove(pathname) != 0) { UI_THROW_ERRNO("Error remove(3)ing " + std::string(pathname) + ": "); } } void rename(char const * oldpath, char const * newpath) { #ifdef WIN32 if (fileExists(newpath)) { if (::remove(newpath) == -1) {UI_THROW_ERRNO("Error removing " + std::string(newpath) + ": ");} } #endif if (::rename(oldpath, newpath) != 0) { UI_THROW_ERRNO("Error rename(2)ing " + std::string(oldpath) + "->" + std::string(newpath) + ": "); } } int open(char const * pathname, int flags) { int const result(::open(pathname, flags)); if (result < 0) { UI_THROW_ERRNO("Error open(2)ing " + std::string(pathname) + ": "); } return result; } int open(char const * pathname, int flags, mode_t mode) { int const result(::open(pathname, flags, mode)); if (result < 0) { UI_THROW_ERRNO("Error open(2)ing " + std::string(pathname) + " with mode " + tos(mode) + ": "); } return result; } void close(int fd) { if (::close(fd) != 0) { UI_THROW_ERRNO("Error close(2)ing fd " + tos(fd) + ": "); } } void mkdir(char const * pathname, mode_t mode) { #ifdef WIN32 if (_mkdir(pathname) != 0) { UI_THROW_ERRNO("Cannot mkdir(2) " + std::string(pathname) + " w/ mode " + tos(mode) + ": "); } #else if (::mkdir(pathname, mode) != 0) { UI_THROW_ERRNO("Cannot mkdir(2) " + std::string(pathname) + " w/ mode " + tos(mode) + ": "); } #endif } void rmdir(char const * pathname) { if (::rmdir(pathname) != 0) { UI_THROW_ERRNO("Cannot rmdir(2) " + std::string(pathname) + ": "); } } int dup(int oldfd) { int const result(::dup(oldfd)); if (result < 0) { UI_THROW_ERRNO("Error dup(2)ing oldfd " + tos(oldfd) + ": "); } return result; } int dup2(int oldfd, int newfd) { int const result(::dup2(oldfd, newfd)); if (result < 0) { UI_THROW_ERRNO("Error dup2(2)ing oldfd " + tos(oldfd) + ": "); } return result; } int fcntl(int fd, int cmd, long arg) { #ifdef WIN32 // note SL: do not just throw an exception here because this will cause a lot of problems //UI_THROW("No fcntl for WIN32"); return -1; #else int const result(::fcntl(fd, cmd, arg)); if (result == -1) { UI_THROW_ERRNO("Error fcntl(2)ing cmd " + tos(cmd) + " on fd " + tos(fd) + ": "); } return result; #endif } int fcntl(int fd, int cmd, struct flock * lock) { #ifdef WIN32 // note SL: do not just throw an exception here because this will cause a lot of problems //UI_THROW("No fcntl for WIN32"); return -1; #else int const result(::fcntl(fd, cmd, lock)); if (result == -1) { UI_THROW_ERRNO("Error fcntl(2)ing cmd " + tos(cmd) + " on fd " + tos(fd) + ": "); } return result; #endif } int flock(int fd, int operation) { #ifdef WIN32 UI_THROW("No flock(2) for WIN32"); return -1; #else int const result(::flock(fd, operation)); if (result != 0) { UI_THROW_ERRNO("Error flock(2)ing operation " + tos(operation) + " on fd " + tos(fd) + ": "); } return result; #endif } struct passwd * getpwnam(char const * name) { #ifdef WIN32 // note SL: do not just throw an exception here because this will cause a lot of problems //UI_THROW("No getpwnam(3) for WIN32"); return NULL; #else struct passwd * result(::getpwnam(name)); if (!result) { UI_THROW_ERRNO("Cannot getpwnam(3) for \"" + std::string(name) + "\": "); } return result; #endif } struct group * getgrnam(char const * name) { #ifdef WIN32 // note SL: do not just throw an exception here because this will cause a lot of problems //UI_THROW("No getgrnam(3) for WIN32"); return NULL; #else struct group * result(::getgrnam(name)); if (!result) { UI_THROW_ERRNO("Cannot getgrnam(3) for \"" + std::string(name) + "\": "); } return result; #endif } ssize_t write(int fd, void const * buf, size_t count) { int const result(::write(fd, buf, count)); if (result < 0) { UI_THROW_ERRNO("Error write(2)ing to fd " + tos(fd) + ": "); } return result; } ssize_t read(int fd, void * buf, size_t count) { int const result(::read(fd, buf, count)); if (result < 0) { UI_THROW_ERRNO("Error read(2)ing from fd " + tos(fd) + ": "); } return result; } #ifndef WIN32 pid_t fork(void) { pid_t const result(::fork()); if (result < 0) { UI_THROW_ERRNO("Error fork(2)ing: "); } return result; } #endif pid_t getpid() { return ::getpid(); } pid_t gettid() { #ifdef __linux__ return ::syscall(SYS_gettid); #else return ::getpid(); #endif } pid_t getppid() { #ifdef WIN32 return ::_getpid(); #else return ::getppid(); #endif } pid_t getpgid(pid_t pid) { #ifdef WIN32 return pid; // Does not seem to be s.th. like parent group #else pid_t const result(::getpgid(pid)); if (result < 0) { UI_THROW_ERRNO("Cannot getpgid(2) on " + tos(pid) + ": "); } return result; #endif } #ifndef WIN32 pid_t waitpid(pid_t pid, int * status, int options) { pid_t const result(::waitpid(pid, status, options)); if (result < 0) { UI_THROW_ERRNO("Error waitpid(2)ing on " + tos(pid) + ": "); } return result; } #endif pid_t setsid() { #if WIN32 return 0; #else pid_t const result(::setsid()); if (result < 0) { UI_THROW_ERRNO("Error setsid(2)ing: "); } return result; #endif } #ifndef WIN32 uid_t getuid() { return ::getuid(); } gid_t getgid() { return ::getgid(); } uid_t geteuid() { return ::geteuid(); } gid_t getegid() { return ::getegid(); } void seteuid(uid_t euid) { if (::seteuid(euid) < 0) { UI_THROW_ERRNO("Cannot seteuid(2) to " + tos(euid) + ": "); } } void setegid(gid_t egid) { if (::setegid(egid) < 0) { UI_THROW_ERRNO("Cannot setegid(2) to " + tos(egid) + ": "); } } void setuid(uid_t uid) { if (::setuid(uid) < 0) { UI_THROW_ERRNO("Cannot setuid(2) to " + tos(uid) + ": "); } } void setgid(gid_t gid) { if (::setgid(gid) < 0) { UI_THROW_ERRNO("Cannot setgid(2) to " + tos(gid) + ": "); } } #ifdef HAVE_LIBPROC uid_t getfsuid(pid_t const pid) { proc_t p; if (::get_proc_stats(pid, &p) != 0) { return p.fuid; } UI_THROW("Cannot getfsuid() [libproc] for pid=" + tos(pid)); } gid_t getfsgid(pid_t const pid) { proc_t p; if (::get_proc_stats(pid, &p) != 0) { return p.fgid; } UI_THROW("Cannot getfsgid() [libproc] for pid=" + tos(pid)); } #else uid_t fsidFromProcfs(pid_t const pid, std::string const & lineId) { try { // Get path in proc filesystem. std::stringstream statPath; statPath << "/proc/" << pid << "/status"; // Open status file std::ifstream statFile; statFile.exceptions(std::ios::eofbit|std::ios::failbit|std::ios::badbit); statFile.open(statPath.str().c_str()); // Read status file line by line until Uid: line is found std::string line; while (std::getline(statFile, line)) { if (line.compare(0, 4, lineId + ":") == 0) { // Tokenize tab-separated line: 'Uid: 1000 1000 1000 1000' StrVec tok(strtok(line, "\t")); return ato(tok.at(4)); } } } catch (std::exception const & e) { UI_THROW("Cannot parse fsid \"" + lineId + "\" from procfs for pid=" + tos(pid) + ": " + e.what()); } UI_THROW("Cannot parse fsid \"" + lineId + "\" from procfs for pid=" + tos(pid)); } uid_t getfsuid(pid_t const pid) { return fsidFromProcfs(pid, "Uid"); } gid_t getfsgid(pid_t const pid) { return fsidFromProcfs(pid, "Gid"); } #endif void setfsuid(uid_t fsuid) { // No real error handling for setfsuid, so we need an extra check ::setfsuid(fsuid); if (fsuid != getfsuid()) { UI_THROW("Cannot setfsuid(2) to " + tos(fsuid) + ": Still " + tos(getfsuid())); } } void setfsgid(gid_t fsgid) { // No real error handling for setfsgid, so we need an extra check ::setfsgid(fsgid); if (fsgid != getfsgid()) { UI_THROW("Cannot setfsgid(2) to " + tos(fsgid) + ": Still " + tos(getfsgid())); } } #else // dummy implementation uid_t getuid() { return ::getuid(); } gid_t getgid() { return ::getuid(); } uid_t geteuid() { return ::getuid(); } gid_t getegid() { return ::getuid(); } uid_t getfsuid(pid_t const) { return 0; } void seteuid(uid_t) {} void setegid(gid_t) {} void setuid(uid_t) {} void setgid(gid_t) {} void setfsuid(uid_t fsuid) {} void setfsgid(gid_t fsgid) {} #endif void getrlimit(int resource, struct rlimit * rlim) { #ifdef WIN32 // note SL: do not just throw an exception here because this will cause a lot of problems //UI_THROW("No getrlimit for WIN32"); #else if (::getrlimit(resource, rlim) == -1) { UI_THROW_ERRNO("Cannot getrlimit(2) from " + tos(resource) + ": "); } #endif } void getrusage(int who, struct rusage * usage) { #ifdef WIN32 // note SL: do not just throw an exception here because this will cause a lot of problems //UI_THROW("No getrusage for WIN32"); #else if (::getrusage(who, usage) == -1) { UI_THROW_ERRNO("Cannot getrusage(2) from " + tos(who) + ": "); } #endif } void setrlimit(int resource, struct rlimit const * rlim) { #ifdef WIN32 // note SL: do not just throw an exception here because this will cause a lot of problems //UI_THROW("No setrlimit for WIN32"); #else if (::setrlimit(resource, rlim) == -1) { UI_THROW_ERRNO("Cannot setrlimit(2) for " + tos(resource) + ": "); } #endif } unsigned int sleep(unsigned int seconds) { #ifdef WIN32 Sleep(DWORD(seconds * 1000)); return 0; #else return ::sleep(seconds); #endif } int socket(int domain, int type, int protocol) { int const result(::socket(domain, type, protocol)); if (result < 0) { UI_THROW_ERRNO("Error on socket(2): "); } return result; } void getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res) { int const r(::getaddrinfo(node, service, hints, res)); if (r != 0) { UI_THROW(std::string("Cannot getaddrinfo(3) for '") + node + ":" + service + "': " + ::gai_strerror(r)); } } void getnameinfo(const struct sockaddr * sa, socklen_t salen, char * host, size_t hostlen, char * serv, size_t servlen, int flags) { int const res(::getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)); if (res != 0) { UI_THROW(std::string("Cannot getnameinfo(3): ") + ::gai_strerror(res)); } } std::string getnameinfo(const struct sockaddr * sa, socklen_t salen) { char host[255]; char service[80]; Sys::getnameinfo(sa, salen, host, 254, service, 79, 0); return std::string(host) + ":" + service; } void getpeername(int s, struct sockaddr * name, socklen_t * namelen) { if (::getpeername(s, name, namelen) != 0) { UI_THROW_ERRNO("Cannot getpeername(2) from socket fd " + tos(s) + ": "); } } void getsockname(int s, struct sockaddr * name, socklen_t * namelen) { if (::getsockname(s, name, namelen) != 0) { UI_THROW_ERRNO("Cannot getsockname(2) from socket fd " + tos(s) + ": "); } } void setsockopt(int s, int level, int optname, void const * optval, socklen_t optlen) { #ifdef WIN32 char const * my_optval((char const *)optval); #else void const * my_optval(optval); #endif if (::setsockopt(s, level, optname, my_optval, optlen) != 0) { UI_THROW_ERRNO("Cannot setsockopt(2) on socket fd " + tos(s) + ": "); } } void setsockopt_to(int s, int level, int optname, struct timeval const & tv) { #ifdef WIN32 //WinSock wants the timeout in milliseconds int const millis(tv.tv_sec * 1000 + tv.tv_usec / 1000); Sys::setsockopt(s, level, optname, (const char*)&millis, sizeof(millis)); #else Sys::setsockopt(s, level, optname, &tv, sizeof(tv)); #endif } ssize_t recv(int s, void * buf, size_t len, int flags) { #ifdef WIN32 ssize_t const result(::recv(s, (char*)buf, len, flags)); #else ssize_t const result(::recv(s, buf, len, flags)); #endif if (result < 0) { UI_THROW_ERRNO("Error recv(2)ing from socket fd " + tos(s) + ": "); } return result; } ssize_t send(int s, void const * buf, size_t len, int flags) { #ifdef WIN32 ssize_t const result(::send(s, (char*)buf, len, flags)); #else ssize_t const result(::send(s, buf, len, flags)); #endif if (result < 0) { UI_THROW_ERRNO("Error send(2)ing to socket fd " + tos(s) + ": "); } return result; } void listen(int s, int backlog) { if (::listen(s, backlog) != 0) { UI_THROW_ERRNO("Cannot listen(2) on socket fd " + tos(s) + ": "); } } void bind(int sockfd, struct sockaddr * my_addr, socklen_t addrlen) { if (::bind(sockfd, my_addr, addrlen) != 0) { UI_THROW_ERRNO("Cannot bind(2) socket fd '" + tos(sockfd) + "' to '" + Sys::getnameinfo(my_addr, addrlen) + "': "); } } void connect(int sockfd, const struct sockaddr * serv_addr, socklen_t addrlen) { if (::connect(sockfd, serv_addr, addrlen) != 0) { UI_THROW_ERRNO("Cannot connect(2) socket fd '" + tos(sockfd) + "' to '" + Sys::getnameinfo(serv_addr, addrlen) + "': "); } } int select(int n, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, struct timeval * timeout) { int const result(::select(n, readfds, writefds, exceptfds, timeout)); if (result < 0) { UI_THROW_ERRNO("Error on select(2): "); } return result; } void socketpair(int d, int type, int protocol, int sv[2]) { #ifdef WIN32 // note SL: do not just throw an exception here because this will cause a lot of problems //UI_THROW("WIN32 has no socketpair call"); #else if (::socketpair(d, type, protocol, sv) != 0) { UI_THROW_ERRNO("Cannot create socketpair(2): "); } #endif } void gettimeofday(struct timeval * tv, struct timezone * tz) { if (::gettimeofday(tv, tz) < 0) { UI_THROW_ERRNO("Cannot gettimeofday(2): "); } } void settimeofday(struct timeval const * tv , struct timezone const * tz) { #ifdef WIN32 // note SL: do not just throw an exception here because this will cause a lot of problems //UI_THROW("WIN32 has no settimeofday call"); #else if (::settimeofday(tv, tz) < 0) { UI_THROW_ERRNO("Cannot settimeofday(2): "); } #endif } iconv_t iconv_open(char const * tocode, char const * fromcode) { iconv_t const result(::iconv_open(tocode, fromcode)); if (result == (iconv_t) -1) { UI_THROW_ERRNO("Error iconv_open(3)ing: " + std::string(tocode) + "<-" + std::string(fromcode)); } return result; } void iconv_close(iconv_t cd) { if (::iconv_close(cd) < 0) { UI_THROW_ERRNO("Cannot iconv_close(3) iconv_t " + tos(cd)); } } void quotactl(int cmd, char const * special, int id, caddr_t addr) { #ifdef WIN32 // note SL: do not just throw an exception here because this will cause a lot of problems //UI_THROW("No quotactl for WIN32"); #else if (::quotactl(cmd, special, id, addr) < 0) { UI_THROW_ERRNO("quotactl(2) failed for " + tos(id) + " on " + special + ": "); } #endif } size_t confstr(int name, char * buf, size_t len) { #ifdef WIN32 return (size_t) 0; #else return ::confstr(name, buf, len); #endif } std::string getconf(int id) { size_t n(confstr(id, 0, (size_t)0)); if (n == 0) { return EmptyString_; } else { std::vector result(n); confstr(id, &result[0], n); return &result[0]; } } // POSIX1e Capapilities #ifdef __linux__ cap_t cap_init(void) { cap_t c(::cap_init()); if (c == 0) { UI_THROW_ERRNO("cap_init(3) failed: "); } return c; } void cap_free(void * obj) { if (::cap_free(obj) != 0) { UI_THROW_ERRNO("cap_free(3) failed: "); } } cap_t cap_dup(cap_t c) { cap_t cDup(::cap_dup(c)); if (cDup == 0) { UI_THROW_ERRNO("cap_dup(3) failed: "); } return cDup; } cap_t cap_get_proc(void) { cap_t c(::cap_get_proc()); if (c == 0) { UI_THROW_ERRNO("cap_get_proc(3) failed: "); } return c; } void cap_set_proc(cap_t c) { if (::cap_set_proc(c) != 0) { UI_THROW_ERRNO("cap_set_proc(3) failed: "); } } void cap_clear(cap_t c) { if (::cap_clear(c) != 0) { UI_THROW_ERRNO("cap_clear(3) failed: "); } } #ifdef HAVE_CAP_CLEAR_FLAG void cap_clear_flag(cap_t c, cap_flag_t f) { if (::cap_clear_flag(c, f) != 0) { UI_THROW_ERRNO("cap_clear_flag(3) failed: "); } } #endif void cap_get_flag(cap_t c, cap_value_t v, cap_flag_t f, cap_flag_value_t *vp) { if (::cap_get_flag(c, v, f, vp) != 0) { UI_THROW_ERRNO("cap_clear_flag(3) failed: "); } } void cap_set_flag(cap_t c, cap_flag_t f, int n, const cap_value_t * va, cap_flag_value_t v) { // @note: (cap_value_t *) non-const cast is compat for libcap1 only if (::cap_set_flag(c, f, n, (cap_value_t *) va, v) != 0) { UI_THROW_ERRNO("cap_set_flag(3) failed: "); } } #ifdef HAVE_CAP_COMPARE int cap_compare(cap_t c1, cap_t c2) { int result(::cap_compare(c1, c2)); if (result != 0) { UI_THROW_ERRNO("cap_compare(3) failed: "); } return result; } #endif cap_t cap_from_text(char const * s) { cap_t c(::cap_from_text(s)); if (c == 0) { UI_THROW_ERRNO("cap_from_text(3) failed: "); } return c; } char * cap_to_text(cap_t c, ssize_t * l) { char * result(::cap_to_text(c, l)); if (result == 0) { UI_THROW_ERRNO("cap_to_text(3) failed: "); } return result; } int prctl(int o, unsigned long arg2, unsigned long arg3, unsigned long arg4, unsigned long arg5) { int result(::prctl(o, arg2, arg3, arg4, arg5)); if (result == -1) { UI_THROW_ERRNO("prctl(2) failed: "); } return result; } #endif }}} ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Exception.cpp0000644000000000000000000000013212751117070020616 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.858884864 30 ctime=1470503616.022342841 ui-utilcpp-1.8.5/src/ui-utilcpp/Exception.cpp0000644000175000017500000000154312751117070021772 0ustar00absurdabsurd00000000000000#include "config.h" // Implementation #include "Exception.hpp" // STDC++ #include namespace UI { std::string const Exception::Errno_ ("xxxERRNOxxx"); std::string const Exception::NoWhatGiven_ ("No error description given"); std::string const Exception::NoDebugGiven_("No debug information given"); Exception::Exception(std::string const & what, std::string const & debug, int const & errNo) :what_(Util::strrpl(what, Errno_, "[" + Util::tos(errNo) + "] " + Util::strerror(errNo))) ,debug_(debug) ,errNo_(errNo) {} Exception::~Exception() throw() {} char const * Exception::what() const throw() { return what_.c_str(); } std::string Exception::getDebug() const { return std::string(std::string(typeid(*this).name()) + ": " + debug_); } int const & Exception::getErrno() const { return errNo_; } } ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Text.hpp0000644000000000000000000000013212751403430017607 xustar0030 mtime=1470498584.901889041 30 atime=1470498584.917888731 30 ctime=1470503616.014342992 ui-utilcpp-1.8.5/src/ui-utilcpp/Text.hpp0000644000175000017500000003053412751403430020765 0ustar00absurdabsurd00000000000000/** * @file * @brief Text, descriptors and sockets. */ #ifndef UI_UTIL_TEXT_HPP #define UI_UTIL_TEXT_HPP // STDC++ #include #include #include #include #include #include #include #include #include // C++ libraries #include #include #include #ifdef WIN32 #if !defined( PATH_MAX ) #include #define PATH_MAX MAX_PATH #endif #endif namespace UI { namespace Util { /** @name Shortcuts for often used types and convenience stream operators. * @{ */ typedef std::vector StrVec; typedef std::list StrList; typedef std::map StrMap; /** @} */ }} namespace UI { namespace Util { std::string strVec2Str(StrVec const & strVec, std::string const & sep=" "); /** @brief You may use on as return value for an existing, but empty, string. */ static std::string const EmptyString_(""); /** @brief Save wrapper for ::strerror. Always use this instead of ::strerror directly. */ std::string strerror(int const & errNo=errno); /** @brief Like std::getline, but also rips of trailing "CR" when line break was CRLF. */ std::string getlineCRLF(std::istream & s); /** @brief ASCII CAPS converter for strings (using std::tolower|upper). */ std::string asciiCAPS(std::string const & in, bool const upper=true); /** @brief Replace all non-ASCII characters to '?' in string. */ std::string & str2Ascii(std::string & s); /** @brief Defaults values for some types via template specialization. */ template inline T Default() { return T(); } /** @brief Default-Specialising. */ template<> inline int Default() { return 0; } /** @brief Default-Specialising. */ template<> inline float Default() { return 0.0; } /** @brief Default-Specialising. */ template<> inline double Default() { return 0.0; } /** @brief Default-Specialising. */ template<> inline long int Default() { return 0; } /** @brief Default-Specialising. */ template<> inline bool Default() { return false; } /** @brief Default-Specialising. */ template<> inline std::string Default() { return ""; } /** @brief Stream modifier function (is there a std:: type??). */ typedef std::ios_base & (* StreamModifier) (std::ios_base &); /** @brief String-to-anything converter with error handling. * * @param t String to convert. * @param m Optional stream modifier like std::hex. * @returns Pair with conversion result and success; if false, result's value is undefinded. */ template std::pair eato(std::string const & t, StreamModifier const m=0) { // Prepare converter stream std::stringstream s(t); if (m) { s << m; }; // Convert with error handling std::pair result; s >> result.first; result.second = !s.fail(); return result; } /** @brief String-to-anything converter with default values on error. @see eato. */ template out_type ato(std::string const & t, StreamModifier const m=0) { std::pair const result(eato(t, m)); return result.second ? result.first : Default(); } /** @brief Anything-to-string converter with error handling. * * @param t Value to convert. * @param m Optional stream modifier like std::hex. * @param w Argument for std::setw() modifier. * @param f Argument for std::setfill() modifier. * @returns Pair with conversion result and success; if false, result's value is undefinded. */ template std::pair etos(in_type const & t, StreamModifier const m=0, int w=0, char f=' ') { // Prepare converter stream std::stringstream s; if (m) { s << m; } if (w) { s << std::setw(w); } if (f != ' ') { s << std::setfill(f); } // Convert with error handling std::pair result; s << t; result.first = s.str(); result.second = !s.fail(); return result; } /** @name Anything-to-string converter with empty string on error. @see etos. * @{ */ template std::string tos(in_type const & t, StreamModifier const m=0, int w=0, char f=' ') { std::pair const result(etos(t, m, w, f)); return result.second ? result.first : std::string(""); } template std::string tos(in_type const & t, int w, char f=' ') { std::pair const result(etos(t, 0, w, f)); return result.second ? result.first : std::string(""); } /** @} */ /** @name Generate arbitrary length pseudo random keys with alphanumeric ASCII characters. * @{ */ /** @brief Class using boost::mt19937 as random engine. */ class AlphaNumericKey { public: /** @brief Construct; seed will be automatically set (once) via timestamp (for linux/unix: microseconds). */ AlphaNumericKey(); std::string get(int len=8); private: std::string const keyChars_; boost::mt19937 engine_; boost::uniform_int<> distribution_; boost::variate_generator > generator_; }; /** @brief You may just use this global generator for convenience. * @note A singleton would be nicer, but imho not worth the effort, considering multi threading protection. */ static AlphaNumericKey GlobalAlphaNumericKey_; /** @brief For compatibility only. */ std::string genAlphaNumericKey(int len=8); /** @} */ /** @brief BSD style "strdup" implementation (is not C standard). See strdup(3). */ char * strdup(char const * s); /** @brief Helper to construct/use C-String arrays ("char **"), occasionally needed by some c functions. */ class CStrArray { public: /** @brief Add string to array. */ CStrArray & add(std::string const & str); CStrArray(); ~CStrArray(); /** @brief Get C string array. */ char const ** get() const; private: std::vector arr_; }; /** @brief Generate any STL container of strings from a token string. * * @note There is a StrVec shortcut for * this template. Doxygen seems to show only its syntax. @see * Text.hpp source header for the template syntax. */ template C strtok(std::string const & s, std::string const & delim=",", std::string const & prefix="", std::string const & postfix="") { C tokens; std::string::size_type pos(0); while (pos != std::string::npos) { std::string::size_type delimPos(s.find(delim, pos)); std::string::size_type tokLen(delimPos == std::string::npos ? std::string::npos : delimPos-pos); std::string token(s.substr(pos, tokLen)); if (!token.empty()) { tokens.push_back(prefix + token + postfix); } pos = delimPos == std::string::npos ? std::string::npos : delimPos+delim.size(); } return tokens; } StrVec strtok(std::string const & s, std::string const & delim=",", std::string const & prefix="", std::string const & postfix=""); /** @brief Like strtok, but you can use a list of one-char delimiters * (delims in strtoks) instead of a fixed delimiter string (delim in strtok). */ template C strtoks(std::string const & s, std::string const & delims=",", std::string const & prefix="", std::string const & postfix="") { C tokens; std::string::size_type p0(0); while (p0 != std::string::npos) { std::string::size_type const p1(s.find_first_of(delims, p0)); std::string const token(s.substr(p0, p1-p0)); if (!token.empty()) { tokens.push_back(prefix + token + postfix); } p0 = s.find_first_not_of(delims, p1); } return tokens; } StrVec strtoks(std::string const & s, std::string const & delims=" \t\n\r", std::string const & prefix="", std::string const & postfix=""); /** * @brief join a list,vector,set, ... with the connector string * * e.g. the string list 'a', 'b', 'c', 'd' joined with ',' will return 'a,b,c,d' * * As C needs to supply a C::const_iterator C.begin() C.end() and ++opertator * e.g. std::vector */ template std::string join( std::string const & expr, C const & list ) { std::string res; typename C::const_iterator it( list.begin() ); if ( it != list.end() ) { res = *it; ++it; for ( ; it != list.end(); ++it ) { res += expr + *it; } } return res; } /** @name Check whether token is in tokens. */ /** @{ */ bool isToken(std::string const & token, StrVec const & tokensVec, int const match=0); bool isToken(std::string const & token, std::string const & tokens, std::string const & delim=",", int const match=0); /** @} */ /** @name Mass string replace. * @{ */ std::string & strrpl(std::string & source, std::string const & token, std::string const & reptoken); std::string strrpl(std::string const & source, std::string const & token, std::string const & reptoken); /** @} */ /** @brief Read any stream into any byte vector. * * @note std::istream::read() is not const, so the stream reference can't be const. */ template std::vector istream2Vector(std::istream & f, int const blockSize=1024) { // We rely on byte size assert(sizeof(Byte) == 1); // Pre: Set vector to size zero, no bytes read std::vector result(0); long int bytesRead(0); while (!f.eof()) { // Prepare to read blockSize bytes from stream into vector result.resize(bytesRead + blockSize); // Read a block directly to vector memory (we cast here, but this should really work for any byte-sized type) f.read((char *) &result[bytesRead], blockSize); bytesRead += f.gcount(); } // Resize down to readBytes size result.resize(bytesRead); return result; } /** @brief Istream-to-string converter. * * @note Works for "binary"-files as well, but istream2Vector might be a better choice. */ std::string istream2String(std::istream & f, int const blockSize=1024); /** @brief a class to convert between different systems. * * @deprecated All different conversions here should rather get a * XXXConverter class in Recoder.?pp (and an appropriate switch in the * Recoder class if needed). */ class XConversion { private: /* lookup table for base64 characters */ static const unsigned char alphabet[]; /* lookup table for values 0..63 */ static unsigned char codes[]; static void codesFill(); static const int bMin = 2; static const int bMax = 16; static int getInt( unsigned char hex ); static std::string out; public: /** * Convert a dezimal (10) represented number in a number
* represented by any basis between 2 (Bin) and 16 (Hex) * * @param number the number to convert * @param basis the basis to use * * @returns a number represented by the wanted basis
* or an empty string */ static std::string dec2Basis( int number, int basis ); /** * Convert a number represented by any basis between
* 2 (bin) and 16 (hex) to a dezimal number (10) * * @param number the numbet to convert * @param basis the basis to use * * @returns a number represented in decimal (basis 10) */ static int basis2Dec( std::string number, int basis ); /** * encrypt a message using xor and the given key * * @param message the mesaage to encrypt * @param key the key used to encrypt the message * @param length number of encrypted chars (return) * * @returns the encrypted message (binary) */ static UI::Util::auto_ptr xorEncrypt(std::string const& message, std::string const& key, int* length); /** * decrypt a message using xor and the given key * * @param message the message to decrypt * @param length the length of the message * @param key the key used to decrypt the message * * @returns the decrypted message (ASCII) */ static std::string xorDecrypt( const unsigned char* message, const int length, std::string const& key ); /** * returns an array of base64-encoded characters to represent the * passed data array. * * @param message the array of bytes to encode * @param length length of the byte array * * @returns result base64 encoded message (ASCII) */ static std::string base64Encode( const unsigned char* message, const int length ); /** * returns an array of bytes which were encoded in the passed * character array. * * @param message a base64 encoded message * @param length used to store the result (Binary) * * @returns number decoded chars */ static UI::Util::auto_ptr base64Decode(std::string const& message, int* length); }; std::string md5sum(std::string const & data); }} /** @name Some convenience stream operators. * @{ */ std::ostream & operator <<(std::ostream & os, UI::Util::StrVec const & sv); std::ostream & operator <<(std::ostream & os, UI::Util::StrList const & sl); /** @} */ #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Http.hpp0000644000000000000000000000013212751117070017604 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.858884864 30 ctime=1470503616.018342917 ui-utilcpp-1.8.5/src/ui-utilcpp/Http.hpp0000644000175000017500000000043112751117070020753 0ustar00absurdabsurd00000000000000/** * @file * @brief Include this for all HTTP related things. */ #ifndef UI_UTIL_HTTP_HPP #define UI_UTIL_HTTP_HPP #include #include #include #include #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/SMLogMono.hpp0000644000000000000000000000013212751117070020477 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.858884864 30 ctime=1470503616.014342992 ui-utilcpp-1.8.5/src/ui-utilcpp/SMLogMono.hpp0000644000175000017500000001001412751117070021644 0ustar00absurdabsurd00000000000000/** * @file SMLogMono.hpp * @author Schlund + Partner AG * @brief Syslog Macro Log: Simple logging based on compiler macros and syslog(3) for mono-threaded aplications * @see SMLog.hpp * * Synopsis: * @code * #include * @endcode * * This can be used as drop-in replacement for SMLog.hpp, i.e. the source using these * logging macros does not need to be changed. * * Each prirority level (see syslog(3)) gets its own compiler macro, which can be used * rather straightforward in the source; the argument of the macro may include stream piping. * For example: * * SM_LOGNOTICE("I have noticed something: " << something) * * Logs can be turned off at compile time (giving full run time advantage, as the code is removed) * with a threshold. Additionally, you can give the facility, and additional text at compile time. * For example: * * c++ ... -DSM_LOGLEVEL=5 -DSM_LOGADD="getpid()" -DSM_LOGFACILITY="ost::SLOG_USER" * * eliminates all log messages with priority higher than 5, giving the process id as additional * information * * Logging itself is done via SysLogMonoSingleton; it should be configured * somewhere at the beginning of your program, for example like: * * @code * UI::Util::SysLogMonoSingleton logger("dvdb", LOG_PERROR, LOG_DAEMON); * @endcode * */ /** * @example SMLogMono.cpp * Example showing log messages in all levels. * Should be installed as ui-utilcpp-smlogmono along with the library. */ #ifndef UI_UTIL_SMLOGMONO_HPP #define UI_UTIL_SMLOGMONO_HPP // STDC++ #include // SYSTEM C #include // BSD // Local #include #ifndef SM_LOGLEVEL /** @brief The Log Level; Log code under this level gets eliminated. */ #define SM_LOGLEVEL LOG_NOTICE #endif /** @brief Add this text to every log messages. */ #ifndef SM_LOGADD #define SM_LOGADD __FILE__ << ":" << __LINE__ #endif #ifndef SM_LOG /** @brief Master Macro (must not be used directly). */ #ifdef SM_ENABLE_CLOG #define SM_LOG(l, p, x) { UI::Util::SysLogMonoSingleton::log(l) << p << ": " << x << " [" SM_LOGADD << "]." << std::endl; std::clog << p << ": " << x << " [" SM_LOGADD << "]." << std::endl; } #else #define SM_LOG(l, p, x) UI::Util::SysLogMonoSingleton::log(l) << p << ": " << x << " [" SM_LOGADD << "]." << std::endl #endif #endif /** @brief Macro for syslog(3) level EMERG. */ #if SM_LOGLEVEL >= LOG_EMERG #define SM_LOGEMERG(x) SM_LOG(LOG_EMERG, "EMG", x) #else #define SM_LOGEMERG(x) #endif /** @brief Macro for syslog(3) level ALERT. */ #if SM_LOGLEVEL >= LOG_ALERT #define SM_LOGALERT(x) SM_LOG(LOG_ALERT, "ALT", x) #else #define SM_LOGALERT(x) #endif /** @brief Macro for syslog(3) level CRIT. */ #if SM_LOGLEVEL >= LOG_CRIT #define SM_LOGCRIT(x) SM_LOG(LOG_CRIT, "CRT", x) #else #define SM_LOGCRIT(x) #endif /** @brief Macro for syslog(3) level ERR. */ #if SM_LOGLEVEL >= LOG_ERR #define SM_LOGERR(x) SM_LOG(LOG_ERR, "ERR", x) #else #define SM_LOGERR(x) #endif /** @brief Macro for syslog(3) level WARNING. */ #if SM_LOGLEVEL >= LOG_WARNING #define SM_LOGWARNING(x) SM_LOG(LOG_WARNING, "WRN", x) #else #define SM_LOGWARNING(x) #endif /** @brief Macro for syslog(3) level NOTICE. */ #if SM_LOGLEVEL >= LOG_NOTICE #define SM_LOGNOTICE(x) SM_LOG(LOG_NOTICE, "ntc", x) #else #define SM_LOGNOTICE(x) #endif /** @brief Macro for syslog(3) level INFO. */ #if SM_LOGLEVEL >= LOG_INFO #define SM_LOGINFO(x) SM_LOG(LOG_INFO, "inf", x) #else #define SM_LOGINFO(x) #endif /** @brief Macro for syslog(3) level DEBUG. */ #if SM_LOGLEVEL >= LOG_DEBUG #define SM_LOGDEBUG(x) SM_LOG(LOG_DEBUG, "dbg", x) #else #define SM_LOGDEBUG(x) #endif /** @name Additional debug levels 8-11. * @{ */ #if SM_LOGLEVEL >= 8 #define SM_LOGDEBUG1(x) SM_LOGDEBUG(x) #else #define SM_LOGDEBUG1(x) #endif #if SM_LOGLEVEL >= 9 #define SM_LOGDEBUG2(x) SM_LOGDEBUG(x) #else #define SM_LOGDEBUG2(x) #endif #if SM_LOGLEVEL >= 10 #define SM_LOGDEBUG3(x) SM_LOGDEBUG(x) #else #define SM_LOGDEBUG3(x) #endif #if SM_LOGLEVEL >= 11 #define SM_LOGDEBUG4(x) SM_LOGDEBUG(x) #else #define SM_LOGDEBUG4(x) #endif /** @} */ #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Thread.hpp0000644000000000000000000000013212751117070020074 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.858884864 30 ctime=1470503616.014342992 ui-utilcpp-1.8.5/src/ui-utilcpp/Thread.hpp0000644000175000017500000000563212751117070021253 0ustar00absurdabsurd00000000000000/** * @file * @brief Thread, descriptors and sockets. */ #ifndef UI_UTIL_THREAD_HPP #define UI_UTIL_THREAD_HPP // C++ libraries #include #include namespace UI { namespace Util { /** @brief Close fd and reopen on "/dev/null" using mode. */ void fd2DevNull(int const & fd, mode_t const & mode); /** @brief Use fork(2) to daemonize current program in a new session id. * * @param closeStdFds Whether to close fd 0,1 and 2 (and re-open them to /dev/null). This is recommended for all production daemons. * @param changeToRootdir Will do a chdir(2) to "/". This is to avoid all errors due to a later remove/change of the cwd. * @param resetUMask Resets umask to "0". * @return True, if we are in the new daemon child; the original process then exited with code 0. False if fork() failed. * @see fork(2), setsid(2), chdir(2), umask(2). */ void daemonize(bool closeStdFds=true, bool changeToRootdir=true, bool resetUMask=true); /** * @example Threads.cpp * Example on how to employ "ProcessThread" threads. */ /** @brief Simple encapsulation for any process based threading system. * * You need to overload "start" and "run". */ #ifndef WIN32 class ProcessThread { public: /** @brief Reserved exit status'. Do not use these as return codes in your run()-functions. * * Program exit status' are always between (including) 0..255; to be able to use * the exit status directly in programs (e.g. for std::exit()), we reserve some * values here (rather than using out-of-range values). */ enum ReservedStatus { NotRunYet_ = 255, Running_ = 254, WaitpidErr_ = 253, KilledByUncatchedSignal_ = 252 }; /** */ ProcessThread(); virtual ~ProcessThread(); /** @brief Start fork "thread". */ virtual void start() = 0; /** Check if "thread" is running. */ bool isRunning(); /** @brief Get PID of running "thread". */ pid_t getPID() const; /** @brief Wait for this "thread", and return the process' exit status. * * You must use this method to avoid zombies, or ignore all SIGCHLDs in the parent. */ int wait(); /** @brief Get status of last run. */ int getStatus() const; protected: /** Process id of thread: Must be set properly by overloaded start method. */ pid_t pid_; /** Status of thread: Must be set properly by overloaded start method. */ int status_; /** Virtual function of thread's task. */ virtual int run() = 0; private: /** Internal function to check status using waitpid(2) */ void checkStatus(bool wait=false); }; /** * @class ForkThread * @brief Simple encapsulation of fork(2) using common thread syntax. * @attention This is not threading -- i.e. the "thread" does not share any execution * context with its caller; it just uses "common thread class nomenclature", hence the name. */ class ForkThread: public ProcessThread { public: /** @brief Spawn thread. */ void start(); }; #endif }} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/SMLog.hpp0000644000000000000000000000013212751117070017646 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.858884864 30 ctime=1470503616.010343068 ui-utilcpp-1.8.5/src/ui-utilcpp/SMLog.hpp0000644000175000017500000001071612751117070021024 0ustar00absurdabsurd00000000000000/** * @file SMLog.hpp * @author Schlund + Partner AG * @brief Syslog Macro Log: Simple logging based on compiler macros and syslog(3) * * Synopsis: * @code * #include * @endcode * * Each prirority level (see syslog(3)) gets its own compiler macro, which can be used * rather straightforward in the source; the argument of the macro may include stream piping. * For example: * * SM_LOGNOTICE("I have noticed something: " << something) * * Logs can be turned off at compile time (giving full run time advantage, as the code is removed) * with a threshold. Additionally, you can give the facility, and additional text at compile time. * For example: * * c++ ... -DSM_LOGLEVEL=5 -DSM_LOGADD="getpid()" -DSM_LOGFACILITY="ost::SLOG_USER" * * eliminates all log messages with priority higher than 5, giving the process id as additional * information * * Logging itself is done CommonC++'s Slog. It is common to make the following * configuration (Note: currently, the facility must be given when compiling): * * ost::slog.open(LOGPREFIX, FACILITY); // Set prefix and syslog(3) facility. * * ost::slog.clogEnable(true); // En- or disable logging to "clog" * * levels as defined in syslog(3). * * The log strings automatically get several additional information, like source file name, * line number, process id, etc. * */ /** @example SMLog.cpp * * Example showing log messages in all levels. Should be installed as * ui-utilcpp-smlog along with the library. */ #ifndef UI_UTIL_SMLOG_HPP #define UI_UTIL_SMLOG_HPP // STDC++ #include // SYSTEM C #include // C++ Libraries #include #ifndef SM_LOGLEVEL /** @brief The Log Level; Log code under this level gets eliminated. */ #define SM_LOGLEVEL LOG_NOTICE #endif #ifndef SM_LOGADD /** @brief Add this text to every log messages. */ #define SM_LOGADD __FILE__ << ":" << __LINE__ #endif #ifndef SM_LOGFACILITY /** @brief The Log Facility. * * Normally, it should be enough to configure this once via slog.open(); however, * there is no really functional "<<(level)" method in Slog, while the "<<(level, facility)" method * works fine. */ #define SM_LOGFACILITY ost::Slog::classDaemon #endif #ifndef SM_LOG /** * @def SM_LOG(l, x) * * Master Macro (must not be used directly). */ #ifdef SM_ENABLE_CLOG #define SM_LOG(l, p, x) { ost::slog(l, SM_LOGFACILITY) << p << ": " << x << " [" SM_LOGADD << "]." << std::endl; std::clog << p << ": " << x << " [" SM_LOGADD << "]." << std::endl; } #else #define SM_LOG(l, p, x) ost::slog(l, SM_LOGFACILITY) << p << ": " << x << " [" SM_LOGADD << "]." << std::endl #endif #endif /** @brief Macro for syslog(3) level EMERG. */ #if SM_LOGLEVEL >= LOG_EMERG #define SM_LOGEMERG(x) SM_LOG(ost::Slog::levelEmergency, "EMG", x) #else #define SM_LOGEMERG(x) #endif /** @brief Macro for syslog(3) level ALERT. */ #if SM_LOGLEVEL >= LOG_ALERT #define SM_LOGALERT(x) SM_LOG(ost::Slog::levelAlert, "ALT", x) #else #define SM_LOGALERT(x) #endif /** @brief Macro for syslog(3) level CRIT. */ #if SM_LOGLEVEL >= LOG_CRIT #define SM_LOGCRIT(x) SM_LOG(ost::Slog::levelCritical, "CRT", x) #else #define SM_LOGCRIT(x) #endif /** @brief Macro for syslog(3) level ERR. */ #if SM_LOGLEVEL >= LOG_ERR #define SM_LOGERR(x) SM_LOG(ost::Slog::levelError, "ERR", x) #else #define SM_LOGERR(x) #endif /** @brief Macro for syslog(3) level WARNING. */ #if SM_LOGLEVEL >= LOG_WARNING #define SM_LOGWARNING(x) SM_LOG(ost::Slog::levelWarning, "WRN", x) #else #define SM_LOGWARNING(x) #endif /** @brief Macro for syslog(3) level NOTICE. */ #if SM_LOGLEVEL >= LOG_NOTICE #define SM_LOGNOTICE(x) SM_LOG(ost::Slog::levelNotice, "ntc", x) #else #define SM_LOGNOTICE(x) #endif /** @brief Macro for syslog(3) level INFO. */ #if SM_LOGLEVEL >= LOG_INFO #define SM_LOGINFO(x) SM_LOG(ost::Slog::levelInfo, "inf", x) #else #define SM_LOGINFO(x) #endif /** @brief Macro for syslog(3) level DEBUG. */ #if SM_LOGLEVEL >= LOG_DEBUG #define SM_LOGDEBUG(x) SM_LOG(ost::Slog::levelDebug, "dbg", x) #else #define SM_LOGDEBUG(x) #endif /** @name Additional debug levels 8-11. * @{ */ #if SM_LOGLEVEL >= 8 #define SM_LOGDEBUG1(x) SM_LOGDEBUG(x) #else #define SM_LOGDEBUG1(x) #endif #if SM_LOGLEVEL >= 9 #define SM_LOGDEBUG2(x) SM_LOGDEBUG(x) #else #define SM_LOGDEBUG2(x) #endif #if SM_LOGLEVEL >= 10 #define SM_LOGDEBUG3(x) SM_LOGDEBUG(x) #else #define SM_LOGDEBUG3(x) #endif #if SM_LOGLEVEL >= 11 #define SM_LOGDEBUG4(x) SM_LOGDEBUG(x) #else #define SM_LOGDEBUG4(x) #endif /** @} */ #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/File.hpp0000644000000000000000000000013212751117070017544 xustar0030 mtime=1470406200.115952021 30 atime=1470498256.129562147 30 ctime=1470503616.006343143 ui-utilcpp-1.8.5/src/ui-utilcpp/File.hpp0000644000175000017500000001627312751117070020726 0ustar00absurdabsurd00000000000000/** * @file * @brief File, descriptors and sockets. */ #ifndef UI_UTIL_FILE_HPP #define UI_UTIL_FILE_HPP #ifdef WIN32 #include #endif // STDC++ #include #include #include #include // C++ libraries #include #include namespace UI { namespace Util { /** @brief Like getenv(3), but returns empty string when env is missing. */ std::string getenv(std::string const & name); /** @brief Guess a config file (/etc/id.conf or ~/.id.conf). */ std::string guessConfFile(std::string const & id, std::string const & suffix=".conf"); /** @brief Write and keep pid file during lifetime. */ class PIDFile { public: /** @brief Guess a pid file (/var/run/id.pid or ~/.id.pid). */ static std::string guess(std::string const & id); PIDFile(std::string const & path, #ifdef WIN32 pid_t const & pid=Sys::getpid(), #else pid_t const & pid=Sys::getpgid(0), #endif bool const & keepExisting=true, mode_t const & perms=S_IRUSR | S_IWUSR #ifndef WIN32 | S_IRGRP | S_IROTH #endif ); ~PIDFile(); private: std::string const path_; }; /** @brief Guarantuee to run "remove(2)" on path in destructor. */ class AutoRemoveFile { public: AutoRemoveFile(std::string const & path); ~AutoRemoveFile(); std::string const & operator()() const; private: std::string const path_; }; /** @brief Simple exception-save FILE abstraction. */ class CFileStream { public: /** @brief Constructor. */ CFileStream(std::string const & fileName, std::string const & mode); ~CFileStream(); /** @brief Get C file stream. */ FILE * get() const; private: FILE * const file_; }; /** @brief File copy from file names. */ void fileCopy(std::string const & src, std::string const & dest); /** @brief Check if a file exists using stat(2). * * @param fName File name to check. * @return true, if file exists, else false. */ bool fileExists(std::string const & fName); /** @brief Get the modification time for a file * * @param path File to check. * @return time of last modification. */ time_t fileModificationTime(std::string const & path); /** @brief File Descriptor Holder Class. * * @see read(2), write(2) * * This should encapsulate system calls on file descriptors, and * automate descriptor closing. */ class FileDescriptor { public: /** @brief Helper to close file descriptors from destructors. */ static void fdClose(int const & fd, std::string const & id, bool const & doClose=true); /** @brief Error codes for exceptions. */ enum ErrorCode { OpenErr_ = 1, ReadErr_, WriteErr_, LockErr_, UnlockErr_, BindErr_, ConnectErr_, UnblockErr_, ListenErr_, ShutdownErr_ }; /** @brief Exceptions for this class. */ typedef CodeException Exception; /** @brief Constructor from file descriptor * * @param fd Already opened file descriptor * @param closeFd Whether to call close(2) in destructor * * This constructor takes an already opened file descriptor. The * destructor will not call close on this descriptor. * */ FileDescriptor(int fd=-1, bool closeFd=false); /** @brief Destructor. * * This will close the file descriptor via close(2), unless it was * constructed by an already opened descriptor. * * It will never delete the file, even if it got created by the * constructor. * */ virtual ~FileDescriptor(); /** @brief C++ like virtual read method. * * This default implementation uses read(2). */ virtual std::streamsize read(void * const buf, std::streamsize count); /** @brief C++ like virtual erite method. * * This default implementation uses write(2). */ virtual std::streamsize write(void const * const buf, std::streamsize count); /** @brief Get file descriptor. */ int getFd() const; protected: /** @brief The file descriptor that is managed. */ int fd_; /** @brief To be called in a constructor. */ void init(int fd, bool closeFd=false); private: bool closeFd_; }; /** @brief File representation. * * @see FileDescriptor, fcntl(2), open(2), close(2) */ class File: public FileDescriptor { public: /** @brief Constructor. * * @param name Path to the file to open * @param flags As in open(2) * @param mode As in open(2) * @param closeFd Whether to call close(2) in destructor * @see open(2) * * This constructor takes a file name, will try to open the file * using open(2). Arguments to open(2) can be given optionally, * and have reasonable defaults. * * OPEN_ERR will be thrown if the file could not be created via * open(2). */ File(std::string const & name, int flags=O_CREAT | O_WRONLY, mode_t mode=S_IRUSR | S_IWUSR, bool closeFd=true); /** @brief Constructor from file descriptor. * * @param fd Already opened file descriptor * @param closeFd Whether to call close(2) in destructor * * This constructor takes an already opened file descriptor. */ File(int fd, bool closeFd=false); /** @brief Get file name. This will always deliver en empty string if constructed from fd. */ std::string const & getName() const; private: std::string const name_; }; /** * @example FileLock.cpp * Example program for advisory POSIX and BSD file locking. * Should be installed as ui-utilcpp-filelock along with the library. */ /** @brief Mutex For Posix Advisory File Locking * * @see MutexLock * @see fcntl(2), open(2) * @attention This does not work from the same process id, as any close() to any open file * descriptor of a process removes all POSIX locks from that (process/fd)-pair. */ #ifndef WIN32 class PosixFileMutex: public File { public: /** @brief Constructor from file name. * * @param lockFile Name of lock file * @see FileDescriptor */ PosixFileMutex(std::string const & lockFile); /** @brief Constructor from file descriptor. * * @param fd Opened file descriptor * @see FileDescriptor */ PosixFileMutex(int fd); /** @name Standard mutex methods. * @{ */ bool tryEnterMutex() throw(); void enterMutex(); void leaveMutex(); /** @} */ private: bool setPosixLock(int type, bool wait); }; /** @brief Mutex For BSD Advisory File Locking. * * @see MutexLock * @see flock(2), open(2) * @attention BSD locking does not work over NFS. * */ class BSDFileMutex: public File { public: /** @brief Constructor from file name. * * @param lockFile Name of lock file * @see FileDescriptor */ BSDFileMutex(std::string const & lockFile); /** @brief Constructor from file descriptor. * * @param fd Opened file descriptor * @see FileDescriptor */ BSDFileMutex(int fd); /** @name Standard mutex methods. * @{ */ bool tryEnterMutex() throw(); void enterMutex(); void leaveMutex(); /** @} */ }; #endif /** @brief File system information abstraction. * * @note All methods always return (amounts of) 1024 byte * blocks. Calculation is done via float for simplicity -- minor * rounding errors may occur. */ class FsInfo { private: uint64_t calc(long double const & value) const; public: FsInfo(std::string const & dev, std::string const & file); uint64_t getTotal() const; uint64_t getAvail() const; uint64_t getFree() const; uint64_t getUsed() const; private: long double bSize_; long double bTotal_; long double bAvail_; long double bFree_; }; }} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Recoder.hpp0000644000000000000000000000013212751117070020250 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.858884864 30 ctime=1470503616.010343068 ui-utilcpp-1.8.5/src/ui-utilcpp/Recoder.hpp0000644000175000017500000002146612751117070021432 0ustar00absurdabsurd00000000000000/** * @file */ #ifndef UI_UTIL_RECODER_HPP #define UI_UTIL_RECODER_HPP // STDC++ #include #include // C libraries #ifdef WIN32 #define PARAMS(Args) Args #else #include #endif // C++ libraries #include #include namespace UI { namespace Util { /** @brief Holder class for conversion results. */ class Conversion { private: char const * const cStr_; size_t const cSize_; public: /** @brief Constructor. */ Conversion(char const * const cStr, size_t const cSize); virtual ~Conversion(); /** @brief Get conversion data. * * @note: This is a C-String, i.e., it always ends in a * zero-byte. However, there also may be zero-bytes in between * (depending on the encoding); you would also need getSize() in * that case. */ char const * get() const; /** @brief Get size (in bytes) of conversion data. */ size_t getSize() const; /** @brief Get std::string copy of conversion data. * * @note This copies the whole conversion (not only the C-String) * into the std::string (@see get()). */ std::string getString() const; }; /** @brief Conversion w/ std::free call on the supplied C-String. */ class StdFreeConversion: public Conversion { private: void * freeObject_; public: /** @brief Constructor. cStr will be std::free'd. */ StdFreeConversion(char * cStr, size_t const cSize); virtual ~StdFreeConversion(); }; /** @brief Conversion w/ std::string holder. */ class StringConversion: public Conversion { private: std::string * delObject_; public: /** @brief Constructor. str will be delete'd. */ StringConversion(std::string * str); virtual ~StringConversion(); }; /** @brief Factory for Conversions. */ class Converter { public: /** @brief Error codes for exceptions. */ enum ErrorCode { EncUnknown_, ConversionErr_, UnknownErr_ }; /** @brief Exceptions for this class. */ typedef CodeException Exception; /** @brief Converter base constructor. */ Converter(std::string const & inEnc, std::string const & outEnc, bool const & sloppy=false); virtual ~Converter(); /** @brief Convert from byte buffer. */ virtual Conversion const * make(char const * const buf, size_t const bufSize) const = 0; /** @brief Convert from C-String. */ Conversion const * make(char const * const cStr) const; /** @brief Convert from std::string. */ Conversion const * make(std::string const & str) const; /** @brief Get id (informational). */ std::string getID() const; protected: /** @name Input/output encoding and sloppy conversion flag. * @{ */ std::string const inEnc_; std::string const outEnc_; bool const sloppy_; //* @} */ }; #ifndef WIN32 /** @brief Converter based on librecode (see there). */ class LibRecodeConverter: public Converter { private: RECODE_OUTER outer_; RECODE_REQUEST request_; /** @brief Verbatim from librecode. */ static void guarantee_nul_terminator(RECODE_TASK task); public: /** @brief Constructor; this supports sloppy encoding if desired. */ LibRecodeConverter(std::string const & inEnc, std::string const & outEnc, bool const & sloppy=false); virtual ~LibRecodeConverter(); Conversion const * make(char const * const buf, size_t const bufSize) const; }; #endif /** @brief Character set converter, using libc's "iconv" directly. */ class IConvConverter: public Converter { private: iconv_t conversion_; public: /** @brief Constructor; this does not support sloppy encoding. */ IConvConverter(std::string const & inEnc, std::string const & outEnc, const bool & sloppy = false); virtual ~IConvConverter(); Conversion const * make(char const * const buf, size_t const bufSize) const; }; /** @brief Converter for URL-Encoding. */ class URLConverter: public Converter { public: /** @brief Constructor; inEnc and outEnc are fixed by the encode flag. */ URLConverter(bool const encode=true); Conversion const * make(char const * const buf, size_t const bufSize) const; /** @note All below is copied 1-1 from the from URL class. */ private: static const unsigned char MinNum = 0x30; static const unsigned char MaxNum = 0x39; static const unsigned char MinAlp = 0x41; static const unsigned char MaxAlp = 0x46; static const unsigned char NumMod = 0x30; static const unsigned char AlpMod = 0x37; static const unsigned char MinAlp2 = 0x61; static const unsigned char MaxAlp2 = 0x66; static const unsigned char AlpMod2 = 0x57; /** @brief Convert an ASCII representation of a hex digit into its byte value e.g. : "b" = '00001011" = 11. * * @param in the hex digit ASCII code * * @returns the byte value of the hex digit */ static unsigned char number(unsigned char in); public: /**@brief Encode an URL string. * * The following rules are applied in the conversion: * The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" * remain the same. * The special characters ".", "-", "*", and "_" remain the same. * The space character " " is converted into a plus sign "+". * The other special characters will be converted in a sequence of the form "%xy" * which epresenting a byte where xy is the two-digit hexadecimal representation of * the 8 bits. * * @param url the URL to encode * * @returns the encoded URL */ static std::string encode(std::string const & url); /** @brief Decode an URL encoded string. * * The following rules are applied in the conversion: * The alphanumeric characters "a" through "z", "A" through "Z" and "0" through "9" * remain the same. * The special characters ".", "-", "*", and "_" remain the same. * The plus sign "+" is converted into a space character " ". * A sequence of the form "%xy" will be treated as representing a byte where xy is * the two-digit hexadecimal representation of the 8 bits. * * @param url the encoded URL string * * @returns the decoded URL */ static std::string decode(std::string const & url); }; /** @brief Converter for Base64 encoding, using CommonCpp functions. */ class Cpp2Base64Converter: public Converter { public: /** @brief Constructor; inEnc and outEnc are fixed by the encode flag. */ Cpp2Base64Converter(bool const encode=true); Conversion const * make(char const * const buf, size_t const bufSize) const; }; /** @brief Converter charEncoding -> rfc2047 (MIME). */ class Rfc2047Converter: public Converter { public: /** @brief Constructor; inEnc and outEnc are fixed by the encode flag. */ Rfc2047Converter(std::string const & inCharEnc); Conversion const * make(char const * const buf, size_t const bufSize) const; }; /** @brief Converter UTF-8 <-> rfc3490 (IDN). */ class Rfc3490Utf8Converter: public Converter { public: /** @brief Constructor; inEnc and outEnc are fixed by the encode flag. */ Rfc3490Utf8Converter(bool const encode=true); Conversion const * make(char const * const buf, size_t const bufSize) const; }; /** @brief Converter from an-char-encoded string with randomly placed email-adresse -> the same string w/ domain parts magically replaced with IDN-encoding. */ class IdnEMailConverter: public Converter { public: /** @brief Constructor; inEnc and outEnc are fixed by the encode flag. */ IdnEMailConverter(std::string const & inEnc); Conversion const * make(char const * const buf, size_t const bufSize) const; }; /** @brief Meta converter class: converter switcher and generic interface. */ class Recoder { private: bool isEnc(std::string const & enc, std::string const & encs) const; Converter const * converter_; public: /** @brief Constructor; sloppy is only supported by some converters. */ Recoder(std::string const & inEnc, std::string const & outEnc, bool const & sloppy=false); ~Recoder(); /** @name Run conversions. * * - Use non-factory methods "run" for temporary/small conversions. * - Use factory methods "make" if results are kept, or your conversion * is big and you want to optimize your code. * * @note Note again that Converter's are factories for * Conversion's. If you use a methode here returning a Conversion * pointer, you are reponsible for deletion as well. * * @{ */ Conversion const * make(char const * src, size_t srcSize) const; Conversion const * make(char const * src) const; std::string run(char const * const buf, size_t const bufSize) const; std::string run(char const * const src) const; std::string run(std::string const & src) const; /** @} */ }; /** @brief This can be used to cache recoder instances. * * @note You really should use this instead of repeatedly creating * temporary Recoder instances -- first, as it's expensive (at least * for librecode), and second, librecode converters have a rather huge * memory leak. */ class RecoderCache { public: static Recoder const & get(std::string const & inEnc, std::string const & outEnc, bool const & sloppy=false); ~RecoderCache(); private: typedef std::map RecoderMap; RecoderMap cache_; static RecoderCache * instance_; }; }} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/QuotaInfo.hpp0000644000000000000000000000013212751117070020572 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.858884864 30 ctime=1470503616.010343068 ui-utilcpp-1.8.5/src/ui-utilcpp/QuotaInfo.hpp0000644000175000017500000001345612751117070021754 0ustar00absurdabsurd00000000000000/** * @file * @author Schlund + Partner AG * */ #ifndef UI_UTIL_QUOTAINFO_HPP #define UI_UTIL_QUOTAINFO_HPP // STDC++ #include #include // C++ libraries #include #include namespace UI { namespace Util { /** @brief Quota information abstraction. * * May be extended easily be adding new methods: * - Add a new private methodXXX method (e.g. methodWinFake) that somehow * sets all the quota values. * - Add it to the method vector (see constructor of QuotaInfo::Methods). * * @todo: The interface is focused on linux "standard" quota * interface. Interface should rather be most powerful, with lesser * implementations falling back to sane defaults. * * @todo: Nicer way to find out what interface to use rather then * testing on by one (check "quota" source). */ class QuotaInfo { public: /** @brief Helper class to hold the device string and (optional) the * fs type (to be able to do better selection on the quota method to * use). */ class FS { friend class QuotaInfo; public: FS(std::string const & dev, std::string const & fstype="") :dev_(dev) ,fstype_(fstype) {} std::string const & getDevice() const { return dev_; } std::string const & getType() const { return fstype_; } std::string getMethods(std::string const & fstype="") const; private: std::string dev_; std::string fstype_; }; /** @brief Get FS information from any file in that fs. * * @note: This method is potentially NOT thread-safe (uses getmntent under linux). */ static FS file2fs(std::string const & fName, std::string const & tab="/proc/mounts"); /** @brief Type of quota information. */ enum Type { Usr_, Grp_ }; /** * @param fs Device name (std::string - implicit) or file system (FS). * @param id ID as in quotactl(2), normally a user or group ID. * @param type Type (user or group) of quota info to retrieve. * @param strPath Extra parameter for windows "quota". */ QuotaInfo(FS const & fs, int const id=Sys::geteuid(), Type const type=Usr_, std::string const & strPath = ""); public: /** @brief Get method string of utilized method. */ std::string getMethod() const; /** @brief Hard limit of disk blocks. */ unsigned long getBlockHL() const; /** @brief Soft limit of disk blocks. */ unsigned long getBlockSL() const; /** @brief Current block usage. */ unsigned long getBlocks() const; /** @brief Hard limit of inodes. */ unsigned long getINodeHL() const; /** @brief Soft limit of inodes. */ unsigned long getINodeSL() const; /** @brief Current inode usage. */ unsigned long getINodes() const; /** @brief Block timer limit. */ time_t getBlockTL() const; /** @brief Inodes timer limit. */ time_t getINodeTL() const; /** @brief Helper for getFree* methods. */ bool getFree(unsigned long const limit, unsigned long const blocks, unsigned long & free) const; /** @brief Get free blocks from hard limit. False, if there is no hard limit. */ bool getFreeBlocksHL(unsigned long & free) const; /** @brief Get free blocks from soft limit. False, if there is no soft limit. */ bool getFreeBlocksSL(unsigned long & free) const; /** @brief Get free indoes from hard limit. False, if there is no hard limit. */ bool getFreeINodesHL(unsigned long & free) const; /** @brief Get free inodes from soft limit. False, if there is no soft limit. */ bool getFreeInodesSL(unsigned long & free) const; /** @brief QuotaInfo exceptions. */ class Exception: public UI::Util::Exception { public: Exception(std::string const & what, std::string const & debug) :UI::Util::Exception(what, debug) {}; }; private: typedef void (QuotaInfo::*Method) (std::string const &, uid_t const); #ifdef HAVE_SYS_QUOTA_H /** @brief Method for linux quota version 1 (@e vfsold). */ void methodLinuxV1(std::string const & dev, uid_t const uid); /** @brief Method for linux quota versions 1,2 (@e vfsold, @e vfsv0) (requires "recent" kernel). */ void methodLinuxV2(std::string const & dev, uid_t const uid); #endif #ifdef HAVE_XFS_XQM_H /** @brief Method for XFS quota. */ void methodLinuxXfs(std::string const & dev, uid_t const uid); #endif /** @brief Method for (NFS) quota via rpc. */ void methodLinuxRpc(std::string const & dev, uid_t const uid); #ifdef WIN32 #ifndef W2K8 void noQuota(std::string const & dev, uid_t const uid); #else void w2k8Quota(std::string const & dev, uid_t const uid); #endif #endif private: /** @brief: Block size used for all block values. */ static unsigned long BlockSize_; class Methods { public: typedef std::map MethodMap; typedef std::vector MethodVec; typedef std::map FSMap; Methods(); MethodMap m_; FSMap f_; MethodVec const & getMethods(std::string const & fstype) const; }; static Methods const methods_; int const sub_; std::string const home_; std::string method_; unsigned long blockHL_; unsigned long blockSL_; unsigned long blocks_; unsigned long inodeHL_; unsigned long inodeSL_; unsigned long inodes_; time_t blockTL_; time_t inodeTL_; }; /** @brief Variant of QuotaInfo from any file in FS. * * @note: Constructor potentially is NOT thread-safe: @see file2fs. * * @note Usually, you instantiate one FS object when your program * initializes, and then use that for all QuotaInfo() calls * thereafter. This is just a shortcut that you should not use if you * have several calls on the same FS. */ class FQuotaInfo: public QuotaInfo { public: /** * @param fileName Any file names on the FS you want to run quota on. * @param id ID as in quotactl(2), normally a user or group ID. * @param type Type (user or group) of quota info to retrieve. */ FQuotaInfo(std::string const & fileName, int const id=Sys::geteuid(), Type const type=Usr_) :QuotaInfo(file2fs(fileName), id, type) {} }; }} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/http0000644000000000000000000000013212751415300017053 xustar0030 mtime=1470503616.066342012 30 atime=1470503616.118341032 30 ctime=1470503616.066342012 ui-utilcpp-1.8.5/src/ui-utilcpp/http/0000755000175000017500000000000012751415300020301 5ustar00absurdabsurd00000000000000ui-utilcpp-1.8.5/src/ui-utilcpp/http/PaxHeaders.1390/URL.cpp0000644000000000000000000000013212751117070020301 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.858884864 30 ctime=1470503616.066342012 ui-utilcpp-1.8.5/src/ui-utilcpp/http/URL.cpp0000644000175000017500000000411112751117070021447 0ustar00absurdabsurd00000000000000// Local configuration #include "config.h" // Implementation #include "URL.hpp" namespace UI { namespace Util { namespace Http { URL::URL(std::string const & url) :url_(url) { if (url.substr(0, 7) != "http://") { UI_THROW("Invalid http url syntax: " + url); } std::string::size_type pathPos(url.find_first_of("/?:", 7)); host_ = url.substr(7, pathPos == std::string::npos ? pathPos : pathPos-7); port_ = 80; if (pathPos != std::string::npos && url[pathPos] == ':') { std::string::size_type newPathPos(url.find_first_of("/?", pathPos+1)); port_ = ato(url.substr(pathPos+1, newPathPos == std::string::npos ? newPathPos : newPathPos-pathPos-1)); port_ = port_ == 0 ? 80 : port_; pathPos = newPathPos; } path_ = pathPos == std::string::npos || url[pathPos] != '/' ? "/" : ""; path_ += pathPos == std::string::npos ? "" : url.substr(pathPos); } URL & URL::addParam(std::string const & key, std::string const & value) { char const sep(path_.find_first_of('?') == std::string::npos ? '?' : '&'); path_ += sep + key + "=" + value; return *this; } std::string const & URL::getHost() const { return host_; } unsigned int const & URL::getPort() const { return port_; } std::string const & URL::getPath() const { return path_; } std::string const URL::getURL() const { return "http://" + host_ + (port_ == 80 ? "" : ":" + UI::Util::tos(port_)) + path_; } URLGet::URLGet(std::string const & url, long int const & timeout) :url_(url) { Connection c(url_.getHost(), url_.getPort(), timeout, 0, timeout, 0, false); c.write(RequestLine(RequestLine::Get_, url_.getPath())); c.write(Header().add("Host", url_.getHost())); c.writeLine(); c.s().flush(); status_ = c.readLine(); header_ = c.readHeader(); if (header_.exists("Content-Length")) { body_ = c.readBlock(header_.get("Content-Length")); } } URL const & URLGet::getURL() const { return url_; } StatusLine const & URLGet::getStatus() const { return status_; } Header const & URLGet::getHeader() const { return header_; } std::string const & URLGet::getBody() const { return body_; } }}} ui-utilcpp-1.8.5/src/ui-utilcpp/http/PaxHeaders.1390/URL.hpp0000644000000000000000000000013212751117070020306 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.858884864 30 ctime=1470503616.062342088 ui-utilcpp-1.8.5/src/ui-utilcpp/http/URL.hpp0000644000175000017500000000237612751117070021467 0ustar00absurdabsurd00000000000000/** * @file */ #ifndef UI_UTIL_HTTP_URL_HPP #define UI_UTIL_HTTP_URL_HPP // STDC++ #include // C++ Libraries #include namespace UI { namespace Util { namespace Http { /** @brief HTTP URL parser. @see RFC 2616, 3.2.2. */ class URL { private: std::string const url_; std::string host_; unsigned int port_; std::string path_; public: URL(std::string const & url); /** @brief Add param to query part (auto-adds query part if not already added) */ URL & addParam(std::string const & key, std::string const & value); /** @name Get original url string, host, port and path. * * @note Path includes the optional "query" and is prepared to be * used as request URI. * * @{ */ std::string const & getHost() const; unsigned int const & getPort() const; std::string const & getPath() const; std::string const getURL() const; /** @} */ }; class URLGet { private: URL const url_; StatusLine status_; Header header_; std::string body_; public: URLGet(std::string const & url, long int const & timeout=0); URL const & getURL() const; StatusLine const & getStatus() const; Header const & getHeader() const; std::string const & getBody() const; }; }}} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/http/PaxHeaders.1390/Makefile.am0000644000000000000000000000007412354527746021212 xustar0030 atime=1470475229.688413255 30 ctime=1470503616.058342163 ui-utilcpp-1.8.5/src/ui-utilcpp/http/Makefile.am0000644000175000017500000000050512354527746022356 0ustar00absurdabsurd00000000000000AM_CPPFLAGS = -I$(top_srcdir)/src AM_CXXFLAGS = -Wall -pthread $(OST_CXXX2_FLAGS) $(UI_UTILCPP_CXXFLAGS) incdir = $(includedir)/$(PACKAGE)/http inc_HEADERS = Header.hpp Cookie.hpp Connection.hpp URL.hpp noinst_LTLIBRARIES = libui-utilcpp-http.la libui_utilcpp_http_la_SOURCES = Header.cpp Cookie.cpp Connection.cpp URL.cpp ui-utilcpp-1.8.5/src/ui-utilcpp/http/PaxHeaders.1390/Connection.cpp0000644000000000000000000000013212751117070021736 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.858884864 30 ctime=1470503616.062342088 ui-utilcpp-1.8.5/src/ui-utilcpp/http/Connection.cpp0000644000175000017500000001130312751117070023105 0ustar00absurdabsurd00000000000000// Local configuration #include "config.h" // Implementation #include "Connection.hpp" namespace UI { namespace Util { namespace Http { void Connection::destroy() { if (!externalStream_) delete stream_; delete socket_; } Connection::Connection(std::iostream & stream) :socket_(0) ,stream_(&stream) ,externalStream_(true) {} Connection::Connection(int fd, bool closeFd, long int rcvToSeconds, long int rcvToMicroseconds, long int sndToSeconds, long int sndToMicroseconds, bool noBlock) :socket_(new Socket(fd, closeFd)) ,stream_(new FDTypeStream(socket_->getFd())) ,externalStream_(false) { try { socket_-> setRcvTimeout(rcvToSeconds, rcvToMicroseconds). setSndTimeout(sndToSeconds, sndToMicroseconds). setUnblock(noBlock); } catch (...) { destroy(); throw; } } Connection::Connection(std::string const & host, unsigned int port, long int rcvToSeconds, long int rcvToMicroseconds, long int sndToSeconds, long int sndToMicroseconds, bool noBlock) :socket_(new INetSocket(host, port)) ,stream_(new FDTypeStream(socket_->getFd())) ,externalStream_(false) { try { socket_-> setRcvTimeout(rcvToSeconds, rcvToMicroseconds). setSndTimeout(sndToSeconds, sndToMicroseconds). setUnblock(noBlock). connect(); } catch (...) { destroy(); throw; } } #ifndef WIN32 Connection::Connection(std::string const & path, long int rcvToSeconds, long int rcvToMicroseconds, long int sndToSeconds, long int sndToMicroseconds, bool noBlock) :socket_(new UnixSocket(path)) ,stream_(new FDTypeStream(socket_->getFd())) ,externalStream_(false) { try { socket_-> setRcvTimeout(rcvToSeconds, rcvToMicroseconds). setSndTimeout(sndToSeconds, sndToMicroseconds). setUnblock(noBlock). connect(); } catch (...) { destroy(); throw; } } #endif Connection::~Connection() { destroy(); } std::string Connection::getId() const { return socket_->getId(); } std::string Connection::getPeerId() const { return socket_->getPeerId(); } std::string Connection::getConnId() const { return "[" + getId() + "]<->[" + getPeerId() + "]"; } std::iostream const & Connection::s() const { return *stream_; } std::iostream & Connection::s() { return *stream_; } // private: buf must be pre allocated to hold size bytes. std::streamsize Connection::readBlock(char * const buf, std::streamsize const & size, bool doThrow) { s().read(buf, size); if (doThrow && s().gcount() != size) { UI_THROW("Incomplete block read: " + tos(s().gcount()) + "/" + tos(size) + " bytes"); } return s().gcount(); } std::string Connection::readLine() { return getlineCRLF(s()); } std::streamsize Connection::readBlock(std::string & block, std::streamsize const & size, bool doThrow) { block.resize(size); return readBlock(&block[0], size, doThrow); } std::string Connection::readBlock(std::streamsize const & size) { std::string block; block.resize(size); readBlock(&block[0], size); return block; } std::vector Connection::readBlockVec(std::streamsize const & size) { std::vector block(size); readBlock(&block[0], size); return block; } Header & Connection::readHeader(Header & header) { std::string line(readLine()); while (line != "") { header.add(line); line = readLine(); } return header; } Header Connection::readHeader() { Header header; return readHeader(header); } Connection & Connection::writeLine(std::string const & line) { s() << line << "\r\n"; return *this; } Connection & Connection::write(std::string const & block) { s().write(&block[0], block.size()); return *this; } Connection & Connection::write(StatusLine const & statusLine) { writeLine(statusLine.get()); return *this; } Connection & Connection::write(RequestLine const & requestLine) { writeLine(requestLine.get()); return *this; } Connection & Connection::write(HeaderField const & oHeaderField, std::string const & prefix) { writeLine(prefix + oHeaderField.get()); return *this; } Connection & Connection::write(Header const & header, std::string const & prefix) { for (Header::const_iterator i(header.begin()); i != header.end(); ++i) { write(*i, prefix); } return *this; } std::string Connection::simpleHttpRequest(std::string const & body) { write(RequestLine()); write(Header().add("Content-Length", tos(body.size()))); writeLine(); write(body); s().flush(); StatusLine status(readLine()); Header header(readHeader()); if (header.exists("Content-Length")) { std::string body(readBlock(header.get("Content-Length"))); return body; } return ""; } }}} ui-utilcpp-1.8.5/src/ui-utilcpp/http/PaxHeaders.1390/Cookie.cpp0000644000000000000000000000013212751117070021050 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.858884864 30 ctime=1470503616.062342088 ui-utilcpp-1.8.5/src/ui-utilcpp/http/Cookie.cpp0000644000175000017500000002013312751117070022220 0ustar00absurdabsurd00000000000000// Local configuration #include "config.h" // Implementation #include "Cookie.hpp" // C++ Libraries #include namespace UI { namespace Util { namespace Http { // Cookie Cookie::Cookie(std::string const & name, std::string const & value) :std::pair(name, value) {} std::string const & Cookie::getName() const { return first; } std::string const & Cookie::getValue() const { return second; } // Cookies Cookies::Cookies(std::string const & line, std::string const & prefix) { addLine(line, prefix); } Cookies::Cookies(HeaderField const & field, std::string const & prefix) { if (field.getName() != "Cookie") { UI_THROW("Not a \"Cookie\" header field: " + field.getName()); } addLine(field.getValue(), prefix); } Cookies::Cookies(Header const & header, std::string const & prefix) { add(header, prefix); } Cookies & Cookies::add(std::string const & name, std::string const & value) { push_back(Cookie(name, value)); return *this; } Cookies & Cookies::addLine(std::string const & line, std::string const & prefix) { std::string::size_type const size(line.size()); if (size) { std::string::size_type p0(0); while (p0 != std::string::npos) { std::string::size_type const p1(line.find_first_of('=', p0)); if (p1 == std::string::npos) { break; // no name=value pair left } std::string::size_type p2(line.find_first_of(';', p1)); p2 = p2 == std::string::npos ? size : p2; // accept only cookie names and values not containing " ,;=" std::string const name(line.substr(p0, p1-p0)); std::string const value(line.substr(p1+1, p2-p1-1)); if (name.find_first_of(" ,;") == std::string::npos && value.find_first_of(" ,=") == std::string::npos) { if (prefix.empty()) { push_back(Cookie(name, value)); } else if (name.compare(0, prefix.size(), prefix) == 0) { push_back(Cookie(name.substr(prefix.size()), value)); } } p0 = p2 == size ? std::string::npos : line.find_first_not_of(" \t", p2+1); } } return *this; } Cookies & Cookies::add(Header const & header, std::string const & prefix) { return addLine(header.get("Cookie", false), prefix); } Cookies::const_iterator Cookies::find(std::string const & name) const { const_iterator i; for (i = begin(); i != end() && i->getName() != name; ++i) {} return i; } bool Cookies::exists(std::string const & name) const { return find(name) != end(); } std::string const & Cookies::get(std::string const & name, bool doThrow) const { const_iterator i(find(name)); if (i == end() && doThrow) { UI_THROW("Cookie not found: " + name); } return (i == end() ? EmptyString_ : i->getValue()); } std::string Cookies::getLine(std::string const & prefix) const { std::string result; for (const_iterator i(begin()); i != end(); ++i) { result += prefix + i->getName() + "=" + i->getValue() + ((i+1) == end() ? "" : "; "); } return result; } // SetCookie SetCookie::SetCookie(HeaderField const & field) { if (field.getName() != "SetCookie") { UI_THROW("Not a \"SetCookie\" header field: " + field.getName()); } setLine(field.getValue()); } SetCookie::SetCookie(std::string const & name, std::string const & value) { setName(name); setValue(value); setExpires(""); setDomain(""); setPath(""); setSecure(false); } SetCookie & SetCookie::setName(std::string const & name) { if (!name.size()) { UI_THROW("Empty name for SetCookie"); } name_ = name; return *this; } SetCookie & SetCookie::setValue(std::string const & value) { value_ = value; return *this; } SetCookie & SetCookie::setExpires(std::string const & expires) { expires_ = expires; return *this; } SetCookie & SetCookie::setExpires(time_t const timestamp) { char buf[30]; struct tm t; gmtime_r(×tamp, &t); strftime(buf, 30, "%a, %d-%b-%Y %H:%M:%S %Z", &t); expires_ = buf; return *this; } SetCookie & SetCookie::setPath(std::string const & path) { path_ = path; return *this; } SetCookie & SetCookie::setDomain(std::string const & domain) { domain_ = domain; return *this; } SetCookie & SetCookie::setSecure(bool const & secure) { secure_ = secure; return *this; } SetCookie & SetCookie::setLine(std::string const & line) { // Defaults for new values std::string newName(""); std::string newValue(""); std::string newExpires(""); std::string newPath(""); std::string newDomain(""); bool newSecure(false); std::string::size_type const size(line.size()); if (size) { std::string::size_type p0(0); while (p0 != std::string::npos) { std::string::size_type p1(line.find_first_of("=;", p0)); p1 = p1 == std::string::npos ? size : p1; std::string const name(line.substr(p0, p1-p0)); if (name.find_first_of(" ,") != std::string::npos) { // don't care for names with evil characters in them p0 = line.find_first_of(';', p1); continue; } std::string::size_type p2(p1); if (p1 != size && line.at(p1) == '=') { p2 = line.find_first_of(';', p1); p2 = p2 == std::string::npos ? size : p2; std::string const value(line.substr(p1+1, p2-p1-1)); if (name == "expires") newExpires = value; else if (name == "domain") newDomain = value; else if (name == "path") newPath = value; else if (value.find(" ,") == std::string::npos) { newName = name; newValue = value; } } else if (name == "secure") { newSecure = true; } p0 = p2 == size ? std::string::npos : line.find_first_not_of(" \t", p2+1); } } // Set new values setName(newName); setValue(newValue); setExpires(newExpires); setPath(newPath); setDomain(newDomain); setSecure(newSecure); return *this; } std::string const & SetCookie::getName() const { return name_; } std::string const & SetCookie::getValue() const { return value_; } std::string const & SetCookie::getExpires() const { return expires_; } std::string const & SetCookie::getPath() const { return path_; } std::string const & SetCookie::getDomain() const { return domain_; } void SetCookie::addTok(std::string & line, std::string const & name, std::string const & value) const { line += "; " + name + "=" + value; } void SetCookie::addTokDef(std::string & line, std::string const & name, std::string const & value, std::string const & defaultValue) const { if (value.size()) { addTok(line, name, value); } else if (defaultValue.size()) { addTok(line, name, defaultValue); } } std::string SetCookie::getLine(std::string const & prefix, std::string const & expiresDefault, std::string const & pathDefault, std::string const & domainDefault) const { std::string result(prefix + name_ + "=" + value_); addTokDef(result, "expires", expires_, expiresDefault); addTokDef(result, "path", path_, pathDefault); addTokDef(result, "domain", domain_, domainDefault); if (secure_) { result += "; secure"; }; return result; } // SetCookies SetCookies::SetCookies() {} SetCookies::SetCookies(Header const & header) { for (Header::const_iterator i(header.begin()); i != header.end(); ++i) { if (i->getName() == "Set-Cookie") { push_back(SetCookie(*i)); } } } SetCookie & SetCookies::add(std::string const & name, std::string const & value) { push_back(SetCookie(name, value)); return back(); } SetCookies::const_iterator SetCookies::find(std::string const & name) const { const_iterator i; for (i = begin(); i != end() && (*i).getName() != name; ++i) {} return i; } bool SetCookies::exists(std::string const & name) const { return find(name) != end(); } SetCookie const & SetCookies::get(std::string const & name) const { const_iterator i(find(name)); if (i == end()) { UI_THROW("SetCookie not found : " + name); } return *i; } Header SetCookies::getHeader(std::string const & prefix, std::string const & expiresDefault, std::string const & pathDefault, std::string const & domainDefault) const { Header result; for (const_iterator i(begin()); i != end(); ++i) { result.add("Set-Cookie", i->getLine(prefix, expiresDefault, pathDefault, domainDefault)); } return result; } }}} ui-utilcpp-1.8.5/src/ui-utilcpp/http/PaxHeaders.1390/Connection.hpp0000644000000000000000000000013212751117070021743 xustar0030 mtime=1470406200.115952021 30 atime=1470498378.623248189 30 ctime=1470503616.058342163 ui-utilcpp-1.8.5/src/ui-utilcpp/http/Connection.hpp0000644000175000017500000000520512751117070023116 0ustar00absurdabsurd00000000000000/** * @file */ #ifndef UI_UTIL_HTTP_CONNECTION_HPP #define UI_UTIL_HTTP_CONNECTION_HPP // STDC++ #include #include #include // C++ Libraries #include #include namespace UI { namespace Util { namespace Http { class Connection { private: Socket * const socket_; std::iostream * const stream_; bool const externalStream_; /** @brief Helper for constructors to destroy internal data on exception. */ void destroy(); public: /** Connection w/ an existing stream. */ Connection(std::iostream & stream); /** Connection w/ an open (socket) file descriptor. */ Connection(int fd, bool closeFd=false, long int rcvToSeconds=0, long int rcvToMicroseconds=0, long int sndToSeconds=0, long int sndToMicroseconds=0, bool noBlock=false); /** Connection w/ an INet peer. */ Connection(std::string const & host, unsigned int port, long int rcvToSeconds=0, long int rcvToMicroseconds=0, long int sndToSeconds=0, long int sndToMicroseconds=0, bool noBlock=false); #ifndef WIN32 /** Connection w/ an UNIX peer. */ Connection(std::string const & path, long int rcvToSeconds=0, long int rcvToMicroseconds=0, long int sndToSeconds=0, long int sndToMicroseconds=0, bool noBlock=false); #endif ~Connection(); /** @name Get socket information. * @{ */ std::string getId() const; std::string getPeerId() const; std::string getConnId() const; /** @} */ /** @name Get stream for arbitrary use. * @{ */ std::iostream const & s() const; std::iostream & s(); /** @} */ private: std::streamsize readBlock(char * const buf, std::streamsize const & size, bool doThrow=true); public: /** @name Read utilities. * @{ */ std::string readLine(); std::streamsize readBlock(std::string & block, std::streamsize const & size, bool doThrow=true); std::string readBlock(std::streamsize const & size); std::vector readBlockVec(std::streamsize const & size); Header & readHeader(Header & header); Header readHeader(); /** @} */ /** @name Write utilities. * @{ */ Connection & writeLine(std::string const & line=""); Connection & write(std::string const & block); Connection & write(StatusLine const & statusLine); Connection & write(RequestLine const & requestLine); Connection & write(HeaderField const & oHeaderField, std::string const & prefix=""); Connection & write(Header const & header, std::string const & prefix=""); /** @} */ /** @name A simple "default" http request. */ std::string simpleHttpRequest(std::string const & body); }; }}} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/http/PaxHeaders.1390/Cookie.hpp0000644000000000000000000000013212751117070021055 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.858884864 30 ctime=1470503616.058342163 ui-utilcpp-1.8.5/src/ui-utilcpp/http/Cookie.hpp0000644000175000017500000001033612751117070022231 0ustar00absurdabsurd00000000000000/** * @file */ #ifndef UI_UTIL_HTTP_COOKIE_HPP #define UI_UTIL_HTTP_COOKIE_HPP // STDC #include // STDC++ #include #include // C++ libraries #include namespace UI { namespace Util { namespace Http { /** @todo Parts marked "GENERIC PART" should be solved by a generic key/pair vector. */ class Cookie: private std::pair { public: Cookie(std::string const & name, std::string const & value); std::string const & getName() const; std::string const & getValue() const; }; /** @brief Handle "Cookie" request header field values syntactically. * * @note Wording line means a string in "Cookie" header field * value syntax ("a=b;c=d;e=f") as described * http://wp.netscape.com/newsref/std/cookie_spec.html . */ class Cookies: public std::vector { public: Cookies(std::string const & line="", std::string const & prefix=""); Cookies(HeaderField const & field, std::string const & prefix=""); Cookies(Header const & header, std::string const & prefix=""); /** @name Modifiers (add cookies). * @{ */ Cookies & add(std::string const & name, std::string const & value); Cookies & addLine(std::string const & line, std::string const & prefix=""); Cookies & add(Header const & header, std::string const & prefix=""); /** @} */ /** @name Accessors. * @{ */ // GENERIC PART const_iterator find(std::string const & name) const; bool exists(std::string const & name) const; std::string const & get(std::string const & name, bool doThrow=true) const; // END GENERIC PART std::string getLine(std::string const & prefix="") const; /** @} */ }; /** @brief Handle "SetCookie" request header field values syntactically. * * @note Wording line means a string in "SetCookie" header * field value syntax ("NAME=a;expires=b;path=c;...") as described * http://wp.netscape.com/newsref/std/cookie_spec.html . * * @todo Syntax integrity checks for setVALUE methods (expires, domain, path, ...). */ class SetCookie { public: SetCookie(HeaderField const & field); SetCookie(std::string const & name, std::string const & value=""); /** @name Modifiers (set values). * @{ */ SetCookie & setName(std::string const & name); SetCookie & setValue(std::string const & value); SetCookie & setExpires(std::string const & expires="Tue, 01-Jan-1980 00:00:00 GMT"); SetCookie & setExpires(time_t const timestamp); SetCookie & setPath(std::string const & path); SetCookie & setDomain(std::string const & domain); SetCookie & setSecure(bool const & secure=true); /** @brief This resets all values and sets the values in line. */ SetCookie & setLine(std::string const & line); /** @} */ /** @name Accessors. */ /** @{ */ std::string const & getName() const; std::string const & getValue() const; std::string const & getExpires() const; std::string const & getPath() const; std::string const & getDomain() const; /** @} */ private: void addTok(std::string & line, std::string const & name, std::string const & value) const; void addTokDef(std::string & line, std::string const & name, std::string const & value, std::string const & defaultValue) const; public: /** @brief Composition. */ std::string getLine(std::string const & prefix="", std::string const & expiresDefault="", std::string const & pathDefault="", std::string const & domainDefault="") const; private: std::string name_; std::string value_; std::string expires_; std::string path_; std::string domain_; bool secure_; }; /** @brief Handle a vector of SetCookie's. */ class SetCookies: public std::vector { public: SetCookies(); SetCookies(Header const & header); SetCookie & add(std::string const & name, std::string const & value=""); /** @name Accessors. */ /** @{ */ // GENERIC PART const_iterator find(std::string const & name) const; bool exists(std::string const & name) const; SetCookie const & get(std::string const & name) const; // END GENERIC PART Header getHeader(std::string const & prefix="", std::string const & expiresDefault="", std::string const & pathDefault="", std::string const & domainDefault="") const; /** @} */ }; }}} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/http/PaxHeaders.1390/Header.hpp0000644000000000000000000000013212751117070021034 xustar0030 mtime=1470406200.115952021 30 atime=1470498378.203256121 30 ctime=1470503616.058342163 ui-utilcpp-1.8.5/src/ui-utilcpp/http/Header.hpp0000644000175000017500000001054312751117070022210 0ustar00absurdabsurd00000000000000/** * @file * */ #ifndef UI_UTIL_HTTP_HEADER_HPP #define UI_UTIL_HTTP_HEADER_HPP // STDC++ #include #include #include // C++ libraries #include #include namespace UI { namespace Util { /** @brief Namespace for all HTTP related code. */ namespace Http { /** @brief Exception for Http namespace. */ class Exception: public Util::Exception { public: Exception(std::string const & what=NoWhatGiven_, std::string const & debug=NoDebugGiven_); }; /** @brief Helper to verify a version string. */ bool verifyVersion(std::string const & version, bool const & doThrow=true); /** @brief Parse and represent a request's request line. @see RFC 2616, 5.1. * @see RFC 2616, 5.1. * * Example request lines: "POST / HTTP/1.1", "GET /humbug&a=auchHumbug HTTP/1.1". */ class RequestLine { public: /** @name HTTP 1.1 methods and string mappings. * * @note Be sure to always update both, Method and generateMethodMap(). */ enum Method { Options_, Get_, Head_, Post_, Put_, Delete_, Trace_, Connect_ }; private: typedef std::map MethodMap; static MethodMap generateMethodMap(); static MethodMap const MethodMap_; public: static Method str2Method(std::string const & method); /** @brief Construct from components. */ RequestLine(Method const & method=Post_, std::string const & uri="/", std::string const & version="HTTP/1.1"); /** @brief Construct from composition (parse). */ RequestLine(std::string const & line); /** @name Set (and validate) components. * @{ */ RequestLine & setMethod(Method const & method); RequestLine & setMethod(std::string const & method); RequestLine & setURI(std::string const & uri); RequestLine & setVersion(std::string const & version); /** @} */ /** @name Get components. * @{ */ Method const & getMethod() const; std::string const & getMethodStr() const; std::string const & getURI() const; std::string const & getVersion() const; /** @} */ /** @brief Get composition. */ std::string get() const; private: Method method_; std::string uri_; std::string version_; }; /** @brief Parse and represent a response's status line. * @see RFC 2616, 6.1. * * Example status line: "HTTP/1.1 550 Internal Server Error" */ class StatusLine { public: typedef unsigned int Code; /** @brief Construct from components. */ StatusLine(Code const & code=200, std::string const & reason="OK", std::string const & version="HTTP/1.1"); /** @brief Construct from composition (parse). */ StatusLine(std::string const & line); /** @name Set (and validate) components. * @{ */ StatusLine & setCode(Code const & code); StatusLine & setCode(std::string const & code); StatusLine & setReason(std::string const & reason); StatusLine & setVersion(std::string const & version); /** @} */ /** @name Get components. * @{ */ Code const & getCode() const; std::string getCodeStr() const; std::string const & getReason() const; std::string const & getVersion() const; /** @} */ /** @brief Get composition. */ std::string get() const; private: Code code_; std::string reason_; std::string version_; }; /** @brief Header field. * * Example header field: "ContentLength: 1234" */ class HeaderField: private std::pair { public: /** @brief Construct from components. */ HeaderField(std::string const & name, std::string const & value); /** @brief Construct from composition (parse). */ HeaderField(std::string const & line); /** @name Get components. * @{ */ std::string const & getName() const; std::string const & getValue() const; /** @} */ /** @brief Get composition. */ std::string get() const; }; /** @brief Array of header fields. */ class Header: public std::vector { public: const_iterator find(std::string const & name) const; bool exists(std::string const & name) const; std::string const & get(std::string const & name, bool doThrow=true) const; template I get(std::string const & name, bool doThrow=true) const { return ato(get(name, doThrow)); } Header & add(std::string const & key, std::string const & value); Header & add(std::string const & line); Header getMulti(std::string const & name) const; Header getPrefix(std::string const & prefix) const; /** @brief Get composition. */ std::string get() const; }; }}} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/http/PaxHeaders.1390/Makefile.in0000644000000000000000000000013212751415267021211 xustar0030 mtime=1470503607.310507022 30 atime=1470503613.574388975 30 ctime=1470503616.062342088 ui-utilcpp-1.8.5/src/ui-utilcpp/http/Makefile.in0000644000175000017500000005022112751415267022362 0ustar00absurdabsurd00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/ui-utilcpp/http 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) DIST_COMMON = $(srcdir)/Makefile.am $(inc_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libui_utilcpp_http_la_LIBADD = am_libui_utilcpp_http_la_OBJECTS = Header.lo Cookie.lo Connection.lo \ URL.lo libui_utilcpp_http_la_OBJECTS = $(am_libui_utilcpp_http_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 = 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)/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 = $(libui_utilcpp_http_la_SOURCES) DIST_SOURCES = $(libui_utilcpp_http_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__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)$(incdir)" HEADERS = $(inc_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCGNU2_CONFIG = @CCGNU2_CONFIG@ CFLAGS = @CFLAGS@ 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@ EXTLIBS = @EXTLIBS@ FGREP = @FGREP@ GNULIBS = @GNULIBS@ 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_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OST_CXXX2_FLAGS = @OST_CXXX2_FLAGS@ OST_CXXX2_LIBS = @OST_CXXX2_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@ PERL = @PERL@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SINGLE_FLAGS = @SINGLE_FLAGS@ SINGLE_LIBS = @SINGLE_LIBS@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ UI_UTILCPP_CXXFLAGS = @UI_UTILCPP_CXXFLAGS@ 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@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I$(top_srcdir)/src AM_CXXFLAGS = -Wall -pthread $(OST_CXXX2_FLAGS) $(UI_UTILCPP_CXXFLAGS) incdir = $(includedir)/$(PACKAGE)/http inc_HEADERS = Header.hpp Cookie.hpp Connection.hpp URL.hpp noinst_LTLIBRARIES = libui-utilcpp-http.la libui_utilcpp_http_la_SOURCES = Header.cpp Cookie.cpp Connection.cpp URL.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 src/ui-utilcpp/http/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/ui-utilcpp/http/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-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libui-utilcpp-http.la: $(libui_utilcpp_http_la_OBJECTS) $(libui_utilcpp_http_la_DEPENDENCIES) $(EXTRA_libui_utilcpp_http_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) $(libui_utilcpp_http_la_OBJECTS) $(libui_utilcpp_http_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Cookie.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Header.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/URL.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 install-incHEADERS: $(inc_HEADERS) @$(NORMAL_INSTALL) @list='$(inc_HEADERS)'; test -n "$(incdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(incdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(incdir)" || 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)$(incdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(incdir)" || exit $$?; \ done uninstall-incHEADERS: @$(NORMAL_UNINSTALL) @list='$(inc_HEADERS)'; test -n "$(incdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(incdir)'; $(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 $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(incdir)"; 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." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ 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-incHEADERS 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: uninstall-incHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am \ install-incHEADERS install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-incHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ui-utilcpp-1.8.5/src/ui-utilcpp/http/PaxHeaders.1390/Header.cpp0000644000000000000000000000013212751117070021027 xustar0030 mtime=1470406200.115952021 30 atime=1470498378.203256121 30 ctime=1470503616.062342088 ui-utilcpp-1.8.5/src/ui-utilcpp/http/Header.cpp0000644000175000017500000001434312751117070022205 0ustar00absurdabsurd00000000000000// Local configuration #include "config.h" // Implementation #include "Header.hpp" // STDC++ #include // Local #include "Connection.hpp" namespace UI { namespace Util { namespace Http { Exception::Exception(std::string const & what, std::string const & debug) :Util::Exception("HTTP error: " + what, debug) {} bool verifyVersion(std::string const & version, bool const & doThrow) { bool const result(isToken(version, "HTTP/1.1,HTTP/1.0")); if (!result && doThrow) { UI_THROW("Unsupported version: " + version); } return result; } // RequestLine RequestLine::MethodMap RequestLine::generateMethodMap() { MethodMap result; result[Options_] = "OPTIONS"; result[Get_] = "GET"; result[Head_] = "HEAD"; result[Post_] = "POST"; result[Put_] = "PUT"; result[Delete_] = "DELETE"; result[Trace_] = "TRACE"; result[Connect_] = "CONNECT"; return result; } RequestLine::MethodMap const RequestLine::MethodMap_(RequestLine::generateMethodMap()); RequestLine::Method RequestLine::str2Method(std::string const & method) { for (MethodMap::const_iterator i(MethodMap_.begin()); i != MethodMap_.end(); ++i) { if (i->second == method) return i->first; } UI_THROW("Unsupported method: " + method); } RequestLine::RequestLine(Method const & method, std::string const & uri, std::string const & version) { setMethod(method); setURI(uri); setVersion(version); } RequestLine::RequestLine(std::string const & line) { std::vector tokens(strtoks(line, " \t")); if (tokens.size() != 3) { UI_THROW("Parsing request line failed: " + line); } setMethod(tokens[0]); setURI(tokens[1]); setVersion(tokens[2]); } RequestLine & RequestLine::setMethod(Method const & method) { method_ = method; return *this; } RequestLine & RequestLine::setMethod(std::string const & method) { return setMethod(str2Method(method)); } RequestLine & RequestLine::setURI(std::string const & uri) { uri_ = uri; return *this; } RequestLine & RequestLine::setVersion(std::string const & version) { verifyVersion(version); version_ = version; return *this; } RequestLine::Method const & RequestLine::getMethod() const { return method_; } std::string const & RequestLine::getMethodStr() const { return MethodMap_.find(method_)->second; } std::string const & RequestLine::getURI() const { return uri_; } std::string const & RequestLine::getVersion() const { return version_; } std::string RequestLine::get() const { return getMethodStr() + " " + getURI() + " " + getVersion(); } // StatusLine StatusLine::StatusLine(Code const & code, std::string const & reason, std::string const & version) { setCode(code); setReason(reason); setVersion(version); } StatusLine::StatusLine(std::string const & line) { std::vector tokens(strtoks(line, " \t")); if (tokens.size() < 2) { UI_THROW("Parsing status line failed: " + line); } setCode(ato(tokens[1])); setVersion(tokens[0]); std::string reason; for (unsigned int i(2); i < tokens.size(); ++i) { reason += (i == 2 ? "" : " ") + tokens[i]; } setReason(reason); } StatusLine & StatusLine::setCode(Code const & code) { if (code < 100 || code >= 600) { UI_THROW("Invalid status code: " + tos(code)); } code_ = code; return *this; } StatusLine & StatusLine::setCode(std::string const & code) { return setCode(ato(code)); } StatusLine & StatusLine::setReason(std::string const & reason) { reason_ = reason; return *this; } StatusLine & StatusLine::setVersion(std::string const & version) { verifyVersion(version); version_ = version; return *this; } StatusLine::Code const & StatusLine::getCode() const { return code_; } std::string StatusLine::getCodeStr() const { return tos(code_); } std::string const & StatusLine::getReason() const { return reason_; } std::string const & StatusLine::getVersion() const { return version_; } std::string StatusLine::get() const { return getVersion() + " " + getCodeStr() + " " + getReason(); } // HeaderField HeaderField::HeaderField(std::string const & name, std::string const & value) :std::pair(name, value) { str2Ascii(second); } HeaderField::HeaderField(std::string const & line) { std::string::size_type const colonPos(line.find(':')); /** @todo: Is it ok to allow empty names? */ if (colonPos == std::string::npos) { UI_THROW("Not a header field: " + line); } else { /** todo: What about spaces before colon (e.g. "Content-Length : 34")? */ first = line.substr(0, colonPos); std::string::size_type const valuePos(line.find_first_not_of(" \t", colonPos+1)); second = valuePos == std::string::npos ? "" : line.substr(valuePos); } str2Ascii(second); } std::string const & HeaderField::getName() const { return first; } std::string const & HeaderField::getValue() const { return second; } std::string HeaderField::get() const { return first + ": " + second; } // Header Header::const_iterator Header::find(std::string const & name) const { const_iterator i; for (i = begin(); i != end() && (*i).getName() != name; ++i) {} return i; } bool Header::exists(std::string const & name) const { return find(name) != end(); } std::string const & Header::get(std::string const & name, bool doThrow) const { const_iterator i(find(name)); if (i == end() && doThrow) { UI_THROW("Header field not found: " + name); } return (i == end() ? EmptyString_ : i->getValue()); } Header & Header::add(std::string const & key, std::string const & value) { push_back(HeaderField(key, value)); return *this; } Header & Header::add(std::string const & line) { push_back(HeaderField(line)); return *this; } Header Header::getMulti(std::string const & name) const { Header result; for (Header::const_iterator i(begin()); i != end(); ++i) { if (i->getName() == name) { result.push_back(HeaderField(i->getName(), i->getValue())); } } return result; } Header Header::getPrefix(std::string const & prefix) const { Header result; for (Header::const_iterator i(begin()); i != end(); ++i) { if (i->getName().compare(0, prefix.size(), prefix) == 0) { result.push_back(HeaderField(i->getName().substr(prefix.size()), i->getValue())); } } return result; } std::string Header::get() const { std::stringstream s; Connection(s).write(*this); return s.str(); } }}} ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Misc.hpp0000644000000000000000000000013212751117070017560 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.858884864 30 ctime=1470503616.010343068 ui-utilcpp-1.8.5/src/ui-utilcpp/Misc.hpp0000644000175000017500000001347012751117070020736 0ustar00absurdabsurd00000000000000/** * @file */ #ifndef UI_UTIL_MISC_HPP #define UI_UTIL_MISC_HPP // STDC++ #include #include #include #include #include // C++ libraries #include #include #include namespace UI { namespace Util { /** @brief Run "delete" on all vector elements, and clear the vector. *>. * * I.e. empty whole vector && call destructor for each ElType * - element. */ template void delAnySeqContainer(std::vector & l) throw() { for (typename std::vector::iterator i(l.begin()); i != l.end(); ++i) { delete *i; } l.clear(); } /** @brief Run "std::free" on all vector elements, and clear the vector. *>. * * I.e. empty whole vector && call destructor for each ElType * - element. */ template void freeAnySeqContainer(std::vector & l) throw() { for (typename std::vector::iterator i(l.begin()); i != l.end(); ++i) { std::free((void *) *i); } l.clear(); } /** @brief Utility to delete any map. * * I.e. empty whole map && call destuctor for each ElType * - element. */ template void delStringMap(std::map & l) throw() { for (typename std::map::iterator i(l.begin()); i != l.end(); ++i) { delete i->second; } l.clear(); } /** @brief Base adapter class to hold a pointer that can't be freed * using standard "delete". * * Derived classes should overwrite the destructor accordingly (and * add other tool methods at will). */ template class auto_base { public: /** @brief Construct from any pointer (may be 0). */ auto_base(P * const p=0) :p_(p) {} /** @brief Set controlled pointer (must not be 0). */ void set(P * const p) { assert(p); p_ = p; } /** @brief Get underlying pointer. */ P * get() const { return p_; } /** @brief Smart dereferencing. */ P * operator->() const { return p_; } protected: /** @brief Controlled pointer. */ P * p_; }; /** @brief Control freeing of C vector pointers via delete[]. */ template class auto_cvec: public auto_base

{ public: /** @brief Control this C vector pointer created via new P[n]. */ auto_cvec(P * const p) :auto_base

(p) {} /** @brief Free memory held by C vector via delete[]. */ ~auto_cvec() { delete[] auto_base

::p_; } /** @brief Access an C vector element. */ P & operator[](int i) { return auto_base

::p_[i]; } }; /** @brief Control freeing of memory via std::free. */ template class auto_free: public auto_base

{ public: /** @brief Control this memory allocated via std::*alloc. */ auto_free(P * const p) :auto_base

(p) {} /** @brief Free memory via std::free. */ ~auto_free() { std::free(auto_base

::p_); } }; /** @brief Reverse "find" for lists. * * @note Why doesn't "find(list.rbegin(), list.rend(), key)" work? * * @param l The list to search. * @param key The key to find. * @return Iterator to found key, or l.end() if not found. */ template typename std::list::iterator reverse_lfind(std::list & l, K const & key) { typename std::list::iterator i(l.end()); do { --i; if ((*i) == key) { return i; } } while (i != l.begin()); return l.end(); } /** @brief Get canonical absolute path name * * This effectively works like realpath(3), wrapped up for C++, w/ exception error handling. * * @see realpath(3) * @bug realpath(3) is "broken by design". We need to create a char buffer of size MAX_PATH * each time we call this function. */ std::string realpath(std::string const & path); /** @brief Mutex Lock class; an object of this class will guard a scope. * * The Mutex class must provide enterMutex(), tryEnterMutex() and leaveMutex() methods. */ template class MutexLock { public: /** @brief Error codes for exceptions. */ enum ErrorCode { Locked_ = 1 }; /** @brief This classes exceptions. */ typedef CodeException Exception; /** @brief Constructor; locks the mutex. * * @param mutex Any Mutex providing enterMutex(), tryEnterMutex() and leaveMutex(). * @param wait Whether to wait until the lock can be set, or to return with exception LOCKED. */ MutexLock(Mutex & mutex, bool wait=true) throw(Exception) :mutex_(&mutex) { if (wait) { mutex_->enterMutex(); } else { if (!mutex_->tryEnterMutex()) { UI_THROW_CODE(Locked_, "Mutex is locked"); } } } /** @brief Destructor; unlocks the mutex. */ ~MutexLock() { mutex_->leaveMutex(); } private: Mutex * const mutex_; }; /** @brief Get canonical absolute path name (mutex-protected) * * You should create one instance of this for one multi-threaded environment, and then * call the object's get() method. Purpose is to be faster than realpath() by not having * to create a buffer of MAX_PATH each time we call. Tests however suprisingly show * it's even somewhat slower. * * @param path Path to canonize. * * @attention Do not use more than one object in a multi-threaded environment. * * @see UI::Util::realpath(). * */ template class RealPath { public: /** @brief Get canonical path, mutex-protected. */ std::string get(std::string const & path) { MutexLock lock(mutex_); Sys::realpath(path.c_str(), buffer_); return std::string(buffer_); }; private: M mutex_; char buffer_[PATH_MAX]; }; /** @brief Helper class to get a scope executed with some other effective uid. */ class EUIDSwap { public: /** @brief Error codes for exceptions. */ enum ErrorCode { SetEuidErr_ = 1 }; /** @brief This classes exceptions. */ typedef CodeException Exception; EUIDSwap(uid_t uid=Sys::getuid()); ~EUIDSwap(); /** @brief Get the original effective user id. */ uid_t getOrigUID() const; private: uid_t const origEUID_; }; }} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/GetOpt.hpp0000644000000000000000000000013212751117070020067 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.858884864 30 ctime=1470503616.006343143 ui-utilcpp-1.8.5/src/ui-utilcpp/GetOpt.hpp0000644000175000017500000001634412751117070021250 0ustar00absurdabsurd00000000000000/** * @file GetOpt.hpp * @author Schlund + Partner AG * @brief Abstraction of GNU C "getopt_long(3)". * @deprecated Leagcy - don't use this for new code -- use boost::program_options instead. * * Synopsis: * * @code * #include * @endcode * * Notes: * - A "command line option" has the form "--=" or "- ". * - Arg can be optional. * - Parser used is GNU getoptAlong. * * Limitations / todos: * - Currently, all c.l.options MUST have a short _and_ a long option. * * Usage (informal): * - GetOpt getOpt(argc, argv) * - { getOpt.set(...) } * * - CLOption * opt0(getOpt.get("version" | 'v')) * * - getOpt.isValid(), opt0->isGiven(), ... */ #ifndef UI_UTIL_GETOPT_HPP #define UI_UTIL_GETOPT_HPP /** * @example GetOpt.cpp * Simple test program for GetOpt. * Binary should be installed as ui-utilcpp-getopt. */ // STDC++ #include #include // SYSTEM C #include // GNU namespace UI { namespace Util { /** @brief Most general class for a command line option. Use this class for a option without argument. * @deprecated Leagcy - don't use this for new code -- use boost::program_options instead. */ class CLOption { public: /** @brief Standard constructor. Normally, you would not use this directly, but rather use GetOpt::set. * * @param nameLong Long name of the option; e.g. "version". * @param nameShort Short name (one character) of the option; e.g. 'v'. * @param doc Documentation string for this option; e.g. "Show version information". * @param defaultArg Default value for that option. */ CLOption(std::string const & nameLong, char nameShort, std::string const & doc = "No documentation for this option.", std::string const & defaultArg=""); /** */ virtual ~CLOption(); /** @brief Get the long name. * * @return Long name of this option. */ std::string getNameLong() const; /** @brief Get the short name. * * @return Short name of this option. */ char getNameShort() const; /** @brief Get the documentation. * * @return Documentation string of this option. */ std::string getDoc() const; /** @brief Check if this option was given. * * @result true, if argument was given, else false. This must be set manually via setGiven() (GetOpt automates this). */ bool isGiven() const; /** @brief Get argument given with this option. * * @result Argument, if any; zero-length string for none. This must be set manually via setGiven() (GetOpt automates this). */ std::string getArg() const; /** @brief Print usage information for this option. */ virtual void printUsage() const; /** @brief Get GNU getopt_long(3) represention of this option. * * @return Corresponding option struct for GNU getopt_long(3). */ virtual option * getCOptLong(option * opt) const; /** @brief Get GNU getopt(3) represention of this option. * * @return Corresponding "optstr" for getopt(3). */ virtual std::string getCOptShort() const; /** @brief Mark this option as "given", and optionally set the argument. * * @param arg Argument string to set this option to. */ virtual void setGiven(std::string const & arg=""); protected: private: // Attributes set when initialized std::string const nameLong_; /** Long option */ char const nameShort_; /** Short option */ std::string const doc_; /** Option documentation */ // Attributes set when parsed bool isGiven_; /** Option given */ std::string arg_; /** Option argument */ protected: std::string const defaultArg_; /** Default option argument */ }; /** @brief Class representing a command line option with mandatory argument. */ class CLOptionArg: public CLOption { public: /** @brief Standard constructor. * * @see CLOption::CLOption. */ CLOptionArg(std::string const & nameLong, char nameShort, std::string const & doc = "No documentation for this option.", std::string const & defaultArg=""); virtual void printUsage() const; virtual option * getCOptLong(option * opt) const; virtual std::string getCOptShort() const; }; /** @brief Class representing a command line option with optional argument. */ class CLOptionOptArg : public CLOption { public: /** @brief Standard constructor. * * @see CLOption::CLOption. */ CLOptionOptArg(std::string const & nameLong, char nameShort, std::string const & doc = "No documentation for this option.", std::string const & defaultArg=""); virtual void printUsage() const; virtual option * getCOptLong(option * opt) const; virtual std::string getCOptShort() const; }; /** @brief Abstraction class for GNU getopt_long(3). * * Use this rather than the CLOption*-Classes directly. * * @deprecated Leagcy - don't use this for new code -- use boost::program_options instead. */ class GetOpt { public: /** @brief All three possible types of CLOption* Classes. * * In normal use, you would use this in set(), who then choses what type of object * to create. Use "NOARG" for CLOption, "ARG" for CLOptionArg and "OPTARG" for CLOptionOptArg. * @see set() */ enum Type {NoArg_, Arg_, OptArg_}; /** @brief Standard constructor. * * @param argc Number of arguments (first argument of main() function). * @param argv Array of arguments (second argument of main() function). */ GetOpt(int argc, char * const * const argv); /** @brief Standard destructor. */ ~GetOpt(); /** @brief Introduce a new option. * * @param nameLong Long name of the option; e.g. "version". * @param nameShort Short name (one character) of the option; e.g. 'v'. * @param type Type of the option (NOARG, ARG, OPTARG); e.g. "NOARG". * @param doc Documentaion for this option; e.g. "Show version information". * @param defaultArg Default value for that option. */ GetOpt & set(std::string const & nameLong, char nameShort, Type type, std::string const & doc = "No documentation for this option.", std::string const & defaultArg=""); /** @brief Get an option object from short name. * * The pointer is valid as long as the GetOpt object stays alive. * This will implicitely parse the command line options, if not already done. * * @param nameShort Short name (one character) of the option; e.g. 'v'. */ CLOption * get(char nameShort); /** @brief Get an option object from long name. * * @param nameLong Long name of the option; e.g. "version". */ CLOption * get(std::string const & nameLong); /** @brief Prints out Usage information to cout (stdout). * * @param title Print this text before usage information. */ void printUsage(std::string const & title="\nUsage:\n\n") const; /** @brief Helper. * * Prints out an error text to cerr, prints usage to cout * and always returns 1 (suitable as program exit code). * @param reason Explanatory error text. * @param title Print this text before usage information. */ int wrongUsage(std::string const & reason, std::string const & title="\nUsage:\n\n") const; /** @brief Check if given command line arguments are "well-formed". * * @note GNU getopt_long(3) will print error messages to stderr, if * the given arguments are not valid. * * @return true if valid, else false. */ bool isValid(); private: int const argc_; char * const * const argv_; std::vector opts_; void parse(); bool isValid_; bool isParsed_; }; }} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/PosixRegex.cpp0000644000000000000000000000013212751117070020755 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.862884788 30 ctime=1470503616.034342615 ui-utilcpp-1.8.5/src/ui-utilcpp/PosixRegex.cpp0000644000175000017500000000253212751117070022130 0ustar00absurdabsurd00000000000000#include "config.h" // Implementation #include "PosixRegex.hpp" // Local #include "Text.hpp" namespace UI { namespace Util { std::string PosixRegex::getErrorMessage(int result) const { int const maxSize(256); std::string msg; msg.resize(maxSize); regerror(result, &preg_, &msg[0], maxSize-1); return msg.c_str(); } PosixRegex::PosixRegex(std::string const & regex, int cflags) throw(Exception) { int result(::regcomp(&preg_, regex.c_str(), cflags)); if (result != 0) { std::string msg(getErrorMessage(result)); ::regfree(&preg_); UI_THROW_CODE((reg_errcode_t)result, "Error compiling posix regex \"" + regex + "\": " + msg); } } PosixRegex::~PosixRegex() { ::regfree(&preg_); } PosixRegex::Match PosixRegex::runMatch(std::string const & text, int eflags) throw(Exception) { Match result; ::regmatch_t pmatch[1]; int posixErr(::regexec(&preg_, text.c_str(), 1, pmatch, eflags)); if (posixErr == 0) { result.matches = true; result.begin = pmatch[0].rm_so; result.end = pmatch[0].rm_eo; } else if (posixErr == REG_NOMATCH) { result.matches = false; } else { UI_THROW_CODE((reg_errcode_t)posixErr, "Error matching \"" + text + "\" against posix regex: " + getErrorMessage(posixErr)); } return result; } bool PosixRegex::run(std::string const & text, int eflags) throw(Exception) { return runMatch(text, eflags).matches; } }} ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/PosixRegex.hpp0000644000000000000000000000013212751117070020762 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.862884788 30 ctime=1470503616.014342992 ui-utilcpp-1.8.5/src/ui-utilcpp/PosixRegex.hpp0000644000175000017500000000402612751117070022135 0ustar00absurdabsurd00000000000000/** * @file * @brief Posixregex, descriptors and sockets. */ #ifndef UI_UTIL_POSIXREGEX_HPP #define UI_UTIL_POSIXREGEX_HPP // STDC++ #include // POSIX C #include // C++ libraries #include namespace UI { namespace Util { /** @example Regex.cpp Example on how to use the PosixRegex class. */ /** @brief Wrapper class for POSIX.2 regex functions. * * @note For the future, one might rather use the libboost's regexx implementation. * * @see regex(3) * @bug Not fully encapsulated; flags must be given using the values from regex.h; Catched * exception code must be compared against the reg_errcode_t defined in regex.h. * @bug Does not support multiple matches (seems this does not work anyway currently) * @bug Does not support clear text error reporting as via regerror. */ class PosixRegex { private: std::string getErrorMessage(int result) const; public: /** @brief Exceptions we might throw. */ typedef CodeException Exception; /** @brief Helper class representing match data. */ class Match { public: Match(): matches(false), begin(0), end(0) {} /** Do we have a match? */ bool matches; /** If yes: where it begins */ unsigned begin; /** If yes: where it ends */ unsigned end; }; /** * @param regex The regular expression * @param cflags Flags as described in regex(3) */ PosixRegex(std::string const & regex, int cflags=0) throw(Exception); /** */ ~PosixRegex(); /** @brief Check if text matches, and return the (first) match. * * @param text Text to examine. * @param eflags Flags as described in regex(3). * @returns First match found; if no match, match.matches will be false. */ Match runMatch(std::string const & text, int eflags=0) throw(Exception); /** @brief Check if text matches. * * @param text Text to examine. * @param eflags Flags as described in regex(3). * @returns True if match found; else false. */ bool run(std::string const & text, int eflags=0) throw(Exception); private: regex_t preg_; }; }} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Cap.hpp0000644000000000000000000000013212751117070017370 xustar0030 mtime=1470406200.111952115 30 atime=1470498009.742218123 30 ctime=1470503616.018342917 ui-utilcpp-1.8.5/src/ui-utilcpp/Cap.hpp0000644000175000017500000000202412751117070020537 0ustar00absurdabsurd00000000000000/** * @file */ #ifndef UI_UTIL_CAP_HPP #define UI_UTIL_CAP_HPP // STDC++ #include // POSIX C #ifdef __linux__ #include #endif namespace UI { namespace Util { /** @brief C++ encapsulation for libcap's 'cap_t'. */ class Cap { private: #ifdef __linux__ cap_t cap_; #endif public: enum InitType { Proc_, Clear_ }; /** @brief Construct from process state, or cleared with proc=false. */ Cap(InitType const & initType=Proc_); /** @brief Construct from textual representation (see man cap_from_text(3)). */ Cap(std::string const & s, InitType const & initType=Proc_); Cap(Cap const & cap); ~Cap(); Cap & apply(); #ifdef HAVE_CAP_COMPARE bool operator==(Cap const & cap) const; #endif /** @brief Get textual representation (see man cap_to_text(3)). */ std::string const get() const; }; /** @brief Helper to enable effective capabilities safely for a scope. */ class CapScope { private: std::string const capabilities_; public: CapScope(std::string const & capabilities); ~CapScope(); }; }} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/auto_ptr_compat.hpp0000644000000000000000000000013112751404322022063 xustar0029 mtime=1470499026.58537852 30 atime=1470499026.613377982 30 ctime=1470503616.018342917 ui-utilcpp-1.8.5/src/ui-utilcpp/auto_ptr_compat.hpp0000644000175000017500000000120012751404322023226 0ustar00absurdabsurd00000000000000/** * @file * @brief auto_ptr compat * * - C++14 deprecates 'auto_ptr' in favor of 'unique_ptr' [and gcc6 does ugly warnings]. * - std::unique_ptr is available since C++11, so we use it then. * - While compat is still needed, use 'UI::Util::auto_ptr' in-code. * - When removing this compat, just bulk-replace 'UI::Util::auto_ptr' with 'std::unique_ptr' in-code. */ #ifndef UI_UTIL_AUTO_PTR_COMPAT_HPP #define UI_UTIL_AUTO_PTR_COMPAT_HPP // STDC++ #include namespace UI { namespace Util { #if __cplusplus >= 201103L template using auto_ptr = std::unique_ptr; #else using std::auto_ptr; #endif }} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/File.cpp0000644000000000000000000000013212751117070017537 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.862884788 30 ctime=1470503616.022342841 ui-utilcpp-1.8.5/src/ui-utilcpp/File.cpp0000644000175000017500000001457312751117070020722 0ustar00absurdabsurd00000000000000#include "config.h" // Implementation #include "File.hpp" // STDC++ #include #include #include // Local #include "Text.hpp" namespace UI { namespace Util { std::string getenv(std::string const & name) { char const * const env(Sys::getenv(name.c_str())); return env ? env : EmptyString_; } std::string guessConfFile(std::string const & id, std::string const & suffix) { #ifdef WIN32 return "./" + id + suffix; #else return (Sys::geteuid() == 0 ? "/etc/" : getenv("HOME") + "/.") + id + suffix; #endif } std::string PIDFile::guess(std::string const & id) { return (Sys::geteuid() == 0 ? "/var/run/" : getenv("HOME") + "/.") + id + ".pid"; } PIDFile::PIDFile(std::string const & path, pid_t const & pid, bool const & keepExisting, mode_t const & perms) :path_(path) { #ifndef WIN32 if (keepExisting && fileExists(path)) { UI_THROW("Won't write to existing PID file: " + path); } std::ofstream f(path_.c_str(), std::ios::out | std::ios::trunc); if (!f.is_open()) { UI_THROW_ERRNO("Error opening pid file: " + path_ + ": "); } // Set hardcoded unix permissions (stdc++ can't do it) Sys::chmod(path_.c_str(), perms); f << pid << std::endl; if (f.fail()) { UI_THROW_ERRNO("Error writing to pid file: " + path_ + ": "); } #endif } PIDFile::~PIDFile() { #ifndef WIN32 try { Sys::unlink(path_.c_str()); } catch(...) {} #endif } AutoRemoveFile::AutoRemoveFile(std::string const & path) :path_(path) {} AutoRemoveFile::~AutoRemoveFile() { try { Sys::remove(path_.c_str()); } catch(...) {} } std::string const & AutoRemoveFile::operator()() const { return path_; } CFileStream::CFileStream(std::string const & file, std::string const & mode) :file_(Sys::fopen(file.c_str(), mode.c_str())) {} CFileStream::~CFileStream() { try { Sys::fclose(file_); } catch(...) {} } FILE * CFileStream::get() const { return file_; } void fileCopy(std::string const & src, std::string const & dest) { CFileStream srcFile(src, "rb"); CFileStream destFile(dest, "wb"); char buffer[4096]; int bytesRead(0); while ((bytesRead = fread(buffer, sizeof(char), sizeof(buffer), srcFile.get())) > 0) { fwrite(buffer, sizeof(char), bytesRead, destFile.get()); } } bool fileExists(std::string const & fName) { #ifdef WIN32 return FALSE == PathFileExists(fName.c_str()) ? false : true; #else try { struct stat fStat; Sys::stat(fName.c_str(), &fStat); return true; } catch (Sys::Exception const &) { return false; } #endif } time_t fileModificationTime(std::string const & path) { try { struct stat st; Sys::stat(path.c_str(), &st); return st.st_mtime; } catch (Sys::Exception const &) { return -1; } } void FileDescriptor::fdClose(int const & fd, std::string const &, bool const & doClose) { if (doClose) { try { Sys::close(fd); } catch(...) {}; } } FileDescriptor::FileDescriptor(int fd, bool closeFd) { init(fd, closeFd); } FileDescriptor::~FileDescriptor() { fdClose(fd_, "FileDescriptor", closeFd_); } std::streamsize FileDescriptor::read(void * const buf, std::streamsize count) { try { return static_cast(Sys::read(fd_, buf, count)); } catch(std::exception const & e) { UI_THROW_CODE(ReadErr_, "Error reading from fd " + tos(getFd()) + ": " + e.what()); } } std::streamsize FileDescriptor::write(void const * const buf, std::streamsize count) { try { return static_cast(Sys::write(fd_, buf, count)); } catch(std::exception const & e) { UI_THROW_CODE(WriteErr_, "Error writing to fd " + tos(getFd()) + ": " + e.what()); } } int FileDescriptor::getFd() const { return fd_; } void FileDescriptor::init(int fd, bool closeFd) { fd_ = fd; closeFd_ = closeFd; } File::File(std::string const & name, int flags, mode_t mode, bool closeFd) :name_(name) { int fd(Sys::open(name_.c_str(), flags, mode)); init(fd, closeFd); } File::File(int fd, bool closeFd) :FileDescriptor(fd, closeFd) {} std::string const & File::getName() const { return name_; } #ifndef WIN32 PosixFileMutex::PosixFileMutex(std::string const & lockFile) :File(lockFile) {} PosixFileMutex::PosixFileMutex(int fd) :File(fd) {} bool PosixFileMutex::setPosixLock(int type, bool wait) { struct flock lock; std::memset(&lock, 0, sizeof(lock)); lock.l_type = type; lock.l_start = 0; lock.l_whence = SEEK_SET; lock.l_len = 0; lock.l_pid = Sys::getpid(); int cmd(wait ? F_SETLKW : F_SETLK); try { return Sys::fcntl(fd_, cmd, &lock) == 0; } catch (...) { return false; } } bool PosixFileMutex::tryEnterMutex() throw() { return setPosixLock(F_WRLCK, false); } void PosixFileMutex::enterMutex() { if (!setPosixLock(F_WRLCK, true)) { UI_THROW_CODE_ERRNO(LockErr_, "Error locking posix file mutex on " + getName() + ": "); } } void PosixFileMutex::leaveMutex() { if (!setPosixLock(F_UNLCK, false)) { UI_THROW_CODE_ERRNO(UnlockErr_, "Error unlocking posix file mutex on \"" + getName() + "\": "); } } BSDFileMutex::BSDFileMutex(std::string const & lockFile) :File(lockFile) {} BSDFileMutex::BSDFileMutex(int fd) :File(fd) {} bool BSDFileMutex::tryEnterMutex() throw() { try { return Sys::flock(fd_, LOCK_EX | LOCK_NB) == 0; } catch (...) { return false; } } void BSDFileMutex::enterMutex() { Sys::flock(fd_, LOCK_EX); } void BSDFileMutex::leaveMutex() { Sys::flock(fd_, LOCK_UN); } #endif uint64_t FsInfo::calc(long double const & value) const { return uint64_t(value * bSize_ / 1024); } FsInfo::FsInfo(std::string const & dev, std::string const & file) { #ifdef WIN32 __int64 i64FreeBytesToCaller = 0; __int64 i64TotalBytes = 0; __int64 i64FreeBytes = 0; if (GetDiskFreeSpaceEx(dev.c_str(), (PULARGE_INTEGER)&i64FreeBytesToCaller, (PULARGE_INTEGER)&i64TotalBytes,(PULARGE_INTEGER)&i64FreeBytes)) { bSize_ = 1; bTotal_ = static_cast(i64TotalBytes); bAvail_ = static_cast(i64FreeBytesToCaller); bFree_ = static_cast(i64FreeBytes); } else { UI_THROW("Cannot get disk usage for device/file on device=" + dev + "/" + file); } #else // dev is not used for unix; this line avoids a compiler warning only. if (dev.empty()) {}; struct statvfs stat; Sys::statvfs(file.c_str(), &stat); bSize_=stat.f_bsize; bTotal_=stat.f_blocks; bAvail_=stat.f_bavail; bFree_=stat.f_bfree; #endif } uint64_t FsInfo::getTotal() const { return calc(bTotal_); } uint64_t FsInfo::getAvail() const { return calc(bAvail_); } uint64_t FsInfo::getFree() const { return calc(bFree_); } uint64_t FsInfo::getUsed() const { return calc(bTotal_-bFree_); } }} ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/CharsetMagic.hpp0000644000000000000000000000013212751117070021217 xustar0030 mtime=1470406200.111952115 30 atime=1470498397.862884788 30 ctime=1470503616.010343068 ui-utilcpp-1.8.5/src/ui-utilcpp/CharsetMagic.hpp0000644000175000017500000000076212751117070022375 0ustar00absurdabsurd00000000000000/** * @file */ #ifndef UI_UTIL_CHARSETMAGIC_HPP #define UI_UTIL_CHARSETMAGIC_HPP // STDC++ #include namespace UI { namespace Util { namespace CharsetMagic { /** @name Guess encoding of data in buffer using len sample size. * * If no encoding could be guessed, this returns an empty string. * @{ */ std::string guess(char const * const buf, size_t const & len); std::string guess(std::string const & buf, std::string::size_type const & len=std::string::npos); /** @} */ }}} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/GetOpt.cpp0000644000000000000000000000013212751117070020062 xustar0030 mtime=1470406200.115952021 30 atime=1470498397.862884788 30 ctime=1470503616.026342765 ui-utilcpp-1.8.5/src/ui-utilcpp/GetOpt.cpp0000644000175000017500000001421712751117070021240 0ustar00absurdabsurd00000000000000// Local configuration #include "config.h" // Implementation #include "GetOpt.hpp" // STDC++ #include #include #include // C++ Libraries #include namespace UI { namespace Util { // // CLOption // CLOption::CLOption(std::string const & nameLong, char nameShort, std::string const & doc, std::string const & defaultArg) :nameLong_(nameLong) ,nameShort_(nameShort) ,doc_(doc) ,isGiven_(false) ,arg_("") ,defaultArg_(defaultArg) {} CLOption::~CLOption() {} std::string CLOption::getNameLong() const { return nameLong_; } char CLOption::getNameShort() const { return nameShort_; } std::string CLOption::getDoc() const { return doc_; } bool CLOption::isGiven() const { return isGiven_; } std::string CLOption::getArg() const { return isGiven() ? arg_ : defaultArg_; } option * CLOption::getCOptLong(option * opt) const { assert(opt); // Generate a GNU C long option from values. Compare "getopt.h". opt->name = nameLong_.c_str(); opt->has_arg = 0; // No args opt->flag = 0; // This is evil, we do not use it opt->val = nameShort_; return opt; } std::string CLOption::getCOptShort() const { std::string res (1, nameShort_); return res; } void CLOption::printUsage() const { std::cout << "--" << nameLong_ << ", -" << nameShort_ << std::endl; std::cout << " " << doc_ << std::endl; } void CLOption::setGiven(std::string const & arg) { isGiven_ = true; arg_ = arg; } //////////////////////////////////////////////////////////////////////// // CLOptionArg Declarations // CLOptionArg::CLOptionArg(std::string const & nameLong, char nameShort, std::string const & doc, std::string const & defaultArg) :CLOption(nameLong, nameShort, doc, defaultArg) {} std::string CLOptionArg::getCOptShort() const { std::string res (1, getNameShort()); return res + ":"; } option * CLOptionArg::getCOptLong (option * opt) const { assert(opt); CLOption::getCOptLong (opt); opt->has_arg = 1; // Argument is mandatory return opt; } void CLOptionArg::printUsage() const { std::cout << "--" << getNameLong() << "=, -" << getNameShort() << ""; if (!defaultArg_.empty()) { std::cout << " :: defaults to \"" << defaultArg_ << "\"" << std::endl; } else { std::cout << std::endl; } std::cout << " " << getDoc() << std::endl; } //////////////////////////////////////////////////////////////////////// // CLOptionOptArg Declarations // CLOptionOptArg::CLOptionOptArg(std::string const & nameLong, char nameShort, std::string const & doc, std::string const & defaultArg) :CLOption(nameLong, nameShort, doc, defaultArg) {} std::string CLOptionOptArg::getCOptShort() const { std::string res (1, getNameShort()); return res + "::"; } option * CLOptionOptArg::getCOptLong (option * opt) const { assert (opt); CLOption::getCOptLong(opt); opt->has_arg = 2; // Argument is optional return opt; } void CLOptionOptArg::printUsage() const { std::cout << "--" << getNameLong() << "[=], -" << getNameShort() << "[]"; if (!defaultArg_.empty()) { std::cout << " :: defaults to \"" << defaultArg_ << "\"" << std::endl; } else { std::cout << std::endl; } std::cout << " " << getDoc() << std::endl; } //////////////////////////////////////////////////////////////////////// // GetOpt Declarations // GetOpt::GetOpt(int argc, char * const * const argv) :argc_(argc) ,argv_(argv) ,isValid_(false) ,isParsed_(false) {} GetOpt::~GetOpt() { UI::Util::delAnySeqContainer(opts_); } GetOpt & GetOpt::set(std::string const & nameLong, char nameShort, Type type, std::string const & doc, std::string const & defaultArg) { assert(!isParsed_); CLOption * newOpt = 0; switch(type) { case NoArg_: newOpt = new CLOption(nameLong, nameShort, doc, defaultArg); break; case OptArg_: newOpt = new CLOptionOptArg(nameLong, nameShort, doc, defaultArg); break; case Arg_: newOpt = new CLOptionArg(nameLong, nameShort, doc, defaultArg); break; } assert(newOpt); opts_.push_back(newOpt); return *this; } CLOption * GetOpt::get(char nameShort) { if (! isParsed_) { parse(); } CLOption * result = 0; for (std::vector < CLOption * >::iterator i=opts_.begin(); i != opts_.end(); i++) { CLOption *co = *i; if (co->getNameShort() == nameShort) { result = co; continue; } } assert(result); return result; } CLOption * GetOpt::get(std::string const & nameLong) { if (!isParsed_) { parse(); } CLOption * result = 0; for (std::vector < CLOption * >::iterator i=opts_.begin(); i != opts_.end(); i++) { CLOption *co = *i; if (co->getNameLong() == nameLong) { result = co; continue; } } assert(result); return result; } void GetOpt::parse() { isParsed_ = true; isValid_ = true; // Generate long and short opts as needed by getopt_long(3) const int s(opts_.size() + 1); std::vector gnucLongOpts(s); std::string gnucShortOpts; unsigned int j(0); for (std::vector ::const_iterator i(opts_.begin()); i != opts_.end(); i++) { assert(j < opts_.size()); // Longopts CLOption *co = *i; co->getCOptLong(&gnucLongOpts[j]); // ShortOpts gnucShortOpts += co->getCOptShort(); ++j; }; // Finish gnuc long opts with end struct const struct option endOpt = { 0, 0, 0, 0 }; gnucLongOpts[j] = endOpt; // This Loop will parse arguments, and set option objects accordingly int opt; int option_index; while ((opt = getopt_long (argc_, argv_, gnucShortOpts.c_str(), (struct option *) &gnucLongOpts[0], &option_index)) != -1) { if (opt == '?') { isValid_ = false; } else { for (std::vector < CLOption * >::iterator i = opts_.begin(); i != opts_.end(); i++) { CLOption *co = *i; if (co->getNameShort() == opt) { co->setGiven (std::string(optarg == 0 ? "" : optarg)); } } } } } bool GetOpt::isValid() { if (!isParsed_) { parse(); } return isValid_; } int GetOpt::wrongUsage(std::string const & reason, std::string const & title) const { std::cerr << "\nWrong usage: " << reason << "." << std::endl; printUsage(title); return 1; } void GetOpt::printUsage(std::string const & title) const { std::cout << title; std::for_each(opts_.begin(), opts_.end(), std::mem_fun(&CLOption::printUsage)); } }} ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Makefile.in0000644000000000000000000000013212751415267020232 xustar0030 mtime=1470503607.286507474 30 atime=1470503613.562389201 30 ctime=1470503616.018342917 ui-utilcpp-1.8.5/src/ui-utilcpp/Makefile.in0000644000175000017500000006641212751415267021414 0ustar00absurdabsurd00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/ui-utilcpp 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) DIST_COMMON = $(srcdir)/Makefile.am $(inc_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/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)" "$(DESTDIR)$(incdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libui_utilcpp_la_DEPENDENCIES = http/libui-utilcpp-http.la \ $(am__DEPENDENCIES_1) am_libui_utilcpp_la_OBJECTS = CmdLine.lo Exception.lo Sys.lo File.lo \ Socket.lo GetOpt.lo Misc.lo QuotaInfo.lo Recoder.lo \ CharsetMagic.lo SysLogMono.lo Text.lo PosixRegex.lo Thread.lo \ Time.lo Cap.lo libui_utilcpp_la_OBJECTS = $(am_libui_utilcpp_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 = libui_utilcpp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(libui_utilcpp_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)/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 = $(libui_utilcpp_la_SOURCES) DIST_SOURCES = $(libui_utilcpp_la_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 HEADERS = $(inc_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ 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) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp 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@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCGNU2_CONFIG = @CCGNU2_CONFIG@ CFLAGS = @CFLAGS@ 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@ EXTLIBS = @EXTLIBS@ FGREP = @FGREP@ GNULIBS = @GNULIBS@ 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_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OST_CXXX2_FLAGS = @OST_CXXX2_FLAGS@ OST_CXXX2_LIBS = @OST_CXXX2_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@ PERL = @PERL@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SINGLE_FLAGS = @SINGLE_FLAGS@ SINGLE_LIBS = @SINGLE_LIBS@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ UI_UTILCPP_CXXFLAGS = @UI_UTILCPP_CXXFLAGS@ 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@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I$(top_srcdir)/src AM_CXXFLAGS = -Wall -pthread $(OST_CXXX2_FLAGS) $(UI_UTILCPP_CXXFLAGS) SUBDIRS = http EXTRA_DIST = ascmagic.c incdir = $(includedir)/$(PACKAGE) inc_HEADERS = \ CmdLine.hpp \ Exception.hpp \ Sys.hpp \ File.hpp \ Socket.hpp \ GetOpt.hpp \ Misc.hpp \ QuotaInfo.hpp \ Recoder.hpp \ CharsetMagic.hpp \ SMLog.hpp SMLogMono.hpp SysLogMono.hpp \ Text.hpp \ PosixRegex.hpp \ Thread.hpp \ Time.hpp \ Cap.hpp \ \ Http.hpp Shortcuts.hpp \ \ auto_ptr_compat.hpp lib_LTLIBRARIES = libui-utilcpp.la libui_utilcpp_la_SOURCES = \ CmdLine.cpp \ Exception.cpp \ Sys.cpp \ File.cpp \ Socket.cpp \ GetOpt.cpp \ Misc.cpp \ QuotaInfo.cpp \ Recoder.cpp \ CharsetMagic.cpp \ SysLogMono.cpp \ Text.cpp \ PosixRegex.cpp \ Thread.cpp \ Time.cpp \ Cap.cpp libui_utilcpp_la_LIBADD = http/libui-utilcpp-http.la $(OST_CXXX2_LIBS) -lpthread -lrpcsvc libui_utilcpp_la_LDFLAGS = -version-info @SO_VERSION@ all: all-recursive .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 src/ui-utilcpp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/ui-utilcpp/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}; \ } libui-utilcpp.la: $(libui_utilcpp_la_OBJECTS) $(libui_utilcpp_la_DEPENDENCIES) $(EXTRA_libui_utilcpp_la_DEPENDENCIES) $(AM_V_CXXLD)$(libui_utilcpp_la_LINK) -rpath $(libdir) $(libui_utilcpp_la_OBJECTS) $(libui_utilcpp_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Cap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CharsetMagic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CmdLine.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)/GetOpt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PosixRegex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QuotaInfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Recoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Socket.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Sys.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SysLogMono.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Text.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Time.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 install-incHEADERS: $(inc_HEADERS) @$(NORMAL_INSTALL) @list='$(inc_HEADERS)'; test -n "$(incdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(incdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(incdir)" || 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)$(incdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(incdir)" || exit $$?; \ done uninstall-incHEADERS: @$(NORMAL_UNINSTALL) @list='$(inc_HEADERS)'; test -n "$(incdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(incdir)'; $(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" 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 $(LTLIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(incdir)"; 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-incHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES 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 -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-incHEADERS uninstall-libLTLIBRARIES .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-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-incHEADERS 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 installdirs-am \ 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-incHEADERS uninstall-libLTLIBRARIES .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Sys.hpp0000644000000000000000000000013212751117070017443 xustar0030 mtime=1470406200.115952021 30 atime=1470498378.623248189 30 ctime=1470503616.006343143 ui-utilcpp-1.8.5/src/ui-utilcpp/Sys.hpp0000644000175000017500000001764412751117070020630 0ustar00absurdabsurd00000000000000/** * @file */ #ifndef UI_UTIL_SYS_HPP #define UI_UTIL_SYS_HPP // STDC++ #include #include // POSIX C #include #include #ifdef __linux__ #include #include #include #endif #ifdef WIN32 #include #include "win32/UID.h" // Get PATH_MAX per magic for WIN32 #if !defined( PATH_MAX ) #include #define PATH_MAX MAX_PATH #endif #if !defined( ssize_t ) typedef int ssize_t; #endif #if !defined( mode_t ) typedef unsigned int mode_t; #endif #if !defined( socklen_t ) typedef int socklen_t; #endif #if !defined( pid_t ) typedef int pid_t; #endif #if !defined( caddr_t ) typedef char* caddr_t; #endif #include #else #include #include // BSD type locking #endif #ifndef WIN32 #include #include #else // dummy passwd struct *UNTESTED COMPAT FOR WIN32* struct passwd {}; struct group {}; #endif #ifndef WIN32 // System C: Resources #include // System C: gettimeofday et.al #include #endif // System C: Sockets #ifdef WIN32 #define SD_RECEIVE 0x00 #define SD_SEND 0x01 #define SD_BOTH 0x02 #else #include #include #include #include #include // BSD sockets #include #endif // System libraries #include // C++ libraries #include namespace UI { namespace Util { /** @brief Namespace for system/library calls. * * @section Sys_Purpose Purpose * * - Error handling via exceptions (so no if-err-then-throw-style code needs to be repeated). * - Automatically produce readable error strings from "errno" value in exception strings. * - Transport a copy of the "errno" value up in exception object for detailed error handling if needed. * - Configuration for different systems (linux,win32; ideally, there should be no ifdefs needed but in Sys.?pp). * * If you use a call that matches any of the points above, please include a wrapper here. * * @section Sys_Example Example usage * * Call any of the wrapper somewhere in your code: @verbatim ... myStr = getPath(); UI::Util::Sys::remove(myStr); // as usual, assume success ... @endverbatim * * Somewhere in your context-specific exception handler: @verbatim ... catch (UI::Util::Sys::Exception const & e) { std::cerr << "System error : " << e.what() << std::endl; std::cerr << "Errno error code was: " << e.getCode() << std::endl; std::cerr << "Exception debug : " << e.getDebug() << std::endl; } ... @endverbatim * * @section Sys_Dev_Howto How to add wrappers * * - Use syntax & name from the man page. * - If return value is only used for error condition:yes/no: make it return void. * - Just call the system/library function. On error condition (see man * page), use UI_THROW_ERRNO("MY NICE PREFIX") to throw w/ * errno + errno text support in the exception. */ namespace Sys { /** @brief Use this exception class if you want to catch failures on system/library calls. */ class Exception: public UI::Util::Exception { public: Exception(std::string const & what=NoWhatGiven_, std::string const & debug=NoDebugGiven_, int const & errNo=0) :UI::Util::Exception(what, debug, errNo) {} virtual ~Exception() throw() {}; }; #ifdef WIN32 void wsaStartup(); void wsaCleanup(); std::string convertPath(std::string const & path); #endif /** @name Drop-in replacements for system(2) and library(3) calls w/ exception handling on errors. * @{ */ void * calloc(size_t nmemb, size_t size); void * malloc(size_t size); void free(void * ptr); int system(char const * s); char * getenv(char const * name); void realpath(char const * path, char * resolved_path); FILE * fopen(char const * path, char const * mode); FILE * fdopen(int fildes, char const * mode); FILE * freopen(char const * path, char const * mode, FILE * stream); void fclose(FILE * fp); mode_t umask(mode_t mask); void chdir(char const * path); void chown(char const * path, uid_t owner, gid_t group=-1); void chmod(char const * path, mode_t mode); void stat(char const * file_name, struct stat * buf); void fstat(int filedes, struct stat *buf); void lstat(char const * file_name, struct stat * buf); void statvfs(char const * path, struct statvfs * buf); void unlink(char const * pathname); void remove(char const * pathname); void rename(char const * oldpath, char const * newpath); int open(char const * pathname, int flags); int open(char const * pathname, int flags, mode_t mode); void close(int fd); void mkdir(char const * pathname, mode_t mode); void rmdir(char const * pathname); ssize_t write(int fd, void const * buf, size_t count); ssize_t read(int fd, void * buf, size_t count); int dup(int oldfd); int dup2(int oldfd, int newfd); int fcntl(int fd, int cmd, long arg); int fcntl(int fd, int cmd, struct flock * lock); int flock(int fd, int operation); struct passwd * getpwnam(char const * name); struct group * getgrnam(char const * name); #ifndef WIN32 pid_t fork(void); #endif pid_t getpid(); pid_t gettid(); pid_t getppid(); pid_t getpgid(pid_t pid); #ifndef WIN32 pid_t waitpid(pid_t pid, int * status, int options); #endif pid_t setsid(); uid_t getuid(); gid_t getgid(); uid_t geteuid(); gid_t getegid(); void seteuid(uid_t euid); void setegid(gid_t egid); void setuid(uid_t uid); void setgid(gid_t gid); uid_t getfsuid(pid_t const pid=gettid()); gid_t getfsgid(pid_t const pid=gettid()); void setfsuid(uid_t fsuid); void setfsgid(gid_t fsgid); void getrlimit(int resource, struct rlimit * rlim); void getrusage(int who, struct rusage * usage); void setrlimit(int resource, struct rlimit const * rlim); unsigned int sleep(unsigned int seconds); int socket(int domain, int type, int protocol); void getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res); void getnameinfo(const struct sockaddr * sa, socklen_t salen, char * host, size_t hostlen, char * serv, size_t servlen, int flags); std::string getnameinfo(const struct sockaddr * sa, socklen_t salen); void getpeername(int s, struct sockaddr * name, socklen_t * namelen); void getsockname(int s, struct sockaddr * name, socklen_t * namelen); void setsockopt(int s, int level, int optname, void const * optval, socklen_t optlen); void setsockopt_to(int s, int level, int optname, struct timeval const & tv); ssize_t recv(int s, void * buf, size_t len, int flags); ssize_t send(int s, void const * buf, size_t len, int flags); void listen(int s, int backlog); void bind(int sockfd, struct sockaddr * my_addr, socklen_t addrlen); void connect(int sockfd, const struct sockaddr * serv_addr, socklen_t addrlen); int select(int n, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, struct timeval * timeout); void socketpair(int d, int type, int protocol, int sv[2]); void gettimeofday(struct timeval * tv, struct timezone * tz); void settimeofday(struct timeval const * tv , struct timezone const * tz); iconv_t iconv_open(char const * tocode, char const * fromcode); void iconv_close(iconv_t cd); void quotactl(int cmd, char const * special, int id, caddr_t addr); size_t confstr(int name, char * buf, size_t len); /** @brief Loosely like the shell utility "getconf". */ std::string getconf(int id); // POSIX Capapilities #ifdef __linux__ cap_t cap_init(void); void cap_free(void * obj); cap_t cap_dup(cap_t c); cap_t cap_get_proc(void); void cap_set_proc(cap_t c); void cap_clear(cap_t c); #ifdef HAVE_CAP_CLEAR_FLAG void cap_clear_flag(cap_t c, cap_flag_t f); #endif void cap_get_flag(cap_t c, cap_value_t v, cap_flag_t f, cap_flag_value_t *vp); void cap_set_flag(cap_t c, cap_flag_t f, int n, const cap_value_t * va, cap_flag_value_t v); #ifdef HAVE_CAP_COMPARE int cap_compare(cap_t c1, cap_t c2); #endif cap_t cap_from_text(char const * s); char * cap_to_text(cap_t c, ssize_t * l); /** @} */ /** @brief Linux: prctl. */ int prctl(int option, unsigned long arg2=-1, unsigned long arg3=-1, unsigned long arg4=-1, unsigned long arg5=-1); #endif }}} #endif ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Cap.cpp0000644000000000000000000000013112751117070017362 xustar0030 mtime=1470406200.111952115 30 atime=1470498397.862884788 29 ctime=1470503616.03834254 ui-utilcpp-1.8.5/src/ui-utilcpp/Cap.cpp0000644000175000017500000000266112751117070020541 0ustar00absurdabsurd00000000000000#include "config.h" // Implementation #include "Cap.hpp" // Local #include "Sys.hpp" namespace UI { namespace Util { Cap::Cap(InitType const & initType) #ifdef __linux__ :cap_(initType == Clear_ ? Sys::cap_init() : Sys::cap_get_proc()) #endif {} Cap::Cap(std::string const & s, InitType const & initType) #ifdef __linux__ :cap_(Sys::cap_from_text((Cap(initType).get() + " " + s).c_str())) #endif {} Cap::Cap(Cap const & cap) #ifdef __linux__ :cap_(Sys::cap_dup(cap.cap_)) #endif {} Cap::~Cap() { #ifdef __linux__ // Never throw in destructor try { Sys::cap_free(cap_); } catch (...) {} #endif } Cap & Cap::apply() { #ifdef __linux__ Sys::cap_set_proc(cap_); return *this; #else return *this; #endif } #ifdef HAVE_CAP_COMPARE bool Cap::operator==(Cap const & cap) const { return Sys::cap_compare(cap.cap_, cap_) == 0; } #endif std::string const Cap::get() const { #ifdef __linux__ // Helper class needed to ensure exception safety class Helper { public: char * s_; Helper( cap_t c): s_(Sys::cap_to_text(c, 0)) {}; ~Helper() { try { Sys::cap_free(s_); } catch (...) {}; } }; return Helper(cap_).s_; #else return ""; #endif } CapScope::CapScope(std::string const & capabilities) :capabilities_(capabilities) { #ifdef __linux__ Cap(capabilities_ + "+e").apply(); #endif } CapScope::~CapScope() { #ifdef __linux__ // Avoid exception in destructor try { Cap(capabilities_ + "-e").apply(); } catch (...) {}; #endif } }} ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/CmdLine.cpp0000644000000000000000000000013212751117070020173 xustar0030 mtime=1470406200.111952115 30 atime=1470498397.862884788 30 ctime=1470503616.022342841 ui-utilcpp-1.8.5/src/ui-utilcpp/CmdLine.cpp0000644000175000017500000002675412751117070021362 0ustar00absurdabsurd00000000000000// Local configuration #include "config.h" // Implementation #include "CmdLine.hpp" // STDC++ #include #include #include #include // C Libraries #ifndef WIN32 #include #include #endif // Local #include "Sys.hpp" #include "Text.hpp" #include "Misc.hpp" #define UI_UTIL_CMDLINE_SEPLINE0 "======================================================================" #define UI_UTIL_CMDLINE_SEPLINE1 "----------------------------------------------------------------------" namespace UI { namespace Util { namespace CmdLine { Cmd::Cmd(std::string const & name, std::string const & help) :cl_(0) ,name_(name) ,help_(help) ,args_() ,minArgs_(0) ,tokens_() ,isParsed_(false) { assert(name_ != ""); } Cmd::~Cmd() {} std::string Cmd::getName() const { return name_; } void Cmd::addArg(std::string const & name, std::string const & help) { args_.push_back(make_pair(name, help)); minArgs_ = args_.size(); } void Cmd::addOptArg(std::string const & name, std::string const & help) { args_.push_back(make_pair(name, help)); } int Cmd::getMinArgs() const { return minArgs_; } int Cmd::getMaxArgs() const { return args_.size(); } std::string Cmd::getSyntax() const { std::string result(name_); for (int i(0); i < (int) args_.size(); ++i) { result += " " + getArgString(i); } return result; } std::string Cmd::getHelp(bool showArgs) const { std::string result(""); if (name_ == "__header") { result += "\n" + help_ + "\n" + UI_UTIL_CMDLINE_SEPLINE1 + "\n"; } else { result += getSyntax() + "\n " + help_ + ".\n"; if (showArgs) { for (int i(0); i < (int) args_.size(); ++i) { result += " " + getArgString(i) + "\t: " + args_[i].second + ".\n"; } } } return result; } bool Cmd::parse(std::string const & line) { tokens_.clear(); std::string l(line); stripLine(l); while (l.length() != 0) { // Skip leading spaces l.erase(0, l.find_first_not_of(spaces_)); // Get token if (l[0] == '"') { // Argument embraced with " l.erase(0, 1); std::string::size_type p(l.find_first_of('"')); if (p == std::string::npos) { tokens_.push_back('"' + l.substr(0, p)); // unterminated } else { tokens_.push_back(l.substr(0, p)); // terminated ++p; } l.erase(0, p); } else { std::string::size_type p(l.find_first_of(spaces_)); std::string token(l.substr(0, p)); if (token != "") { tokens_.push_back(token); } l.erase(0, p); } } isParsed_ = (tokens_.size() > 0 && tokens_[0] == getName() && (int) tokens_.size() > getMinArgs() && (int) tokens_.size() <= getMaxArgs()+1); return isParsed_; } bool Cmd::isParsed() const { return isParsed_; } std::string Cmd::getArg(int i) const { assert(cl_); assert(isParsed_); assert(i <= getMaxArgs()); if (i < (int) tokens_.size()) { if (tokens_[i].length() > 0 && tokens_[i][0] == '$') { // CLI expansion return cl_->getVar(tokens_[i].substr(1, std::string::npos)); } else { // Straight argument return tokens_[i]; } } else { return ""; // Not given optional argument } } int Cmd::run() { assert(cl_); assert(isParsed_); assert(getArg(0) == getName()); try { return runCmd(); } catch (...) { cl_->es() << "Unknown exception catched when running: " << getName() << "." << std::endl; return 20; } } void Cmd::setCL(CmdLine * cl) { assert(cl); cl_ = cl; } std::string Cmd::getArgString(int i) const { assert(i < (int)args_.size()); std::string result(""); if (i >= minArgs_) { result += "["; } result += "<" + args_[i].first + ">"; if (i >= minArgs_) { result += "]"; } return result; } std::string Cmd::stripLine(std::string const & line) { std::string l(line); l.erase(0, l.find_first_not_of(spaces_)); l.erase(l.find_last_not_of(spaces_)+1, std::string::npos); return l; } std::string Cmd::commandFromLine(std::string const & line) { return stripLine(line).substr(0, line.find_first_of(Cmd::spaces_)); } std::string const Cmd::spaces_(" \t\n\r\f\v"); HeaderCmd::HeaderCmd(std::string const & header) :Cmd("__header", header) {} int HeaderCmd::runCmd() { return 1; } /** @brief Internal command: Exit command line. */ class ExitCmd: public Cmd { public: ExitCmd() :Cmd("exit", "Leave session") {} private: int runCmd() { cl_->setVar("__EXIT", "true"); return 0; } }; /** @brief Internal command: Get help. */ class HelpCmd: public Cmd { public: HelpCmd() :Cmd("help", "Show command help") { addOptArg("command", "Get more help for specific command"); } private: int runCmd() { int result(0); if (getArg(1) == "") { cl_->os() << "\nHelp for " << cl_->getVar("__TITLE") << std::endl; cl_->os() << UI_UTIL_CMDLINE_SEPLINE0 << std::endl; for (std::vector::iterator i(cl_->commands_.begin()); i != cl_->commands_.end(); ++i) { cl_->os() << (*i)->getHelp(false); } cl_->os() << UI_UTIL_CMDLINE_SEPLINE0 << std::endl; } else { Cmd * c(cl_->findCmd(getArg(1))); if (c) { cl_->os() << c->getHelp(true); } else { cl_->es() << "Unknown command: " << getArg(1) << std::endl; result = 1; } } return result; } }; /** @brief Internal command: Set a variable. */ class SetCmd: public Cmd { public: SetCmd() :Cmd("set", "Show or set variables; shows all variables without any argument.\n Use \"set -e\" to enable or \"set +e\" to disable fatal errors, respectively") { addOptArg("name", "Get value for variable "); addOptArg("value", "Set value for variable to "); } private: int runCmd() { if (getArg(1) == "-e") { cl_->setVar("__FATAL", "true"); // like bash's "set -e" } else if (getArg(1) == "+e") { cl_->setVar("__FATAL", "false"); // like bash's "set +e" } else if (getArg(1) == "") { cl_->showVars(); // "set": shows all variables } else if (getArg(2) == "") { // "set ARG1" cl_->showVar(getArg(1)); // "set var": shows var } else { // "set ARG1 ARG2" cl_->setVar(getArg(1), getArg(2)); } return 0; } }; /** @brief Internal command: Source another script. */ class SourceCmd: public Cmd { public: SourceCmd() :Cmd("source", "Source (load and run all lines of) file") { addArg("file", "File to source"); } private: int runCmd() { std::ifstream * f = new std::ifstream(getArg(1).c_str(), std::ios::in); if (f && f->is_open()) { // Avoid leak with this bool flag ;) if (cl_->isNeedsDeletion_) { delete cl_->is_; } cl_->is_ = f; cl_->isNeedsDeletion_ = true; return 0; } else { cl_->es() << "File open error: " << getArg(1) << std::endl; return 1; } } }; /** @brief Internal command: Sleep for n seconds. */ class SleepCmd: public Cmd { public: SleepCmd() :Cmd("sleep", "Delay execution for some time") { addOptArg("seconds", "Seconds to sleep"); } private: int runCmd() { return Sys::sleep(ato(getArg(1))); } }; /** @brief Internal command: Print text. */ class EchoCmd: public Cmd { public: EchoCmd() :Cmd("echo", "Print text to stdout") { addOptArg("text", "Text to print"); } private: int runCmd() { cl_->os() << getArg(1) << std::endl; return 0; } }; CmdLine::CmdLine(std::istream * is, std::ostream * os, std::ostream * es, std::string const & title, std::string const & prompt) :is_(is) ,isNeedsDeletion_(false) ,os_(os) ,es_(es) ,commands_() ,variables_() { assert(os_); assert(es_); // Variables that influence CmdLine's behaviour setVar("__TITLE", title); setVar("__PROMPT", prompt); setVar("__ECHO", "false"); setVar("__LAST_ERROR", "0"); setVar("__ERRORS", "0"); setVar("__FATAL", "false"); setVar("__EXIT", "false"); // Set generic commands add(new HeaderCmd("Generic command line functions")); add(new ExitCmd()); add(new HelpCmd()); add(new SetCmd()); add(new SourceCmd()); add(new SleepCmd()); add(new EchoCmd()); } CmdLine::~CmdLine() { delAnySeqContainer(commands_); } void CmdLine::add(Cmd * cmd) { assert(cmd); commands_.push_back(cmd); cmd->setCL(this); } Cmd * CmdLine::findCmd(std::string const & name) const { for (std::vector::const_iterator i(commands_.begin()); i != commands_.end(); ++i) { if ((*i)->getName() == name) { return *i; } } return 0; } std::ostream & CmdLine::os() { return *os_; } std::ostream & CmdLine::es() { return *es_; } std::string CmdLine::readLine(std::string const & promptVar) { std::string result(""); os() << getVar(promptVar); if (is_) { // Use standard istream char line[320]; is_->getline(line, 320); result = line; } else { // Interactive; use readline/history char * line(::readline("")); if (line) { result = line; std::free(line); Cmd::stripLine(result); if (result != "") { ::add_history(result.c_str()); } } } return result; } std::string CmdLine::getVar(std::string const & key) const { std::map::const_iterator i(variables_.find(key)); if (i == variables_.end()) { return ""; } else { return (*i).second; } } void CmdLine::setVar(std::string const & key, std::string const & value) { std::map::iterator i(variables_.find(key)); if (i == variables_.end()) { std::pair::iterator, bool> result(variables_.insert(std::make_pair(key, value))); assert(result.second); } else { (*i).second = value; } } void CmdLine::showVar(std::map::iterator i) { if (i != variables_.end()) { os() << (*i).first << "=\"" << (*i).second << "\""; } else { os() << "Variable not set."; } os() << std::endl; } void CmdLine::showVar(std::string const & key) { std::map::iterator i(variables_.find(key)); showVar(i); } void CmdLine::showVars() { for (std::map::iterator i(variables_.begin()); i != variables_.end(); ++i) { showVar(i); } } int CmdLine::run() { os() << std::endl << getVar("__TITLE") << std::endl; os() << UI_UTIL_CMDLINE_SEPLINE0 << std::endl; os() << "\nType \"help\" for command overview." << std::endl; while (getVar("__EXIT") != "true") { std::string line(readLine()); if (getVar("__ECHO") == "true") { os() << line << std::endl; } if (line.length() != 0 && line[0] != '#' && line[0] != '\n') // empty lines or comments { setVar("__LAST_ERROR", "0"); // Find command Cmd * cmd(findCmd(Cmd::commandFromLine(line))); if (cmd) { if (cmd->parse(line)) { int exitCode(cmd->run()); if (exitCode != 0) { es() << "Error: \"" << line << "\" failed with exit code " << exitCode << "." << std::endl; setVar("__LAST_ERROR", tos(exitCode)); } } else { // Syntax error os() << "\nParser error in: \"" << line << "\":\n\n"; es() << cmd->getHelp(true) << std::endl; setVar("__LAST_ERROR", "5"); } } else { es() << "Unknown command." << std::endl; setVar("__LAST_ERROR", "10"); } // Error counter if (getVar("__LAST_ERROR") != "0") { setVar("__ERRORS", tos(ato(getVar("__ERRORS"))+1)); } } // Change back to interactive mode if stream is done if (is_ && is_->eof()) { is_ = 0; } if (getVar("__FATAL") == "true" && ato(getVar("__LAST_ERROR")) != 0) { es() << "Exiting on fatal error." << std::endl; setVar("__EXIT", "true"); setVar("__ERRORS", tos(-1 * ato(getVar("__ERRORS")))); } } return ato(getVar("__ERRORS")); } }}} ui-utilcpp-1.8.5/src/ui-utilcpp/PaxHeaders.1390/Text.cpp0000644000000000000000000000013212751403437017611 xustar0030 mtime=1470498591.797755828 30 atime=1470498591.813755519 30 ctime=1470503616.034342615 ui-utilcpp-1.8.5/src/ui-utilcpp/Text.cpp0000644000175000017500000002343012751403437020764 0ustar00absurdabsurd00000000000000#include "config.h" // Implementation #include "Text.hpp" // STDC++ #include #include // C++ libraries #include // Local #include "Time.hpp" #include "Misc.hpp" namespace UI { namespace Util { std::string strVec2Str(StrVec const & strVec, std::string const & sep) { return join(sep, strVec); } std::string strerror(int const & errNo) { std::string result; #ifndef UI_UTILCPP_DISABLE_STRERROR #ifdef WIN32 result = ::strerror(errNo); #else int const bufSize(80); char buf[bufSize]; #ifdef STRERROR_R_CHAR_P // Non-POSIX variant (like GNU libc). See AC_FUNC_STRERROR_R autotool test, and its comments. // This "may or may not use the supplied buffer" [debian sarge dev. does not ]. char * ret(::strerror_r(errNo, buf, bufSize-1)); result = ret ? ret : ""; #else // POSIX variant ::strerror_r(errNo, buf, bufSize-1); result = buf; #endif #endif #endif return result == "" ? "No errno error string available" : result; } std::string getlineCRLF(std::istream & s) { std::string line; if (std::getline(s, line)) { if (line.size() > 0 && *(--line.end()) == '\r') { line.erase(--line.end()); } } return line; } std::string asciiCAPS(std::string const & in, bool const upper) { std::string result; result.resize(in.size()); for (unsigned i(0); i < in.size(); ++i) { result[i] = upper ? static_cast(std::toupper(in[i])) : static_cast(std::tolower(in[i])); } return result; } std::string & str2Ascii(std::string & s) { for (std::string::iterator i(s.begin()); i != s.end(); ++i) { #ifdef WIN32 if (!isascii(*i)) { *i = '?'; } #else if (!::isascii(*i)) { *i = '?'; } #endif } return s; } AlphaNumericKey::AlphaNumericKey() :keyChars_("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") ,engine_(getTimeValUSec()) ,distribution_(0, keyChars_.size()-1) ,generator_(engine_, distribution_) {} std::string AlphaNumericKey::get(int len) { std::string key; key.resize(len); for (int j(0); j < len; j++) { key[j] = keyChars_[generator_()]; } return key; } std::string genAlphaNumericKey(int len) { return GlobalAlphaNumericKey_.get(len); } char * strdup(char const * s) { assert(s); size_t const n(std::strlen(s) + 1); char * const p((char *) std::malloc(n)); if (p) { std::memcpy(p, s, n); } return p; } CStrArray & CStrArray::add(std::string const & str) { assert(!arr_.empty()); // Push back, but before Null-Terminator arr_.insert(arr_.end()-1, strdup(str.c_str())); return *this; } CStrArray::CStrArray() { // Add Null-Terminator arr_.push_back(0); } CStrArray::~CStrArray() { UI::Util::freeAnySeqContainer(arr_); } char const ** CStrArray::get() const { assert(!arr_.empty()); return (char const **) &arr_[0]; } StrVec strtok(std::string const & s, std::string const & delim, std::string const & prefix, std::string const & postfix) { return strtok(s, delim, prefix, postfix); } StrVec strtoks(std::string const & s, std::string const & delims, std::string const & prefix, std::string const & postfix) { return strtoks(s, delims, prefix, postfix); } bool isToken(std::string const & token, StrVec const & tokensVec, int const match) { std::string const ltoken(match == 0 ? token : asciiCAPS(token, match > 0)); for (StrVec::const_iterator i(tokensVec.begin()); i != tokensVec.end(); ++i) { if (*i == ltoken) { return true; }; } return false; } bool isToken(std::string const & token, std::string const & tokens, std::string const & delim, int const match) { StrVec const tokensVec(strtok(tokens, delim)); return isToken(token, tokensVec, match); } std::string & strrpl(std::string & source, std::string const & token, std::string const & reptoken) { assert(!token.empty()); std::string::size_type i(0); while ((i = source.find(token, i)) != std::string::npos) { source.replace(i, token.size(), reptoken); i += reptoken.size(); } return source; } std::string strrpl(std::string const & source, std::string const & token, std::string const & reptoken) { std::string result(source); strrpl(result, token, reptoken); return result; } std::string istream2String(std::istream & f, int const blockSize) { std::string result; std::vector buffer(blockSize); while (!f.eof()) { f.read(&buffer[0], blockSize); result.append(&buffer[0], f.gcount()); } return result; } /* lookup table for base64 characters */ const unsigned char XConversion::alphabet[] = {'A','B','C','D','E','F','G','H','I','J', 'K','L','M','N','O','P','Q','R','S','T', 'U','V','W','X','Y','Z','a','b','c','d', 'e','f','g','h','i','j','k','l','m','n', 'o','p','q','r','s','t','u','v','w','x', 'y','z','0','1','2','3','4','5','6','7', '8','9','+','/','=' }; unsigned char XConversion::codes[256] = ""; void XConversion::codesFill() { int i = 0; for (i=0; i<256; i++) { codes[i] = 0; } for (i = 'A'; i <= 'Z'; i++) { codes[i] = static_cast( i - 'A'); } for (i = 'a'; i <= 'z'; i++) { codes[i] = static_cast(26 + i - 'a'); } for (i = '0'; i <= '9'; i++) { codes[i] = static_cast(52 + i - '0'); } codes[(int) '+'] = 62; codes[(int) '/'] = 63; } std::string XConversion::dec2Basis( int number, const int basis ) { std::string out(""); char digits[16] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; int remainder = 0; if ( basis >= bMin && basis <=bMax ) { do { remainder = number % basis; out = digits[remainder] + out; number = number / basis; } while (number>0); } return out; } int XConversion::getInt( unsigned char hex ) { int ret=0; if ( hex >= 0x41 && hex <= 0x46 ) { // A-F ret = (int)(hex-0x37); } if ( hex >= 0x61 && hex <= 0x66 ) { // a-f ret = (int)(hex-0x57); } if ( hex >= 0x30 && hex <= 0x39 ) { // 1-9 ret = (int)(hex-0x30); } return ret; } int XConversion::basis2Dec( std::string number, int basis ) { int ret = getInt( (unsigned char) number[0] ); for ( unsigned int i=1 ; i XConversion::xorEncrypt(std::string const& message, std::string const& key, int* length) { unsigned char* result=0; int keyLen = key.size(); int messageLen = message.size(); int i=0; int j=0; result=new unsigned char[messageLen]; for ( i=0 ; i=keyLen) j=0; } *length=i; return UI::Util::auto_ptr(result); } std::string XConversion::xorDecrypt(const unsigned char* message, const int length, std::string const& key) { std::stringstream result; int keyLen = key.size(); int messageLen = length; int i=0; int j=0; if ( message ) { for ( i=0 ; i=keyLen) j=0; } } return std::string(result.str()); } std::string XConversion::base64Encode(const unsigned char* message, const int length) { int i = 0; int index = 0; int quad = 0; int trip = 0; int val = 0; char r0, r1, r2, r3 = 0; std::stringstream result; for (i=0, index=0; i>= 6; r2=alphabet[(trip? (val & 0x3F): 64)]; val >>= 6; r1=alphabet[val & 0x3F]; val >>= 6; r0=alphabet[val & 0x3F]; result< XConversion::base64Decode(std::string const& message, int* length) { int ix = 0; int shift = 0; /* # of excess bits stored in accum */ int accum = 0; /* excess bits */ int index = 0; int value = 0; int inLen = message.size(); unsigned char* result= NULL; /* 4 chars decode to 3 bytes and input length is always an even */ codesFill(); /* multiple of 4 characters. */ /* -> output length is ((intput length / 4) *3) - Pads ! */ (*length) = ((inLen) / 4) * 3; if (inLen>0 && message[inLen-1] == '=') (*length)--; /* ignore the Pads */ if (inLen>0 && message[inLen-2] == '=') (*length)--; result = new unsigned char[(*length)]; for (ix=0; ix= 0 ) { /* skip over non-code */ accum <<= 6; /* bits shift up by 6 each time thru */ shift += 6; /* loop, with new bits being put in */ accum |= value; /* at the bottom. */ if ( shift >= 8 ) { /* whenever there are 8 or more shifted in, */ shift -= 8; /* write them out (from the top, leaving any */ result[index++] = /* excess at the bottom for next iteration. */ ((accum >> shift) & 0xff); } } } return UI::Util::auto_ptr(result); } std::string md5sum(std::string const & data) { ost::MD5Digest digest; std::stringstream str; digest << data; str << digest; return str.str(); } }} std::ostream & operator <<(std::ostream & os, UI::Util::StrVec const & sv) { os << UI::Util::join(",", sv); return os; } std::ostream & operator <<(std::ostream & os, UI::Util::StrList const & sl) { os << UI::Util::join(",", sl); return os; } ui-utilcpp-1.8.5/src/PaxHeaders.1390/xfs0000644000000000000000000000013212751415277014616 xustar0030 mtime=1470503615.982343595 30 atime=1470503616.118341032 30 ctime=1470503615.982343595 ui-utilcpp-1.8.5/src/xfs/0000755000175000017500000000000012751415277016044 5ustar00absurdabsurd00000000000000ui-utilcpp-1.8.5/src/xfs/PaxHeaders.1390/swab.h0000644000000000000000000000007412354527746016011 xustar0030 atime=1470498397.862884788 30 ctime=1470503615.982343595 ui-utilcpp-1.8.5/src/xfs/swab.h0000644000175000017500000001057712354527746017167 0ustar00absurdabsurd00000000000000#ifndef SWAB_H #define SWAB_H /* casts are necessary for constants, because we never know how for sure * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way. */ #define ___swab16(x) \ ({ \ __u16 __x = (x); \ ((__u16)( \ (((__u16)(__x) & (__u16)0x00ffU) << 8) | \ (((__u16)(__x) & (__u16)0xff00U) >> 8) )); \ }) #define ___swab32(x) \ ({ \ __u32 __x = (x); \ ((__u32)( \ (((__u32)(__x) & (__u32)0x000000ffUL) << 24) | \ (((__u32)(__x) & (__u32)0x0000ff00UL) << 8) | \ (((__u32)(__x) & (__u32)0x00ff0000UL) >> 8) | \ (((__u32)(__x) & (__u32)0xff000000UL) >> 24) )); \ }) #define ___swab64(x) \ ({ \ __u64 __x = (x); \ ((__u64)( \ (__u64)(((__u64)(__x) & (__u64)0x00000000000000ffULL) << 56) | \ (__u64)(((__u64)(__x) & (__u64)0x000000000000ff00ULL) << 40) | \ (__u64)(((__u64)(__x) & (__u64)0x0000000000ff0000ULL) << 24) | \ (__u64)(((__u64)(__x) & (__u64)0x00000000ff000000ULL) << 8) | \ (__u64)(((__u64)(__x) & (__u64)0x000000ff00000000ULL) >> 8) | \ (__u64)(((__u64)(__x) & (__u64)0x0000ff0000000000ULL) >> 24) | \ (__u64)(((__u64)(__x) & (__u64)0x00ff000000000000ULL) >> 40) | \ (__u64)(((__u64)(__x) & (__u64)0xff00000000000000ULL) >> 56) )); \ }) #define ___constant_swab16(x) \ ((__u16)( \ (((__u16)(x) & (__u16)0x00ffU) << 8) | \ (((__u16)(x) & (__u16)0xff00U) >> 8) )) #define ___constant_swab32(x) \ ((__u32)( \ (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \ (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \ (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \ (((__u32)(x) & (__u32)0xff000000UL) >> 24) )) #define ___constant_swab64(x) \ ((__u64)( \ (__u64)(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \ (__u64)(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \ (__u64)(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \ (__u64)(((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | \ (__u64)(((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | \ (__u64)(((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \ (__u64)(((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \ (__u64)(((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56) )) /* * provide defaults when no architecture-specific optimization is detected */ #ifndef __arch__swab16 # define __arch__swab16(x) ({ __u16 __tmp = (x) ; ___swab16(__tmp); }) #endif #ifndef __arch__swab32 # define __arch__swab32(x) ({ __u32 __tmp = (x) ; ___swab32(__tmp); }) #endif #ifndef __arch__swab64 # define __arch__swab64(x) ({ __u64 __tmp = (x) ; ___swab64(__tmp); }) #endif #ifndef __arch__swab16p # define __arch__swab16p(x) __arch__swab16(*(x)) #endif #ifndef __arch__swab32p # define __arch__swab32p(x) __arch__swab32(*(x)) #endif #ifndef __arch__swab64p # define __arch__swab64p(x) __arch__swab64(*(x)) #endif #ifndef __arch__swab16s # define __arch__swab16s(x) do { *(x) = __arch__swab16p((x)); } while (0) #endif #ifndef __arch__swab32s # define __arch__swab32s(x) do { *(x) = __arch__swab32p((x)); } while (0) #endif #ifndef __arch__swab64s # define __arch__swab64s(x) do { *(x) = __arch__swab64p((x)); } while (0) #endif /* * Allow constant folding */ # define __swab16(x) \ (__builtin_constant_p((__u16)(x)) ? \ ___swab16((x)) : \ __fswab16((x))) # define __swab32(x) \ (__builtin_constant_p((__u32)(x)) ? \ ___swab32((x)) : \ __fswab32((x))) # define __swab64(x) \ (__builtin_constant_p((__u64)(x)) ? \ ___swab64((x)) : \ __fswab64((x))) static __inline__ __const__ __u16 __fswab16(__u16 x) { return (__extension__ __arch__swab16(x)); } static __inline__ __u16 __swab16p(__u16 *x) { return (__extension__ __arch__swab16p(x)); } static __inline__ void __swab16s(__u16 *addr) { (__extension__ ({__arch__swab16s(addr);})); } static __inline__ __const__ __u32 __fswab32(__u32 x) { return (__extension__ __arch__swab32(x)); } static __inline__ __u32 __swab32p(__u32 *x) { return (__extension__ __arch__swab32p(x)); } static __inline__ void __swab32s(__u32 *addr) { (__extension__ ({__arch__swab32s(addr);})); } static __inline__ __const__ __u64 __fswab64(__u64 x) { # ifdef __SWAB_64_THRU_32__ __u32 h = x >> 32; __u32 l = x & ((1ULL<<32)-1); return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h))); # else return (__extension__ __arch__swab64(x)); # endif } static __inline__ __u64 __swab64p(__u64 *x) { return (__extension__ __arch__swab64p(x)); } static __inline__ void __swab64s(__u64 *addr) { (__extension__ ({__arch__swab64s(addr);})); } #endif /* SWAB_H */ ui-utilcpp-1.8.5/src/PaxHeaders.1390/Makefile.in0000644000000000000000000000013212751415267016137 xustar0030 mtime=1470503607.222508681 30 atime=1470503613.542389578 30 ctime=1470503615.982343595 ui-utilcpp-1.8.5/src/Makefile.in0000644000175000017500000004422712751415267017321 0ustar00absurdabsurd00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src 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) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = 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) am__DIST_COMMON = $(srcdir)/Makefile.in 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@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCGNU2_CONFIG = @CCGNU2_CONFIG@ CFLAGS = @CFLAGS@ 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@ EXTLIBS = @EXTLIBS@ FGREP = @FGREP@ GNULIBS = @GNULIBS@ 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_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OST_CXXX2_FLAGS = @OST_CXXX2_FLAGS@ OST_CXXX2_LIBS = @OST_CXXX2_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@ PERL = @PERL@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SINGLE_FLAGS = @SINGLE_FLAGS@ SINGLE_LIBS = @SINGLE_LIBS@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ UI_UTILCPP_CXXFLAGS = @UI_UTILCPP_CXXFLAGS@ 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@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = ui-utilcpp tools EXTRA_DIST = xfs/swab.h 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 src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/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." 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 .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ui-utilcpp-1.8.5/PaxHeaders.1390/Makefile.am0000644000000000000000000000013212751117070015326 xustar0030 mtime=1470406200.111952115 30 atime=1470498360.439591654 30 ctime=1470503615.946344273 ui-utilcpp-1.8.5/Makefile.am0000644000175000017500000000112312751117070016474 0ustar00absurdabsurd00000000000000AUTOMAKE_OPTIONS = 1.9 ACLOCAL_AMFLAGS = SUBDIRS = src doc docdir = $(datadir)/doc/$(PACKAGE) doc_DATA = README NEWS AUTHORS ChangeLog COPYING EXTRA_DIST = .ui-auto.conf .gitignore incdir = $(includedir)/$(PACKAGE) @UI_AUTO_AM@ all-local: ui-auto-all clean-local: ui-auto-clean distclean-local: ui-auto-distclean install-data-local: ui-auto-install-data install-exec-local: ui-auto-install-exec uninstall-local: ui-auto-uninstall dist-hook: ui-auto-dist # "Source lines of code" estimation x-sloc: find src/ \( -name "*.[ch]pp" -o -name "*.[ch]" \) -a ! -wholename "*.svn/*" | xargs wc -l ui-utilcpp-1.8.5/PaxHeaders.1390/config.sub0000644000000000000000000000007412711107577015266 xustar0030 atime=1470503346.483422596 30 ctime=1470503615.958344047 ui-utilcpp-1.8.5/config.sub0000755000175000017500000010647712711107577016454 0ustar00absurdabsurd00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2016 Free Software Foundation, Inc. timestamp='2016-03-30' # 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 . # # 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 to . # # 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 # 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 or ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2016 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* | netbsd*-eabi* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] 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 | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | 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 \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | 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 ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | 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-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | 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-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | 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 ;; asmjs) basic_machine=asmjs-unknown ;; 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 ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; 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=i686-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 ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; 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-*) 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* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ | -onefs* | -tirtos*) # 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 ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -ios) ;; -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 ;; c8051-*) os=-elf ;; 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: ui-utilcpp-1.8.5/PaxHeaders.1390/doc0000644000000000000000000000013212751415300013757 xustar0030 mtime=1470503616.110341183 30 atime=1470503616.118341032 30 ctime=1470503616.110341183 ui-utilcpp-1.8.5/doc/0000755000175000017500000000000012751415300015205 5ustar00absurdabsurd00000000000000ui-utilcpp-1.8.5/doc/PaxHeaders.1390/Makefile.am0000644000000000000000000000007412354527746016116 xustar0030 atime=1470475229.592415427 30 ctime=1470503616.110341183 ui-utilcpp-1.8.5/doc/Makefile.am0000644000175000017500000000016012354527746017257 0ustar00absurdabsurd00000000000000doc_EXTRA_DIST = EXTRA_DIST = $(doc_EXTRA_DIST) docdir = $(datadir)/doc/$(PACKAGE) doc_DATA = $(doc_EXTRA_DIST) ui-utilcpp-1.8.5/doc/PaxHeaders.1390/Makefile.in0000644000000000000000000000013212751415267016115 xustar0030 mtime=1470503607.206508983 30 atime=1470503613.530389804 30 ctime=1470503616.110341183 ui-utilcpp-1.8.5/doc/Makefile.in0000644000175000017500000003411412751415267017271 0ustar00absurdabsurd00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc 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) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = 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)$(docdir)" DATA = $(doc_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCGNU2_CONFIG = @CCGNU2_CONFIG@ CFLAGS = @CFLAGS@ 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@ EXTLIBS = @EXTLIBS@ FGREP = @FGREP@ GNULIBS = @GNULIBS@ 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_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OST_CXXX2_FLAGS = @OST_CXXX2_FLAGS@ OST_CXXX2_LIBS = @OST_CXXX2_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@ PERL = @PERL@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SINGLE_FLAGS = @SINGLE_FLAGS@ SINGLE_LIBS = @SINGLE_LIBS@ SO_VERSION = @SO_VERSION@ STRIP = @STRIP@ UI_UTILCPP_CXXFLAGS = @UI_UTILCPP_CXXFLAGS@ 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 = $(datadir)/doc/$(PACKAGE) dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ doc_EXTRA_DIST = EXTRA_DIST = $(doc_EXTRA_DIST) doc_DATA = $(doc_EXTRA_DIST) 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 doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/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-docDATA: $(doc_DATA) @$(NORMAL_INSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-docDATA: @$(NORMAL_UNINSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: 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 $(DATA) installdirs: for dir in "$(DESTDIR)$(docdir)"; 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." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-docDATA 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-docDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-docDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am 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-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-docDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ui-utilcpp-1.8.5/PaxHeaders.1390/INSTALL0000644000000000000000000000007412657715017014342 xustar0030 atime=1470503346.479422671 30 ctime=1470503615.954344123 ui-utilcpp-1.8.5/INSTALL0000644000175000017500000003661012657715017015514 0ustar00absurdabsurd00000000000000Installation 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 command `./configure && make && make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. 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 `' 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. ui-utilcpp-1.8.5/PaxHeaders.1390/missing0000644000000000000000000000007412657715017014705 xustar0030 atime=1470503346.483422596 30 ctime=1470503615.958344047 ui-utilcpp-1.8.5/missing0000755000175000017500000001533012657715017016056 0ustar00absurdabsurd00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 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 . # 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 ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ui-utilcpp-1.8.5/PaxHeaders.1390/AUTHORS0000644000000000000000000000007412354527746014365 xustar0030 atime=1470498397.862884788 30 ctime=1470503615.950344198 ui-utilcpp-1.8.5/AUTHORS0000644000175000017500000000004512354527746015530 0ustar00absurdabsurd00000000000000United Internet, Karlsruhe, Germany. ui-utilcpp-1.8.5/PaxHeaders.1390/aclocal.m40000644000000000000000000000013112751415266015141 xustar0029 mtime=1470503606.02653122 30 atime=1470503606.106529713 30 ctime=1470503615.946344273 ui-utilcpp-1.8.5/aclocal.m40000644000175000017500000137665412751415266016341 0ustar00absurdabsurd00000000000000# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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-2001, 2003-2015 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) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ]) # serial 58 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.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl 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_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 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 m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then 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 set != "${COLLECT_NAMES+set}"; 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: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _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\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) 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\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) 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 0 = "$lt_write_fail" && 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 ." 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 yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _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 that 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 # Generated automatically by $as_me ($PACKAGE) $VERSION # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in 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 set != "${COLLECT_NAMES+set}"; 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) 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' 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 0 = "$_lt_result"; 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 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 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 yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; 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 yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _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 set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [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 that will find a shell with a builtin # printf (that 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], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; 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* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; 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 yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" 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 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_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 bitrig* | 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" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # 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 yes = "[$]$2"; 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 yes = "[$]$2"; 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; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 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" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do 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 17 != "$i" # 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 yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if 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 yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it 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 ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [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 no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" 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 yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _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 no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $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 no = "$hard_links"; 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 where 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 yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # 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 relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; 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_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics 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 m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; 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` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; 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 AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) 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 ia64 = "$host_cpu"; 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 # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; 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%'\''`; $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$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 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 ;; 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=no 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 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; 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 yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 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 ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_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* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 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 yes = "$with_gnu_ld"; 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=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _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], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_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 that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then 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 no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw 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 yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- 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 # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # 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 ;; 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 | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) 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* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 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 ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _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 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) 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 no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN 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 one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # 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 yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-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 ia64 = "$host_cpu"; 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 if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= 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, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no 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 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _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* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$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 yes = "$pipe_works"; 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_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _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 yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) 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']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; 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 ia64 = "$host_cpu"; 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 ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 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 | 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* | netbsdelf*-gnu) ;; *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 yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) 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']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; 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 ia64 = "$host_cpu"; 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 ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _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 | 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' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _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 that 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 GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; 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 ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ 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 yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # 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 | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 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 ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.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 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, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # 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 linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" 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' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; 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 yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) 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 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** 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 no = "$_LT_TAGVAR(ld_shlibs, $1)"; 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 yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac 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,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` 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 yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # 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,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" 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 yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; 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,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _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 yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_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 yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # 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 yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; 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 no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(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 yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi _LT_TAGVAR(link_all_deplibs, $1)=no else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && 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 ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 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* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; 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 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no 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 shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && 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 yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && 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 yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $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 yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 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 yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(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 yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 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 sni = "$host_vendor"; 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 no = "$_LT_TAGVAR(ld_shlibs, $1)" && 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 yes,yes = "$GCC,$enable_shared"; 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 what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || 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 no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _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 yes != "$_lt_caught_CXX_error"; 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 yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # 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 ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= 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 # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac 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,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` 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 yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # 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,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" 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 yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 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,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; dgux*) case $cc_basename in ec++*) # 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 ;; 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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # 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 yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; 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 yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; 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 yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $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 | 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 yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 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 ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; 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 yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && 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 yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -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 $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 $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -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 CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(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 no = "$_LT_TAGVAR(ld_shlibs, $1)" && 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 yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # 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 x-L = "$p" || test x-R = "$p"; 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 no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 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 no = "$pre_test_object_deps_done"; 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)= ;; 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 no = "$F77"; 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 yes != "$_lt_disable_F77"; 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 no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || 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 yes != "$_lt_disable_F77" 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 no = "$FC"; 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 yes != "$_lt_disable_FC"; 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 no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## 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 yes != "$_lt_disable_FC" 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 set = "${GCJFLAGS+set}" || 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 10 -lt "$lt_ac_count" && 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], [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_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; 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-2009, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _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_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _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_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # 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=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, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 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, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 4179 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.6]) m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software # Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 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])]) dnl Copyright (C) 2000-2003 Open Source Telecom Corporation. dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a configuration dnl script generated by Autoconf, you may include it under the same dnl distribution terms that you use for the rest of that program. dnl OST_CCXX2_VERSION([MINIMUM-VERSION[,ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]]) dnl Test for usable version of CommonC++ AC_DEFUN([OST_CCXX2_DYNLOADER],[ ost_cv_dynloader=`$CCGNU2_CONFIG --dso` if test "$ost_cv_dynloader" = "yes" ; then MODULE_FLAGS=`$CCGNU2_CONFIG --module` AC_SUBST(MODULE_FLAGS) fi ]) AC_DEFUN([OST_CCXX2_LD_THREADING],[ LD_THREADING=`$CCGNU2_CONFIG --cclibs` AC_SUBST(LD_THREADING) ]) AC_DEFUN([OST_CCXX2_VERSION], [ if test -d ${exec_prefix}/bin ; then PATH=${exec_prefix}/bin:$PATH elif test -d ${prefix}/bin ; then PATH=${prefix}/bin:$PATH ; fi AC_PATH_PROG(CCGNU2_CONFIG, ccgnu2-config, no) ccgnu2_version=ifelse([$1], ,0.99.0,$1) AC_MSG_CHECKING(for commoncpp2 version >= $ccgnu2_version) if test "$CCGNU2_CONFIG" = "no" ; then AC_MSG_RESULT(not found) echo "*** The ccgnu2-config script installed by commoncpp2 0.99" echo "*** or later could not be found." echo "*** You need to install GNU Common C++ 2, whose later releases are" echo "*** available from http://www.gnu.org/software/commoncpp/ and any" echo "*** GNU mirror." ifelse([$3], , :, [$3]) exit -1 else config_version=`$CCGNU2_CONFIG --version` ccgnu2_config_major_version=`echo $config_version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` ccgnu2_config_minor_version=`echo $config_version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` ccgnu2_config_micro_version=`echo $config_version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` ccgnu2_check_major_version=`echo "$ccgnu2_version" | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` ccgnu2_check_minor_version=`echo "$ccgnu2_version" | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` ccgnu2_check_micro_version=`echo "$ccgnu2_version" | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` version_ok=no if test $ccgnu2_config_major_version -gt $ccgnu2_check_major_version ; then version_ok=yes elif test $ccgnu2_config_major_version -eq $ccgnu2_check_major_version \ && test $ccgnu2_config_minor_version -gt $ccgnu2_check_minor_version ; then version_ok=yes elif test $ccgnu2_config_major_version -eq $ccgnu2_check_major_version \ && test $ccgnu2_config_minor_version -eq $ccgnu2_check_minor_version \ && test $ccgnu2_config_micro_version -ge $ccgnu2_check_micro_version; then version_ok=yes fi if test "$version_ok" = "no"; then AC_MSG_RESULT(no) ost_cv_ccxx_config=false echo "*** An old version of CommonC++ of $config_version was found." echo "*** You need a version of commoncpp2 newer than $ccgnu2_version. The latest version of" echo "*** CommonC++ is always available from ftp://ftp.gnu.org/gnu/commonc++/." ifelse([$3], , :, [$3]) else AC_MSG_RESULT(yes) ost_cv_ccxx_config=true SINGLE_FLAGS="$CXXFLAGS" SINGLE_LIBS="$LIBS" AC_SUBST(SINGLE_LIBS) AC_SUBST(SINGLE_FLAGS) CXXFLAGS="$CXXFLAGS "`$CCGNU2_CONFIG --flags` GNULIBS="$LIBS "`$CCGNU2_CONFIG --gnulibs` EXTLIBS=`$CCGNU2_CONFIG --extlibs` LIBS="$LIBS `$CCGNU2_CONFIG --stdlibs`" AC_SUBST(GNULIBS) AC_SUBST(EXTLIBS) fi fi ]) AC_DEFUN([OST_CCXX2_CHECK], [ if test -d ${exec_prefix}/bin ; then PATH=${exec_prefix}/bin:$PATH elif test -d ${prefix}/bin ; then PATH=${prefix}/bin:$PATH ; fi AC_PATH_PROG(CCGNU2_CONFIG, ccgnu2-config, no) ccgnu2_version=ifelse([$1], ,0.99.0,$1) AC_MSG_CHECKING(for commoncpp2 version >= $ccgnu2_version) if test "$CCGNU2_CONFIG" = "no" ; then AC_MSG_RESULT(not found) echo "*** The ccgnu2-config script installed by commoncpp2 0.99" echo "*** or later could not be found." echo "*** You need to install GNU Common C++ 2, whose later releases are" echo "*** available from http://www.gnu.org/software/commoncpp/ and any" echo "*** GNU mirror." ifelse([$3], , :, [$3]) exit -1 else config_version=`$CCGNU2_CONFIG --version` ccgnu2_config_major_version=`echo $config_version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` ccgnu2_config_minor_version=`echo $config_version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` ccgnu2_config_micro_version=`echo $config_version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` ccgnu2_check_major_version=`echo "$ccgnu2_version" | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` ccgnu2_check_minor_version=`echo "$ccgnu2_version" | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` ccgnu2_check_micro_version=`echo "$ccgnu2_version" | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` version_ok=no if test $ccgnu2_config_major_version -gt $ccgnu2_check_major_version ; then version_ok=yes elif test $ccgnu2_config_major_version -eq $ccgnu2_check_major_version \ && test $ccgnu2_config_minor_version -gt $ccgnu2_check_minor_version ; then version_ok=yes elif test $ccgnu2_config_major_version -eq $ccgnu2_check_major_version \ && test $ccgnu2_config_minor_version -eq $ccgnu2_check_minor_version \ && test $ccgnu2_config_micro_version -ge $ccgnu2_check_micro_version; then version_ok=yes fi if test "$version_ok" = "no"; then AC_MSG_RESULT(no) ost_cv_ccxx_config=false echo "*** An old version of CommonC++ of $config_version was found." echo "*** You need a version of commoncpp2 newer than $ccgnu2_version. The latest version of" echo "*** CommonC++ is always available from ftp://ftp.gnu.org/gnu/commonc++/." ifelse([$3], , :, [$3]) else AC_MSG_RESULT(yes) ost_cv_ccxx_config=true CCFLAGS2=`$CCGNU2_CONFIG --flags` LDCCGNU2=`$CCGNU2_CONFIG --gnulibs` LDCCEXT2=`$CCGNU2_CONFIG --stdlibs` AC_SUBST(LDCCGNU2) AC_SUBST(LDCCEXT2) AC_SUBST(CCFLAGS2) fi fi ]) AC_DEFUN([OST_CCXX2_FOX],[ AC_LANG_SAVE AC_LANG_CPLUSPLUS ost_cv_lib_fox=false AC_CHECK_HEADERS(fox/fx.h,[ AC_DEFINE(HAVE_FOX_FX_H) ost_cv_lib_fox=true]) AC_LANG_RESTORE ]) dnl OST_CCXX2_XML([ACTION-IF-TRUE[,ACTION-IF-FALSE]]) AC_DEFUN([OST_CCXX2_HOARD],[ AC_ARG_ENABLE(hoard, [--disable-hoard Disable hoard support]) AC_ARG_ENABLE(mpatrol, [--enable-mpatrol Enable mpatrol debugging]) if test "$enable_mpatrol" = "yes" ; then LIBS="$LIBS -lmpatrolmt -lbfd -liberty" elif test "$enable_hoard" != "no" ; then AC_CHECK_LIB(hoard, free, [LIBS="$LIBS -lhoard"]) fi ]) AC_DEFUN([OST_CCXX2_XML], [ AC_MSG_CHECKING(for commoncpp2 xml parsing) AC_LANG_PUSH(C++) AC_REQUIRE_CPP AC_TRY_RUN([ #include #ifndef COMMON_XML_PARSING #error "" #endif int main() { return 0; } ], ost_cv_ccxx_xml=yes, ost_cv_ccxx_xml=no) AC_LANG_POP(C++) if test "x$ost_cv_ccxx_xml" = "xyes" ; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_OST_CCXX2_XML_PARSING, 1, [Define this if the CommonC++ library was compiled with XML parsing support]) ifelse([$1], , :, [$1]) else AC_MSG_RESULT(no) ifelse([$2], , :, [$2]) fi ]) dnl ACCONFIG TEMPLATE dnl #undef CCXX_CONFIG_H_ dnl #undef HAVE_FOX_FX_H dnl END ACCONFIG dnl Initialize an ui-auto project dnl dnl Usage: dnl UI_INIT(SOURCE_FILE, [SO_VERSION=], [TOOLDIR=src/tools], [INCDIR=src/PACKAGE], [AUTOMAKE_OPTS=]) dnl dnl SOURCE_FILE (mandatory) See AC_CONFIG_SRCDIR. dnl SO_VERSION (optional) Give SO version (libtool style: e.g. 2:4:0) if needed. dnl TOOLDIR (sane default) UI-automagic script PACKAGE-version will be created in that directory. dnl INCDIR (sane default) UI-automagic header version.h will be created in that directory. dnl AUTOMAKE_OPTS (optional) Options to AM_INIT_AUTOMAKE. dnl AC_DEFUN([UI_INIT], [ dnl dnl Generic autoconf/automake stuff dnl AC_PREREQ(2.58) AC_CONFIG_SRCDIR($1) AM_INIT_AUTOMAKE($5) dnl dnl Basic initializations dnl if test -z "${PACKAGE_VERSION}"; then AC_MSG_ERROR([[Cant continue: PACKAGE_VERSION missing.]]) fi SO_VERSION=$2 AC_SUBST(SO_VERSION) TOOLDIR=$3 if test -z "${TOOLDIR}"; then TOOLDIR="src/tools" fi INCDIR=$4 if test -z "${INCDIR}"; then INCDIR="src/${PACKAGE_NAME}" fi dnl dnl Initialize ui-auto.am dnl UI_AUTO_AM="ui-auto.am" rm -v -f "${UI_AUTO_AM}" AC_SUBST_FILE(UI_AUTO_AM) UI_ADD_AM([ # These are the generic ui-auto rules rules (add these to your Makefile.am appropriately to *-local targets). .PHONY: ui-auto-all ui-auto-clean ui-auto-dist ui-auto-distclean ui-auto-install-data ui-auto-install-exec ui-auto-uninstall ui-auto-am-clean: rm -f "${UI_AUTO_AM}" .PHONY: ui-auto-am-clean # Set dependencies for generic rules ui-auto-distclean: ui-auto-am-clean ]) dnl dnl PACKAGE-version script (mandatory) dnl S_NAME="${PACKAGE_NAME}-version" S_PATH="${TOOLDIR}/${S_NAME}" V_MAJOR=`echo ${PACKAGE_VERSION} | cut -d'.' -f1` V_MINOR=`echo ${PACKAGE_VERSION} | cut -d'.' -f2` V_PATCH=`echo ${PACKAGE_VERSION} | cut -d'.' -f3` mkdir -p `dirname "${S_PATH}"` cat <"${S_PATH}" #!/bin/sh -e echo "UI_PACKAGE=\"${PACKAGE_NAME}\"" echo "UI_VERSION=\"${PACKAGE_VERSION}\"" echo "UI_VERSION_MAJOR=\"${V_MAJOR}\"" echo "UI_VERSION_MINOR=\"${V_MINOR}\"" echo "UI_VERSION_PATCH=\"${V_PATCH}\"" EOF if test -n "${SO_VERSION}"; then LV_IF=`echo ${SO_VERSION} | cut -d':' -f1` LV_REV=`echo ${SO_VERSION} | cut -d':' -f2` LV_AGE=`echo ${SO_VERSION} | cut -d':' -f3` LV_MAJOR=$[[LV_IF - LV_AGE]] LV_MINOR=${LV_AGE} LV_PATCH=${LV_REV} SO_VERSION_SYS="${LV_MAJOR}.${LV_MINOR}.${LV_PATCH}" cat <>"${S_PATH}" echo "UI_SO_VERSION=\"${SO_VERSION_SYS}\"" echo "UI_SO_VERSION_MAJOR=\"${LV_MAJOR}\"" echo "UI_SO_VERSION_MINOR=\"${LV_MINOR}\"" echo "UI_SO_VERSION_PATCH=\"${LV_PATCH}\"" EOF fi chmod +x "${S_PATH}" dnl Man page for version script S_NAME_CAP=`echo "${S_NAME}" | tr "[[:lower:]]" "[[:upper:]]"` cat <"${S_PATH}.1" .TH ${S_NAME_CAP} "1" .SH NAME ${S_NAME} \- Print parsable version information for development package ${PACKAGE_NAME}. .SH SYNOPSIS .PP .B ${S_NAME} .SH DESCRIPTION .PP Prints version information for installed development package ${PACKAGE_NAME} in a parsable way. This is intended to be used by automatic version checks of build systems. .SH AUTHOR EOF if test -n "${SOURCE_DATE_EPOCH}"; then \ echo "Produced automatically by ui-auto for ${PACKAGE_NAME} on `date --utc --rfc-822 --date="@${SOURCE_DATE_EPOCH}"`." >>${S_PATH}.1 else \ echo "Produced automatically by ui-auto for ${PACKAGE_NAME} on `date --rfc-822`." >>${S_PATH}.1 fi dnl Automake rules for installation && distclean UI_ADD_AM([ ui-version-script-install: install -d -m755 \"\$(DESTDIR)\$(bindir)\" install -m755 \"${S_PATH}\" \"\$(DESTDIR)\$(bindir)\" install -d -m755 \"\$(DESTDIR)\$(mandir)/man1\" install -m644 \"${S_PATH}.1\" \"\$(DESTDIR)\$(mandir)/man1\" ui-version-script-uninstall: rm -f \"\$(DESTDIR)\$(bindir)/${S_NAME}\" \"\$(DESTDIR)\$(mandir)/man1/${S_NAME}.1\" ui-version-script-clean: rm -f "${S_PATH}" "${S_PATH}.1" .PHONY: ui-version-script-install ui-version-script-uninstall ui-version-script-clean # Set dependencies for generic rules ui-auto-distclean: ui-version-script-clean ui-auto-install-exec: ui-version-script-install ui-auto-uninstall: ui-version-script-uninstall ]) dnl dnl version.h include (only when lib) dnl if test -n "${SO_VERSION}"; then I_NAME="version.h" I_PATH="${INCDIR}/${I_NAME}" HEADER_NAME=`echo "${PACKAGE_NAME}" | tr - _ | tr [a-z] [A-Z]` mkdir -p `dirname "${I_PATH}"` cat <"${I_PATH}" #ifndef ${HEADER_NAME}_VERSION_H #define ${HEADER_NAME}_VERSION_H /** @{ @brief ui-auto'mated version macros. */ #define ${HEADER_NAME}_VERSION "${PACKAGE_VERSION}" #define ${HEADER_NAME}_VERSION_MAJOR ${V_MAJOR} #define ${HEADER_NAME}_VERSION_MINOR ${V_MINOR} #define ${HEADER_NAME}_VERSION_PATCH ${V_PATCH} /** @} */ /** @{ @brief ui-auto'mated library version support. */ #define ${HEADER_NAME}_LIBVERSION "${SO_VERSION_SYS}" #define ${HEADER_NAME}_LIBVERSION_MAJOR ${LV_MAJOR} #define ${HEADER_NAME}_LIBVERSION_MINOR ${LV_MINOR} #define ${HEADER_NAME}_LIBVERSION_PATCH ${LV_PATCH} /** @} */ #endif EOF dnl Automake rules for installation && distclean UI_ADD_AM([ ui-version-header-install: install -d -m755 \"\$(DESTDIR)\$(incdir)\" install -m644 \"${I_PATH}\" \"\$(DESTDIR)\$(incdir)\" ui-version-header-uninstall: rm -f \"\$(DESTDIR)\$(incdir)/${I_NAME}\" ui-version-header-clean: rm -f "${I_PATH}" .PHONY: ui-version-header-install ui-version-header-uninstall ui-version-header-clean # Set dependencies for generic rules ui-auto-distclean: ui-version-header-clean ui-auto-install-exec: ui-version-header-install ui-auto-uninstall: ui-version-header-uninstall ]) fi ]) dnl Check for ui-auto enabled project. dnl dnl Usage: dnl UI_CHECK(key, package, MAJOR,MINOR,PATCH, LMAJOR,LMINOR,LPATCH) dnl dnl key unique key for this test dnl package package name (script name searched for is PACKAGE-version) dnl MAJOR (optional) required major version number of library dnl MINOR (optional) required minor version number of library dnl PATCH (optional) required patchlevel of library dnl LMAJOR (optional) required major version number of library interface dnl LMINOR (optional) required minor version number of library interface dnl LPATCH (optional) required patchlevel of library interface dnl dnl All version numbers default to 0 if not specified. dnl AC_DEFUN([UI_CHECK], [ ifelse($3, , MAJOR=0, MAJOR=$3) ifelse($4, , MINOR=0, MINOR=$4) ifelse($5, , PATCH=0, PATCH=$5) ifelse($6, , LMAJOR=0, LMAJOR=$6) ifelse($7, , LMINOR=0, LMINOR=$7) ifelse($8, , LPATCH=0, LPATCH=$8) dnl Check and evaluate version script AC_PATH_PROG([$1], [$2-version]) test x"$[$1]" = x && AC_MSG_ERROR([$2-version not found in PATH]) dnl Reset variables UI_PACKAGE="" UI_VERSION="" UI_VERSION_MAJOR="" UI_VERSION_MINOR="" UI_VERSION_PATCH="" UI_SO_VERSION="" UI_SO_VERSION_MAJOR="" UI_SO_VERSION_MINOR="" UI_SO_VERSION_PATCH="" dnl Set variables from PACKAGE-version script eval `[$2-version]` dnl Sanity check test x"${UI_PACKAGE}" = x[$2] || AC_MSG_ERROR([$2-version found in PATH seems corrupt; from old unstable ui-auto version? ]) dnl Check package version AC_MSG_CHECKING([package $2, version ${MAJOR}.${MINOR}.${PATCH} or later]) for TYPE in MAJOR MINOR PATCH; do INSTALLED_VERSION="UI_VERSION_${TYPE}" NEEDED_VERSION="${TYPE}" if test ${!INSTALLED_VERSION} -lt ${!NEEDED_VERSION}; then AC_MSG_ERROR([${UI_VERSION} is too old.]) elif test ${!INSTALLED_VERSION} -gt ${!NEEDED_VERSION}; then break fi done AC_MSG_RESULT([yes (version ${UI_VERSION})]) dnl Check library version if test -n "${UI_SO_VERSION}"; then AC_MSG_CHECKING([library from ${UI_PACKAGE}, version ${LMAJOR}.${LMINOR}.${LPATCH} or later]) for TYPE in MAJOR MINOR PATCH; do INSTALLED_VERSION="UI_SO_VERSION_${TYPE}" NEEDED_VERSION="L${TYPE}" if test ${!INSTALLED_VERSION} -lt ${!NEEDED_VERSION}; then AC_MSG_ERROR([${UI_SO_VERSION} is too old.]) elif test ${!INSTALLED_VERSION} -gt ${!NEEDED_VERSION}; then break fi done AC_MSG_RESULT([yes (lib version ${UI_SO_VERSION})]) fi ]) dnl UI common autotools helper macros dnl UI_MSG_MISSING(VALUE, WHAT [,"warn"]) dnl dnl If VALUE is empty or "no, exit with error message that suport dnl for WHAT is missing, or continue with a warning if "warn" is given. AC_DEFUN([UI_MSG_MISSING], [ if test x"[$1]" = "x" -o x"[$1]" = "xno"; then if test x"[$3]" = "xwarn"; then AC_MSG_WARN([Missing support for: $2.]) else AC_MSG_ERROR([Missing support for: $2.]) fi fi ]) dnl Simplified and enhanced version of AC_PATH_PROG dnl dnl UI_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, "warn"]) dnl dnl Check for program with AC_PATH_PROG. If program is not found, exit with dnl error unless "warn" option is given. dnl AC_DEFUN([UI_PATH_PROG], [ AC_PATH_PROG([$1], [$2]) UI_MSG_MISSING([$$1], [Program $2], [$3]) ]) dnl Echo to file dnl dnl UI_PRINT_FILE(FILENAME, TEXT) AC_DEFUN([UI_PRINT_FILE], [ echo -n "$2" >"$1" ]) dnl Add automake source dnl dnl UI_ADD_AM(makefile code) AC_DEFUN([UI_ADD_AM], [ echo -n "$1" >>"ui-auto.am" ]) dnl ui-auto check for C++ compilers dnl dnl Calls AC_PROG_CXX, and then checks for some compilers/versions we must not use. dnl dnl UI_ADD_AM(makefile code) AC_DEFUN([UI_PROG_CXX], [ AC_PROG_CXX if test "x$GXX" = "xyes"; then if ${CXX} --version | grep "2\.9[[]0123456789[]]\..*"; then AC_MSG_ERROR([We cannot use g++-2.9*; pls use at least g++-3.0.]) fi fi ]) # Clean distribution dir from "well-known" cruft. # # Usage configure.ac: UI_DISTDIR_CRUFT # Usage Makefile.am : dist-hook: ui-auto-dist AC_DEFUN([UI_DISTDIR_CRUFT], [ UI_ADD_AM([ ui-distdir-cruft: test ! -z \$(distdir) rm -rf \`find \$(distdir) -type d -name "CVS" -o -name ".svn" -o -name ".git"\` rm -f \`find \$(distdir) -type f -name ".cvsignore" -or -name CVSDUMMY -or -name '*~' -or -name '#*#' -or -name '.#*'\` .PHONY: ui-distdir-cruft # Set dependencies for generic rules ui-auto-dist: ui-distdir-cruft ]) ]) AC_DEFUN([UI_DOXYGEN], [ AC_ARG_ENABLE(ui-doxygen,[ --disable-ui-doxygen Disable generation of doxygen documentation.], [ UI_DOXYGEN_ENABLED="${enableval}" ]) UI_DOXYGEN_TARGETS='def html latex man rtf xml' if test "$UI_DOXYGEN_ENABLED" = "no"; then UI_DOXYGEN_MAKE="mkdir autodoc && for d in ${UI_DOXYGEN_TARGETS}; do echo 'Doxygen documentation was disabled by configure option.' >autodoc/\$\${d}; done" else UI_PATH_PROG(DOXYGEN, doxygen) UI_PATH_PROG(PERL, perl) UI_DOXYGEN_MAKE='$(DOXYGEN) Doxyfile' fi UI_ADD_AM([ ui-doxygen: rm -rf autodoc && ${UI_DOXYGEN_MAKE} touch ui-doxygen ui-doxygen-clean: rm -rf autodoc ui-doxygen ui-doxygen-install: ui-doxygen install -d \$(DESTDIR)\$(docdir) && \ chmod -R u=rwx,g=rx,o=rx \$(DESTDIR)\$(docdir) && \ for d in ${UI_DOXYGEN_TARGETS}; do \ cp -a autodoc/\$\${d} \$(DESTDIR)\$(docdir) 2>/dev/null || true ; \ done ui-doxygen-uninstall: for d in ${UI_DOXYGEN_TARGETS}; do \ chmod -R u+wx \$(DESTDIR)\$(docdir)/\$\${d} 2>/dev/null || true ; \ rm -rf \$(DESTDIR)\$(docdir)/\$\${d}; \ done .PHONY: ui-doxygen-clean ui-doxygen-install ui-doxygen-uninstall ui-auto-all: ui-doxygen ui-auto-clean: ui-doxygen-clean ui-auto-install-data: ui-doxygen-install ui-auto-uninstall: ui-doxygen-uninstall ]) ]) # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # 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.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15], [], [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.15])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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # 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], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # 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: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([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 # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_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 ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _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])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # 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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_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-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_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 /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 ui-utilcpp-1.8.5/PaxHeaders.1390/ChangeLog0000644000000000000000000000013212751415244015050 xustar0030 mtime=1470503588.674858226 30 atime=1470503588.730857171 30 ctime=1470503615.954344123 ui-utilcpp-1.8.5/ChangeLog0000644000175000017500000110205012751415244016220 0ustar00absurdabsurd000000000000002016-08-06 Stephan Sürken [ui-auto-release run by absurd@weslok.olx.intra]: News for 1.8.5. configure.ac: Prepare 1.8.5. 2016-08-06 Stephan Sürken tools/GetOpt.cpp: Don't print build time in getopt example. With -Wdate-time, this warns about it might not be reproducible code. While that is not quite true anymore (gcc nowadays honors SOURCE_DATE_EPOCH for this), it might still be a problem for older gcc or other compilers. It also does not make so much sense anyway in the example for '--version'. 2016-08-06 Stephan Sürken Add 'ui-utilcpp/auto_ptr_compat.hpp': "Reimplementing" auto_ptr compat (fixes include of ui-utilcpp/Text.hpp). As this is partly needed in include files/API, local "config.h" will not work. Having an actual include will also make this (re-)usable in other projects. auto_ptr compat: To be on the safe side, use namespace UI::Util (not UI). 2016-08-05 Stephan Sürken [ui-auto-release run by absurd@weslok.olx.intra]: ChangeLog updated from version control. [ui-auto-release run by absurd@weslok.olx.intra]: News for 1.8.4. configure.ac: Prepare 1.8.4. .ui-auto.conf: Fix for hellfield using '~SID' version appendix. This also removes old commented config for good. Use 'unique_ptr' instead of 'auto_ptr' when using C++11 or better. Please also see the comments in ./configure.ac; we currently stay compatible with non-C++11 compiles. 2014-08-01 Stephan Sürken README: Add note about LFS. 2014-07-20 Stephan Sürken [ui-auto-release run by absurd@weslok.olx.intra]: ChangeLog updated from version control. [ui-auto-release run by absurd@weslok.olx.intra]: News for 1.8.3. configure.ac: Prepare 1.8.3. .ui-auto.conf: Debian connector: Clean up, and add alternative. 2014-07-17 Stephan Sürken UnitTests: Don't run test that requires a running HTTPD on localhost:80 by default. .ui-auto.conf: Fix Debian VC location (connect with packaging on alioth). 2014-07-08 Stephan Sürken configure.ac: Add AC_SYS_LARGEFILE (adds large FS support for FsInfo). This also adds some FsInfo code to the quota test tool example. src/tools/Cap.cpp: Improve code to avoid warning with '-D_FORTIFY_SOURCE=2'. 2014-07-07 Stephan Sürken README: Update, add a short desc for all sets. [ui-auto-release run by absurd@weslok.olx.intra]: Updated from version control. [ui-auto-release run by absurd@weslok.olx.intra]: News for 1.8.2. configure.ac: Prepare 1.8.2. PosixRegex::runMatch: Bugfix: Use correct pmatch index (0 not 1); fixes begin,end values in Match. This also adds a UnitTests for this case, and it fixes a gcc warning (which led me there in the first place). 2014-07-02 Stephan Sürken Makefile.am: Add '.gitignore' to dist This does not exactly feel like the right thing to do, but it has practical advantages: you don't have to newly maintain upstream's .gitignore when you hold it in another git repo later for distro-packaging (like git-buildpackage...). 2014-07-01 Stephan Sürken Add proper .gitignore. Doxyfile.in: Update to doxygen-1.8.7. Switch license to LGPLv3, and update README. .ui-auto.conf: Adapt for move to SF. 2013-05-07 pvoipdev [ui-auto-release run by autuse@volvic.schlund.de]: Updated from version control. git-svn-id: https://svn.1and1.org/svn/ssr/branches/ui-utilcpp/UI_UTILCPP_1_8_PATCHES@88315 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release run by autuse@volvic.schlund.de]: News for 1.8.1. git-svn-id: https://svn.1and1.org/svn/ssr/branches/ui-utilcpp/UI_UTILCPP_1_8_PATCHES@88314 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2013-05-07 srken * configure.ac: Prepare 1.8.1 git-svn-id: https://svn.1and1.org/svn/ssr/branches/ui-utilcpp/UI_UTILCPP_1_8_PATCHES@88313 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Socket::getId: Catch std::exception, not Exception (this method should never fail/raise Exception). (cherry picked from commit 6267022c2165bb5fe9c0b2f914617a044d5bf7d6) git-svn-id: https://svn.1and1.org/svn/ssr/branches/ui-utilcpp/UI_UTILCPP_1_8_PATCHES@88311 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2012-05-08 srken .ui-auto.conf: Update stable branch to new stable Debian branch. git-svn-id: https://svn.1and1.org/svn/ssr/branches/ui-utilcpp/UI_UTILCPP_1_8_PATCHES@86331 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2012-05-07 srken argl: Never commit release tarballs. (cherry picked from commit e47f895fc156aeba4f39b2441a4c1f9db35936be) git-svn-id: https://svn.1and1.org/svn/ssr/branches/ui-utilcpp/UI_UTILCPP_1_8_PATCHES@86321 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2012-05-07 autuse [ui-auto-release run by autuse@volvic.schlund.de]: Branch forking at 1.8.0 git-svn-id: https://svn.1and1.org/svn/ssr/branches/ui-utilcpp/UI_UTILCPP_1_8_PATCHES@86319 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release run by autuse@volvic.schlund.de]: Updated from version control. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@86317 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release run by autuse@volvic.schlund.de]: News for 1.8.0. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@86316 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release run by autuse@volvic.schlund.de]: Updated from version control. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@86315 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release run by autuse@volvic.schlund.de]: News for 1.8.0. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@86314 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2012-05-07 srken NEWS: Update again. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@86313 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2012-05-07 srken Revert ".ui-auto.conf: Only build for squeeze." This reverts commit 793cf6cc29079b7fe5fc9ac264f0b60d12563fd1. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@86307 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2012-05-07 srken .ui-auto.conf: Only build for squeeze. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@86299 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f .ui-auto.conf: Update to new svn URL (TECITO 1544i). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@86298 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Prepare release notes for 1.8.0 git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@86289 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Prepare stable release 1.8.0 (library main version 9). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@86288 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f ui-auto: Add Eduard && Patrick to release notify (for the Win port). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@86287 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2012-04-10 srken Remove all vc-proprietary $Id$ tags from source. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@86008 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2012-04-10 srken Doxygen: Eliminate new warning with Caps.?pp. Doxygen docs are nore warning-free for doxygen 1.7.6.1. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@86003 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2012-04-10 srken Doxygen: Update config to 1.7.6.1. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@86002 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2012-04-10 srken Remove helper tools for already removed code: ContainerUnitTests, HelperUnitTests. These would only still compile by accident if the old headers could still be found on the system. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@86001 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2012-04-10 srken c++: Fix last three compiler warnings. ui-utilcpp is now checked against g++-4.7 to be warning-free against '-Wall -Wextra -pedantic'. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@86000 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2012-04-10 srken INetSocket: Disable default copy constructor. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@85999 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f svn-ignore: Add *-cap tool utility. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@85998 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2012-04-04 ewetzel WSAStartup and WSACleanup added git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@85972 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2012-04-03 srken Sockets: Support IPv6 for class INetSocket. This API-transparently adds support for IPv6 for the class INetSocket, and updates to the more generic getaddrinfo() and getnameinfo() function family (obsoleting quite some code). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@85966 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2012-04-03 srken Sys: Add system wrappers for ::getaddrinfo and ::getnameinfo. These are needed for the IPv6 support for sockets; this also improves the exception error strings for Sys::connect() and Sys::bind(). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@85965 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2012-02-15 srken Add source lines of code estimation. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@85540 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2011-01-31 slinder fixed: removed exceptions that were thrown in Windows build; that led to unsalvagable db files git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@81845 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2011-01-17 srken Removing helper and container ("Nico Cache") from build system (now in apache 2 common code). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@81696 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Move docroot cache helpers to apache2 common code. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@81695 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Move docroot cache helpers to apache2 common code. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@81694 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-12-22 srken configure.ac: Update to a new developemnt version to avoid confusion. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@81616 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f .ui-auto.conf: Update to build for sid/squeeze by default. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@81614 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-10-27 slinder fixed: yet another quota issue; forgot to divide by blocksize, so the value was to big for unsigned long git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@81089 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-10-26 slinder changed: making compilable after merging code to TINC 2.01 fixed: W2k8 quota issue if there is NO quota git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@81074 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-09-17 srken [ui-auto-release run by absurd@manwe.use.schlund.de]: Updated from version control. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@80823 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release run by absurd@manwe.use.schlund.de]: News for 1.6.0. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@80822 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f configure.ac: Prepare release 1.6.0. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@80821 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-09-02 slinder fixed: quota git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@80723 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-09-01 slinder SL: fixed: Quota/W2k8 git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@80710 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-08-05 srken * src/ui-utilcpp/Sys: getenv(3): Fix: On error, throw (don't return null pointer). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@80517 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-06-25 srken * src/ui-utilcpp/Sys: Add support for linux' gettid(), and use that as default for 'fsuid' calls. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@80005 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * src/ui-utilcpp/Sys.cpp: Fix: Should not use ERRNO here. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@80004 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-06-23 srken * src/ui-utilcpp/Sys: Fix throws to use ui-utilcpp convention. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79994 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * src/ui-utilcpp/Sys.cpp: setfsuid: Fix check for error using new getfsuid|gid methods. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79987 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * src/ui-utilcpp/Sys.cpp: Cosmetic: Adapt exception texts for ui-utilcpp wording. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79986 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-06-23 srken * src/ui-utilcpp/Sys: getfsgid must be implemented the hard way, parsing procfs. Just the same as for getfsuid; this adds a generic helper function that can be used for both. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79985 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-06-23 srken * src/ui-utilcpp/Sys: getfsuid must be implemented the hard way, parsing procfs. This adds two impls: via libproc (preferred, but cant be used due to memory leaks; enabled via --enable-libproc), and a home made specialised parser (default). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79984 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-06-23 srken * configure.ac: Add --enable-libproc: Optionally use libproc. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79983 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-06-16 srken * src/ui-utilcpp/Sys: getfsuid(): Workaround: Unlike described in the man page, result may be -1 sometimes; use geteuid() then. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79928 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-06-14 srken * src/ui-utilcpp/Sys.cpp: Add support for "pseudo" calls getfsuid() and getfsgid(). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79892 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * src/ui-utilcpp/Sys.hpp: chown: default 2nd arg to -1. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79891 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-06-11 srken * src/ui-utilcpp/GetOpt: Doxygen fix. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79878 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * src/ui-utilcpp/Sys: Fix three exception error strings. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79877 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-06-10 srken src/ui-utilcpp/GetOpt: Add support for default argument values. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79868 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-06-09 srken src/ui-utilcpp/Sys.cpp: Add support for setfsuid and setfsgid linux calls. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79824 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Connection: Add simpleHttpRequest method. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79823 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Socket: Add shutdown() method. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79822 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-04-20 srken * .ui-auto.conf: Hmm, skipping squeeze for now. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79377 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * .ui-auto.conf: Manual support for squeeze (ui-auto template hasn't yet). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79372 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * .ui-auto.conf: Change Debian target dist to squeeze, with backports to lenny and etch. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79363 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-04-19 srken docs: Fix some doxygen warnings. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79344 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f typo fix in dox docs. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79343 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Capabilties: Add example program. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79342 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Capabilities: Compatibility for libcap1 (Debian etch). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79341 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Capabilities: Add scope capabilities helper class CapScope. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79340 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Add new header/class "Cap": Abstraction class for posix capabilities. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79339 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Sys: Add C++ system wrappers for (nearly) all libcap library calls (linux only) git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79338 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Sys: Add wrapper support for prctl (linux only). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79337 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix ignore (used old "sp" prefix). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@79335 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-03-18 srken QuotaInfo: Fix class variable order which leads to gcc compile errors with -pedantic. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@78621 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-03-15 slinder SL added: Quota for W2k8 git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@78536 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2010-03-12 srken Sys: Add getgrnam(3) c++ wrapper. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@78516 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-11-30 slinder fixed: Win2k8 support git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@76407 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-10-15 srken Half reverting/fixing change for a a VC++ warning In WIN32 code, arg "file" is not used, but in linux code; i.e., we need it, so it is put back in. To avoid warnings, "file" is now used in the exception string in WIN32 code. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@75381 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-10-15 srken Changing prefix "_" for POSIX calls back to non-prefixed. Visual C++ compiler warns on POSIX calls (though it supports them), stating "_" would be ISO C++ compliant. However, this is just an arbitrary renaming by VisualC++ for implementation-dependent functions, and there are no such names for gcc. To simplify porting, we just use the standard POSIX names, and suppress the warnings. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@75380 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-10-15 slinder Disabled another warning. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@75378 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-10-15 slinder Lots of clean up. changed: raised to warning level 4 removed: lots of warnings removed: #ifdef WIN32 where I could added: #pragma warning disable where necessary git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@75377 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-10-13 slinder fixed: make compilable for Win32 removed: some compiler warnings git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@75354 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-10-12 srken Code cleanup: Fix possible warnings (envp not used). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@75299 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-09-28 srken RealTime: When normalizing negative values, silently set to 0 instead of throwing exception We are not imposing an exception here as this might happen with a diff (s1-s0) when the system time has changed between the two stamps (administrator, ntp, etc...). This quite legal action should not lead to an exception (and thusly impose complicated error handling on the caller's side). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@74912 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-07-29 srken add NEWS entry for Simon's uid bug fix. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@73976 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-07-24 slinder fixed: UID was 1000 which it cannot be (always 0 for Windows) git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@73942 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-06-18 srken - use the new template for Debian config - build for lenny, bp for etch. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@73693 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Debian config: "Default template" for ui packages. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@73682 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-06-16 srken add missing NEWS skel for 1.5.0. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@73669 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-03-30 srken fix revapx. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72886 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-03-27 srken build stable snapshots to experimental. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72861 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Bump versions to new unstable. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72854 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72843 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release run by absurd@manwe.use.schlund.de]: News update. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72842 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f update news to new recommended lline length 64. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72841 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f prep stable 1.4.0: Dump version (1.4.0), so main version to 5. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72840 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-03-20 srken orig auto commit settings. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72779 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-03-06 srken cosmetic: use gtpgod(0) here. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72594 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-02-18 slinder fixed: compiler error for W2k8 git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72386 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-02-17 srken * Update tar format to tar-pax. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72380 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Update .ui-auto.conf. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72362 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-02-06 slinder fixed: didn't compile for Windows git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72208 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-02-05 srken some output cosmetics. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72190 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Update .ui-auto.conf for autotmatic debian release. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72189 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f typo fix. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72179 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - Change internal code so taht methods tried depend on fs type. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72178 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f add rpcsvc to library dependency. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72177 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f fix up informational output. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72173 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f select methods depending on fs. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72172 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f fix ols description. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72171 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f yet anotzher note. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72170 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f add warninga about potential not-thread safe file2fs. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72169 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - New class FQuotaInfo that uses the above tool automatically. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72167 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f qzuota: add preferred method function. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72160 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Use map, not vector, for methods. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72156 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f also write available methods. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72155 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-02-04 srken seems we only have user quota for rpc. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72153 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f rm debug output. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72152 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f niver ouztput order. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72151 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f fix docygen docs. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72150 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f FIX: any exception should mark the method "not working", not just Sys::. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72149 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix the used block size in constant. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72148 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - Add new class FS (dev+fstype instead of dev only) to construct QuotaInfo (API extension, old code using QuotaInfo is compatible but need to be recompiled). - Add helper function file2fs to generate an FS (dev+fstype) from any file on that fs. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72144 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f fix: all linked programs need dep in rpcsvc. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72141 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * QuotaInfo: Add method for quota via rpc (for nfs). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@72138 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2009-01-19 srken [ui-auto-release (1.3.3) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71875 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release (1.3.3) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71874 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f prep 1.3.3 git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71873 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-12-19 slinder added: boost 1.35 support git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71790 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-12-15 srken - ContainerUnitTests: Uninitialized variable. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71756 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f ignore makefiel.in s. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71755 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - add new NEWS skeleton - PosixRegexx: Fix Subclass not initialized warning. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71754 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f ignore new version man page. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71753 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f cosmetic: white space fix. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71752 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-12-01 srken [ui-auto-release (1.3.2) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71635 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release (1.3.2) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71634 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release (1.3.2) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71633 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f ignore proteties: Laso ignore tar.gz.sig files. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71632 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Bump library version for 0.3.2. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71631 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix: Makefile.in's must not be in svn. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71630 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Update doxygen config for doxygen 1.5.6 (fixing some warnings). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71625 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-11-28 srken fix ignore prpoerties. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71618 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * CmdLine: Fix a g++ warning (use std::string::size_type). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71617 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-11-21 slinder added: support for W2k8 git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71541 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-11-20 slinder fixed: compiler error in WIN32 git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71531 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-10-07 nsiomos * Added documentation for cache_map and the functions in Helper namespace * Added a unit test for the functions in Helper namespace * modified Helper::to_time_t to return 0 if its given ptime value is special git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@71069 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-09-25 nsiomos [ui-auto-release (1.3.1) run by user@]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@70971 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release (1.3.1) run by user@]. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@70970 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Fixed atime setting with calls using iterator ranges * Set library version to 4:0:0 git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@70969 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f corrected header guards for ui-nite tests git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@70967 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-09-23 nsiomos [ui-auto-release (1.3.0) run by user@]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@70938 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release (1.3.0) run by user@]. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@70937 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f z git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@70936 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release (1.3.0) run by user@]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@70934 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release (1.3.0) run by user@]. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@70933 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Introduced namespaces "Container" and "Helper" * Added hash container Container::cache_map which is particular useful for cache entries * Added several boost-related helper hunctions in helper/Boost.hpp git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@70932 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-07-02 srken * Bug fix: Http::Connection: Protect constructors against exceptions (potential missing data/fd removal on failing connects). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@68852 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-06-19 srken Dump version to unstable. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@68439 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release (1.2.0) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@68433 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release (1.2.0) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@68432 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f release 1.2. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@68431 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f prepare 1.2. * Dump library main version to 3 (stable). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@68429 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-03-27 vgrecescu removed auto-running of tests on the build machine git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@66397 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-03-18 vgrecescu update visual studio projects git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@66084 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-02-14 srken Fix: Use the new-style https:// svn urls. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@64593 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-01-22 vgrecescu visual studio 9.0 project files git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@63518 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-01-10 srken * sp2ui: Fix: Also update macros SP_THROW to UI_THROW. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62649 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-01-08 srken [ui-auto-release (1.1.40) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62491 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release (1.1.40) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62490 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f prepare release 40. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62489 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * README/AUTHORS updates: - SP->UI fixes. - Temp. 1.2 todo section: remove hints to very old (fixed) bugs - mv old SPRelease explanation to ui-auto. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62488 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f also fix all warnings w/ new g++ 4.3. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62486 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Tested against upcoming g++-3.4 and fixed all compile errors due to missing includes. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62484 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * boost test: Boost 34 deprecated some parts of API; updated to a variant that works for both, 33 and 34. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62482 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-01-07 srken cosmetics: urls w/o trailing "/". git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62449 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release (1.1.39) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62433 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [ui-auto-release (1.1.39) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62432 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f prep 1.1.39. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62431 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f fix help/description. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62406 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f cosmetic: fix tempioryr file name. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62393 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f sp2ui must be in extra_dist; fixing distcheck. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62389 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-01-04 srken sp->ui: Completed, add some notes to NEWS. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62331 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f sp->ui: Fix ignore settings. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62330 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f sp->ui: Fix ignore settings. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62329 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f cvs->svn: Remove obsolete cvsignore files. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62328 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f sp->ui: Automatically update ourselves via ui-utilcpp-sp2ui tool. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62327 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f sp->ui: sp2ui tool: fix sp2ui file exception. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62326 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f sp->ui: Add sp2ui tool, analogous to the ui-auto-sp2ui tool. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62325 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f sp->ui: Change file names. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62318 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f sp->ui: Change file names. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62317 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Update vc location. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62316 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Update NEWS. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62315 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-01-04 srken win32 iconv change: - Add NEWS note: iconvctl() support (sloppy) for non-linux systems (using GNU libiconv). - Fix linux compilation: Don't use iconvctl on linux (it's non-standard and in GNU libiconv only). git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62312 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2008-01-04 srken sp->ui: Automatic changes from ui-auto-sp2ui. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62306 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f sp->ui: Automatic changes from ui-auto-sp2ui. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@62305 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-12-13 vgrecescu IConvConverter 'sloppy mode' git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@61693 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-11-26 ldumitrescu update win32 project files git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@61066 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-11-13 srken Moving project sp-utilcpp to correct location after cvs import. git-svn-id: https://svn.1and1.org/svn/ssr/trunk/ui-utilcpp@60610 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-10-29 ldumitrescu solve rename issue, if the destination file exists. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48896 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-10-19 suerken [sp-auto-release (1.1.38) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48894 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.38) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48893 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f prepare 1.1.38. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48892 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Http::HeaderField: Bugfix: Allow empty header field values when parsing line. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48891 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f update unit tests... git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48890 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f add unit tests for empty header fiels values. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48889 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f http header tests: change all add(a,b) to add(line), so we also test line parsing. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48888 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-08-30 ldumitrescu changes in VC project files git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48887 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f again, min max windows bug git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48886 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f minor changes for windows compatibility git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48885 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-08-23 suerken [sp-auto-release (1.1.37) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48883 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.37) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48882 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f prep 1.1.37. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48881 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Recoder: rfc2047 encoder: Fix possible segfaults due to typo; add unit test for the segfault case. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48880 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-07-31 ldumitrescu - adding sp-utillcpp unit test project - adding libidna reference to sp-utilcpp git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48879 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-07-18 ldumitrescu adding idna lib paths git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48878 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-07-18 suerken Fix include order. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48877 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-07-18 ldumitrescu global space removed git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48876 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-07-11 suerken [sp-auto-release (1.1.36) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48874 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.36) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48873 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f prep 1.99.36. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48872 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f idnEMail recoder tests. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48871 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Recoder: Add "idn-email" (any-string w/ emails to string w/ IDN-encoded EMail domains) converter. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48870 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f add "idnEMail" converter. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48869 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-07-09 suerken [sp-auto-release (1.1.35) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48867 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.35) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48866 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f prepare 1.99.35. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48865 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Recoder: Add rfc3490 (International Domain Names, IDN) converter. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48864 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f rcf2046: Use new std::string directly for efficiency. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48863 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f rcf2046: Obsolete extra encode method. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48862 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f rcf2046:encode: input: Use char/size instead of std::string. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48861 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - todo: we use no flags. - comsetics. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48860 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f fix: strlen is std. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48859 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f idn: rm redundancy.. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48858 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f no need for extra scope git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48857 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f initial idn implementation. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48856 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f skeleton for idn encoding. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48855 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Add dependency to "libidn" (for IDNA recode facility). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48854 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f add check for rfc2047 encoding. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48853 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f const fixes. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48852 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-07-06 suerken activate rfc2047 in Recoder. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48851 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-07-06 suerken sp-utilcpp-1.1.35 (unstable) (NOT RELEASED): * Recoder: Add rfc2047 (MIME) converter. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48850 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-03-28 suerken again, and some more cosmetics. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48849 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f cosmetic fix: getId() should not be used in constructor. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48848 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f cosmetic fixes. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48847 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-03-13 suerken Fix: Move readline includes to *.cpp. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48846 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-03-12 suerken [sp-auto-release (1.1.34) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48844 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.34) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48843 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Prepare release 34. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48842 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-03-09 suerken * New Sys-Macros: getpwnam. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48841 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f rm check for prog perl: This was used together w/ doxygen test, whcih is now done via SP_DOXYGEN. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48840 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * New Sys-Macros: confstr,getconf (POSIX system configuration variables). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48839 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-03-08 mlaue No need to explicitly check for doxygen. SP_DOXYGEN does a better job. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48838 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-01-31 suerken new news skeleton. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48837 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Use 320 chars for script reading. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48836 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.33) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48834 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.33) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48833 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f prep 1.1.33. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48832 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-01-31 daniel Remove statvfs from Win32 build (no support for it under Win32). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48831 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Added uint64_t definition. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48830 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-01-30 suerken * Text.?pp: Switch to use boost's random to produce pseudo random alpha-numeric keys. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48829 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-01-25 suerken [win32] Remove "DiskInfo as quota method" hack from QuotaInfo. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48828 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Adjust win32 code from QuotaInfo && move to FsInfo. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48827 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f sort of "test" for FsInfo. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48826 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f FsInfo initial version. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48825 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2007-01-23 suerken update. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48824 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix ::statvfs macro: shoould be void. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48823 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Sys "macro support" for ::statvfs. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48822 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-11-21 daniel no message git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48821 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-11-13 suerken Fix warnings w/ g++ 4.1. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48820 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-11-08 suerken + * Having the SP_PROG_CXX c++ checker (rules out g++-2.95): Removed + all gcc 2.95 compat code. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48819 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-11-03 suerken [sp-auto-release (1.1.32) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48817 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.32) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48816 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Updates for sp-auto-0.2. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48815 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f increase margins for reltimestamp test; more suitable for busy systenms ;(. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48814 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-10-26 daniel no message git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48813 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-10-20 suerken Cosmetic: Use xplicit "long int" where only "long" was used. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48812 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-10-11 daniel Win32 fix for disk quota bigger than 4TB. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48811 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-10-09 daniel Added free disk check for Win32. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48810 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-09-06 suerken [sp-auto-release (1.1.31) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48808 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.31) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48807 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Prepare 1.1.31. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48806 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-09-04 suerken * Text: Some convenience stream operators. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48805 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-08-18 suerken [sp-auto-release (1.1.30) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48803 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.30) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48802 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f prep 1.1.30. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48801 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Add Http::Connection::getConnId() convenience method. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48800 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-08-17 suerken [sp-auto-release (1.1.29) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48798 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.29) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48797 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Prep. 1.1.29. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48796 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-08-16 suerken default for match, git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48795 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Fix: Use "const ref" for join() method. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48794 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Add "isToken()" for already existing StrVecs (speedup). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48793 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-08-01 suerken fixing typo in doxygen doc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48792 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-07-21 zachmann [sp-auto-release (1.1.28) run by tz@hugo.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48790 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.28) run by tz@hugo.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48789 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.28) run by tz@hugo.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48788 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.28) run by tz@hugo.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48787 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f o updated version git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48786 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f o added a perl like join method for strings git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48785 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-07-13 daniel Added convertPath function to fix Win32 paths in stat function. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48784 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-07-11 daniel no message git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48783 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-07-04 suerken fix indent. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48782 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.27) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48780 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.27) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48779 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f preparing 27. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48778 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * New text tool: str2ascii. * Http fix: Force pure ASCII values for any Headerfield. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48777 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-06-26 hund marginal reformatting git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48776 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f return a reference in non const strrpl() git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48775 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-06-15 daniel no message git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48774 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-06-09 suerken human redabale output for realtime stamp test.Add real time stamp unist test. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48773 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Add real time stamp unist test. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48772 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-06-08 suerken cosmetics: Use StrVec typedef. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48771 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-06-07 suerken [sp-auto-release (1.1.26) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48769 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.26) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48768 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f prep 1.1.26. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48767 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f some more doc updates. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48766 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f preparing 1.1.26. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48765 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Obsolete tool "misc" removed. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48764 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Bugfix File: Remove a number of now-obsolete exception specifications. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48763 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f update... git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48762 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f sys update _is_ completed. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48761 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Gor Exception HOWTO now. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48760 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - Exception HOWTO. - Include Text.hpp in Exception.hpp, not cpp. Remove note. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48759 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - Some fixes for exception classes. - Started exception howto. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48758 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - Add "mkdir" and "rmdir" - Some doc updtes. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48757 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f exception unit tests updates. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48756 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-06-01 daniel no message git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48755 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f no message git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48754 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f no message git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48753 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-05-31 suerken - Adding initial exception unit tests (one errno test only currently). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48752 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - SP_THROW_ERRNO, SP_THROW_CODE_ERRNO: Catching global errno early in these two macros to avoid the possibility that code in argument evaluation tampers w/ the value. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48751 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Cosmetics. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48750 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - Set default errNo to 0=Success (was global errno); this means exceptions not dealing w/ "errnos" always have getErrNo()==Success instead of "random", which is more reasonable. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48749 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Remove unused macros: SP_THROW_SP, SP_THROW_ERRNO_E. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48748 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - Sys::Exception: Making it non "Code" exception again (getErrNo() is already available in all exceptions were aplicable). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48747 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f space fix. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48746 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Exceptions: - Remove unsused macro SP_THROW_SP. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48745 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-05-29 suerken * PIDFile fix: Use chmod on file, defaults to "rw-r--r--". git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48744 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f space fix. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48743 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-05-25 daniel no message git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48742 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Win32 fixes. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48741 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-05-19 suerken * "Shortcuts.hpp" fix: Make sure all namespaces are defined. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48740 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-05-18 suerken [sp-auto-release (1.1.25) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48738 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.25) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48737 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Various doc/style fixes. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48736 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.25) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48735 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.25) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48734 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f prep 25. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48733 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f prep 25. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48732 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Count every started block. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48731 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Updaaaaaaaaaaaaaaaaaaaaaaaaaaaaargh............. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48730 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * QuotaInfo: Fix bug due to wrong struct comment in "linux version 2". * QuotaInfo: Clean up quota methods "linux version 1" and "linux version 2". git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48729 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Update linux quota, version 2 method. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48728 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Update linux quota, version 1 method. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48727 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f type in comment. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48726 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f chose more adequate name for quota methods. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48725 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Remove support for non-standard g++-2.95 code. Mark g++-2.95 compatibilty helper functions deprecated. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48724 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * QuotaInfo: Use "effective uid" as default (was: real uid). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48723 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f fix: use Sys-wrapper for getuid. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48722 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Initial fix for linux version 2 quota (but this needs a rewrite). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48721 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-05-11 suerken Mark getopt deprecated. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48720 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Add "Shortcuts.hpp" helper include. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48719 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fis desc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48718 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Update... git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48717 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Add descs for SP::Util:Http namespace. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48716 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Add descs for SP and SP::Util namespaces. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48715 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f More nice docs for Sys. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48714 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Update docs. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48713 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Remove some onsiolete/unmaintained doc cruft. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48712 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f error string typo fix. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48711 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Replace Sys:Exception by a CodeException (thus having errno transported up in exception object). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48710 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Rm include for win32 (Fix Nightly Test Warning). should be replaced now by STDC++ C header "ctime". git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48709 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - Add STDC++ C header "ctime". - Move includes gettimeofday et.all "sys/time.h" doen to "system c" git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48708 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-05-10 suerken [sp-auto-release (1.1.24) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48706 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.24) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48705 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Prep 1.1.24. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48704 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Rm seemingly obsolete bug note. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48703 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f cosmetci git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48702 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Fix all doxygen warnings (needs doxygen >= 1.4.6 [in bpo for debian]). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48701 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Don't warn for undocumented. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48700 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Better way to define sun_path; add note. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48699 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix: Use Sys::unlink. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48698 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Bugfix: UnixSocket: Protect sun_path C-string from being undefined when constructed via fd -- as it might be used in getId(). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48697 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.23) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48695 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.23) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48694 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Prepare 23. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48693 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-05-09 suerken * Sys-macros support for resource limits. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48692 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-05-08 daniel Win32 fixes. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48691 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-04-07 suerken [sp-auto-release (1.1.22) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48689 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.22) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48688 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f prepare 1.1.22. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48687 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * More Sys-macros around uid. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48686 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f fix news separator. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48685 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-04-06 suerken [sp-auto-release (1.1.21) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48683 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.21) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48682 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f preparing 1.1.21. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48681 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Recoder: Also add run(char,size) convenience method. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48680 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Add special recoder test from third source. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48679 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * RealTimeScope: No default stream on destructor (fixes cerr usage). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48678 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Replace std::cerr error handling by exception. in win32 code. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48677 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix type: WriteErr (not Read) on write. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48676 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-04-05 suerken [sp-auto-release (1.1.20) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48674 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.20) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48673 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Prepare 1.1.20. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48672 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f remove obsolete qualificatons. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48671 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Re-integrating context exceptions for EUIDSwap (we need that). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48670 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Bufix: Call ::getpid() ;). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48669 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Cleanup up system includes. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48668 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Update docs for daemonize. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48667 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f System includes cleanup: Time. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48666 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f System includes cleanup: Thread. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48665 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f System includes cleanup: Socket. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48664 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f System includes cleanup: Recoder. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48663 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - Obsolete icnovn include. - Yet more notes on Recoder make/run. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48662 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f cosmetic. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48661 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f + * "Sys::-Update": Recoder: iconv_open(3),iconv_close(3). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48660 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f System includes cleanup: QuotaInfo. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48659 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f System includes cleanup: Misc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48658 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * "Sys::-Update": PIDFile,getpguid(2). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48657 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f System includes cleanup: File. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48656 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f rm CloseErr_, really. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48655 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * File/Socket: Code cleanup; now-obsolete (by Sys::, we now catch down to throw matching the abstraction) exception codes removed: CloseErr_, SocketErr_, HostnameErr_, PathErr_, ReuseaddrErr_, SetuidErr_, PermErr_. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48654 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix: Proper Filedescriptor::Exception catch down for: read, write. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48653 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix in WIN32 code: Destructor should not throw; also uses obsolete "CloseErr_". git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48652 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fixing/simplifying UnixSocket constructor. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48651 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fixing/simplifying INetSocket constructor. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48650 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix: Using std::exception for Filedescriptor::Exception catch downs. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48649 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f cosmetic fixes. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48648 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f cosmetic fix: ifndef -> ifdef. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48647 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-04-04 suerken * "Sys::-Update": Time/gettimeofday(2),settimeofday(2). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48646 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix: Hiding timout/setsockopt win32 specials in special Sys::setsockopt_to. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48645 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * "Sys::-Update":Socket/chown(2),fcntl(2),socket(2),getpeername(2), getsockname(2),setsockopt(2),recv(2),send(2),listen(2),bind(2), connect(2),select(2),socketpair(2) * Exception: Rm SP_THROW_CODE_ERRNO_E macro: No longer needed w/ Sys. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48644 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Recoder: Adding run(char const *) for convenience. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48643 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-04-03 suerken File/Socket: Renaming stdRead/stdWrite to read/write. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48642 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix: we should use std::memset. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48641 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * "Sys::-Update": BSD/POSIXLock/fcntl(2),flock(2). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48640 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * "Sys::-Update": FileDescriptor/open[m](2),read(2),write(2). - Rm obsolete FileDescriptor::read/write wrappers. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48639 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * "Sys::-Update": File/[fl]stat(2),getenv(2). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48638 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Rm now-obsolete "non-error handling" get() method. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48637 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-03-31 suerken * "Sys::-Update": IConv|b64Converter:malloc(2),calloc(2),free(2). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48636 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Recoder(librecode): Fix: Move "task" into the factory level (i.e. Converter::make()) as this obviously can't be thread-safe. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48635 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Recoder(librecode): Fix deletion order. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48634 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Sys::-Update: QuotaInfo/quotactl(2). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48633 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f update todo. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48632 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Sys-update: Misc:EUIDSwap/seteuid(2)+setegid(2). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48631 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * "Sys::-Update" completion: Misc/realpath(3) git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48630 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix: realpath() impl -> Misc.cpp, not Text.cpp. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48629 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Doc update. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48628 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * "Sys::-Update" completion: CmdLine/sleep, git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48627 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Recoder: Renaming all factory calls "run" to "make", so nobody has excuses any more ;). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48626 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-03-30 suerken [sp-auto-release (1.1.19) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48624 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.19) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48623 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f prepare 1.1.19. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48622 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f update todo. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48621 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * REMOVING PROPOSED OBSOLETE: AtomicMutex, NaiveCloneThread (also purges --enable-linux-atomic configure option). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48620 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Add yet another note that returned Conversion's are factoried. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48619 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Add note for recoder cache. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48618 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f RecoderCache: Fix key to saveguard against ambiguities. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48617 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Using RecoderCache for recode unit tests. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48616 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-03-30 daniel no message git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48615 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-03-29 suerken + * New RecoderCache singleton to cache recoders (speed improvments && + workaround against librecode memory leaks). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48614 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-03-23 suerken [sp-auto-release (1.1.18) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48612 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.18) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48611 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Prep 1.1.18. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48610 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Sys: add chmod,system. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48609 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * PROPOSED OBSOLETE: AtomicMutex, NaiveCloneThread. Will be removed on next release unless there are vetos. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48608 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - Update to void start(). - Rm NaiveCloneThread part. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48607 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f News update. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48606 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Lot more updates SYS updates: Thread+File. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48605 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f + * Thread: New fd2DevNull helper tool. + * Thread: Harden "daemonize" to reopen std fd's 0,1,2 to protect + against library xyz reading from/writing to fds. + * Updates to Sys:: Thread, git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48604 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix: Missing impl for Sys::Exception. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48603 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Add getpid,getppid,waitpid. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48602 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Add umask,chdir,fork,setsid. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48601 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * New Sys.?pp: Long-due "ernno exception" drop-in replacements for system(2) and library(3) calls. * Sys::open,close,dup,dup2. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48600 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-03-22 suerken [sp-auto-release (1.1.17) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48598 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.17) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48597 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f prepare 1.1.17. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48596 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * --disable-linux-atomic -> --enable-linux-atomic: Opt-in, as this is non-standard. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48595 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f + * Separate File.?pp into File.?pp + Socket.?pp (confusing, too much code). + * Text: Remove tool function "sha1sum" as this is not used, unavaible + for win32 and code is missing in newer libcommoncpp2 upstreams + (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=352122). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48594 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * File: New helper class "AutoRemoveFile". git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48593 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-03-16 daniel There's no ::socketpair for WIN32 build. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48592 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-02-28 suerken Seems win32 needs this ifdef ? git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48591 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.16) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48589 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.16) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48588 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Prepare 1.1.16. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48587 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * QuotaInfo: Fix compile for newer systems using _LINUX_QUOTA_VERSION = 2 for 2.6 style quota. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48586 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-02-27 suerken * File: PIDFile: Check for pid file existence. Default is now to throw if found (was: overwrite silently). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48585 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * File: New "SocketPair" abstraction (helps writing tests for protocols). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48584 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-02-17 suerken fixes for scope time log helper (destructor does not call virtuals ;). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48583 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.15) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48581 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.15) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48580 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Prepare 1.1.15. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48579 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-02-16 suerken Time: Add ScopeRealTime class (easy latency logging for scopes). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48578 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-02-14 suerken Http::URL: addParam() support; generate URL(). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48577 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-02-14 daniel no message git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48576 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-02-09 suerken [sp-auto-release (1.1.14) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48574 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.14) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48573 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Prepare 1.1.14. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48572 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Updating to new Http::URLGet. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48571 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Typos, format. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48570 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Http: Update Exception for debug support; use SP_THROW for all exceptions. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48569 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix: inet "port" should be unsigned. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48568 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f rm cerr debug output. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48567 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Update. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48566 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix: "/" even if we only have query. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48565 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Use localhost rather that external url. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48564 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Http: Add Http.hpp for convenience: Include all http headers. * Http: New class URL: Parse HTTP URLs (rfc 2616, 3.2.2). * Http: New class URLGet: Simple HTTP GET impl. based on given HTTP URL. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48563 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Http: StatusLine: Allow status lines w/o "reason" text. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48562 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-02-07 suerken * Bugfix strerror(errNum): Actually use errNum arg, not errno. * Exception: Updated Exception base class internals update; new errno macros "*_E" to give errNo explicitely. * Bugfix File: Fixes w/ new *_E macros where appropriate (fixes wrong errno messages in some circumstances). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48561 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-02-06 suerken Shoukld be a const ref. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48560 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * File: Exception "errno" error handling: Make sure error strings don't inlcude calls changing errno. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48559 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-01-31 suerken [sp-auto-release (1.1.13) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48557 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.13) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48556 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f new release- git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48555 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix: Missing virtual destructor. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48554 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-01-30 suerken + * File: New tools: getenv(), PIDFile class, guessConfFile. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48553 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-01-26 daniel no message git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48552 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f stdlib.h has a #define max, so we need to undefine it first. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48551 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Added PATH_MAX support for Win32 build. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48550 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-01-25 suerken [sp-auto-release (1.1.12) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48548 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.12) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48547 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Prepare 1.12. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48546 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix ignore. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48545 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Text: strerror(int) now defaults to strerror(int=error). * Text: Separate "PosixRegex" into own header to avoid include wars. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48544 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-01-20 suerken Follow suite: Header/Impl listing. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48543 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-01-19 daniel We don't have support for SHAxxx in CommonC++. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48542 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Small fix for WIN32 build. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48541 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-01-18 suerken "Errno" static constatnt should be named "Errno_". git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48540 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-01-17 suerken Fix: Missing include. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48539 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-01-11 suerken * _More_ socket id fixes: - Fix possible random c-string w/ getPeerId/UnixSockets. - Enable ids when not connected/bound. - Remove obsolete UnixSocket::getPath(). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48538 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - Renicing getsockname helper. - Adding memset/0. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48537 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix stupid mistakes. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48536 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-01-10 suerken New NEWS skelton; Text: New tool strVec2Str. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48535 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-01-05 suerken [sp-auto-release (1.1.11) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48533 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.11) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48532 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 1.1.11. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48531 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Sockets::getId() should now finally work reliably. Honest. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48530 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Yet more fixes to finally get getId(9 reliably work. sigh. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48529 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - Fixing stream order for connect() (right-to-left!) - Rm some obsolete code. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48528 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - Sockets:bind/connect/listen: Now all return *this for convenience. - New NEWS skeleton. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48527 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Use all names fq. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48526 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Make this work for both: inet and unix sockets. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48525 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - Fix: Socket::bind() virtual (like connect()). - UnixSocket::bind/unixBind(): Default for silentUnlink now "true". git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48524 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-01-05 hund Added missing #include git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48523 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-01-04 suerken Return of Socket::sockaddr2id nonvirtual, to allow Socket::getId(). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48522 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.10) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48520 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.10) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48519 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Preparing 1.1.10. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48518 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Renicing. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48517 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Inet id: Fix forgotten "ntoh" macron on port. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48516 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix: Use virtual sockaddr2id rather that switch. Reorder socklen/sockkadr2id (Socket,UnixSocket/INetSocjet). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48515 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2006-01-03 suerken * Sockets: Fixing wrong socklen usage for getId()/getPeerId(). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48514 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f UnixSocket: Silent unlink support for destructor. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48513 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-12-30 suerken [sp-auto-release (1.1.9) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48511 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.9) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48510 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Preparing 1.1.9. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48509 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-12-29 suerken * SetCookie/SetCookies: Const/add(key) -> Const/add(key, value="") for convenience. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48508 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - SetCookie: Support for defaults on composition (expires, path, domain). - Other fixes cnd changes. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48507 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f update build system to use CommonCPP "--stdlibs" (includes ccext2 w/ digests). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48506 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-12-28 suerken * Text: New tool functions md5sum, sha1sum. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48505 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-12-27 suerken typo fix. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48504 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-12-23 suerken Text fix. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48503 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Text fis. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48502 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Text: Replacing some strange/posiible danferous usage of string constructor w/ explicit resize(). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48501 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Cosmetic fix. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48500 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Style fixes, rm obsolete note. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48499 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-12-22 suerken prefix support fer SetCookies::getHeader(). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48498 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f SetCookie prefix support for getLine(). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48497 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - new skeletin. - Cookie: Add prefix support for cookie names git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48496 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Cookie: Add prefix support for cookie names: Unit Tests. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48495 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Cookie: Add prefix support for cookie names. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48494 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-12-20 suerken [sp-auto-release (1.1.8) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48492 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.8) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48491 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Preparing 1.1.8. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48490 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Add --disable-strerror (to fix known strange segfaults on static compilations running under wrong libc). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48489 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * Add Util::strerror (wrapper for ::strerror(3)); replacing all calls. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48488 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-12-19 suerken [sp-auto-release (1.1.7) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48486 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.7) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48485 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Preparing 1.1.7. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48484 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix: Use big letters. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48483 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix SetCookie parsing problem (Heiko). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48482 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f urlencode fix: Encode non-ASCII bytes. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48481 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f urlencode/decode: Some _even more_ notation fixes befroe upcoming bug fix. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48480 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f urlencode/decode: Some _more_ notation fixes befroe upcoming bug fix. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48479 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f urlencode/decode: Some notation fixes befroe upcoming bug fix. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48478 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Adding test for urldecode/ascii bug. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48477 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-12-16 suerken Add one SetCookie test (simple parsing fails). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48476 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-12-15 suerken win32 fix: Adding a note so no one is tempted to change the code back. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48475 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-12-15 daniel Fixing Win32 exceptions. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48474 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-12-15 suerken Adding bug note for url converter(instead of fixing it ;) git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48473 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-12-12 daniel I've defined a gmtime_r function also for Windows build. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48472 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f no message git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48471 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-12-07 suerken * Text.hpp: Add StrVec, StrList, StrMap convenience shortcuts. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48470 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-12-05 suerken Update (pthread). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48469 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix: pthread dependency. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48468 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f New skeleton, update. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48467 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix: Use _LIBADD, not _LIB (ccgnu2 library dependency). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48466 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-12-02 suerken [sp-auto-release (1.1.6) run by absurd@manwe.use.schlund.de]: Automatically updated from vc. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48464 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f [sp-auto-release (1.1.6) run by absurd@manwe.use.schlund.de]. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48463 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Preparing 1.1.6. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48462 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f SetCookie/SetCookies: - rm check(). - chekcs must be done by individual setVALUE methods. - Fixing setLine to reset all values (this is what one would expect). - Many doxygen doc fixes. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48461 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f SetCookies: - parse -> setLine(), public. - Add setName(). - Fix doxygen docs. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48460 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Cookies: - parse -> add, public. - Fix doxygen docs. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48459 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Making gmtime ifdef fix s/w nicer. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48458 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix: Use non-thread-save-guaranteed gmtime() for win32 only. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48457 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-11-29 daniel gmtime_r call was replaced with gmtim call because there's no gmtime_r on Windows build. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48456 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-11-28 suerken Fixing CXX2 check (workaround). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48455 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fixing xfs include. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48454 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-11-18 suerken "%T" not ISO C++ (-pedantic warning). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48453 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-11-18 hund * fixed some bugs in cookie code * overloaded SetCookie::setExpire() to also take a unix timestamp * set up a couple more unittests git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48452 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-11-07 suerken Cosmetics. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48451 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fixing some extra ";". git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48450 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-11-04 suerken Fixing forgotten Cookie header (install). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48449 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Updates... git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48448 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Moving code from .hpp -> .cpp: Fixing includes. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48447 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Moving code from .hpp -> .cpp: Cookies. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48446 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Moving code from .hpp -> .cpp: Connection. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48445 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Moving code from .hpp -> .cpp: Header. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48444 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Moving code from .hpp -> .cpp: StatusLine. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48443 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Moving code from .hpp -> .cpp: Exceptions, RequestLine. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48442 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-10-26 suerken - All Connection::write* now return *this. - Header::getDebug() -> Header::get() (composition) real method. - Header::get(): Using Connection/strstream, removing redundant code from Header. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48441 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-10-26 suerken UPDATE for: - Shortcut utilities to write StatusLine/RequestLine. - Some osmetics/dox updates. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48440 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-10-26 suerken - Shortcut utilities to write StatusLine/RequestLine. - Some osmetics/dox updates. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48439 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-10-26 suerken UPDATES for: - Reordering and doc updates for utility functions. - Just use "write" (inst. of writeHeader, writeHeaderField etc..) as method name wherever possible (let arguments determine semantics). - rm now obsolete readBlock(char *, size). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48438 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-10-26 suerken - Reordering and doc updates for utility functions. - Just use "write" (inst. of writeHeader, writeHeaderField etc..) as method name wherever possible (let arguments determine semantics). - rm now obsolete readBlock(char *, size). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48437 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - verifyVersion method to cpp. - RequestLine: Make str2Method public. - StatusLine: setCode(string) helper. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48436 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fixing http helper lib addition. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48435 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - Removing redundancies in http version verification (request/status line). - Some doc updates. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48434 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Some doc updates. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48433 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Some cosmetics and doc updatzes. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48432 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Abbr. getLine() to more appr. get(). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48431 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-10-26 suerken UPDATES FOR: - Properly(*) impl. request line. (*): Code is int, setCOMPONENT methods w/ validation, default constr/assignment, no redundancies. - Many doxygen fixes. - number of various fixes and updates. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48430 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-10-26 suerken - Properly(*) impl. request line. (*): Code is int, setCOMPONENT methods w/ validation, default constr/assignment, no redundancies. - Many doxygen fixes. - number of various fixes and updates. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48429 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-10-26 suerken - fis status code 100->200 in http test. - Updates for: Properly(*) impl. status line. (*): Code is int, setCOMPONENT methods w/ validation, default constr/assignment, no redundancies. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48428 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-10-26 suerken Properly(*) impl. status line. (*): Code is int, setCOMPONENT methods w/ validation, default constr/assignment, no redundancies. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48427 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-10-24 suerken - Connection: Adding const s() - Exceptions: Dropping IO errors -- we only throw HTTP errors. Fixing redundant HTTP text in all error texts. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48426 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f using flush method driectly. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48425 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Some cosmetics. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48424 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - Using s() to get stream. - Removing non-http stream fucntions. - Removing all (logocally wrong) const on read/write methods. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48423 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Update for new Connection code. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48422 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-10-17 daniel no message git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48421 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Small WIN32 fixes. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48420 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-10-12 suerken Show connection peer address git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48419 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Add getId() and getPeerId() from Socket. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48418 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Update (socket ids). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48417 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Exception:getErrno(): Doping that to take errno parameter (defaults to global errno). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48416 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f * File: Socket implementation: Fix up getId() to generically use getsockname(); Add getPeerId() using getpeername(). git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48415 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-10-11 suerken - Add Exception (code exception, HttpErr, IOErr) for namespace. - "Normalize" all error descriptions. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48414 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-10-10 suerken NEWS update. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48413 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Updates for new cookie code. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48412 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Many changes. Initial check in of (hopefully) all features + some testing. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48411 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Using "EmptyString" helper; thus get() may deliver const ref. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48410 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Adding "empty string" static helper. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48409 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-10-06 suerken - Switch I|OHeader* to one unified Header* Rationale: Code should use "const" wisely later; saves overhead. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48408 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - Switch I|OHeader* to one unified Header* Rationale: Code should use "const" wisely later; saves overhead. - Fix: Remove erratic empty c'tor for RequestLine. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48407 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f todo/reminder update. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48406 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Add some reminders for http. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48405 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f - Initial file skeleton for cookie support. - Initial "request cookie" support (parser only). - Initial "request cookie" unit tests. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48404 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Disable verbatim headers. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48403 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Proper doxygen des for getDebug. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48402 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-10-05 suerken Some cosmetic enhances for debug code. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48401 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f Fix: getDebug() -> IHeader. git-svn-id: https://svn.1and1.org/svn/ssr/cvs-import/sputils/trunk/sp-utilcpp@48400 68a9b8fe-1ee0-0310-b702-80ecccfdeb3f 2005-10-04 suerken - Add "debug" support for headers. - get